ProlificPoultry Posted April 3 Share Posted April 3 I have edited two of my game's xml files, specifically the entitygroups.xml and the gamestages.xml so that the bloodmoon hordes would be way bigger and harder with the spawns. The easy way to think about it is like how they were if you played Alpha 18 on insane difficulty as I have replaced the default 1.2x difficulty mulitplier with 2.5x. Also I pretty much just copy and pasted the zombie spawns from Alpha 18 and put them into the Alpha 20 entitygroups.xml EXCEPT I had to replace the cheerleader and the cowboy with the lumberjack and mutated zombie because the cheerleader and cowboy would throw me console errors since they are no longer in the game. What I need help with is turning this into an actual modlet. Like can I tell the game to use these modified xml's instead of the default ones or something like that? It's probably more involved than that I would think and I have watched some videos on xml mods however I haven't seen one trying to do something like this. I am pretty new to this kind of thing and I asked the modding Discord for help with not a lot of success but I figured since so many people have been able to help me with my problems here lately then I'd give posting here a go. I'd very much like for other people to be able to play with these settings because the hordes have just become so easy in Alpha 19/ 20 that the Horde is not really a threat anymore. Like you are 10x more likely to die while looting then on Horde Night so I wanted to change this. I know that it probably has to do with performance reasons that the hordes were nerfed but I don't see anything changing for the hordes or optimization in regards to Alpha 21 so I want to keep at this. Can anyone help me make this a mod? I can't attach my xmls here so I'll just paste bin them. Also the entitygroupsxml is too big to paste the entire thing so I just put the part that I modified. https://pastebin.com/rqDsf5Kk https://pastebin.com/AyhK26yQ 1 Link to comment Share on other sites More sharing options...
BFT2020 Posted April 3 Share Posted April 3 Here is an example of one I did that you can use as reference. Also when you go to that link, you should be able to see others that I made in the past. Link to comment Share on other sites More sharing options...
a_jp Posted April 4 Share Posted April 4 as my reference en-zombie It's a different way of doing things. modified for myself Only the ferrule hoard part Copy The GS numbers refer to the default ~, GS23 and below are not made, Created in the same way up to GS726 entitygroups.xml <append xpath="/entitygroups/entitygroup[@name='feralHordeStageGS23']"><entity name="a-zombieyo" prob="1.5"/><entity name="a-zombieyo2" prob="1.5"/><entity name="a-zombieyo3" prob="1.5"/><entity name="a-s-Demolition" prob="1.5"/><entity name="a-ZombieVulture" prob="0.5"/><entity name="a-zombieBoe" prob="1.5"/><entity name="a-zombieBigArlene" prob="1.5"/><entity name="a-s-zombieBoe" prob="1.2"/><entity name="a-zombieArlene" prob="1.2"/></append> <append xpath="/entitygroups/entitygroup[@name='feralHordeStageGS27']"><entity name="a-zombieyo" prob="1.5"/><entity name="a-zombieyo2" prob="1.5"/><entity name="a-zombieyo3" prob="1.5"/><entity name="a-s-Demolition" prob="1.5"/><entity name="a-ZombieVulture" prob="0.5"/><entity name="a-zombieBoe" prob="1.5"/><entity name="a-zombieBigArlene" prob="1.5"/><entity name="a-s-zombieBoe" prob="1.2"/><entity name="a-zombieArlene" prob="1.2"/></append> Link to comment Share on other sites More sharing options...
meganoth Posted April 4 Share Posted April 4 Please do not use "Mods" for discussions, this should be done in "Discussions and Requests". Thread has been moved Link to comment Share on other sites More sharing options...
ProlificPoultry Posted April 4 Author Share Posted April 4 6 hours ago, meganoth said: Please do not use "Mods" for discussions, this should be done in "Discussions and Requests". Thread has been moved Sorry about that Link to comment Share on other sites More sharing options...
ProlificPoultry Posted April 4 Author Share Posted April 4 12 hours ago, a_jp said: as my reference en-zombie It's a different way of doing things. modified for myself Only the ferrule hoard part Copy The GS numbers refer to the default ~, GS23 and below are not made, Created in the same way up to GS726 entitygroups.xml <append xpath="/entitygroups/entitygroup[@name='feralHordeStageGS23']"><entity name="a-zombieyo" prob="1.5"/><entity name="a-zombieyo2" prob="1.5"/><entity name="a-zombieyo3" prob="1.5"/><entity name="a-s-Demolition" prob="1.5"/><entity name="a-ZombieVulture" prob="0.5"/><entity name="a-zombieBoe" prob="1.5"/><entity name="a-zombieBigArlene" prob="1.5"/><entity name="a-s-zombieBoe" prob="1.2"/><entity name="a-zombieArlene" prob="1.2"/></append> <append xpath="/entitygroups/entitygroup[@name='feralHordeStageGS27']"><entity name="a-zombieyo" prob="1.5"/><entity name="a-zombieyo2" prob="1.5"/><entity name="a-zombieyo3" prob="1.5"/><entity name="a-s-Demolition" prob="1.5"/><entity name="a-ZombieVulture" prob="0.5"/><entity name="a-zombieBoe" prob="1.5"/><entity name="a-zombieBigArlene" prob="1.5"/><entity name="a-s-zombieBoe" prob="1.2"/><entity name="a-zombieArlene" prob="1.2"/></append> So are you telling the game to use something different for each game stage interval by writing <append xpath at the start of each line? And wouldn't I have to type this for every single interval as well if I am to do it this way? I mean I guess I could but that's like a ton of work I think. Isn't there an easier way? Maybe remove the lines that the game already has for the hordes then do append xpath and add your custom stuff? I could be talking out of my behind here so maybe it doesn't work quite like that. Also if I wanted to tell the game to add my stuff to the entitygroups.xml where would I tell it to add it too? This xml isn't set up like the items.xml or blocks.xmls where they have things that you can reference like append xpath="/items/item[@name='gunShotgunT0PipeShotgun']. Instead there's just the descriptions that they commented out unless I'm missing something 1 Link to comment Share on other sites More sharing options...
ProlificPoultry Posted April 4 Author Share Posted April 4 On 4/3/2023 at 11:28 AM, BFT2020 said: Here is an example of one I did that you can use as reference. Also when you go to that link, you should be able to see others that I made in the past. Well I wasn't quite able to use yours as a reference however that gave me the idea to use other mods that affect things similarly to mine and I found one of khaine's mods from alpha 19 that made the hordes bigger which I was able to reference to I think make mine work similarly. There was also this game stage mod for mulitplayer in Alpha 18 which I mirrored somewhat to get my gamestage multiplier working. The only thing I haven't been able to get to work is the different horde night spawns. It is still spawning the zombies for default bloodmoons so my thinking is that I use remove then append to tell the game to use mine instead of the vanilla spawns only I don't know how to tell the game to do that for the entire bloodmoon section of the xml since there's only the commented out stuff at the top like this: <!-- XXXXXXXXXXXXXXXXXXXXXXXXXXXX start: auto generated feral / blood mood horde groups XXXXXXXXXXXXXXXXXXXXXXXXXXXX --> <entitygroup name="feralHordeStageGS1"><entity name="zombieJoe"/><entity name="zombieNurse"/><entity name="zombieUtilityWorker"/><entity name="zombieBoe"/><entity name="zombieMoe"/><entity name="zombieMarlene"/><entity name="zombieYo"/><entity name="zombieJanitor"/><entity name="zombieTomClark"/><entity name="zombieSteve"/><entity name="zombieDarlene"/><entity name="zombiePartyGirl"/></entitygroup> <entitygroup name="feralHordeStageGS2"><entity name="zombieTomClark"/><entity name="zombieBoe"/><entity name="zombieJanitor"/><entity name="zombieArlene"/><entity name="zombieNurse"/><entity name="zombieBusinessMan"/><entity name="zombieUtilityWorker"/><entity name="zombieYo"/><entity name="zombieSteve"/><entity name="zombieMoe"/><entity name="zombiePartyGirl"/><entity name="zombieJoe"/></entitygroup> 1 Link to comment Share on other sites More sharing options...
a_jp Posted April 5 Share Posted April 5 Entering numbers for hordes It was really hard. Combat balance is hard. <entity name="a-zombieyo" prob="1.5"/> of this a-zombieyo The name of the original zombie. Link to comment Share on other sites More sharing options...
khzmusik Posted April 6 Share Posted April 6 (edited) On 4/4/2023 at 7:46 PM, ProlificPoultry said: Well I wasn't quite able to use yours as a reference however that gave me the idea to use other mods that affect things similarly to mine and I found one of khaine's mods from alpha 19 that made the hordes bigger which I was able to reference to I think make mine work similarly. There was also this game stage mod for mulitplayer in Alpha 18 which I mirrored somewhat to get my gamestage multiplier working. The only thing I haven't been able to get to work is the different horde night spawns. It is still spawning the zombies for default bloodmoons so my thinking is that I use remove then append to tell the game to use mine instead of the vanilla spawns only I don't know how to tell the game to do that for the entire bloodmoon section of the xml since there's only the commented out stuff at the top like this: <!-- XXXXXXXXXXXXXXXXXXXXXXXXXXXX start: auto generated feral / blood mood horde groups XXXXXXXXXXXXXXXXXXXXXXXXXXXX --> <entitygroup name="feralHordeStageGS1"><entity name="zombieJoe"/><entity name="zombieNurse"/><entity name="zombieUtilityWorker"/><entity name="zombieBoe"/><entity name="zombieMoe"/><entity name="zombieMarlene"/><entity name="zombieYo"/><entity name="zombieJanitor"/><entity name="zombieTomClark"/><entity name="zombieSteve"/><entity name="zombieDarlene"/><entity name="zombiePartyGirl"/></entitygroup> <entitygroup name="feralHordeStageGS2"><entity name="zombieTomClark"/><entity name="zombieBoe"/><entity name="zombieJanitor"/><entity name="zombieArlene"/><entity name="zombieNurse"/><entity name="zombieBusinessMan"/><entity name="zombieUtilityWorker"/><entity name="zombieYo"/><entity name="zombieSteve"/><entity name="zombieMoe"/><entity name="zombiePartyGirl"/><entity name="zombieJoe"/></entitygroup> If you want to totally replace the entity groups used by blood moon hordes, you can use an XPath expression that targets those XML nodes, and remove them. They all start with "feralHordeStage" so you could do something like this: <remove xpath="//entitygroup[starts-with(@name, 'feralHordeStage')]" /> EDIT: Here's a detailed explanation of what that does. "remove" is an XPath command. In this case the command is "remove any XML nodes that match this XPath expression." The "//" in XPath means "any descendant, not just a direct descendant." Since it's the first thing in the XPath expression, it means "any descendant of the root node in the XML document." "[" and "]" define a predicate - only nodes that match that predicate are selected. Predicates usually (but not always) target XML attributes. "starts-with" is an XPath method that selects any node whose text starts with a particular string. "@" means "select an attribute". In this case it selects the "name" attribute of any entitygroup tags in the document. You would then add back all of the entity groups you just deleted, with your own version: <append xpath="/entitygroups"> <!-- ...whatever entity groups you copied over and modified --> </append> Incidentally, if you haven't done this already, then you should bookmark this forum post and refer to it whenever you're doing XPath modifications: Edited April 6 by khzmusik (see edit history) 2 Link to comment Share on other sites More sharing options...
khzmusik Posted April 6 Share Posted April 6 (edited) EDIT: Please delete this, it was supposed to be an edit of my previous comment. Edited April 6 by khzmusik (see edit history) Link to comment Share on other sites More sharing options...
ProlificPoultry Posted Monday at 01:38 PM Author Share Posted Monday at 01:38 PM On 4/5/2023 at 8:59 PM, khzmusik said: If you want to totally replace the entity groups used by blood moon hordes, you can use an XPath expression that targets those XML nodes, and remove them. They all start with "feralHordeStage" so you could do something like this: <remove xpath="//entitygroup[starts-with(@name, 'feralHordeStage')]" /> EDIT: Here's a detailed explanation of what that does. "remove" is an XPath command. In this case the command is "remove any XML nodes that match this XPath expression." The "//" in XPath means "any descendant, not just a direct descendant." Since it's the first thing in the XPath expression, it means "any descendant of the root node in the XML document." "[" and "]" define a predicate - only nodes that match that predicate are selected. Predicates usually (but not always) target XML attributes. "starts-with" is an XPath method that selects any node whose text starts with a particular string. "@" means "select an attribute". In this case it selects the "name" attribute of any entitygroup tags in the document. You would then add back all of the entity groups you just deleted, with your own version: <append xpath="/entitygroups"> <!-- ...whatever entity groups you copied over and modified --> </append> Incidentally, if you haven't done this already, then you should bookmark this forum post and refer to it whenever you're doing XPath modifications: Oh gosh I know it's been like 2 months now, I apologize that I am now just replying to this, I got busy with my finals among other things... But anyways so it kind of worked! Kind of. I know that it removed the original zombie spawns from the entitygroups.xml, however it's just not spawning any more zombies on horde nights. I tested this a while ago now and just recently remembered that I wanted to make this mod so I went back in and yeah, still no zombie spawns. I can't figure out why but this is what I have in the xml: <config> <!-- Changes the zombie spawns on horde night--> <remove xpath="//entitygroup[starts-with(@name, 'feralHordeStage')]" /> <append xpath="/entitygroups"> (i'll just put this little bit as an example) <entitygroup name="feralHordeStageGS1"><entity name="zombieJoe"/><entity name="zombieNurse"/><entity name="zombieUtilityWorker"/><entity name="zombieBoe"/><entity name="zombieMoe"/><entity name="zombieMarlene"/><entity name="zombieYo"/><entity name="zombieJanitor"/><entity name="zombieTomClark"/><entity name="zombieSteve"/><entity name="zombieDarlene"/><entity name="zombiePartyGirl"/></entitygroup> <entitygroup name="feralHordeStageGS2"><entity name="zombieTomClark"/><entity name="zombieBoe"/><entity name="zombieJanitor"/><entity name="zombieArlene"/><entity name="zombieNurse"/><entity name="zombieBusinessMan"/><entity name="zombieUtilityWorker"/><entity name="zombieYo"/><entity name="zombieSteve"/><entity name="zombieMoe"/><entity name="zombiePartyGirl"/><entity name="zombieJoe"/></entitygroup> </append> </config> Also thanks for your help! I really appreciate it! : D 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