Recommended Posts

JouNin    0

Will custom art be supported?

I want alphabet neon tiles.
To indicate the room name, the contents of the pipe, a dangerous place, etc.

If it is a dedicated compression format for animation, I feel that I need a tool.

Share this post


Link to post
Share on other sites
Nightinggale    951
9 hours ago, JouNin said:

Will custom art be supported?

It looks like it's already supported. The log claims to look for custom art when the game starts and the assets class in the source code has gained the ability to store art (kanim) from mods. The question is how to use it. Looks like everybody are waiting for the promised modding tutorial.

The only big issue I have with waiting is it means no test of the modding system. If we don't get the tutorial prior to launch, then nobody will use/test it prior to launch and we risk a launch with buggy mod support.

Share this post


Link to post
Share on other sites
Lurve    364

I just wanted to add a quick note missing in the OP: the non-Steam mod folder for Linux users is

~/.config/unity3d/Klei/Oxygen Not Included/mods/Dev

 

Share this post


Link to post
Share on other sites
Nightinggale    951
3 minutes ago, Lurve said:

I just wanted to add a quick note missing in the OP: the non-Steam mod folder for Linux users is

~/.config/unity3d/Klei/Oxygen Not Included/mods/Dev

There are two folders. One is local, the other is dev (not sure about case on case sensitive disks). What we are told is that players should use local while mod creators should use dev. It looks like the difference is that if a mod crashes, ONI will disable all mods, except if at least one mod is loaded from dev. This means if you use dev, you have an easier time fixing your own crashing mod, but at the same time you can lock the game and not be able to reach the mod menu. This means if you use dev, be prepared to manually edit mods.json (in the mods folder) or remove it to disable all mods.

Share this post


Link to post
Share on other sites
Lurve    364
Posted (edited)
10 minutes ago, Nightinggale said:

There are two folders. One is local, the other is dev (not sure about case on case sensitive disks). What we are told is that players should use local while mod creators should use dev. It looks like the difference is that if a mod crashes, ONI will disable all mods, except if at least one mod is loaded from dev. This means if you use dev, you have an easier time fixing your own crashing mod, but at the same time you can lock the game and not be able to reach the mod menu. This means if you use dev, be prepared to manually edit mods.json (in the mods folder) or remove it to disable all mods.

It is case sensitive.  I would strongly advise using Dev for now, because Local will get caught in infinite restart loops if version information is not available in a mod.  Dev (usually) gives you a stern warning and lets you proceed anyway.  I'm currently making a topic in the mod forum about this.

[ETA] No, it's some kind of hash check that's always returning that content has changed, not a versioning problem.

Edited by Lurve

Share this post


Link to post
Share on other sites
SakuraKoi    570
Posted (edited)
On 18.4.2019 at 11:28 PM, KleiChrisP said:

Right you are. No files in the 'templates' directory were being handled in such a way as to be moddable. The fix is in and will be available to you in an upcoming patch.

[imagine the voice of a 2.10 meter tall body builder] Is it there yet? Is it there yet?!

UPDATE: Question still open but at least I made it (to sum it up: too much new code)

I mean to ask (after holding so long off) because now there is something worse than a mod not working and having to decipher the errors&find the mistakes, namely it is having a mod not work and not having any actual (relevant) errors. I intended to port/update an old mod to the launch preview and modify it but after having it constantly crash when the world selection screen should pop up, I moved it to the intended mod folder after facing no more errors (but still the crash).

While moving it helped, it then showed a bugged world selection and attempting to generate a world (in vain though, it is stuck). The output log constantly repeats:

Spoiler

(Filename: /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs Line: 635) 

