Home » MODDING HQ 1.13 » v1.13 Modding, Customising, Editing » v1.13 XML Customization » XML Editor Update: Let me deal with this! (The XML Editor is awfully old. I would like update it.)
XML Editor Update: Let me deal with this![message #357645] Sun, 14 July 2019 23:33 Go to next message
XeMessiah is currently offline XeMessiah

 
Messages:7
Registered:July 2019
Dear forum,

I guess almost everybody, who ever tried to create their own weapons, explosives or anything represented in typical .xml files provided within v1.13 GameDirs, has already been struggling with the complexity that comes with modifying .xml files without a sufficient xml editor. Probably, we don't have to argue that it would be awesome to have an up-to-date version of the existing XML Editor (XE) solution.

Today, I inspected the latest code revision of XE, created call & type/class graphs, dependency overviews and other useful stuff in order to comprehend how XE works.
Furthermore, I tried to compile XE with the latest Data-1.13 directory and it worked (after some adjustments had to be made ;) ).

I definitely feel able to update XE and I'd like to assume this task. I'm not sure, how long this will take since I don't have that much time but anyway, I will take what time it needs for the sake of the JA2 community.

However, to efficiently update XE, I need some insight in how exactly the xml file structure differs.
Of course, it would be possible to compare svn states, but I hope that there might be some information regarding the evolution of the xml structure already.

I'm looking forward to receive any useful responses ;)

[Updated on: Mon, 15 July 2019 02:09]

Report message to a moderator

