MegaGlest Forum

Modding and game content creation => Tools => Topic started by: Mr War on 4 July 2011, 07:16:56

Title: Is there a script or tool that...
Post by: Mr War on 4 July 2011, 07:16:56
I want to change the names of some resources in my sic fi factions. I could go through every XML and manually change every reference to them.

Is there a tool that allows me to run a find and replace operation on all the xmls in a folder tree?
Title: Re: Is there a script or tool that...
Post by: will on 4 July 2011, 07:19:05
Is the name in the xml more than an identifier?  Isn't the actual screenname localised?

So you'd just have to know where to put a language file so that in English your 'wood' resource is called "Carbon" or whatever you want to call it?
Title: Re: Is there a script or tool that...
Post by: Omega on 4 July 2011, 08:11:02
Is the name in the xml more than an identifier?  Isn't the actual screenname localised?

So you'd just have to know where to put a language file so that in English your 'wood' resource is called "Carbon" or whatever you want to call it?
In GAE, you could just have wood=Carbon in the TECHTREE language file.

Of course, you could always just run a simple find and replace. For example, in notepad++, open the find and replace window (ctrl + f), go to the find in files tab, set the path to your techtree folder, and replace <resource name="old_resource_name" with <resource name="new_resource_name". That should work for all upgrades and units to my knowledge, and can't think of any instances it would appear in besides that. You'd have to manually rename the folder and XMl name of the resource, though.
Title: Re: Is there a script or tool that...
Post by: Mr War on 4 July 2011, 12:15:40
Yeah I should have looked more closely at the problem before posting