• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Help Mod to Lower screams to 1 not 1 or 2.

J71rivera

New member
<Screamer>
    <set xpath="/spawning/spawning[contains(@name, 'Scouts']/property[contains(@name, 'TotalPerWave')]/@value">1</set>
    <set xpath="/spawning/spawning[contains(@name, 'ScoutsFeral']/property[contains(@name, 'TotalPerWave')]/@value">1</set>
</Screamer>

Is this correct or do I have something wrong here? 

 
Trying to modify 

<!-- *** ZOMBIES_SCOUT_SCREAMER -->
    <!-- *** NOTE: These are referenced in code for the screamer system -->
    <entityspawner name="Scouts" dynamic="true" wrapMode="wrap">
        <day value="*"><!--* means it is used when no day is specified -->
            <property name="ResetToday" value="true" />
            <property name="EntityGroupName" value="ZombieScouts" />
            <property name="DelayBetweenSpawns" value="4" />
            <property name="TotalAlive" value="2" />
            <property name="TotalPerWave" value="1,2" />
        </day>
    </entityspawner>
    <entityspawner name="ScoutsFeral" dynamic="true" wrapMode="wrap">
        <day value="*">
            <property name="ResetToday" value="true" />
            <property name="EntityGroupName" value="ZombieScoutsFeral" />
            <property name="DelayBetweenSpawns" value="3" />
            <property name="TotalAlive" value="2" />
            <property name="TotalPerWave" value="1,2" />
        </day>
    </entityspawner>
    <entityspawner name="ScoutsRadiated" dynamic="true" wrapMode="wrap">
        <day value="*">
            <property name="ResetToday" value="true" />
            <property name="EntityGroupName" value="ZombieScoutsRadiated" />
            <property name="DelayBetweenSpawns" value="3" />
            <property name="TotalAlive" value="2" />
            <property name="TotalPerWave" value="1,2" />
        </day>
    </entityspawner>

For a server XML only mod. I'm so close I think.. but could be wrong. 

 
<Screamer>
    <set xpath="/spawning/spawning[contains(@name, 'Scouts']/property[contains(@name, 'TotalPerWave')]/@value">1</set>
    <set xpath="/spawning/spawning[contains(@name, 'ScoutsFeral']/property[contains(@name, 'TotalPerWave')]/@value">1</set>
</Screamer>

Is this correct or do I have something wrong here? 


It should be

<set xpath="/spawning/entityspawner[contains(@name,'Scouts')]/day/property[@name='TotalPerWave']/@value">1</set>




And you only need one line since it will change all entityspawners that contain Scouts in the name.

 
Thanks. I had actually figured out part of it but I still had it messed up I was at..

<set xpath="/spawning/entityspawner[contains(@name, 'Scouts']/property[contains(@name, 'TotalPerWave')]/@value">1</set>
    

Thanks for the fixed code. i was on the right track. 

But what if I only wanted to nerft stouts. but not scoutsferal and sounds irated.. its when you don't have guns and you get 2 screams and they just wreck you and your bas by having a scream a paluza lol. 2 screamsers to 4 to 6 to OMG wipe out. 

 
Thanks. I had actually figured out part of it but I still had it messed up I was at..

<set xpath="/spawning/entityspawner[contains(@name, 'Scouts']/property[contains(@name, 'TotalPerWave')]/@value">1</set>
    

Thanks for the fixed code. i was on the right track. 

But what if I only wanted to nerft stouts. but not scoutsferal and sounds irated.. its when you don't have guns and you get 2 screams and they just wreck you and your bas by having a scream a paluza lol. 2 screamsers to 4 to 6 to OMG wipe out. 




Change

entityspawner[contains(@name,'Scouts')]




to

Code:
entityspawner[@name='Scouts']
 
got 2024-08-29T21:29:08 51.310 ERR XML loader: Patching 'spawning.xml' from mod 'Shenanigans_OneScreamer' failed:
2024-08-29T21:29:08 51.327 EXC XML.Patch (/Screamer/set, line 3 at pos 5): XPath evaluation failed: '/spawning/entityspawner[@name,'Scouts']/day/property[@name='TotalPerWave']/@value' has an invalid token.

:(  

<?xml version="1.0" encoding="UTF-8"?>
<Screamer>
      <set xpath="/spawning/entityspawner[@name,'Scouts']/day/property[@name='TotalPerWave']/@value">1</set>
      <set xpath="/spawning/entityspawner[@name,'ScoutsFeral']/day/property[@name='TotalPerWave']/@value">1</set>
</Screamer>

The first one worked like a charm. i just had to be picky lol

 
Last edited by a moderator:
Im sorry tired about to lay down.  If I only change where I was going then it would be

<set xpath="/spawning/entityspawner[@name, 'Scouts']/day/property[contains(@name, 'TotalPerWave')]/@value">1</set>

If I just use your code it works . but it changes them all. i was only trying to change Scouts and Scoutsferal and leave the ScoutsRadiated alone. 

Maybe I'm not seeing it or we are one two different roads :)  

 
If I was modding this, I would write it this way:

<set xpath="//entityspawner[@name='Scouts']/day/property[@name='TotalPerWave']/@value">1</set>




Note, when you want to change a specific line, you use the format variable/property = value, so @name='Scouts' will direct the game to change this specific line of code.  When you are looking to modify multiple lines of code with one line of conditional code, you use the format variable/property,value so contains(@name,'Scouts') would look for any line of code where the name contains Scouts and change it (so in this case all 3 Scout spawn events).

 
Back
Top