Private
Re: XML Editor Update: Let me deal with this![message #357646 is a reply to message #357645] Mon, 15 July 2019 02:19 Go to previous messageGo to next message
Deleted.

 
Messages:2663
Registered:December 2012
Location: Russian Federation
@XeMessiah looking through gamedir svn commits from stable 7609 to actual version will show all differences, you probably only need to check for Items folder and Lookup folder.
https://ja2svn.mooo.com/source/ja2_v1.13_data/GameDir
I doubt there's a XML diff table ready somewhere.



Left this community.

Report message to a moderator

Lieutenant

Re: XML Editor Update: Let me deal with this![message #357666 is a reply to message #357645] Fri, 19 July 2019 03:17 Go to previous messageGo to next message
XeMessiah is currently offline XeMessiah

 
Messages:7
Registered:July 2019
@sevenfm Thank you! I really appreciate every helpful information.

Could anybody please elaborate why the xml editor adds these nothing items?

Report message to a moderator

Private
Re: XML Editor Update: Let me deal with this![message #357670 is a reply to message #357666] Fri, 19 July 2019 11:28 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
The editor will show all defined items even if they are just dummy entries named "nothing".


Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Report message to a moderator

Lieutenant
Re: XML Editor Update: Let me deal with this![message #357674 is a reply to message #357670] Sun, 21 July 2019 16:54 Go to previous messageGo to next message
XeMessiah is currently offline XeMessiah

 
Messages:7
Registered:July 2019
@silversurfer: I agree that the editor shows dummy items. However, by "adding", I ment why adding/copying items infers the creation of dummy items. Do we really need dummy items in order for JA2 to correctly parse all items? Or do we only need certain dummy items and not all of them? I recall the editor's working set growing fast when adding or---for the sake of convenience---copying items due to these dummy items. I really like to keep the overall number of items close to the number of items that are not dummy items.

Another point I'd like to mention:
I will be using git instead of svn, since I am used to it.
Anyway, I could imagine to push certain release candidates to svn as well, but before I decide to do this, I really like to encourage the maintainer of the ja2svn server to use letsencrypt instead of self-signed TLS certificates. Would be great for this forum to employ crypto via TLS as well. I mean, this is 2019 ;)

[Updated on: Sun, 21 July 2019 17:06]

Report message to a moderator

Private
Re: XML Editor Update: Let me deal with this![message #357675 is a reply to message #357674] Sun, 21 July 2019 17:37 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
At least some of the dummy items are leftovers from items that have been used in the past. They probably need to remain so maps that still refer to them don't crash the game or something.


Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Report message to a moderator

Lieutenant
Re: XML Editor Update: Let me deal with this![message #357698 is a reply to message #357675] Fri, 26 July 2019 22:32 Go to previous messageGo to next message
Fallaxia is currently offline Fallaxia

Messages:3
Registered:July 2019
Location: Germany
@XeMessiah,

I just would like to ask: Did you already make progress on getting the XML Editor useable again?

Report message to a moderator

Civilian
Re: XML Editor Update: Let me deal with this![message #357721 is a reply to message #357645] Sun, 28 July 2019 16:06 Go to previous messageGo to next message
XeMessiah is currently offline XeMessiah

 
Messages:7
Registered:July 2019
@Fallaxia: Yes, I did. As a first step, I re-enabled the editor to load the most actual files. Therefore, I needed to change some 32bit ints to 64bit ints. Furthermore, I added information regarding new xml entries in order for them to not be deleted. But its still not in a state that is releasable and its an ongoing progress. Unfortunately, I only have time on sundays and even then only little time. But regarding years we all have been waiting to get an update on the editor, I guess its worth waiting to get a sufficient update and not something coded badly. So bear with me big grin

[Updated on: Sun, 28 July 2019 18:39]

Report message to a moderator

Private
Re: XML Editor Update: Let me deal with this![message #357996 is a reply to message #357645] Tue, 03 September 2019 13:23 Go to previous messageGo to next message
XeMessiah is currently offline XeMessiah

 
Messages:7
Registered:July 2019
Hey everybody,

here's some news and a little request for help/information.

The editor is now able to:
- correctly load most of the xml files that it "knew" about in 2014
- save the data in the required form

There is still some stuff missing, so that I won't upload it already. However, I'm happy with the progress so far.

Here's my question:
To automatically test, whether files saved by the editor differ significantly from the files given by the latest GameDir, I need to change the given files a litte bit.

E.g., lets regard the Items.xml file STANDING_MODIFIERS section.
The editor always includes empty sections in the form of <STANDING_MODIFIERS />, if no according data is given. An equivalent way to mark such sections empty is two write subsequent xml tags in the form of:
<STANDING_MODIFIERS>
</STANDING_MODIFIERS>
Of course, there must be no data between these two xml tags.

Another point is that the GameDir xml files often do not carry xml entries with default values, but the xml editor will always include default values.

Obviously, in order to compare xml files, it would be easier two ensure input and output files to have the same form.
Fortunately, its easy to adjust the original xml files regarding such simple deviations.

Anyway, I have some trouble with the Drugs.xml file. For instance, the "Energy Booster" does not carry the "chance" entry in its DRUG_EFFECT sections.
I assume, it does not have to since its effect will always be applied. Since the xml editor will add the "change" entry, I need to adjust the GameDir Drugs.xml file such that it carries default chance values.

What would default values of all entries in Drugs.xml be? Could I simply include a chance value of 100, where an effect is to be always applied?

Moreover, because there is now "empty" DRUG_EFFECT ID, could I simply add a DRUG_EFFECT section with ID=0 and chance=0 to be a non-applied default section?

I'm looking forward to any help ;)


Report message to a moderator

Private
Re: XML Editor Update: Let me deal with this![message #357997 is a reply to message #357996] Tue, 03 September 2019 16:18 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
You can look at the game source code. In Tactical\XML_Drugs.cpp you will find definitions like this:

		else if ( pData->curElement == ELEMENT &&
				  (strcmp( name, "DRUG_EFFECT" ) == 0) )
		{
			pData->curElement = ELEMENT_DRUG_EFFECT;

			// start of a new element: set default values
			pData->drug_effects.effect = 0;
			pData->drug_effects.duration = 0;
			pData->drug_effects.size = 0;
			pData->drug_effects.chance = 100;
				
			pData->maxReadDepth++;
		}

These are the defaults which are overwritten by the values from the xml.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Report message to a moderator

Lieutenant
Re: XML Editor Update: Let me deal with this![message #357998 is a reply to message #357645] Tue, 03 September 2019 20:44 Go to previous messageGo to next message
XeMessiah is currently offline XeMessiah

 
Messages:7
Registered:July 2019
@silversurfer: Thank you!

Report message to a moderator

Private
Re: XML Editor Update: Let me deal with this![message #358534 is a reply to message #357998] Wed, 20 November 2019 22:04 Go to previous messageGo to next message
Blacksun is currently offline Blacksun

 
Messages:7
Registered:August 2018
any progress? can't wait to get my hands on the editor! :-)

Report message to a moderator

Private
Re: XML Editor Update: Let me deal with this![message #358636 is a reply to message #358534] Thu, 12 December 2019 01:08 Go to previous messageGo to next message
XeMessiah is currently offline XeMessiah

 
Messages:7
Registered:July 2019
Hey folks,

as far as I see it, the editor is ready to be used again.

Unfortunately, I won't have time the next two weeks to upload it.

I plan to have a working repository online still in this year.

Report message to a moderator

Private
Re: XML Editor Update: Let me deal with this![message #358692 is a reply to message #358636] Fri, 20 December 2019 21:13 Go to previous messageGo to next message
Parkan is currently offline Parkan

 
Messages:439
Registered:April 2010
Location: Russia,Sevastopol

So,this will be a new xml editor or just updated version of xml editor which includes in SCI and SVN Repository?


1.Serve the public trust
2.Protect the innocent
3.Uphold the law(c)Robocop

Report message to a moderator

Master Sergeant
Re: XML Editor Update: Let me deal with this![message #359193 is a reply to message #357645] Mon, 16 March 2020 10:40 Go to previous messageGo to next message
Midnite is currently offline Midnite

 
Messages:12
Registered:April 2018
Location: Roannapur
Has there been any progress with the XML Editor? Editing XMLs manually is fine and all that... but tracking down SLFs is a bit labor-intensive without it.

Report message to a moderator

Private
Re: XML Editor Update: Let me deal with this![message #359986 is a reply to message #359193] Sun, 10 May 2020 15:25 Go to previous messageGo to next message
Fallaxia is currently offline Fallaxia

Messages:3
Registered:July 2019
Location: Germany
@XeMessiah

Can you upload your current progress? It would be nice to see a #working again# Editor.

Report message to a moderator

Civilian
Re: XML Editor Update: Let me deal with this![message #361094 is a reply to message #359986] Thu, 03 September 2020 00:11 Go to previous messageGo to next message
Kurt is currently offline Kurt

 
Messages:423
Registered:March 2004
What the hell was that?

This person created an account to post this thread (and only this thread), and then, when things became serious, he vanished in thin air... It's now 8 months later, and his "ready to be used again" editor remains pure vaporware.

Still, we do need somebody to update the XML Editor. Someone real. speechless

I've been working with an old JA2 version, for which the XML Editor still existed, and I can't imagine porting my mod to 8796 without that essential piece of software...

Report message to a moderator

Master Sergeant
Re: XML Editor Update: Let me deal with this![message #361096 is a reply to message #361094] Thu, 03 September 2020 03:19 Go to previous messageGo to next message
SinMachina is currently offline SinMachina

 
Messages:48
Registered:August 2020
Kurt, lucky for you, I'm currently working on a project to more easily translate the main XML files [Merc, Items, Weapons, StartingGear] and fully comment each short hand field. However, this is still in its early steps [I'm about half way done with MercProfiles], and as each new XML is completed, and tested to be bug free and accurate, I'll add an option to upload it.

Report message to a moderator

Corporal
Re: XML Editor Update: Let me deal with this![message #361107 is a reply to message #361096] Thu, 03 September 2020 19:23 Go to previous messageGo to next message
Kurt is currently offline Kurt

 
Messages:423
Registered:March 2004
SinMachina wrote on Thu, 03 September 2020 02:19
a project to more easily translate the main XML files
What do you mean by "translate"? You mean comment?

Well, that definitely would be useful, I tried using proedit to get an idea about what some values in the MercProfiles.xml might mean. Not the most efficient way...

But still, the spreadsheet style view of the XML Editor is way more compact and easier to navigate, and nothing will ever beat the XML Editor for bulk editing of items. Example: Let's say I want the heavy anti-materiel rifles to have the same damage values since they mostly use the same ammunition (12.7x99mm NATO (.50 BMG)). With the XML Editor it's as easy as sorting by caliber, and typing in the new damage value: It takes about as much time as saying it.
Now using a text editor, I need to search for the right caliber line, then find the damage line of that item, and edit it, then find the next one. Not that it can't be done, but it takes a lot more time, especially if you edit many values on dozens of items.


I definitely declare the XML Editor to be a must-have, something essential to all modders out there, a priority project... crying

Unfortunately I can't code my way out of a paper bag.

Report message to a moderator

Master Sergeant
Re: XML Editor Update: Let me deal with this![message #362133 is a reply to message #357645] Mon, 28 December 2020 22:38 Go to previous messageGo to next message
Blacksun is currently offline Blacksun

 
Messages:7
Registered:August 2018
still no new version of the editor or other userfriendly solution?

Report message to a moderator

Private
Re: XML Editor Update: Let me deal with this![message #362530 is a reply to message #362133] Tue, 23 February 2021 23:57 Go to previous messageGo to next message
Szaruga is currently offline Szaruga

Messages:4
Registered:February 2021
My friend and I are trying to update the XML Editor to work with the new version 1.13
For starters, I have a question:
There are 13 new item parameters that the XML editor does not "read", these are:
-------
<usHackingModifier>0</usHackingModifier>
<usBurialModifier>0</usBurialModifier>
<antitankmine>0</antitankmine>
<cigarette>0</cigarette>
<usPortionSize>0</usPortionSize>
<diseaseprotectionface>0</diseaseprotectionface>
<diseaseprotectionhand>0</diseaseprotectionhand>
<usRiotShieldStrength>0</usRiotShieldStrength>
<usRiotShieldGraphic>0</usRiotShieldGraphic>
<bloodbag>0</bloodbag>
<emptybloodbag>0</emptybloodbag>
<medicalsplint>0</medicalsplint>
<sFireResistance>0</sFireResistance>
-------
Before I get to know better what they are used for and what types of items are associated with, can someone please write me in which XML editor editing windows should these new parameters be found?

Also, where can I find a list of all the item flags (the ones in the ItemFlag XML field) that are used in the current version of 1.13?

[Updated on: Wed, 24 February 2021 00:06]




"When you see the truth triumph, ask what powerful lie was fighting for it."

Report message to a moderator

Civilian
Re: XML Editor Update: Let me deal with this![message #362531 is a reply to message #362530] Wed, 24 February 2021 08:39 Go to previous messageGo to next message
Deleted.

 
Messages:2663
Registered:December 2012
Location: Russian Federation
Szaruga wrote on Wed, 24 February 2021 02:57
Also, where can I find a list of all the item flags (the ones in the ItemFlag XML field) that are used in the current version of 1.13?
Check Item Types.h
Toggle Spoiler
Also check Data-1.13\TableData\Lookup\ItemFlag.xml which should be used by XML Editor.



Left this community.

Report message to a moderator

Lieutenant

Re: XML Editor Update: Let me deal with this![message #362550 is a reply to message #362531] Fri, 26 February 2021 17:44 Go to previous messageGo to next message
Szaruga is currently offline Szaruga

Messages:4
Registered:February 2021
sevenfm wrote on Wed, 24 February 2021 08:39
...................Also check Data-1.13\TableData\Lookup\ItemFlag.xml which should be used by XML Editor.
Thanks.

All right - the flags seem to be working already.
But...
1) The xml editor causes big problems when saving, even if we change only one thing, or even change nothing, then after saving - the editor itself introduces a lot of changes, e.g. the <ubClassIndex> parameter changes without order and composition, sometimes it increases, sometimes decreases (by different values) and sometimes remains unchanged. (in addition, I have not yet determined what this parameter is responsible for.) What's worse, even the old, supposedly working editor with the 7609 file version does it - this suggests that the correct operation of the xml editor goes back even older times? version 4850? Before?
2) Some things changed their type, eg the <alcohol> parameter in the old game was "boolean" and is now a number.
3) Editor seems to be designed mainly for editing weapons, because in the case of other items - it looks worse (e.g. drugs, food).

We will try to find out if this whole mess when saving can be fixed.



"When you see the truth triumph, ask what powerful lie was fighting for it."

Report message to a moderator

Civilian
Re: XML Editor Update: Let me deal with this![message #362551 is a reply to message #362550] Fri, 26 February 2021 17:48 Go to previous messageGo to next message
Deleted.

 
Messages:2663
Registered:December 2012
Location: Russian Federation
ubClassIndex is a reference to id in another table which is determined by usItemClass and possibly other tags, for example for explosives (usItemClass = 512, 256) ubClassIndex points to uiIndex in Explosives.xml, for guns in Weapons.xml etc.


Left this community.

Report message to a moderator

Lieutenant

Re: XML Editor Update: Let me deal with this![message #362869 is a reply to message #362551] Tue, 13 April 2021 03:46 Go to previous message
awatz is currently offline awatz

 
Messages:42
Registered:August 2002
Location: Philippines
What editor version are you guys using?

I am using SCI_JA2v1.13_Revision_8796_on_GameDir_2531
I've tried xml editor versions 103,104, and 105
I'm getting this error
https://imgur.com/bTpHOyt

Report message to a moderator

Corporal
Previous Topic: bAccuracy to nAccuracy conversion formula?
Next Topic: Removing "Day" factor from weapon/item progress
Goto Forum:
  


Current Time: Fri Mar 29 09:24:15 GMT+2 2024

Total time taken to generate the page: 0.02495 seconds