Home » MODDING HQ 1.13 » v1.13 General Development Talk » fixing xml editor ?
fixing xml editor ?[message #348320] Mon, 16 January 2017 21:50 Go to next message
Czert

 
Messages:104
Registered:August 2007
anyone have idea at which time xml editor will be working agaain ?
will love to try some playing there.
Re: fixing xml editor ?[message #348383 is a reply to message #348320] Fri, 20 January 2017 19:50 Go to previous messageGo to next message
RoWa21

 
Messages:2040
Registered:October 2005
Location: Austria
If someone can list all the changes/tags for the xml files, I will try to make the xml editor working again.


Re: fixing xml editor ?[message #348385 is a reply to message #348383] Fri, 20 January 2017 20:30 Go to previous messageGo to next message
Flugente

 
Messages:3338
Registered:April 2009
Location: Germany
As it seems the editor was last updated in 2015 with r2262, any structural changes to relevant xmls afterwards. Which are:
  • AmmoTypes.xml:
    • <antiTank> was removed
    • new tags, all take values from 0.0 to 100.0 (float):
      <dDamageModifierLife> default 1.0
      <dDamageModifierBreath> default 1.0
      <dDamageModifierTank> default 0.0
      <dDamageModifierArmouredVehicle> default 0.0
      <dDamageModifierCivilianVehicle> default 0.0
      <dDamageModifierZombie> default 1.0
  • there are a lot more merchants in Merchants.xml (r2320), not sure whether his requires editor work
  • I assume MercProfiles.xml and SectorNames.xml are not relevant here, otherwise have to look at those closer
  • Items.xml:
    • added <usHackingModifier> (int, 0 - 100)
    • added <antitankmine> (int, 0 - 1)
    • not sure of these disease-related tags are in: <cigarette> (int, 0 - 1), <usPortionSize> (int, 0 - 100), <diseaseprotectionface> (int, 0 - 1), <diseaseprotectionhand> (int, 0 - 1)
    • current Item Flags for <ItemFlag> (frrom ItemTypes.h):
      // -------- 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 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 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
      



“What are you doing?” Joffrey interrupted him.

“… can’t a man give a few last words for his son to carry?”

“…Who told you your son was making it out of this field alive?”

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.


Re: fixing xml editor ?[message #348525 is a reply to message #348385] Sat, 28 January 2017 00:43 Go to previous messageGo to next message
Flugente

 
Messages:3338
Registered:April 2009
Location: Germany
Also, this affects AmmoTypes.xml.



“What are you doing?” Joffrey interrupted him.

“… can’t a man give a few last words for his son to carry?”

“…Who told you your son was making it out of this field alive?”

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.


Re: fixing xml editor ?[message #349890 is a reply to message #348525] Thu, 25 May 2017 23:18 Go to previous messageGo to next message
Huberclim

 
Messages:34
Registered:May 2011
Location: Germany
Hi guys,
sorry for a newbie question: What is the current status here? Can I edit the XML files before starting a game, e.g. for changing the stats and traits of the MERCs? Or isn't this working?
Thanks,
H
Re: fixing xml editor ?[message #349892 is a reply to message #349890] Fri, 26 May 2017 10:48 Go to previous messageGo to next message
silversurfer

 
Messages:2292
Registered:May 2009
XML Editor has not been updated so don't use it. With the current SCIs it doesn't even start because of unknown tags. If you want to edit XML files use a text editor. MercProfiles.xml has descriptions at the top so it shouldn't be too difficult to modify it.



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

Re: fixing xml editor ?[message #353340 is a reply to message #349892] Fri, 27 April 2018 01:32 Go to previous messageGo to next message
Hawkeye

 
Messages:1765
Registered:October 2005
Location: Australia
Considering some of the issues the XML editor has had for some time as well as not even starting, would it be time to remove from the SVN or not be included with the 1.13 install? That is if it hasn't been already?

I'm not looking to crap on someone elses work and the XML when it did work was very cool, but considering the confusion it's causing and the data it corrupts should it now be something to be installed individually?


Re: fixing xml editor ?[message #353342 is a reply to message #353340] Fri, 27 April 2018 11:11 Go to previous messageGo to next message
silversurfer

 
Messages:2292
Registered:May 2009
I guess if the XML Editor was coded in C++ there would be more people willing to update it. Unfortunately there don't seem to be any code converters that can transform a Visual Studio DotNet project into a Visual Studio C++ project. So unless we find a VB.Net coder we might as well remove the XML Editor from the standard download.



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

Re: fixing xml editor ?[message #353701 is a reply to message #348385] Wed, 06 June 2018 22:16 Go to previous messageGo to next message
NewAgeOfPower

 
Messages:110
Registered:June 2010
Flugente wrote on Fri, 20 January 2017 18:30
As it seems the editor was last updated in 2015 with r2262, any structural changes to relevant xmls afterwards. Which are:
[*] AmmoTypes.xml:

-snipped for brevity-

I recall simply copying AmmoTypes.xml, merchants.xml, and a handful of others to a backup folder before starting any editing, then copying them back over to 'repair' XML editor inflicted damage. Would such a procedure still work?
Re: fixing xml editor ?[message #353702 is a reply to message #353701] Wed, 06 June 2018 22:26 Go to previous messageGo to next message
Flugente

 
Messages:3338
Registered:April 2009
Location: Germany
Well... yes, unless you miss one. And this won't help if those are the xmls you edit.

What one can always do is to keep a svn copy of the current gamedir and copy over all the xmls the editor altered over that, and then use Tortoise svn diff tool to find and restore removed tags. But that becomes tedious fast, especially if one does large changes. It's not really workable unless you work on stock data, too.



“What are you doing?” Joffrey interrupted him.

“… can’t a man give a few last words for his son to carry?”

“…Who told you your son was making it out of this field alive?”

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.


Re: fixing xml editor ?[message #353703 is a reply to message #353702] Fri, 08 June 2018 00:10 Go to previous messageGo to next message
NewAgeOfPower

 
Messages:110
Registered:June 2010
Well, that seems reasonable. Where do I find the XML editor tool? It was not included with my install package.
Re: fixing xml editor ?[message #353704 is a reply to message #353703] Fri, 08 June 2018 03:55 Go to previous messageGo to next message
pheloncab

 
Messages:275
Registered:August 2004
Location: So. Cal. or texas
Would this help someone to rebuild the tool https://www.developerfusion.com/tools/convert/vb-to-csharp/ into something that could be used going forward?
Re: fixing xml editor ?[message #353705 is a reply to message #353704] Fri, 08 June 2018 12:19 Go to previous messageGo to next message
The_Bob

 
Messages:387
Registered:May 2009
Location: Behind you.
I don't think a converter could help fix this. What it would take is a hero who would make the sacrifice of reading through all of the editor's code and figuring out what changes to the xml files broke it. It seems like it's mostly designed to handle unknown tags but apparently that wasn't enough.

Then again the fix might be as simple as someone actually bothering to read the error message and tracing it back to the source. At least for the part that keeps the editor from starting in a new gamedir. The code that overwrites xml files is probably in the file I linked, it's just that there's a lot of other VB code there as well, and everyone enjoys looking at lots and lots of VB code.

Re: fixing xml editor ?[message #353706 is a reply to message #353705] Fri, 08 June 2018 13:09 Go to previous messageGo to next message
Enneagon

 
Messages:46
Registered:July 2016
Location: Latvia
The_Bob wrote on Fri, 08 June 2018 12:19
I don't think a converter could help fix this.


Please tell me that code is at least party auto-generated. No offense intended, and I'm a bit clueless about systems used, and not that I haven't seen (and even, ashamed to admit, produced) similar code (usually when initially small project bloat by many magnitudes unexpectedly fast), but there ought to be better way of doing this.

No much wonder no one wants to touch that with even a six yards long pole.
Re: fixing xml editor ?[message #353708 is a reply to message #353703] Fri, 08 June 2018 21:53 Go to previous message
Flugente

 
Messages:3338
Registered:April 2009
Location: Germany
NewAgeOfPower wrote on Thu, 07 June 2018 21:10
Well, that seems reasonable. Where do I find the XML editor tool? It was not included with my install package.

If I recall it was recently removed from the SCI due to the, well, behaviour described. But as it hasn't changed for years, you could download any SCI from '16 or '17 and extract the editor and it's xml files (basically anything with xml editor in the name) from there.



“What are you doing?” Joffrey interrupted him.

“… can’t a man give a few last words for his son to carry?”

“…Who told you your son was making it out of this field alive?”

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.


Previous Topic: Lasers/Rifle LAM providing bonus to reflex/iron sights only?
Next Topic: How to use sector fortification?
Goto Forum:
  


Current Time: Tue Jun 19 11:31:10 EEST 2018

Total time taken to generate the page: 0.01224 seconds