[1.3] [KV] In-Game Definition Editor [ModSync-RW]

Started by Kiame, November 19, 2018, 12:39:59 AM

Previous topic - Next topic

Kiame

Press  [  (default) to open the window.

A Definition (Def) is what defines almost everything in RimWorld.

Defs that can be edited currently:
-Apparel
-Backstories
-Biomes
-Difficulty
-Hediffs
-Indigestible
-Projectiles
-Recipes (aka bills)
-Story Tellers
-Thoughts
-Traits
-Weapons

This mod will continue to be updated as new definition types are added.

Can be added to and removed from existing saves.

Please let me know if you run into any issues.

Troubleshooting
At any time if you have an issue with this mod at game load you can delete the file called "stats.xml" located in:
C:\Users\<username>\AppData\LocalLow\Ludeon Studios\RimWorld by Ludeon Studios\InGameDefEditor
Replacing "<username>" with your Windows user name

Things to be aware of
Traits
Traits are structured in a tiered system. What this means is not all Traits will be initially visible and you'll have to find the parent Trait-type, select it, then scroll to the child trait.
For instance move speed:
SpeedOffset is the parent TraitDef
slowpoke, fast walker, and jogger are the Traits assigned to pawns
Recipes
When editing a recipe there are a wide range of items that can be selected as "Allowed Defs". Not all will work in all cases though. If editing the club recipe and "Cat" is added as an ingredient, a pawn will use a "Cat" as an ingredient but that will cause an endless number of exceptions because "Cats" are not a compatible ingredient. (as this mod grows it might be possible to label a Cat as a "Stuff" so I am currently not going to change it)

Other notes
Currently when adding Defs to ingredients the list is very long. I would like to explore ways to make adding defs quicker by adding a search field.


Steam: https://steamcommunity.com/sharedfiles/filedetails/?id=1568772413

Direct Download:
1.3

Consider using ModSync-RW to know when new version are available.

GitHub: https://github.com/KiameV/rimworld-ingamedefeditor


Like my mods? Consider supporting me!





Operative85

Hey, Kiame! I've been having a problem. I can't seem to get this mod to load. Any ideas? Here's the log. Thanks so much!

Exception from asynchronous event: System.ArgumentNullException: Argument cannot be null.
Parameter name: key
at System.Collections.Generic.SortedDictionary`2<string, Verse.RecipeDef>.set_Item (string,Verse.RecipeDef) <0x00107>
at InGameDefEditor.Defs.Initialize () <0x005bd>
at InGameDefEditor.IOUtil.LoadData () <0x000b6>
at InGameDefEditor.Patch_SavedGameLoaderNow_LoadGameFromSaveFileNow.Prefix () <0x00014>
at (wrapper dynamic-method) Verse.SavedGameLoaderNow.LoadGameFromSaveFileNow_Patch1 (string) <0x0001c>
at Verse.Root_Play.<Start>m__0 () <0x0002d>
at Verse.LongEventHandler.RunEventFromAnotherThread (System.Action) <0x00042>

Verse.Log:Error(String, Boolean)
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.LongEventHandler:<UpdateCurrentAsynchronousEvent>m__1()

Kiame

#2
Which version do you have? Yesterday's update hopefully prevents that

It very well could still not work though. It appears that some mods don't define labels when they should be. Let me know if it is still broken  :)

Operative85

I've just updated and it works now! Thank you so much!

And one more thing, will you be adding the Plant Defs soon? If not, can you please teach me how to make my trees immortal? I've figured it out for the flowers, not so much with the trees.

Once again, thank you!

Kiame

I never looked into plant defs. I'm planning on thoughts next, then traits probably.

Operative85

Alright! Thanks so much and Godspeed on your endeavor! :)

Kiame

 O should have added, what I'll add next is up in the air, trees/plants seem interesting though.

On vacation this week so don't expect much for the rest of this week  :)

Operative85


Crow_T

cool mod, this should save time digging through core.
(regarding dead man's apparel)
"I think, at the very least, the buff should go away for jackets so long as you're wearing the former owner's skin as a shirt."
-Condaddy20

Kiame


Kiame

#10
Update:
Persistence should be working again. Sorry about that!
Added a good amount of logging and code to alert me when i break something  :-[

Kiame

Update:
Due to issues with recipes I've disabled them for now. Opening the editor for the first time may cause an error to come up and possibly a loss of settings for other defs (sorry)

I am going to look into ways to mitigate these problems going forward and better protect settings that may have already been applied for other def types.

A heads up:
As part of the mitigations (and for future expansion of the mod) I think i will use this time to rethink how I'm persisting settings (last time i really hope) so any previous settings will probably be lost. So for the next few hours don't go crazy editing everything.

Thank you all for bearing with me as I figure all this out!

Operative85


Kiame

Update:
Re-wrote how settings are saved. Doing this will make sure that if a problem does come up only one Def-type will be lost and not all settings. (other changes as part of this will make adding new defs faster)
As part of this all previous settings will be lost. (I really hope this is the last time this'll happen, sorry!)

Added more settings to weapons

Kiame

#14
Update:
Added the ability to modify Trait defs

Important note:
Traits are structured in a tiered system. What this means is not all Traits will be initially visible and you'll have to find the parent Trait-type, select it, then scroll to the child trait.
For instance move speed:
SpeedOffset is the parent TraitDef
-slowpoke, fast walker, and jogger are the Traits assigned to pawns