Jump to content

Virus


Jessy

Recommended Posts

Bonjour
J'ai mis en place le virus de la rage, il fonctionne bien, mais j'aimerais que la stamina soit limité a 100 jusqu’à la prise du vaccin, mais je bloque la dessus.
Quelqu'un pourrais m'aider ?

 

Hello
I set up the rabies virus, it works well, but I would like the stamina to be limited to 100 until the vaccine is taken, but I block it.
Can someone help me?

Link to comment
Share on other sites

15 minutes ago, Jessy said:

Bonjour
J'ai mis en place le virus de la rage, il fonctionne bien, mais j'aimerais que la stamina soit limité a 100 jusqu’à la prise du vaccin, mais je bloque la dessus.
Quelqu'un pourrais m'aider ?

 

Hello
I set up the rabies virus, it works well, but I would like the stamina to be limited to 100 until the vaccine is taken, but I block it.
Can someone help me?

 

Look at the hungry buff in game, that limits the maximum stamina of the player.  That's a good place to start if you want to add that type of debuff to your rabies virus.

Link to comment
Share on other sites

3 hours ago, Jessy said:

yes, I look already, but it does not change the stamina after having the virus

 

Are you wanting it to behave like infection that applies debuff if left untreated and the condition worsens or do you want it to apply a debuff automatically as soon as it is applied, like the fatigue debuff you treat with vitamins?

 

For hungry, I was looking at this section which is probably what you are looking for:

 

        <effect_group>
            <triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$buffStatusHungryBlockage" operation="set" value="100"/>
            <triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$buffStatusHungryBlockage" operation="add" value="@$PlayerLevelBonus"/>
            <triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$buffStatusHungryBlockage" operation="multiply" value=".133"/>
            <passive_effect name="StaminaMaxBlockage" operation="base_add" value="@$buffStatusHungryBlockage"/>
        </effect_group>

 

So in this case, there is a variable (cvar = buffStatusHungryBlockage) that is calculated and then applied to the passive effect StaminaMaxBlockage.  So if you were to do this same route, you would need to generate a new variable (for example buffStatusRabiesBlockage).  In the example above, say the person has a level bonus of 20 for stamina.  If they become hungry, the blockage value would be 15.96 (100+20)*0.133.   This is then added to StaminaMaxBlockage via the last line.

 

You might be able to get away and use the same variable buffStatusHungryBlockage in your virus calculations.  However, since your goal is to set the max at 100 stamina with the virus, you would just add the @$PlayerLevelBonus to the Blockage variable which would limit it to no greater than starting stamina.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...