Home » MODDING HQ 1.13 » v1.13 Modding, Customising, Editing » v1.13 XML Customization » 1.13 Xml Editing
Re: 1.13 Xml Editing[message #73617] Fri, 14 October 2005 08:11 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
I'd like to start a collection of tips and proceedures for .xml editing. If anything I write here can be added to please do so. If something is incorrect definately jump right on it.

REMEMBER IN THE NEWEST RELEASES .XMLS YOU ALTER MUST BE DONE FROM THE NEW ITEMS FOLDER IN THE TABLEDATA FOLDER.

ALSO NOTE THAT THE NEWER .XMLS MAY HAVE MORE VARIABLE ENTRIES (TEXT LINES) AND MAY CAUSE PROBLEMS WITH USING THE OLD ONES.


1)Test every change by running the .exe (launching the game after you've made the change). This is invaluable for quickly finding where a mistake you've made is. If you make twenty changes, each with 110 odd lines of data per item you might spend the good part of the night just troubleshooting one simple typo.
I listed this one first because it is perhaps the most time saving technique I've come up with. Once you really get the hang of this you'll be able to do several changes at once but at first you should stick closely to this technique.

2)When making a new item of a similar type to an existing item, copy/paste the existing item (all lines except for item number) to the item number you want it to end up in before making any changes. Then, all you have to do is adjust it's ubWeight, ubGraphic number and all other bits you want changed to the new item's specifications without danger of the item losing it's general characteristics.
Of course, for items that depend on other .xmls for their characteristics (weapons rely on the weapons.xml, explosives the explosives.xml etc.) make new entries in the supporting files (the other .xmls) if neccessary and type the ubClassIndex number that corresponds to this new item.

3)Playtest the hell out of each of you're changes. This seems obvious but since a lot of items are tied together making a mistake on one item in a combination could result to considerable confusion down the road.

4)When making a complex item (launchable, merge, combineable etc.) look carefully at the way an existing item of this type is done and ONLY change files that are altered to make this item in the existing .xmls. In other words, don't just try to guess what supporting .xmls you need to change to make a Launchable, Merge, Attachment, etc. look at an item as similar to the new one you want to make as possible and see how it is already done.


That's it for now....I thought I had something more profound to relate here but hopefully the contribution of others will raise this post to the level of something very useful for people just starting to work with these truly exceptional new tools. Again, please add and edit as neccessary.

Report message to a moderator

