feiyi Posted December 8, 2021 Share Posted December 8, 2021 (edited) I try to add an ID in the loot.xml file to define a drop list, and then add lotlistondeath in the entityclasses.xml file, but an error will be reported when entering the game, and a red letter will pop up when searching Edited December 8, 2021 by feiyi (see edit history) Link to comment Share on other sites More sharing options...
Red Eagle LXIX Posted December 8, 2021 Share Posted December 8, 2021 LootContainer references are now based on names instead of numeral IDs, making collisions between mods less likely You need to give the container a name not an ID anymore. Link to comment Share on other sites More sharing options...
feiyi Posted December 8, 2021 Author Share Posted December 8, 2021 40 minutes ago, Red Eagle LXIX said: You need to give the container a name not an ID anymore. I added the specified name, but still reported an error <lootcontainer id="220" name="junk" count="0,2" size="4,3" sound_open="UseActions/open_backpack" sound_close="UseActions/close_backpack" open_time="1.5" loot_quality_template="qualBaseTemplate"> 52 minutes ago, Red Eagle LXIX said: You need to give the container a name not an ID anymore. A legal container contains ID and name. I once added ID and name. Name exists on the original basis. ID is also independent and unused, but red ink will jump every time I search Link to comment Share on other sites More sharing options...
Red Eagle LXIX Posted December 8, 2021 Share Posted December 8, 2021 (edited) I just noticed your screenshot is missing the close on the property tag during the append (or covered by the red marking). The name "junk" is already in use. Suggest fmod_junk as name. <lootcontainer id="220" name="fmod_junk" count="0,2" size="4,3" sound_open="UseActions/open_backpack" sound_close="UseActions/close_backpack" open_time="1.5" loot_quality_template="qualBaseTemplate"> Did you also change the pointer to it in the append? <append xpath="/entity_classes/entity_class[@name='zombieTemplateMale']"> <property name="LootListOnDeath" value="fmod_junk"/> </append> Edited December 8, 2021 by Red Eagle LXIX Checked loot.xml, container named junk already exists. (see edit history) Link to comment Share on other sites More sharing options...
feiyi Posted December 8, 2021 Author Share Posted December 8, 2021 Just now, Red Eagle LXIX said: Did you also change the pointer to it? <append xpath="/entity_classes/entity_class[@name='zombieTemplateMale']"> <property name="LootListOnDeath" value="junk"/> </append> <append xpath="/entity_classes/entity_class[@name='zombieTemplateMale']"> <property name="LootListOnDeath" value="junk" /> </append> Value should not be ID? Before A20, I always used ID Link to comment Share on other sites More sharing options...
Red Eagle LXIX Posted December 8, 2021 Share Posted December 8, 2021 (edited) Correct, id is not used anymore. EDIT: Also please see the edit above, junk is already in use, name it something else, I changed to add a suggestion. Edited December 8, 2021 by Red Eagle LXIX (see edit history) Link to comment Share on other sites More sharing options...
feiyi Posted December 8, 2021 Author Share Posted December 8, 2021 6 minutes ago, Red Eagle LXIX said: Correct, id is not used anymore. EDIT: Also please see the edit above, junk is already in use, name it something else, I changed to add a suggestion. In other words, the new version binds the container according to the name, not the ID, so I just need to add a new name to bind? 1 minute ago, feiyi said: In other words, the new version binds the container according to the name, not the ID, so I just need to add a new name to bind? <lootcontainer id="220" name="junk_items" count="0,2" size="4,3" sound_open="UseActions/open_backpack" sound_close="UseActions/close_backpack" open_time="1.5" loot_quality_template="qualBaseTemplate"> <append xpath="/entity_classes/entity_class[@name='zombieTemplateMale']"> <property name="LootListOnDeath" value="junk_items" /> </append> Link to comment Share on other sites More sharing options...
Red Eagle LXIX Posted December 8, 2021 Share Posted December 8, 2021 Yes, you got it. Link to comment Share on other sites More sharing options...
feiyi Posted December 8, 2021 Author Share Posted December 8, 2021 1 minute ago, Red Eagle LXIX said: Yes, you got it. Thank you for your help. I like your modules very much👍 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now