Ludeon Forums

Ludeon Forums

  • July 06, 2020, 02:14:24 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: definitions updater  (Read 2234 times)

lude

  • Colonist
  • ***
  • Posts: 137
  • Refugee
    • View Profile
definitions updater
« 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.
Logged

KingOfAwesomnia

  • Drifter
  • **
  • Posts: 41
  • Refugee
    • View Profile
Re: definitions updater
« Reply #1 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.
Logged

mrofa

  • Planetologist
  • ****
  • Posts: 1668
  • Squirrel Hunter
    • View Profile
Re: definitions updater
« Reply #2 on: January 08, 2015, 01:50:25 PM »

lude you got such option in notepad++
Logged
All i do is clutter all around.

Neurotoxin

  • Colonist
  • ***
  • Posts: 255
  • Raider
    • View Profile
Re: definitions updater
« Reply #3 on: January 10, 2015, 11:13:21 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 ;)