Sergeant Major
Re: 1.13 Xml Editing[message #73618] Fri, 14 October 2005 08:21 Go to previous messageGo to next message
gmonk

 
Messages:670
Registered:April 2002
Location: Newfoundland, Canada
@Khor:
This should really have its own thread so it can be found and read more easily. The hints collection is a great idea, I'd imagine that lots of folks will have questions about how to add their own changes to the files.

Maybe a single sticky with just the hints in a kinf of FAQ format?

Report message to a moderator

First Sergeant
Re: 1.13 Xml Editing[message #73619] Fri, 14 October 2005 08:25 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
I was thinking of that and will do so as soon as there is enough scrutiny here to validate and maybe even redefine this idea.

Report message to a moderator

Sergeant Major
Re: 1.13 Xml Editing[message #73620] Fri, 14 October 2005 08:33 Go to previous messageGo to next message
Kaiden is currently offline Kaiden

 
Messages:504
Registered:September 2003
I think you should also add How to's for specific items, like adding "pocketed" vests and things of that nature as well. Or "special" items that you created that were difficult to pull off.

Also Mugsy mentioned something in the bug reports thread about a log.txt file that should log validation errors for the XML files.

Report message to a moderator

First Sergeant

Re: 1.13 Xml Editing[message #73621] Fri, 14 October 2005 08:38 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
Cool. Will do Kaiden.

Report message to a moderator

Sergeant Major
Re: 1.13 Xml Editing[message #73622] Fri, 14 October 2005 14:37 Go to previous messageGo to next message
Madd_Mugsy

 
Messages:634
Registered:July 2005
Location: Canada
Yes, Kaiden's correct, there's a log.txt file in the Data folder that will get updated whenever you see a runtime error at the sirtech logo.

Report message to a moderator

First Sergeant

Re: 1.13 Xml Editing[message #73623] Fri, 14 October 2005 15:08 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
Is the log.txt file just for diagnosing crashes or does it do something else?

Report message to a moderator

Sergeant Major
Re: 1.13 Xml Editing[message #73624] Fri, 14 October 2005 15:37 Go to previous messageGo to next message
Kaiden is currently offline Kaiden

 
Messages:504
Registered:September 2003
Just for the runtime errors I beleive.

Report message to a moderator

First Sergeant

Re: 1.13 Xml Editing[message #73625] Fri, 14 October 2005 17:09 Go to previous messageGo to next message
gmonk

 
Messages:670
Registered:April 2002
Location: Newfoundland, Canada
Aggghhh!! Too many police!

J/K. The hats look nice and I hear that the ladies like men in uniform. Wink

Report message to a moderator

First Sergeant
Re: 1.13 Xml Editing[message #73626] Sat, 15 October 2005 15:44 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
Is anyone else having a bug with thier modded .xmls where you don't have to spend any APs to reload a weapon? I posted this in the bug reports but I figured since there was no response and this is the thread most .xml modders look at I might find an answer here.

Sorry for being repetitious but has anyone else seen this one?

Report message to a moderator

Sergeant Major
Re: 1.13 Xml Editing[message #73627] Sun, 16 October 2005 06:48 Go to previous messageGo to next message
Kaiden is currently offline Kaiden

 
Messages:504
Registered:September 2003
Khor, you are missing the following 3 tags in every item in items.xml:

0
0
0

the following 3 tags are missing from your items in Weapons.xml:

5
1
7


Now, snap or mugsy may need to correct me, but I beleive the structure has to match for everything to work properly, so if we add a new tag to the xmls, you have to add it to your modified xmls as well.

If this is the case, I will do what I can to keep track of any new tags that are added so we can be more clear about them in the list of changes from version to version.

You can look at the latest version of items.xml to see where the above listed tags belong, adding them to every entry will probably be a pain, but not as time consuming as having to start over.

Anyway if I got this all wrong, let me know, and I'll keep looking through the tags and the code. (Need to familiarize myself with the XML code anyway Razz ).

Report message to a moderator

First Sergeant

Re: 1.13 Xml Editing[message #73628] Sun, 16 October 2005 14:18 Go to previous messageGo to next message
Kaiden is currently offline Kaiden

 
Messages:504
Registered:September 2003
Khor, did that fix your problem?

Report message to a moderator

First Sergeant

Re: 1.13 Xml Editing[message #73629] Sun, 16 October 2005 19:55 Go to previous messageGo to next message
Snap is currently offline Snap

 
Messages:286
Registered:September 2000
Location: USA (by way of the Old Wo...
Khor, if you e-mail me your files, I can add the missing tags.

Report message to a moderator

Master Sergeant
Re: 1.13 Xml Editing[message #73630] Mon, 17 October 2005 03:47 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
I've been really busy this weekend doing RL crap so I haven't gotten around to adding all that. The only way I can figure is to do it manually and I'd need a few extra hours in the day for that.
I definately believe that's it and can't wait to start messing with reload times because a lot of the weapons I used for the WW2 mod have remarkably differing loading systems and a standard reload time I think is highly unrealistic for this era. Not to mention that if speed loaders were even around back then I'm sure they were rare.

Snap

I really appreciate the offer. It will save me a lot of time. I definately can do this but haven't been able to steal the few hours it would take me from the last few days.
I'll mail you the .xmls but bear in mind that these were the original versions so you actually have to add 350x3 = 1050 to the Items.xml and something like 70x3 for the Weapons.xml file.
If you don't want to get into all that I understand. It's hardly something I would ask of a guy who's alredy contributed so much to this great system. But you might be amused by some of the stuff I've done (not to mention the numerous spelling errors in the descriptions). These files are still very much in the development stage but they are nearing completion thanx largely to this project. I wasn't going to release a mod until I could get some of the weapons to reflect their antique characteristics and show the real evolution that happened in firearms during those years.
If you find it's too much work to get into, I understand but I think you might get a kick out of looking at that stuff anyway.

Thanx again.

Report message to a moderator

Sergeant Major
Re: 1.13 Xml Editing[message #73631] Mon, 17 October 2005 06:27 Go to previous messageGo to next message
Kaiden is currently offline Kaiden

 
Messages:504
Registered:September 2003
Khor, he'll probably spend 10 minutes and write a script to do it in less than 1 Smile

Report message to a moderator

First Sergeant

Re: 1.13 Xml Editing[message #73632] Mon, 17 October 2005 11:25 Go to previous messageGo to next message
Snap is currently offline Snap

 
Messages:286
Registered:September 2000
Location: USA (by way of the Old Wo...
Right, that's what I was going to do Smile

Unfortunately, it's much easier to correct files on a case-by-case basis than to make a universal update utility. But Kaiden has threatened to do just that :angel:

Report message to a moderator

Master Sergeant
Re: 1.13 Xml Editing[message #73633] Thu, 20 October 2005 10:50 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
That fixed it. Thanx a whole lot guys.

Report message to a moderator

Sergeant Major
Re: 1.13 Xml Editing[message #73634] Thu, 20 October 2005 16:57 Go to previous messageGo to next message
Snap is currently offline Snap

 
Messages:286
Registered:September 2000
Location: USA (by way of the Old Wo...
Quote:
Originally posted by Snap:
Update: The decrypted binary prof.dat with a new structure is ready. It now includes animation parameters for both small and large faces, and also allows to set all inventary items as droppable/undroppable. The new file is called prof.bin (see the updated zip). I also included some extra info for editor developers in the data definitions, and updated the XML file.

prof.zip
Another update: based on some suggestions, the profile structure has been expanded to include caps for all stats. We are just staking out ground for POSSIBLE future implementation - for now this new data doesn't influence anything. We just thought that it would be better to add this before the editor is released than to have to change the editor later.

The zip has been updated with the new structure specs and a new prof.bin file.

Report message to a moderator

Master Sergeant
Re: 1.13 Xml Editing[message #73635] Fri, 21 October 2005 11:44 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
I don't know if this is a bug unique to my .xml project or is something generally experienced but every time I make a change in the .xmls (which I also update the Itemsdesc.edt so it appears correctly in Proedit) the structure of the items.xml changes considerably. The whole text moves to the left (no indentation) and there is a several character gap between each lines variable number and the 'closing' index header. There is also no new line between the second entry on each line and the uiIndex number like there is in the regular Items.xml.

What is worse is that my new entries are all causing runtime errors. I'm pretty sure this is because of the different structure.
I'll mention that I have Toxic's .xml editor installed in this project but I'm editing the files manually.

I hope there is an easy fix for this. I'll try to play around with my other installs to see if I get a similar problem but for now I'm at a dead stop again.

Report message to a moderator

Sergeant Major
Re: 1.13 Xml Editing[message #73636] Fri, 21 October 2005 17:57 Go to previous messageGo to next message
Snap is currently offline Snap

 
Messages:286
Registered:September 2000
Location: USA (by way of the Old Wo...
Yes, I noticed your Items.xml was pretty messed up. What do you use to edit it?

Report message to a moderator

Master Sergeant
Re: 1.13 Xml Editing[message #73637] Fri, 21 October 2005 18:22 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
I use notepad because it loads and saves fast. Should I use something else?

Report message to a moderator

Sergeant Major
Re: 1.13 Xml Editing[message #73638] Sat, 22 October 2005 02:45 Go to previous messageGo to next message
Madd_Mugsy

 
Messages:634
Registered:July 2005
Location: Canada
Turn off the word wrap Wink

Report message to a moderator

First Sergeant

Re: 1.13 Xml Editing[message #73639] Sat, 22 October 2005 04:16 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
I wish it was that easy but I tried word warp and that didn't work.

Do you have any other ideas?

Report message to a moderator

Sergeant Major
Re: 1.13 Xml Editing[message #73640] Sat, 22 October 2005 11:23 Go to previous messageGo to next message
Kaiden is currently offline Kaiden

 
Messages:504
Registered:September 2003
Find a different text editor. Personally I like EditPlus but it's not free (shareware). It has customizeable syntax highlighting so if it doesn't "Support" the "Language" you are coding in, you can create a syntax file for files of that type. Most of these "better than notepad" apps don't confuse tabs and spaces, and have customizeable tabs.

Whenever I get a new pc either at work or at home, the very first thing I do after getting everything installed, is set .SQL files to open up in Query Analyzer because the default is notepad for some reason and it ALWAYS screws up my formating when I use notepad.

It will even mess with the formatting of other txt type files that were even created using notepad.

Report message to a moderator

First Sergeant

Re: 1.13 Xml Editing[message #73641] Sat, 22 October 2005 11:54 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
I just downloaded EditPlus. I'll start editing the .xmls with this and if within 30 days I'm happy enough with it I'll buy (provided it's not $90 or something rediculous like that.

Thanx man.

Report message to a moderator

Sergeant Major
Re: 1.13 Xml Editing[message #73642] Sun, 23 October 2005 01:23 Go to previous messageGo to next message
Nighthawk is currently offline Nighthawk

 
Messages:46
Registered:February 2002
Location: Springfield, MO
Khor,

I have used XML Notepad(free download) with no problems. It shows the parent-child structure tree and a expand all button to click on.

My editing was much simplier than your vast project, just adding pockets/items to certain armors, changing weapon ranges, editing enemy and IMP guns/gear, and changing the regular mortar to a fire support radio to pretend it's an artillery stirke. That was my MOS in the army.

Nighthawk

Report message to a moderator

Corporal
Re: 1.13 Xml Editing[message #73643] Mon, 14 November 2005 07:43 Go to previous messageGo to next message
Claymaker is currently offline Claymaker

 
Messages:6
Registered:November 2005
I don't know if this is the right place, but I am having trouble with the lockbustingpower stat in ammotypes.xml. Even when I set it above zero, that ammotype does not always hit locks when a door is targeted, as the stat description advertises. Am I doing something wrong or is this not fully implemented? also, it mentions "can break locks with a SmashDifficulty (see BinaryData\Locks.bin) less than the lockBustingPower." but where is locks.bin? it isn't in either of my binarydata folders.

Report message to a moderator

Private
Re: 1.13 Xml Editing[message #73644] Mon, 14 November 2005 18:48 Go to previous messageGo to next message
I4NI is currently offline I4NI
Messages:4
Registered:November 2005
Location: Stockholm, Sweden
Claymaker, if I have unserstood it correctly, it is not enough to set it at above zero, in order to really have it make a difference it has to be above 70, since all doors with SmashDifficulty below 70 (and PickDifficulty below 50) always can be hit by bullets.

And it is not true that the bullet ALWAYS hit locks, i believe it hits the lock 33% of the time.

Not sure of any of the numbers here since I have been changing that part of the code in my files...

Report message to a moderator

Civilian
Re: 1.13 Xml Editing[message #73645] Mon, 14 November 2005 20:27 Go to previous messageGo to next message
the scorpion

 
Messages:1834
Registered:September 2004
Location: CH
is there any way of changing the default tank machine gun or tank gun?
thx

Report message to a moderator

Sergeant Major
Re: 1.13 Xml Editing[message #73646] Mon, 14 November 2005 23:52 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
The Tank Cannon is an Item that can be changed like any other item I believe (other than being non removeable it has all the same listing features as any other weapon). I don't know where the tank machine gun is on the weapons list. I'm assuming it just uses an existing machine gun's item reference but don't know which one.


Really, I don't much remember comming up against a tank that used a machine gun?

But to change the tank's gun, just alter the tank cannon in the items slot (and all interrelated files too).

Report message to a moderator

Sergeant Major
Re: 1.13 Xml Editing[message #73647] Tue, 15 November 2005 00:11 Go to previous messageGo to next message
the scorpion

 
Messages:1834
Registered:September 2004
Location: CH
the idea is not to change existing things, but rather being able to alter a tank`s weapon choice (ever approached a tank close? the tank can`t fire it`s cannon at close range, it uses the minimi)

so the problem is i don`t want to overwrite the minimi and put it back into another slot and wanted to know if there is a more elegant solution

i think i leave the tank cannon as the tanks primary weapon, but maybe the hard-coded reference to the minimi as the tanks backup weapon can be edeited somehow?

Report message to a moderator

Sergeant Major
Re: 1.13 Xml Editing[message #73648] Tue, 15 November 2005 00:20 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
Oh, yea. That would be sweet.

This might be done by adding a default attachment (machine gun) to the tank cannon. The problem here might be that the AI doesn't use attachments correctly (or at all if I'm remembering right) but it would be worth messing around with.

I think a tank flamethrower would also be a cool thing.
Sorry for misunderstanding you man.

Report message to a moderator

Sergeant Major
Re: 1.13 Xml Editing[message #73649] Tue, 15 November 2005 00:35 Go to previous messageGo to next message
the scorpion

 
Messages:1834
Registered:September 2004
Location: CH
don`t think we can attach one gun to the other, but one step could be to allow the tank to fire different sorts of shells for instance (mustard gas or napalm anybody?)


i hope the coders can externalize this value (or even simpler) allow to give hand-picked equipment to tanks in the new editor

Report message to a moderator

Sergeant Major
Re: 1.13 Xml Editing[message #73650] Sun, 20 November 2005 04:00 Go to previous messageGo to next message
SharkD is currently offline SharkD

 
Messages:352
Registered:July 2003
I agree that LUA should be used instead of XML.

Report message to a moderator

Master Sergeant
Re: 1.13 Xml Editing[message #73651] Sun, 20 November 2005 07:34 Go to previous messageGo to next message
bonechucker is currently offline bonechucker

 
Messages:33
Registered:March 2001
Location: who wants to know ?
@Mikail ...LUA and ja2 ...nice idea...will u do it ? Wink
then my next request would be the irrlicht-engine ...
thx in advance Wink

greets bone

Report message to a moderator

Private 1st Class
Re: 1.13 Xml Editing[message #73652] Mon, 19 December 2005 22:42 Go to previous messageGo to next message
the scorpion

 
Messages:1834
Registered:September 2004
Location: CH
has anybody had success altering the cities.xml file? what exactly do i need to do to rename cities? city names appear in a lot of diffeent situations, which of them are influenced by changing the citie`s name in cities .xml?

*edit*

i also don`t quite get the town point variable... is this somehow the size of a town?

Report message to a moderator

Sergeant Major
Re: 1.13 Xml Editing[message #73653] Mon, 19 December 2005 23:41 Go to previous messageGo to next message
Realist

 
Messages:28
Registered:September 2005
Location: Duesseldorf, Germany
Quote:
i also don`t quite get the town point variable... is this somehow the size of a town?
i'm not sure, but i think "town point" defines where the town's name is displayed on the strategic map.
so it's just controlling how it looks like, but has no further effects.

Report message to a moderator

Private 1st Class
Re: 1.13 Xml Editing[message #73654] Mon, 19 December 2005 23:50 Go to previous messageGo to next message
the scorpion

 
Messages:1834
Registered:September 2004
Location: CH
oh danke realist

so it is only the table itself that defines which sector belongs to which city? cool (btw it seems to have worked so far... not sure yet though)

what appears a bit odd to me is that the changes in the table worked (additional town sectors) but the names are all the same and in the same position

i`ll try if changing "town point" variable shifts the town`s name in the strategic map

Report message to a moderator

Sergeant Major
Re: 1.13 Xml Editing[message #73655] Tue, 20 December 2005 00:03 Go to previous messageGo to next message
TrashMan is currently offline TrashMan

 
Messages:61
Registered:November 2005
Location: Croatia
Quote:
Originally posted by Khor1255:

REMEMBER IN THE NEWEST RELEASES .XMLS YOU ALTER MUST BE DONE FROM THE NEW ITEMS FOLDER IN THE TABLEDATA FOLDER.
Eh? I'm a bit confused here.

I installed 1.13, made a new folder called Data-MYMOD, copied all files from the 1.13 into it and simply edited the xmls I wanted.
what's this with a NewItem folder?

Report message to a moderator

Corporal
Re: 1.13 Xml Editing[message #73656] Tue, 20 December 2005 00:15 Go to previous messageGo to previous message
Majek is currently offline Majek

 
Messages:437
Registered:January 2003
Location: Slovenia
Quote:
Originally posted by TrashMan:
Quote:
Originally posted by Khor1255:

REMEMBER IN THE NEWEST RELEASES .XMLS YOU ALTER MUST BE DONE FROM THE NEW ITEMS FOLDER IN THE TABLEDATA FOLDER.
Eh? I'm a bit confused here.

I installed 1.13, made a new folder called Data-MYMOD, copied all files from the 1.13 into it and simply edited the xmls I wanted.
what's this with a NewItem folder?
that was in one of the previous releases not the last one.

Report message to a moderator

Master Sergeant
Previous Topic: XML Editor Changelog
Next Topic: MercStartingGear editor
Goto Forum:
  


Current Time: Sat May 18 20:30:09 GMT+3 2024

Total time taken to generate the page: 0.03551 seconds