View Single Post
schenn
Member
 
Join Date: Aug 2015
Posts: 32

Old August 31st, 2015, 09:36 AM
I'm setting a tracker starting value based off the values of a characters attributes at the time of creation. This tracker only needs to determine this starting value once (when the user is ready to lock their profile), as the minimum and maximum values are changed by experiences in game play.

Essentially, I'm making a tracker for Sanity for Shadowrun. The starting value is derived from a formula involving Willpower and Essence. Afterwords, the tracker can decrement in two fashions. One, by the user lowering the sanity value after a sanity loss event. Two, by the user increasing their Cthulhu Mythos tracker. The CM tracker always starts at 0.

the stateiscreate = 0 will probably work for what I need, however, how do I keep it from resetting its value if the user goes back into character creation after having changed their sanity during gameplay. E.g. Jim loses some sanity and while exploring the program, he returns to creation mode, which causes the sanity value to reset to its starting value. He doesn't know how much sanity he lost, and is now stuck trying to figure it out.

I guess I could create an additional tracker for 'sanity lost' Then I could just add the different values together. I was trying to avoid an 'extra' tracker if possible, but it seems as though that would be the easiest way to go about this. Can a tracker's minimum value be negative? (A player can heal their sanity over their starting sanity through therapy and medications. This would effectively push their sanity lost tracker to the negative)

if(stateiscreate = 0)
startingSanity = (willpower + essence) * 5 + 15 ~ store startingSanity in a field value
minimum = startingSanity ~ push the tracker to the current sanity value
else
sanity = startingSanity - sanityLostTracker - CM
minimum = sanity ~ push the tracker to the current sanity value
schenn is offline   #6 Reply With Quote