Ludeon Forums

RimWorld => Mods => Tools => Topic started by: lude on December 29, 2014, 03:30:45 PM

Title: definitions updater
Post by: lude on December 29, 2014, 03:30:45 PM
Heyho, I was wondering if it was possible to create a tool that looks for occurences of definitions and changes them based on the latest major/minor build of Rimwars, like replacing <baseMaterialType>Transparent</baseMaterialType> with <Shader>Transparent</Shader> and similar, where the developers just would have to upkeep a list of API changes and then every modder (or user if the modder spirited away) would just run this tool and it'd change every occurence in the XML file.

I know this is possible in a lot of different ways (Grep or Wingrep to get the strings and then load them in a good mass editor, for win I use notepad++, but it's still annoying frickle work)

Just updated Liandri Corp and MIRV Artillery for myself due to some minor discrepancies (that didn't seem to break the mod anyway nor lead to bugs)

offtopic:
Quote
anyone recognize XML error: &gt;
doesn't correspond to any field in type Thingdef.

or XML error: &gt;
doesn't correspond to any field in type Thingfilter.
I'm too lazy to disable mods single or in groups to find out what causes it, the only occurences of &gt are in dll files.
Title: Re: definitions updater
Post by: KingOfAwesomnia on December 30, 2014, 10:04:46 AM
Making a tool that replaces certain content in a file with something else would be pretty easy to make. Keeping up with all the things that should change between alpha releases is the biggest part of the work.
Title: Re: definitions updater
Post by: mrofa on January 08, 2015, 01:50:25 PM
lude you got such option in notepad++
Title: Re: definitions updater
Post by: Neurotoxin on January 10, 2015, 11:13:21 PM
Quote from: mrofa on January 08, 2015, 01:50:25 PM
lude you got such option in notepad++

That is true but a tool where you could provide a definition list and a file list (or just a directory to recurse) would be pretty handy. The problem though lies with updating the definition list after each release and would definitely be something you'd want to open source to facilitate making it quick. Sort of a one click solution. Just because a wheel already exists doesn't mean it can't be better rounded ;)