Author Topic: Is there a script or tool that...  (Read 1569 times)

Mr War

  • Guest
Is there a script or tool that...
« 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?

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: Is there a script or tool that...
« Reply #1 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?

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Is there a script or tool that...
« Reply #2 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.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Mr War

  • Guest
Re: Is there a script or tool that...
« Reply #3 on: 4 July 2011, 12:15:40 »
Yeah I should have looked more closely at the problem before posting

 

anything