Home » MODDING HQ 1.13 » v1.13 Modding, Customising, Editing » v1.13 XML Customization » Randomitem.XML (How does it work?)
|
|
|
Re: Randomitem.XML[message #359803 is a reply to message #359802]
|
Tue, 28 April 2020 03:24
|
|
Deleted. |
|
Messages:2663
Registered:December 2012 Location: Russian Federation |
|
|
There's also information from Russian 7609 FAQ (use google translate if needed):
Как создавать случайные предметы
Пример из мода SDO.
Items.xml:
Quote:<ITEM>
<uiIndex>2748</uiIndex>
<szItemName>Rnd Misc Item 1</szItemName>
<szLongItemName>Rnd Face Item</szLongItemName>
<usItemClass>1073741824</usItemClass>
<randomitem>7</randomitem>
...
</ITEM>
Тег <randomitemcoolnessmodificator> позволяет предмету менять требования coolness для выбора заданных в нем случайных предметов.
RandomItem.xml:
Quote:<RANDOMITEM>
<uiIndex>7</uiIndex>
<szName>Random Face Item, complete</szName>
<randomitem1>1</randomitem1>
...
<randomitem10>6</randomitem10>
<item1>0</item1>
...
<item10>0</item10>
</RANDOMITEM>
Теги <item1>..<item10> ссылаются реальные предметы в Items.xml
Теги <randomitem1>..<randomitem10> ссылаются на RandomItem.xml, таким образом случайные предметы ссылаются на другие случайные предметы, которые могут порождать в итоге группы реальных предметов.
RandomItem.xml:
Quote:<RANDOMITEM>
<uiIndex>1</uiIndex>
<szName>Random Face Item, Group 1/6</szName>
<randomitem1>0</randomitem1>
...
<randomitem10>0</randomitem10>
<item1>176</item1>
...
<item10>2306</item10>
</RANDOMITEM>
Items.xml:
Quote:<ITEM>
<uiIndex>176</uiIndex>
<szItemName>Steel Helmet</szItemName>
<szLongItemName>Steel Helmet</szLongItemName>
<usItemClass>2048</usItemClass>
...
</ITEM>
And also comments from Russian modder:
1) Если вписывать предметы только в теги <itemХ>ХX</itemХ>, то всегда будет браться только предмет <item1>Х</item1>.
2) Если в наборе присутствуют теги <randomitemХ> и <itemХ>, то выбор будет происходить только между <randomitem>.
3) Для корректной работы нужно создавать отдельно предмет <RANDOMITEM ХX>, в который вписываются предметы из Items.xml, и отдельно - предмет <RANDOMITEM YY>, который ссылается на предмет <RANDOMITEM ХХ> через тег <randomitemХ>ХХ</randomitemХ>.
[Updated on: Tue, 28 April 2020 03:30]
Left this community.Report message to a moderator
|
|
|
|
|
|
Re: Randomitem.XML[message #359806 is a reply to message #359804]
|
Tue, 28 April 2020 03:38
|
|
Deleted. |
|
Messages:2663
Registered:December 2012 Location: Russian Federation |
|
|
edmortimer wrote on Tue, 28 April 2020 05:34Thanks for trying. I still don't understand the most important part - which is #3
1) If you enter items only in the tags <itemX> XX </ itemX>, then only the item <item1> X </item1> will always be taken.
2) If the tags contain <randomitemX> and <itemX> tags, then the selection will occur only between <randomitem>.
3) For correct operation, you need to create a separate object <RANDOMITEM XX>, which contains items from Items.xml, and separately, an object <RANDOMITEM YY>, which refers to an object <RANDOMITEM XX> through the tag <randomitemХ> ХХ </ randomitemХ> .
That means - don't mix itemXX and randomitemXX tags in one record in RandomItem.xml, if you need only 10 possible random items, just make one record with only ItemXX tags, if you need more random items, you have to use nested tree in which case you create one record with only RandomItemXX tags which are ID references to the records in the same file where you can either define itemXX tags so the game translates it to real items or add another level of random items in which case you only use RandomItemXX tags.
Left this community.Report message to a moderator
|
|
|
|
|
Re: Randomitem.XML[message #361354 is a reply to message #359807]
|
Wed, 23 September 2020 03:24
|
|
edmortimer |
|
Messages:1533
Registered:January 2015 Location: Home Free |
|
|
OK, I've uncovered a problem with RandomItems regarding weapons. They appear correctly, and are loaded with ammunition (though, of course, the game doesn't provide any extra). However when unloading the weapon, regardless of which one it is (as long as it was spawned via RandomItems.XML), the ammunition will disappear. If loaded with new ammo, and then unloaded, that ammo will disappear also. It seems to fire correctly and do damage correctly when loaded, but always disappears the ammo when unloaded. Using Sevenfm's Tactical Panel (7609+AI_r1574) it shows that whenever ammunition is loaded into the randomly spawned weapon it becomes NADA. At least, that's what the Tactical Panel reports.
Report message to a moderator
|
|
|
|
|
|
Goto Forum:
Current Time: Thu Apr 18 19:09:33 GMT+3 2024
Total time taken to generate the page: 0.01150 seconds
|