Home » MODDING HQ 1.13 » v1.13 General Development Talk » XML Clean-Up (Historically grown Data is a nightmare)
XML Clean-Up[message #366302] Wed, 06 November 2024 13:41 Go to next message
MasterN is currently offline MasterN

 
Messages:51
Registered:February 2011
Location: Berlin - Ger
Hi all.

A recent idea of some modifications escalated into a full XML overhaul.
Before you continue a little bit of context: I have never used the xml editor. Maybe 15 years ago I tried to check it out and just by chance caught it on a bad buggy non-working day and ever since I've been working directly in the xml files. Requires more care, but works. Nowadays I'm on linux and the thing outright doesn't start big grin
If any of my comments don't really affect sb who uses a reliable and efficient and easy to use tool like the xml-editor then please disregard (if you interpret a sarcastic undertone please consider that the editor is a separate piece of SW which may experience its own issues that require manual xml input to continue work).

Item.xml has organically grown. 335 entries for Vanilla, 1000+ entries for 1.13 (please see Items 428, 434, 442, 448 for extra confusion...).

I'd like to propose an internal item management concept for the file Items.xml.
The wiki reads: "uiIndex - the item index, number the items sequentially starting at 1 and ending at 5000. Don't skip numbers or the game will crash. Do not use items #0 and #70. Do not use the same number for two different items."
I don't know whether 5000 is a hard limit for the game but all the better as I had the number 8192 in mind.

You use reserved spaces for certain items.

  • 0-255: I have noticed a couple items that are essentially required for the game to run properly(and the editor :'D). 255 should be enough for all essential item for non-human enemies, quest-items, keys and so on for 1,13 and all mod ideas ppl may have. Maybe the editor-required entries can just go here as well...
  • 256-1279: 1000 spaces for attachments, armors, LBE-gear and all other miscellaneous items
  • 1280-3071: 1700+ spaces for Weapons(may be sub-divided for the weapon types as well)
  • 3072-4863: 1700+ spaces for ammo
  • rest: reserve
Suggestion would require these values be hard-coded into the editor.
Requires a singular but massive overhaul of all attached xml-files. But that would also allow a f-ton of unused stuff to be reviewed and removed.

Creates order in the main item database.
Allows for easier removal and especially eases overview.
Kitty was kind enough to remind me of something:
Adding own modifications after an update becomes a lot easier if all of this is in a more useful order than randomly added items. And that counts as well for potentially combining mods.

Report message to a moderator

Corporal
Re: XML Clean-Up[message #366304 is a reply to message #366302] Wed, 06 November 2024 23:36 Go to previous message
Kitty

 
Messages:472
Registered:October 2017
Location: Germany
Won't advice using XML-Editor at all. In will mess up your files should you be saving with it. Not worth it, all the more since you seem well aquainted with manually editing the files.

As for the amount of items in items.xml, pretty sure that quoted 5000 limit isn't a thing (anymore?). There are a few mods out there which I think break that.

Take a peek into SDO, AIMNAS/BRAINMOD or AV to see how those handled it. For example, just recently it was mentioned at Discord that Aimnas has managed to replace nearly all stock items, which may seems close to what you're up to.

[Updated on: Wed, 06 November 2024 23:37]




How to get: latest 1.13, 7609 and more | 7609 SCI (eng) | Compiling+SVN

I need more details. (Didi Hallervorden)

Report message to a moderator

Master Sergeant
Previous Topic: Changes to MercOpinions.xml
Next Topic: Release Notes
Goto Forum:
  


Current Time: Thu Nov 07 04:30:10 GMT+2 2024

Total time taken to generate the page: 0.01152 seconds