Arty1 Posted May 19, 2023 Share Posted May 19, 2023 So I am trying to add my own items to a personal Treasure quest: loot.xml <lootgroup name="InfinityItems"> <item name="InfinityPistol" count="1" loot_prob_template="high"/> <item name="InfinityAmmo" count="1" loot_prob_template="high"/> <item name="FinalNote" count="1" loot_prob_template="high"/> </lootgroup> <append xpath='//lootgroup[@name="groupBuriedWeaponChest"]'> <item group="InfinityItems" count="1" loot_prob_template="high" force_prob="true"/> </append> quest.xml <quest id="FinalChestHunt"> <property name="name_key" value="quest_FinalChestHunt_supplies"/> <property name="subtitle_key" value="quest_buried_supplies_subtitle"/> <property name="description_key" value="quest_buried_supplies_description"/> <property name="icon" value="ui_game_symbol_treasure"/> <property name="repeatable" value="true"/> <property name="category_key" value="quest"/> <property name="offer_key" value="quest_FinalChestHunt_offer"/> <property name="difficulty" value="medium"/> <property name="difficulty_tier" value="3"/> <property name="statement_key" value="quest_buried_supplies_statement"/> <property name="response_key" value="quest_buried_supplies_response"/> <property name="completiontype" value="TurnIn"/> <property name="completion_key" value="quest_buried_supplies_completion"/> <property name="shareable" value="true"/> <objective type="TreasureChest"> <property name="phase" value="1" /> <property name="block" value="cntBuriedWeaponChest"/> <property name="distance" value="2000-3000"/> <property name="default_radius" value="9"/> <property name="container_type" value="Supplies"/> <property name="nav_object" value="treasure" /> <property name="direct_nav_object" value="treasure_direct" /> <property name="blocks_per_reduction" value="10" /> <property name="radius_reduction_sound" value="ui_radius_shrink" /> </objective> <reward type="Exp" value="1000"/> <action type="ShowTip" value="FinalMessage"/> </quest> The items are not appearing in the chest, Does anyone know why? There are no errors. This is the group I am trying to put it in: <lootgroup name="groupBuriedWeaponChest"> <item group="groupWeaponsAllScaled" prob="2"/> <item group="groupArmorScaled" prob="1"/> <item group="groupModAllScaled" prob="1"/> <item group="schematicsModsAndGeneralCommon" loot_prob_template="high"/> <item group="schematicsModsAndGeneralRare" loot_prob_template="low"/> </lootgroup> Link to comment Share on other sites More sharing options...
BFT2020 Posted May 19, 2023 Share Posted May 19, 2023 Check your append path. It is adding it not to the group, but after the group. You need to go one more level to add it inside the group. If you go to the roaming save files, the game creates config files after the mods are loaded in. You can see where your mod is placing the code Link to comment Share on other sites More sharing options...
BFT2020 Posted May 19, 2023 Share Posted May 19, 2023 (edited) Err nm, that is not the cause. I tried it and it put it on my game. However, you have some syntax errors in your append statement: <append xpath='//lootgroup[@name="groupBuriedWeaponChest"]'> should be <append xpath="//lootgroup[@name='groupBuriedWeaponChest']"> Are you wanting a chance for them to appear or guaranteed to be in there? Edited May 19, 2023 by BFT2020 spacing!!! (see edit history) Link to comment Share on other sites More sharing options...
khzmusik Posted May 20, 2023 Share Posted May 20, 2023 (edited) 6 hours ago, BFT2020 said: However, you have some syntax errors in your append statement: <append xpath='//lootgroup[@name="groupBuriedWeaponChest"]'> should be <append xpath="//lootgroup[@name='groupBuriedWeaponChest']"> In theory, both should be valid XML, though the double quotes are far more common. I suspect that the real issue is that the probabilities are too low for the added loot group. A loot probability of "high" is 0.75, which makes it equally as common as the "schematicsModsAndGeneralCommon" loot group. And how often do you get schematics in your buried supplies quests? My advice is to make a new container block, that is basically the same as "cntBuriedWeaponChest" but uses a new lootcontainer. The new lootcontainer would reference the "InfinityItems" lootgroup. EDIT: Also, this forum is only for mod authors to announce and support their own mods. This should be in the "Discussions and Request" forum. Read the big red "Posting in the Mod Forum" link, in the banner at the top of this page. Edited May 20, 2023 by khzmusik (see edit history) Link to comment Share on other sites More sharing options...
BFT2020 Posted May 20, 2023 Share Posted May 20, 2023 6 hours ago, khzmusik said: I suspect that the real issue is that the probabilities are too low for the added loot group. A loot probability of "high" is 0.75, which makes it equally as common as the "schematicsModsAndGeneralCommon" loot group. And how often do you get schematics in your buried supplies quests? Yeah, that was what I was thinking which is why I asked the OP what their probability attempt target was. @Arty1 To expand on khzmusik's comments: Loot container <!-- cntBuriedWeaponChest --> <lootcontainer id="122" name="buriedSuppliesT2" count="2,3" size="8,9" sound_open="UseActions/open_chest" sound_close="UseActions/close_chest" loot_quality_template="qualBaseTemplate"> <item group="groupBuriedWeaponChest"/> </lootcontainer> So 50/50 chance that either 2 or 3 items will be in the container From the loot group (with the new loot group items) <lootgroup name="groupBuriedWeaponChest"> <item group="groupWeaponsAllScaled" prob="2"/> <item group="groupArmorScaled" prob="1"/> <item group="groupModAllScaled" prob="1"/> <item group="schematicsModsAndGeneralCommon" loot_prob_template="high"/> <item group="schematicsModsAndGeneralRare" loot_prob_template="low"/> <item group="InfinityItems" count="1" loot_prob_template="high" force_prob="true"/> </lootgroup> The loot probability is based on totaling up the numbers and then divided by the specific item or group. So in this case: 2+1+1+0.75+0.2+0.75 = 5.7 Your new group: .75/5.7 or around 13% chance (for each pick) So can fiddle around with the numbers to change the probabilities. Another thing you can do is use All in count. For example, <lootgroup name="groupBuriedWeaponChest" count="all"> <item group="groupWeaponsAllScaled" prob="2"/> <item group="groupArmorScaled" prob="1"/> <item group="groupModAllScaled" prob="1"/> <item group="schematicsModsAndGeneralCommon" loot_prob_template="high"/> <item group="schematicsModsAndGeneralRare" loot_prob_template="low"/> <item group="InfinityItems" count="1" loot_prob_template="high" force_prob="true"/> </lootgroup> What that does is force the game to look at each lootgroup inside of it. So you can easily get a lot more stuff as each line has a chance to spawn on the first pick, then repeats again on the 2nd and possibly 3rd pick. Probably for you, the best thing to do is just to change the probability numbers of the lootgroup. Link to comment Share on other sites More sharing options...
Arty1 Posted May 21, 2023 Author Share Posted May 21, 2023 Cheers guys! That has sorted my problem! Thanks for helping out again BFT2020!! Cheers khzmusik as well, and noted on the wrong group, will post in that one next time 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