I've been lurking around to find any good way of making NPC equipment fully random. Today I found that there's a change in the engine you guys made ( viewtopic.php?f=32&t=549 ).
So, I've done everything as described but the game chooses EVERY item from the [spawn_loadout].
Could be the #include a cause of the problem?
Example:
Code: Select all
<specific_character id="sim_default_killer_0_default_0a" team_default = "1">
<name>GENERATE_NAME_stalker</name>
<icon>ui_inGame2_merc_2</icon>
<map_icon x="1" y="0"></map_icon>
<bio>??????? ???????. f???????¤ ?????????¤ ???????????.</bio>
<class>sim_default_killer_0</class>
<community>killer</community> <terrain_sect>stalker_terrain</terrain_sect>
<snd_config>characters_voice\human_03\killer\</snd_config>
<rank>1747</rank>
<money min="250" max="1750" infinitive="0"/>
<reputation>0</reputation>
<visual>actors\stalker_merc\stalker_merc_2</visual>
<supplies>
[spawn]
#include "gameplay\character_gr_primaryweapons_merc_0.xml"
#include "gameplay\character_gr_secondaryweapons_mercenary.xml"
#include "gameplay\character_gr_grenades_mixed.xml"
#include "gameplay\character_gr_medical_mixed.xml"
#include "gameplay\character_gr_food.xml"
#include "gameplay\character_gr_detectors.xml"
merc_outfit, prob=0.005 \n
</supplies>
#include "gameplay\character_criticals_4.xml"
#include "gameplay\character_dialogs.xml"
</specific_character>
Where #include "gameplay\character_gr_primaryweapons_merc_0.xml" looks like that:
Code: Select all
[spawn_loadout] \n
weapon1 \n
weapon2 \n
weapon3 \n
etc.
Also, there's an order for loading every #include.
Primary weapons are in [spawn_loadout]
Secondary weapons are in [spawn_loadout2]
[spawn_loadout3] only in case of *_medical_mixed.xml
[spawn_loadout4] for detectors.
The .xml containing grenades doesn't use [spawn_loadout(number)]
Happy New Year and hopefully next MOTY in 2017 !