Ludeon Forums

RimWorld => Mods => Tools => Topic started by: Kiame on November 19, 2018, 12:39:59 AM

Title: [1.3] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on November 19, 2018, 12:39:59 AM
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 (https://github.com/KiameV/rimworld-ingamedefeditor/releases/download/1.3/InGameDefEditor.zip)

Consider using ModSync-RW (https://ludeon.com/forums/index.php?topic=41634.0) to know when new version are available.

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


Like my mods? Consider supporting me!
(https://i.imgur.com/i08683D.png) (https://ko-fi.com/kiamev)

(https://steamuserimages-a.akamaihd.net/ugc/955222356208292369/A76775455851F285F4399F9344CBEAC83378FCD1/)

(https://steamuserimages-a.akamaihd.net/ugc/955222356208315335/061F55786BC400C247813DB86E8CBE62A8AE1001/)
Title: Re: [1.0] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Operative85 on November 20, 2018, 08:49:04 AM
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()
Title: Re: [1.0] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on November 20, 2018, 03:08:54 PM
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  :)
Title: Re: [1.0] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Operative85 on November 20, 2018, 05:16:03 PM
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!
Title: Re: [1.0] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on November 20, 2018, 05:19:47 PM
I never looked into plant defs. I'm planning on thoughts next, then traits probably.
Title: Re: [1.0] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Operative85 on November 20, 2018, 05:28:57 PM
Alright! Thanks so much and Godspeed on your endeavor! :)
Title: Re: [1.0] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on November 20, 2018, 05:33:58 PM
 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  :)
Title: Re: [1.0] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Operative85 on November 20, 2018, 06:50:03 PM
Gotcha! Take care and have fun! :)
Title: Re: [1.0] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Crow_T on November 20, 2018, 07:02:26 PM
cool mod, this should save time digging through core.
Title: Re: [1.0] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on November 21, 2018, 11:42:04 PM
Update:
Fixed the "do until x" not working issue
Title: Re: [1.0] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on November 23, 2018, 12:20:15 AM
Update:
Persistence should be working again. Sorry about that!
Added a good amount of logging and code to alert me when i break something  :-[
Title: Re: [1.0] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on November 26, 2018, 05:04:58 PM
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!
Title: Re: [1.0] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Operative85 on November 26, 2018, 07:21:53 PM
Cheers, Kiame! And good luck!
Title: Re: [1.0] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on November 28, 2018, 12:21:43 AM
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
Title: Re: [1.0] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on November 29, 2018, 03:19:37 AM
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
Title: Re: [1.0] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on December 01, 2018, 12:47:46 AM
Update:
Added the ability to modify Thought defs
Title: Re: [1.0] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on December 02, 2018, 10:43:14 PM
Update:
Added the ability to edit Story Teller defs
Title: Re: [1.0] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on December 05, 2018, 02:20:47 AM
Update:
Added Difficulty def editing
Title: Re: [1.0] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on December 05, 2018, 12:22:50 PM
Update:
Added the ability to disable Apparel and Weapon defs.

For those that want a medieval game, now you can do it!
Title: Re: [1.0] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on December 06, 2018, 12:39:19 AM
Update:
Added Recipes back in

I have limited what can be edited somewhat:
-Ingredients and Product types cannot be changed - the amount required/produced can be edited
-Filters cannot be changed and are currently not populated

Omni-drill mod defines recipes in an unorthodox way. Due to that those recipes will not be loaded by this mod.
Title: Re: [1.0] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on December 07, 2018, 03:51:24 AM
Update:
- Added Indigestible defs
- Apparel and Weapons have more editable fields - mainly for when they are items on the ground
Title: Re: [1.0] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on December 07, 2018, 02:06:55 PM
Update:
Fixed an issue where Recipes were failing to load
Title: Re: [1.0] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on December 08, 2018, 11:47:29 AM
Update:
-Fixed an issue where having more than one Difficulty defs with the same difficulty would throw as exception
-Ingredient Filters will now have a list of all Allowed Defs
Title: Re: [1.0] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on December 09, 2018, 02:07:02 PM
Update:
-Redisigned how defs are selected
-Added the ability to change Mineable defs (used in map generation)
Title: Re: [1.0] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on December 12, 2018, 03:35:44 AM
Update
Added the ability to edit Backstories!
Title: Re: [1.0] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on December 22, 2018, 04:39:34 PM
Update:
Added the ability to edit building defs and fixed a few things here and there
Title: Re: [1.0] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Operative85 on December 23, 2018, 04:30:58 AM
Quote from: Kiame on December 22, 2018, 04:39:34 PM
Update:
Added the ability to edit building defs and fixed a few things here and there

Ahh, just in time for Christmas <3 Thanks for all the work, Kiame.
Title: Re: [1.0] [KV] In-Game Definition Editor [ModSync-RW]
Post by: jager666 on January 15, 2019, 10:09:00 PM
Awesome mod Kiame!

Is there any chance to do something similar to use with translations? It would be so much easier for the translators that are not really xml savvy.
Title: Re: [1.0] [KV] In-Game Definition Editor [ModSync-RW]
Post by: chesiq on February 14, 2019, 08:40:13 AM
Hi, great mod. I think someone reported an error caused by this mod.

Here it is.

Too many tries finding incident time. minSpacingDays is too high.
Verse.Log:Error(String, Boolean)
Verse.Log:ErrorOnce(String, Int32, Boolean)
RimWorld.IncidentCycleUtility:GenerateHitList(Int32, Int32, Int32, Single, Single, Int32, Single, Int32)
RimWorld.IncidentCycleUtility:IncidentCountThisInterval(IIncidentTarget, Int32, Single, Single, Single, Single, Single, Single, Single)
RimWorld.<MakeIntervalIncidents>c__Iterator0:MoveNext()
RimWorld.<MakeIncidentsForInterval>c__Iterator1:MoveNext()
RimWorld.<MakeIncidentsForInterval>c__Iterator0:MoveNext()
RimWorld.Storyteller:StorytellerTick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()
Title: Re: [1.0] [KV] In-Game Definition Editor [ModSync-RW]
Post by: aemeyer on March 05, 2019, 03:46:22 AM
A long time ago I would try to balance mod packs by hand, testing and reloading many mods at once, trying to fit all the pieces together.
I saw 1.0 came out and decided to get back out to the Rim and was mentally preparing myself for about a weeks worth of editing just to get started playing for real.
You just saved me and probably others so much time. Thank you very much.
Title: Re: [1.1] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on March 04, 2020, 12:41:47 AM
Updated for 1.1 - https://github.com/KiameV/rimworld-ingamedefeditor/releases/download/1.1/InGameDefEditor.zip

I'm sure i've missed something here and there. If there are any issues please let me know!

Changes:
- I've decided to add a setting "Auto Apply Settings" on every def. Defaults to false. As a def's fields are changed they will be applied to the game. The setting will _not_ be applied when the game is re-started. I decided this was a better way to keep track which mods are edited and being set on game load.

- The selected Def will be remembered between the Editor being closed then reopened. (makes editing the same def then testing easier)

- Default button to open In-Game editor is now [ left bracket as steam's screenshot button is dumbly F10 by default (hey valve there's such a thing as Prt Scr!)
Title: Re: [1.1] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on March 05, 2020, 04:04:45 AM
WARNING:
I'm re-plumbing this mod. It's possible that settings will be lost. I am sorry about this and I will try to mitigate it as much as possible. Try to keep track of the defs that have been modified.

The next release will be out in a day or two.
Title: Re: [1.1] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on March 05, 2020, 08:42:51 PM
Update:
Re-wrote a good chunk of underlying code to make this mod more maintainable. I've verified that existing settings should load just fine! (woohoo!)

The "Disabled Defs" and "Auto Apply Def" buttons on the top right work now - if you select an item under them, that item will be loaded to be edited.

Let me know if there's anything that seems wrong.
Title: Re: [1.1] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on March 12, 2020, 11:36:03 PM
Update:
- Fixing an issue where projectile data was not saving when edited from the weapons page
- Fixing an issue where defs were not getting automatically applied due to something in the load order not loading correctly (this does happen and doesnt seem to hurt anything; will keep watching this) -- i've added more Warning messages to the logs to help monitor
- Items with the same label will be easier to tell apart as their defName will now be appended to their label
Title: Re: [1.1] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on March 26, 2020, 11:04:56 PM
Update:
- Added the ability to modify Hediff Defs
- Fixing +/- Apparel/Weapon Base Modifiers
Title: Re: [1.1] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on April 28, 2020, 04:02:33 AM
Update:
Added support for adding/removing tags for apparel
Title: Re: [1.1] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on August 05, 2020, 11:37:43 PM
Update:
Added a filter text field to the right of Defs selection. Typing into that prior to selecting defs will filter the resulting selecting items and only show results that contain the filtered text.
Title: Re: [1.2] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on August 12, 2020, 01:31:48 AM
Updated for 1.2 - https://github.com/KiameV/rimworld-ingamedefeditor/releases/download/current/InGameDefEditor.zip
Title: Re: [1.2] [KV] In-Game Definition Editor [ModSync-RW]
Post by: thejogger1998 on October 26, 2020, 02:19:33 PM
This mod is so awesome, its a golden tool for dummies without any knowledge about coding like me. Developers should have made this in their games, like map editor from Warcraft 3 back in the day.

But I have some question regarding its usage.

I dont really understand what you said about this mod remembering stuff. But would the changes I made from one save game affect the others ? Like I edited a trait in one of my save would this trait  also changed in the save of my brother using the same computer ? And what would happen if I uninstall the mod without change these edited traits back to default would these traits break the game ?

And can I create new traits through this mod ? Will there be this option in the future ?

Thanks


Title: Re: [1.2] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on October 28, 2020, 10:19:04 AM
Changes made with this mod will effect all saves.

All changes made with this mod will go away if this mod is disabled. If the mod is re-enabled all changes will be reapplied.

There is no way to create new defs with this mod.
Title: Re: [1.2] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on October 30, 2020, 12:16:57 AM
Update:
Added "Resources" to be selected. This include stones, metals, hides, and furs.
Title: Re: [1.3] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on July 28, 2021, 12:52:27 AM
Updated for 1.3 - Direct Download (https://github.com/KiameV/rimworld-ingamedefeditor/releases/download/1.3/InGameDefEditor.zip)
Along with this update there's a new def group "Plant"
Title: Re: [1.3] [KV] In-Game Definition Editor [ModSync-RW]
Post by: Kiame on January 14, 2022, 11:03:38 PM
Update v1.3.2.0 (https://github.com/KiameV/rimworld-ingamedefeditor/releases/download/1.3/InGameDefEditor.zip):
Removed sound from the plant stuff. Verified changing Harvest Yield and saving now correctly loads and allows trees to be cut down.