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

Randomize zombie HP

Creypon

Refugee
Hello, I'm totally new here... and I'm interested in improving the experience of my worlds with my friends, I'm looking for some way to randomize the lives of zombies... but with help and enough hours I was just able to understand how change the value of weapons, tools... It is very shameless of me... to come asking for help when I know little and nothing... but I would greatly appreciate it.

 
health is already randomised

there are 3 different lines for zombies, animals and zombie animals in the entityclasses xml

<passive_effect name="HealthMax" operation="perc_add" value="-.15,.15"/>

 
health is already randomised

there are 3 different lines for zombies, animals and zombie animals in the entityclasses xml

<passive_effect name="HealthMax" operation="perc_add" value="-.15,.15"/>
Code:
oh... I didn't know... I had to use very outside help to achieve this... <entity_class name="zombie" extends="entity_zombie">
    <!-- Random HP depending on gamestage -->
    <property name="HitPoints" value="{rand(250 + gamestage * 2, 400 + gamestage * 5)}" />
</entity_class> Hi,Honestly, I wanted me to follow up with the player's level, but I know little or nothing about programming. I also don't know the most optimal way to monitor, but I think that this way I can set the min hp and max hp, Now I'm looking at how to make it work...
 
oh... I didn't know... I had to use very outside help to achieve this... <entity_class name="zombie" extends="entity_zombie">
<!-- Random HP depending on gamestage -->
<property name="HitPoints" value="{rand(250 + gamestage * 2, 400 + gamestage * 5)}" />
</entity_class> Hi,Honestly, I wanted me to follow up with the player's level, but I know little or nothing about programming. I also don't know the most optimal way to monitor, but I think that this way I can set the min hp and max hp, Now I'm looking at how to make it work...

new <entity_class name="zombie" extends="entity_zombie">
    <!-- HP aleatorios en función del gamestage -->
    <property name="HitPoints" value="{if(rand(0, 100) < 5, rand(100, 380 + gamestage * 5), rand(250 + gamestage * 2, 400 + gamestage * 5))}" />
</entity_class>

 
new <entity_class name="zombie" extends="entity_zombie">
    <!-- HP aleatorios en función del gamestage -->
    <property name="HitPoints" value="{if(rand(0, 100) < 5, rand(100, 380 + gamestage * 5), rand(250 + gamestage * 2, 400 + gamestage * 5))}" />
</entity_class>
or this? <passive_effect name="HealthMax" operation="perc_add" value="-0.2,0.2" prob="0.2"/>

 
i now try change the entityclass.xml, but dont work... i use this 

<entityclass name="Zombie">

    <!-- "HealthMax" "Zombie" -->
    <passive_effect name="HealthMax" operation="perc_add" value="-0.2,0.2" condition="always" />
    <passive_effect name="ExtraHealth" operation="perc_add" value="0.05" condition="rand(0,1) < 0.05" />
</entityclass>
 

 
Back
Top