[TIMSTAMP][1] [INFO] Error occurred with mods active. Disabling all mods (unless dev mods active).
ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
  at System.Collections.Generic.List`1[System.String].get_Item (Int32 index) [0x00024] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:635 
  at DestinationSelectPanel.RePlaceAsteroids () [0x000ec] in D:\JenkinsWorkspace\Preview_Simgame_Windows\game\Assets\scripts\ui\DestinationSelectPanel.cs:153 
  at DestinationSelectPanel.Update () [0x0013b] in D:\JenkinsWorkspace\Preview_Simgame_Windows\game\Assets\scripts\ui\DestinationSelectPanel.cs:130 

headed by a slightly longer version

Spoiler

[13:26:26.808] [1] [INFO] Error occurred with mods active. Disabling all mods (unless dev mods active).
ArgumentNullException: Argument cannot be null.
Parameter name: key
  at System.Collections.Generic.Dictionary`2[System.String,ProcGen.SubWorld].ContainsKey (System.String key) [0x00099] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:474 
  at ProcGen.SettingsCache.LoadSubworlds (System.Collections.Generic.List`1 subworlds, System.Collections.Generic.List`1 errors) [0x0004b] in D:\JenkinsWorkspace\Preview_Simgame_Windows\game\Assets\Plugins\Klei\worldgen\WorldGenSettings.cs:203 
  at ProcGen.SettingsCache.LoadFiles (System.Collections.Generic.List`1 errors) [0x00212] in D:\JenkinsWorkspace\Preview_Simgame_Windows\game\Assets\Plugins\Klei\worldgen\WorldGenSettings.cs:380 
  at ProcGenGame.WorldGen.LoadSettings () [0x00008] in D:\JenkinsWorkspace\Preview_Simgame_Windows\game\Assets\scripts\worldgen\WorldGen.cs:178 
  at NewGameSettingsPanel.Init () [0x00016] in D:\JenkinsWorkspace\Preview_Simgame_Windows\game\Assets\scripts\ui\NewGameSettingsPanel.cs:48 
  at ColonyDestinationSelectScreen.OnSpawn () [0x0000d] in D:\JenkinsWorkspace\Preview_Simgame_Windows\game\Assets\scripts\ui\ColonyDestinationSelectScreen.cs:42 
  at KMonoBehaviour.Spawn () [0x00075] in D:\JenkinsWorkspace\Preview_Simgame_Windows\game\Assets\Plugins\Klei\util\KMonoBehaviour.cs:284 
Rethrow as Exception: Error in ColonyDestinationScreen2.ColonyDestinationSelectScreen.OnSpawn
  at KMonoBehaviour.Spawn () [0x000bf] in D:\JenkinsWorkspace\Preview_Simgame_Windows\game\Assets\Plugins\Klei\util\KMonoBehaviour.cs:291 
  at KMonoBehaviour.Start () [0x00011] in D:\JenkinsWorkspace\Preview_Simgame_Windows\game\Assets\Plugins\Klei\util\KMonoBehaviour.cs:242 

Complete outputlog and mod can be found in the attachments (put MagmaMod2 folder into \Documents\Klei\OxygenNotIncluded\mods\local and enable ingame)

tl;dr JEEEEEEENKINS!

(any help from anyone would be appreciated)

 

 

Edited by SakuraKoi
fix'd et

Share this post


Link to post
Share on other sites
Lurve    364

Your FrozenCore trait file is missing the additionalUnknownCellFilters tag.  Compare it with the vanilla one.

  • Thanks 1

Share this post


Link to post
Share on other sites
SakuraKoi    570
8 minutes ago, Lurve said:

Your FrozenCore trait file is missing the additionalUnknownCellFilters tag.  Compare it with the vanilla one.

Welp, that's one issue fixed, it must have ended up going missing somewhere. Now that alone still did not help to create a word but I also found some other mistakes while comparing. After this and that, I ended up with the magma biome being replaced by some others even though it should be in line with the new system. Dis gonna be a PITA. Something about tags... might as well rewrite the worlds to really just replace Bottom with the two new.

Then finally...

Spoiler

it worked :wilson_cry:(<-Happiness) 

20190715172544_1.thumb.jpg.892a10276fc9c00226ead4e495c84670.jpg

Though there are a few more kinks to work out, with which I do not mean the hydrogen bombs but Rime which has to little space to handle all these biomes

 

Share this post


Link to post
Share on other sites
test447    19

Hello @Ipsquiggle I was hoping you could provide the modding community with an update on Klei's intentions with regards to providing tools for creating modded art assets for the game.

The current system allows for modders to load custom art assets through the `anims` folder as long as modders make Unity AssetBundles out of their work. However in order to make an AssetBundle it requires downloading a full install of Unity which seems unfortunate for modders. Is this going to be the expected workflow going forward for packaging modded assets for use in Oxygen Not Included mods?

Additionally it is currently possible to retexture existing animations by simply pairing a modified png texture with the existing animation and build file. Two examples of workshop mods that do this are https://steamcommunity.com/sharedfiles/filedetails/?id=1810801031 and https://steamcommunity.com/sharedfiles/filedetails/?id=1810563583. However the modding community would certainly like to be able to load entirely custom animations into the game. I understand that the don't starve modding tools provide a way for community Spriter projects to be converted into klei animation files but the don't starve modding tools converter is creating an older version of klei animation file format that Oxygen Not Included does not support. Does Klei intend to provide a Spriter project to klei animation file format converter for the game's launch or would community efforts to create a converter (like this one https://github.com/daviscook477/kparser) be a worthwhile investment of the modding community's time? Thank you very much.

 

A cute example of a custom texture and custom animation loaded into the game using that above tool: epO6TrQ.jpg

  • Like 1

Share this post


Link to post
Share on other sites
Nightinggale    951
8 hours ago, test447 said:

However in order to make an AssetBundle it requires downloading a full install of Unity which seems unfortunate for modders.

I second this 100%. To me the few GB download and HD space isn't the main issue (it is for some), but rather how difficult it is to get started. Extracting an existing anim to png, modify it to your liking and then put it back in the game is like 30 steps and it's not like they are trivial. This makes the learning curve for modded graphics way too steep. If the learning curve is too steep, we will see that a bunch of mods will continue to use the current reuse of vanilla kanims, perhaps with altered tint colors.

What I view as the perfect intro level for modded anims would be to allow people to extract the current ones as png (which is easy. There are programs for that). Then add the extracted png and somehow tell the game with _build and _anim to use with it and which kanim string to use ingame for the anim in question. People can then draw new stuff in the png because they know which part goes where for passive/active. It shouldn't replace the current setup, but rather it should be an addition for the majority of modders.

One thing to remember is that Klei hires educated people for programming, graphics etc, meaning there are expects with prior knowledge for each task. A modder is often alone and can't be trained expert in all fields. More often than not, a modder is self taught in all fields. This means good mod support require targeting multiple skills levels. In this case the two types of modders to support would be those who can make their own build and anim and the type of modder, who can figure out how to draw on a png in paint.net or similar. Sure the latter will have limitations as it is fixed which parts will be used as sprites to cycle through when a building is active or whatever, but it would be an acceptable limitation for somebody lacking the background to make the build or anim parts, hence giving them the choice between the png only approach or no custom graphics.

 

Also we lack a good feedback system for mod support issues. There is the modding subforum, but it's also used for mod requests and announcing mod creations. We need something, which is dedicated as mod creators to Klei. Something like a bug tracker specifically for modding issues/limitations. There is the bug tracker, but it's bad because it mixes modding issues with non-modding issues and it's holding me back from reporting issues I encounter. I'm feeling bad each time I report something because I know I report a bug, which regular players won't see, making it questionable what to call that type of bug. There is an example of a bug only affecting modders.

 

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites
Nightinggale    951

@Ipsquiggle I have a feature request. Add a Storage field to each input/output element in ElementConverter and EnergyGenerator. Make it default to NULL, in which case the code should use the current storage, which is set with [MyCmpReq]. Semi-related it would be nice if the current storage would be public (it's currently private).

The problem is currently the same storage component is used for all inputs and outputs. You might not want coal, polluted water and carbondioxide in the same storage, but that's what you can get with the current code. This results in various modding limitations when designing new or modded buildings.

I can create my own components to solve the problem, but doing so will really hurt mod compatibility. If two mods use the same instance of a component like ElementConverter, then both mods can work just fine together. If one or both replaces it with a different component (same, but modded under a new name), then the two mods will no longer work together.

Mod compatibility is a topic, which is surprisingly absent from the forum, maybe because it is viewed as the fault of the modder each time it happens. It has happened to me twice in the last two months. Both were incompatibility issues between my own mods, meaning I was clearly to blame. However it likely won't be the last compatibility issue anybody encounter and it would be nice to avoid cases, which are prone to causing such issues. The last case was due to replacing a component with a modded one and then another mod looking for the original component name and didn't find it. Adding more configuration freedom to the vanilla components will greatly reduce the need to replace those components, which in turn will greatly reduce the risk of this type of compatibility issue.

Share this post


Link to post
Share on other sites
Nightinggale    951

Another code change request: IBuildingConfig shouldn't use virtual methods. Use abstract instead and fill in empty methods in each config class.

The problem is that the virtual methods is prone to causing bugs when using Harmony. Say you want to add a postfix to DoPostConfigurePreview. Harmony will do that just fine and won't complain about anything. However if DoPostConfigurePreview isn't in the building, the method being patched will be the default empty methods in IBuildingConfig. This means the mod applies the change to every single building without DoPostConfigurePreview.

The result is that the building your mod will behave as expected since it will call your modded code as expected, but other buildings will break. This means you can mod OilRefineryConfig and then AlgaeHabitatConfig breaks. Since it's not obvoius to the modder and the oil refinery works fine when tested ingame, there is a high risk that the mod will be released with said bug. Tracking down which mod breaks the algae terrarium will then be hard because nobody will make the connection to the oil refinery.

This can't happen with abstract methods because then there will be a method assigned to each building without any shared empty methods.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now