Jump to content

Modlet Creation !--HELP--!


Recommended Posts

Hello!

First time Modletter here. Trying to make a modlet for biome spawns so I am not changing the config directly. I can't get my head around how to call the Biome section (i.e biome name="city") and then edit each line (i.e Maxcount =) properly. since they all look the same except the fact at the end they say such as "ZombiesAll"

 

<biome name="city">

<spawn maxcount="3" respawndelay="1" time="Day" entitygroup="ZombiesAll" />

<spawn maxcount="5" respawndelay="1" time="Night" entitygroup="ZombiesNight" />

<spawn maxcount="1" respawndelay="1" time="Any" entitygroup="ZombieDogGroup" />

</biome>

I've been sitting here 2 hours and cant get past <set xpath=spawning.

 

Really would appreciate some help folks!

Link to comment
Share on other sites

example_

<set xpath="/spawning/biome/spawn[@maxcount='5' and not(@entitygroup='ZombieDogGroup') and not(@entitygroup='WanderingTraders') and not(contains(@entitygroup,'Animal'))]/@maxcount">15</set>
<set xpath="/spawning/biome/spawn[@maxcount='3' and not(@entitygroup='ZombieDogGroup') and not(@entitygroup='WanderingTraders') and not(contains(@entitygroup,'Animal'))]/@maxcount">10</set>
<set xpath="/spawning/biome/spawn[@maxcount='2' and not(@entitygroup='ZombieDogGroup') and not(@entitygroup='WanderingTraders') and not(contains(@entitygroup,'Animal'))]/@maxcount">7</set>
<set xpath="/spawning/biome/spawn[@maxcount='1' and not(@entitygroup='ZombieDogGroup') and not(@entitygroup='WanderingTraders') and not(contains(@entitygroup,'Animal'))]/@maxcount">5</set>

this will increase the zombieamount in all biomes by a factor of 3-5

 

if you want to change an individual line in your example above,

you start with

<set xpath="/spawning/biome

now you want the biome named city to modify, so

<set xpath="/spawning/biome[@name='city']

now let's say you want to modify the second spawn there, so we need an identifier for this second line, entitygroup seem okay here, but you can use ALL 3 (besides respawndelay) as they are all distinct on all entries in that biome spawner!!

<set xpath="/spawning/biome[@name='city']/spawn[@entitygroup='ZombiesNight']

now, what do you want to change? lets say the maxcount?, okay:

<set xpath="/spawning/biome[@name='city']/spawn[@entitygroup='ZombiesNight']/@maxcount">

now you set the desired value

<set xpath="/spawning/biome[@name='city']/spawn[@entitygroup='ZombiesNight']/@maxcount">9

and end the open set clause

<set xpath="/spawning/biome[@name='city']/spawn[@entitygroup='ZombiesNight']/@maxcount">9</set>

and you are done!

 

more info here:

https://7daystodie.com/forums/showthread.php?93816-XPath-Modding-Explanation-Thread

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...