Home » MODDING HQ 1.13 » v1.13 Modding, Customising, Editing » v1.13 XML Customization » Bulk editing of XML files
Bulk editing of XML files[message #312079] Thu, 15 November 2012 06:18 Go to next message
knightofni is currently offline knightofni

 
Messages:96
Registered:August 2011
So most XML files are editable in Excel, where it is easy to edit data in bulk.

Except Items.xml.

Because of its more complicated structure (with the ), Excel can't load it properly.

So how are modders / developers coping with this file ? Say you want to add a field to all weapons, or modify a field for all items ?

Are there specialized tools, or do you write scripts ?

Thanks for any input

Report message to a moderator

Corporal 1st Class
Re: Bulk editing of XML files[message #312083] Thu, 15 November 2012 09:16 Go to previous messageGo to next message
JMich is currently offline JMich

 
Messages:546
Registered:January 2011
Location: Greece
To modify a field for all items, use the XML Editor, it should support this (as I recall).
To add a (new) field to all weapons will be a bit more of a pain, since you'll have to find a tag that exists in all of them, and then do a mass replace of with ## where of course uiIndex is the tag that exists everywhere, NewTag is the tag you wish to add and ## is the value for the new tag, though all items will have the same value.
Best bet, use the XML Editor, there's a reason we have it.

Report message to a moderator

First Sergeant
Re: Bulk editing of XML files[message #312087] Thu, 15 November 2012 10:24 Go to previous messageGo to next message
knightofni is currently offline knightofni

 
Messages:96
Registered:August 2011
Hi JMich, Thanks for your answer. I was a bit vague in my first post, let me be a bit more specific regarding what i'm trying to do (and i can't seem to find how):

1. Editing the following tag per weapon category


0


or


-10


2. Extracting ubWeight for each weapon

Report message to a moderator

Corporal 1st Class
Re: Bulk editing of XML files[message #312089] Thu, 15 November 2012 10:35 Go to previous messageGo to next message
JMich is currently offline JMich

 
Messages:546
Registered:January 2011
Location: Greece
1) Open XML Editor, show all items, add the proper columns you want to modify, select the column, right click and enable editing, right click and Apply Value to Selected Column->Set and enter the value you wish them to have.

2) Open XML Editor, show all items, add the proper columns you want to copy, click on the top right corner (to select the whole grid), hit Ctrl-C to copy, then paste it into Excel (or wherever you want to add them to).

Report message to a moderator

First Sergeant
Re: Bulk editing of XML files[message #312093] Thu, 15 November 2012 12:24 Go to previous messageGo to next message
knightofni is currently offline knightofni

 
Messages:96
Registered:August 2011
Most excellent, i'm starting to understand how to use it. Thanks for this very useful tool.

Is there some sort of manual / faq about the XML editor ? I've tried looking in the Docs folder and on the forum, but couldnt find.

Report message to a moderator

Corporal 1st Class
Re: Bulk editing of XML files[message #312094] Thu, 15 November 2012 12:33 Go to previous message
JMich is currently offline JMich

 
Messages:546
Registered:January 2011
Location: Greece
Unfortunately, there isn't. Feel free to ask in the forums though, there should be a few people able to answer your queries, and some may even be able to implement changes to the editor.

Report message to a moderator

First Sergeant
Previous Topic: Where do .xml files get their data?
Next Topic: Train Militia in every city in 4870 ?
Goto Forum:
  


Current Time: Mon Dec 04 15:30:42 GMT+2 2023

Total time taken to generate the page: 0.01080 seconds