Home » MODDING HQ 1.13 » v1.13 Modding, Customising, Editing » v1.13 XML Customization » Extra Sector Items xml (Is there a catch?)
Extra Sector Items xml[message #362032]
|
Sat, 12 December 2020 07:49
|
|
Kitty |
|
Messages:436
Registered:October 2017 Location: Germany |
|
|
Found this explanation in "Docs"-Folder of an old 1.13:
This is an old 1.13 Feature which seems to be hidden for Modders long time.
This feature has been reworked by Headrock
-------------------------
XML filename format:
-------------------------
\tabledata\Map\[SectorGrid]_[ZLevel]_ExtraItems_[DifficultyName].xml
Examples:
\TableData\Map\A9_0_ExtraItems_Novice.xml -> for entering the A9 surface sector (Omerta) when playing novice difficulty.
\TableData\Map\D13_1_ExtraItems_Expert.xml -> for entering the first level of the Drassen Mine on Expert difficulty.
The following "DifficultyNames" are valid:
- Novice
- Experienced
- Expert
- Insane
-------------------------
XML content format:
-------------------------
<ExtraItems>
<Item>
<uiIndex>#</uiIndex>
<quantity>#</quantity>
<condition>#</condition>
<gridno>#</gridno>
<visible>#</visible>
</Item>
</ExtraItems>
-------------------------
XML notes:
-------------------------
- For clarity, uiIndex should always come first. However, I've set it so that the position of uiIndex
in the list is not relevant (so long as it exists). Most XMLs work that way, and I think that's fine.
- All other tags can come in any order.
- Quantity can be set to any number, but will only create an item (or more) if above 0.
Quantity of 0 or less will not crash the game, it simply won't create items.
If this tag is completely omitted, the game will create one item by default.
- Condition can be set to 1-100. If it is set outside these values, the item will not be created
(the game won't crash). If this tag is completely omitted, the item will have 100 condition.
- Gridno can be set to any positive number, including 0. However, if it is out of bounds,
the game will generate a screen message that it could not place the item, but will not crash the game.
Obviously, there is no rational default for this tag, so it must always be included.
- Visible can be set to 0 or 1. When 1, will create an item that is visible from the moment you enter the map.
Otherwise, a merc must spot the item by simple sight, like all other items on the map.
If this tag is omitted, the item is created with 0 visibility by default (must be spotted).
Did a quick test in Omerta, and it seems to be working. Items appear, no crash.
But, since it's ancient, is there a catch?
[Updated on: Sat, 12 December 2020 08:07]
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
|
|
|
|
|
|
|
Re: Extra Sector Items xml[message #362039 is a reply to message #362036]
|
Sun, 13 December 2020 01:04
|
|
Kitty |
|
Messages:436
Registered:October 2017 Location: Germany |
|
|
Kurt wrote on Sat, 12 December 2020 19:31Can you place items inside containers that way (hidden, only visible when opening the container)? To put it differently, is the definition of "hidden" the same as the Map Editor's?
What's the syntax for "gridno"? (I'd suspect "x,y", but I've grown wary...)
If there is a container at GridNo, items will be inside.
If items are inside container, it doesn't seem to matter if "visible" is 1 or 0. Mercs have to open container to see item.
Haven't tried it, but I expect that GridNo should be accesable. Like, don't place items at GridNo where there is already a tree, a wall, a rock, etc. Or on top of a mountain where mercs can't go, etc.
Like silversurfer said, to get the GridNo, you have to open the map with MapEditor (Guides on MapEditor are in Folder "Docs", GridNo are described in those, iirc).
silversurfer wrote on Sat, 12 December 2020 11:47I never heard of this feature, but it seems to be working, according to your test. Come to think of it - one could create a map with no items on it and simply add different items per difficulty with these XML files. If random items work - even better. It would also solve some issues with pre-placed items on maps, which have incorrect attachments, because the items from the XMLs would be created at runtime with the current data from Items.xml.
Did some more research. Found some of those xml in DL-1.13 v4.50, so it seems wil473 has used those for it.
In code, I found something at "Stratetic/XML_ExtraItems.cpp". Since you are way more qualified for code then me, I assume you can make more sense out of this then me (For me, it's just: "Hmm, there it seems to be definded. I whish I could find out if there are other places in code related to this.")
As for random items, I'm not sure if those work. As far as I understand, the possible content of random items is defined in RandomItems.xml. The actual items to call for those in RandomItems.xml are in items.xml. What I'm wondering is, if that wouldn't result in something like "that's internal, don't touch it", like items for explosions ?
I remember to have read a conversation between edmortimer and seven about random items. Gotta look if I've bookmarked this. With this I, hopefully, should be able to create some random-items for testing.
[Updated on: Sun, 13 December 2020 01:07]
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
|
|
|
|
|
Goto Forum:
Current Time: Fri Mar 29 06:40:05 GMT+2 2024
Total time taken to generate the page: 0.01042 seconds
|