Jump to content

Medicine Modifier formula location


JesusCondom

Recommended Posts

Hi.

I've been changing around how some of the medicine works in an attempt to make the game a little less of a cakewalk.

For now, this has been limited to changing stimpaks and radaway from healing instantly, to healing over time.

For stimpaks, the game uses this formula to calculate the total amount healed;

 

(base) + (((2 * base) / 100) * medicine)

 

If you mark it as an over time effect, it just takes the total amount and divides it by the time you set, and then applies that number once per second.

In the ingestible window, it'll only allow me to change the base amount, the time, and mark it as "medicine" which somehow applies this formula, and the base effect window only allows me to edit which stat it applies the effect to. So here's my question:

 

Does anyone know where this formula is located, or how one might access it?

 

The ultimate goal is to apply the medicine modifier to the time, rather than the amount healed.

If anyone knows of a better way to do this than the one I am currently pursuing, all advice is welcome.

Link to comment
Share on other sites

Wow , I didn't know you could set up a heal over time like that. I just assumed they were done with

"GetSecondsPassed" in a script.

 

Which is what you can do to get your medicine skill to adjust the time , and ignore the heal amount.

Just make a new base effect ... and select "Script" from Effect archetype drop down.

Then attach a script something like this in the assoc item drop down ... (Script type : Effect)

 

SCN MyHealScript

 

Int iUsed ; this keeps each heal tick to only once

Float MedSkill ; this stores the med skill

Float RunTime ; this is the duration based on med skill

Float Time ; this stores the actual time for checking

 

Begin ScriptEffectStart

 

Set MedSkill to Player.GetAv Medicine

Set RunTime to MedSkill * 10 ; says medicine returns as a % , so max is 10 sec here .

Set iUsed to 1

Player.ModAv Health 5 ; I put this as initial tick , but could just start it in next block.

 

End

 

Begin ScriptEffectUpdate

 

If iUsed == 1 && Time <= RunTime

Set Time to Time + GetSecondsPassed

If Time >= 1 ; could use decimal here for more ticks per sec

Player.ModAv Health 5

Set iUsed to 2

else

 

If iUsed == 2 && Time <= RunTime

Set Time to Time + GetSecondsPassed

If Time >= 2 ; also you could make the tics every 2-3 secs , whatever ?

Player.ModAv Health 5

Set iUsed to 3

else

 

If iUsed == 3 && Time <= RunTime

Set Time to Time + GetSecondsPassed

If Time >= 3

Player.ModAv Health 5

Set iUsed to 4

else

 

; Etc .... for all ticks at max duration ...

 

endif ; need as many endif as you have IF

endif

endif

endif

endif

endif

 

End

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 

Then select this base effect on your ingestible , and set its duration for possible max , but no magnitude.

 

I think that will work anyways , but there may be a more efficient way to script it.

 

Hope that helps.

 

Add edit : Whoops ... had to change MedSkill variable to a float in order for it to accept the % return

Edited by Mktavish
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...