EpicSpire Posted October 10, 2020 Share Posted October 10, 2020 i'm trying to make a small mod that replaces the screamer with a horde. so instead of summoning a screamer, if just get a horde as if she called them. i know how to editt he xml to do this, but i do not know how to make the xpath command to do it via a modlet. The modlette is meant to be used in a pure burnt forest biome and i'd like the horde to only consist of zombieBurnt and zombieSteveCrawler, but i want it to spawn in more than 1 of each and i don't know how to do that either. the main issue i have is the /set or /append coding. if i want to change: <entitygroup name="ZombieScouts"> <entity name="zombieScreamer"/> </entitygroup> to <entitygroup name="ZombieScouts"> <entity name="zombieBurnt" /> <entity name="zombieSteveCrawler" /> </entitygroup> do i use /set or /append and how do i make it so it spawns more than 1 of each? perferably based on GameStage Link to comment Share on other sites More sharing options...
PrimalCarnage Posted October 13, 2020 Share Posted October 13, 2020 I'm new to this myself, but I will try to help the best I can. If I'm not mistaken, your code should be something like this: <config> <remove xpath="entitygroups/entitygroup[@name='ZombieScouts']"/entity[@name='zombieScreamer']/> <append xpath="entitygroups/entitygroup[@name='ZombieScouts']"> <entity name="zombieBurnt"/> <entity name="zombieSteveCrawler"/> </append> </config> If I am correct, and have read your post correctly, the code I have provided will remove the Screamer Zombie from the group "ZombieScouts", then add the Burnt Zombie, and Zombie Crawler Steve to that group. As far as how to adjust how many zombies spawn I have no idea how to do that. Please let me know if you figure that part out, and if my code helped you. Link to comment Share on other sites More sharing options...
EpicSpire Posted October 17, 2020 Author Share Posted October 17, 2020 i can make the scout spawn a horde.. but since they were spawned by the scout spawning system.. they will all be scouts. the screamer does not have the ability to summon more zombies.. the scout class gives it that ability. so if your scout command calls in 6 crawlers.. all 6 of them will call in their own screamer horde if their alert goes off... lol Link to comment Share on other sites More sharing options...
AuroraGiggleFairy Posted October 23, 2020 Share Posted October 23, 2020 On 10/16/2020 at 7:49 PM, EpicSpire said: the scout class gives it that ability. That is seriously good to know! But to answer your question, I believe that piece is part of the .dll or hardcorded or whatever, and not modifiable through xml. At least, specifically changing what the "scout" does. Link to comment Share on other sites More sharing options...
EpicSpire Posted October 25, 2020 Author Share Posted October 25, 2020 thank you, i was told that by someone else too so its good to have a confirmation. Link to comment Share on other sites More sharing options...
CrazyAluminum Posted November 4, 2020 Share Posted November 4, 2020 I don't wanna create other stupid topics, so I post my question here 1. How to add tiered="false" to all effect_group's inside all items that have melee, gun or armor in their name. as example <effect_group name="meleeToolAxeT1IronFireaxe"> to <effect_group name="meleeToolAxeT1IronFireaxe" tiered="false"> doesn't work <append xpath="//item[contains(@name,'melee') or contains(@name,'gun') or contains(@name,'armor')]/effect_group">tiered='false'</append> 2. How to change each RepairTools property to XX, if Material property is YY? As example, I have 500 machine guns and all of them has property name="Material" value="MMachineGunParts" and I wanna change RepairTools property to gunMGT1AK47Parts for all items that have such material <property name="Material" value="MMachineGunParts"/> <property name="RepairTools" value="resourceRepairKit"/> to <property name="Material" value="MMachineGunParts"/> <property name="RepairTools" value="gunMGT1AK47Parts"/> Link to comment Share on other sites More sharing options...
AuroraGiggleFairy Posted November 4, 2020 Share Posted November 4, 2020 1 hour ago, CrazyAluminum said: How to add tiered="false" <append xpath="//item[contains(@name,'melee') or contains(@name,'gun') or contains(@name,'armor')]/effect_group">tiered='false'</append> Example used online (https://7daystodie.gamepedia.com/XPath_Explained) <setattribute xpath="/items/item[@name='meleeBoneShiv']" name="author">sphereii</setattribute> So in your case: <setattribute xpath="//item[contains(@name,'melee') or contains(@name,'gun') or contains(@name,'armor')]/effect_group" name="tiered">false</setattribute> Link to comment Share on other sites More sharing options...
AuroraGiggleFairy Posted November 4, 2020 Share Posted November 4, 2020 1 hour ago, CrazyAluminum said: 2. How to change each RepairTools property to XX, if Material property is YY? Perhaps something like this would work? <remove xpath="/items/item[ add machine gun identifier here?]/property[@name='RepairTools']"/> <insertAfter xpath="items/item[ add machine gun identifier here?]/property[@value='MMachineGunParts']"> <property name="RepairTools" value="gunMGT1AK47Parts"/></insertAfter> Link to comment Share on other sites More sharing options...
CrazyAluminum Posted November 4, 2020 Share Posted November 4, 2020 53 minutes ago, Riles said: <append xpath="//item[contains(@name,'melee') or contains(@name,'gun') or contains(@name,'armor')]/effect_group">tiered='false'</append> Example used online (https://7daystodie.gamepedia.com/XPath_Explained) <setattribute xpath="/items/item[@name='meleeBoneShiv']" name="author">sphereii</setattribute> So in your case: <setattribute xpath="//item[contains(@name,'melee') or contains(@name,'gun') or contains(@name,'armor')]/effect_group" name="tiered">false</setattribute> tiered isn't a name Link to comment Share on other sites More sharing options...
AuroraGiggleFairy Posted November 4, 2020 Share Posted November 4, 2020 19 minutes ago, CrazyAluminum said: tiered isn't a name That is correct. In the code I provided, the name="tiered" is just referring to the name of the attribute you are adding, which is tiered. with the result turning to tiered="false" as within the line of code. Link to comment Share on other sites More sharing options...
CrazyAluminum Posted November 4, 2020 Share Posted November 4, 2020 21 minutes ago, Riles said: That is correct. In the code I provided, the name="tiered" is just referring to the name of the attribute you are adding, which is tiered. with the result turning to tiered="false" as within the line of code. Thanks! Also I'm confused how to remove the values I want, because these lines removes all Tags and property tags that I don't want to remove Edit: I got it, as example <removeattribute xpath="//@tags">perkMiner69r</removeattribute> Link to comment Share on other sites More sharing options...
AuroraGiggleFairy Posted November 4, 2020 Share Posted November 4, 2020 14 minutes ago, CrazyAluminum said: confused how to remove the values I want What values did you want removed? Link to comment Share on other sites More sharing options...
CrazyAluminum Posted November 4, 2020 Share Posted November 4, 2020 21 minutes ago, Riles said: What values did you want removed? All tags="perkGunslinger,9mmGun" (as example) and ,9mmGun and perkGunslinger (as example) from all Tags removeattribute removes all tags, remove doesn't work because of the game says that I need removeattribute Link to comment Share on other sites More sharing options...
AuroraGiggleFairy Posted November 4, 2020 Share Posted November 4, 2020 @CrazyAluminum hmmm... This one I wasn't sure if it was possible. I had used the "set" xpath to redo each item specifically... but that is a lot of a work. Ideas: 1.) take out the removeattribute commands, I don't believe that is how that specific xpath works. 2.) with the remove command, also specify if the tag has that attribute you want removed? Something like this (not sure if I am coding this correctly when it comes to "adding conditions": /property[@name='tags'][contains(@value,',9mmGun')]/@value> Also 3.) Modifying the progression system and the tags that utilize them is a PAIN! they are interconnected in many ways possibly included within the .dll. Sometimes just renaming them through localization and moving benefits around does the trick. Link to comment Share on other sites More sharing options...
CrazyAluminum Posted November 5, 2020 Share Posted November 5, 2020 10 hours ago, Riles said: @CrazyAluminum hmmm... This one I wasn't sure if it was possible. I had used the "set" xpath to redo each item specifically... but that is a lot of a work. Ideas: 1.) take out the removeattribute commands, I don't believe that is how that specific xpath works. 2.) with the remove command, also specify if the tag has that attribute you want removed? Something like this (not sure if I am coding this correctly when it comes to "adding conditions": /property[@name='tags'][contains(@value,',9mmGun')]/@value> Also 3.) Modifying the progression system and the tags that utilize them is a PAIN! they are interconnected in many ways possibly included within the .dll. Sometimes just renaming them through localization and moving benefits around does the trick. Do you check it yourself? I can't get this to work Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.