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
|
|
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 #357674 is a reply to message #357670]
|
Sun, 21 July 2019 16:54
|
|
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 #357996 is a reply to message #357645]
|
Tue, 03 September 2019 13:23
|
|
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 #361096 is a reply to message #361094]
|
Thu, 03 September 2020 03:19
|
|
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
|
|
Kurt |
|
Messages:420
Registered:March 2004 |
|
|
SinMachina wrote on Thu, 03 September 2020 02:19a 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...
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 #362530 is a reply to message #362133]
|
Tue, 23 February 2021 23:57
|
|
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
|
|
Deleted. |
|
Messages:2657
Registered:December 2012 Location: Russian Federation |
|
|
Szaruga wrote on Wed, 24 February 2021 02:57Also, 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// -------- added by Flugente: various item flags --------
// flags used for various item properties (easier than adding 32 differently named variables). DO NOT CHANGE THEM, UNLESS YOU KNOW WHAT YOU ARE DOING!!!
// note that these should not be used to determine what kind of an attachment an item is, that is determined by attachmentclass and the AC_xxx flags above
#define BLOOD_BAG 0x00000001 //1 // this item is a blood bag can can be used to boost surgery
#define MANPAD 0x00000002 //2 // this item is a MAn-Portable Air-Defense System
#define BEARTRAP 0x00000004 //4 // a mechanical trap that does no explosion, but causes leg damage to whoever activates it
#define CAMERA 0x00000008 //8
#define WATER_DRUM 0x00000010 //16 // water drums allow to refill canteens in the sector they are in
#define MEAT_BLOODCAT 0x00000020 //32 // retrieve this by gutting a bloodcat
#define MEAT_COW 0x00000040 //64 // retrieve this by gutting a cow
#define BELT_FED 0x00000080 //128 // item can be fed externally
#define AMMO_BELT 0x00000100 //256 // this item can be used to feed externally
#define AMMO_BELT_VEST 0x00000200 //512 // this is a vest that can contain AMMO_BELT items in its medium slots
#define CAMO_REMOVAL 0x00000400 //1024 // item can be used to remove camo
#define CLEANING_KIT 0x00000800 //2048 // weapon cleaning kit
#define ATTENTION_ITEM 0x00001000 //4096 // this item is 'interesting' to the AI. Dumb soldiers may try to pick it up
#define GAROTTE 0x00002000 //8192 // this item is a garotte
#define COVERT 0x00004000 //16384 // if LBE, any gun inside will be covert. On a gun, it will be covert in any LBE, even if the LBE does not have that tag itself
#define CORPSE 0x00008000 //32768 // a dead body
#define SKIN_BLOODCAT 0x00010000 //65536 // retrieve this by skinning (=decapitating) a bloodcat
#define NO_METAL_DETECTION 0x00020000 //131072 // a planted bomb with this flag can NOT be detected via metal detector. Use sparingly!
#define JUMP_GRENADE 0x00040000 //262144 // add +25 heigth to explosion, used for bouncing grenades and jumping mines
#define HANDCUFFS 0x00080000 //524288 // item can be used to capture soldiers
#define TASER 0x00100000 //1048576 // item is a taser, melee hits with this will drain breath (if batteries are supplied)
#define SCUBA_BOTTLE 0x00200000 //2097152 // item is a scuba gear air bottle
#define SCUBA_MASK 0x00400000 //4194304 // item is a scuba gear breathing mask
#define SCUBA_FINS 0x00800000 //8388608 // this item speed up swimming, but slows walking and running
#define TRIPWIREROLL 0x01000000 //16777216 // this item is a tripwire roll
#define RADIO_SET 0x02000000 //33554432 // item can be used to radio militia/squads in other sectors
#define SIGNAL_SHELL 0x04000000 //67108864 // this is a signal shell that precedes artillery barrages
#define SODA 0x08000000 //134217728 // item is a can of soda, sold in vending machines
#define ROOF_COLLAPSE_ITEM 0x10000000 //268435456 // this item is required in the collapsing of roof tiles. It is used internally and should never be seen by the player
#define DISEASEPROTECTION_1 0x20000000 //536870912 // this item protects us from getting diseases by human contact if kept in inventory
#define DISEASEPROTECTION_2 0x40000000 //1073741824 // this item protects us from getting diseases by human contact if kept in inventory
#define LBE_EXPLOSIONPROOF 0x80000000 //2147483648 // any gear in LBE with this flag is protected from explosions
// extended flagmask to UINT64
#define EMPTY_BLOOD_BAG 0x0000000100000000 // this item is a empty blood bag
#define MEDICAL_SPLINT 0x0000000200000000 // this item is a medical splint that can be applied to some diseases
Also check Data-1.13\TableData\Lookup\ItemFlag.xml which should be used by XML Editor.
Left this community.Report message to a moderator
|
|
|
|
Re: XML Editor Update: Let me deal with this![message #362550 is a reply to message #362531]
|
Fri, 26 February 2021 17:44
|
|
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
|
|
|
|
|
Goto Forum:
Current Time: Mon Jan 13 19:41:06 GMT+2 2025
Total time taken to generate the page: 0.01530 seconds
|