Page 1 of 1

Scripting Lactose Intolerance

PostPosted: Sat May 01, 2010 12:51 pm
by Tes96
Click here Lactose Intolerance Bethsoft Forums link

So I posted this over in the BethSoft Forums and Stuporstar has been helping me with it but he's taking a break at the moment. I'm just wondering if anyone here would know how to script this kind of percentage drops in fatigue and luck/endurance. The entire thread is only two pages long so you can see how we arrived to this. Basically, I'm wanting the Player to eat an ingredient, wait one game-hour, then these effects below will begin. This is to simulate real life lactose intolerance.

Here are the percentages for the Fatigue Drop:

    0:00 - Eat item -> nothing happens for 1 hour. PC has 100% of current fatigue
    1:00 - PC now has 95% of current fatigue
    1:10 - PC then has 90% of current fatigue
    1:20 - 85% fatigue
    1:30 - 80%
    1:40 - 75%
    1:50 - 70%
    2:00 - 65%
    2:10 - 60%
    2:20 - 55%
    2:30 - 50%
    2:40 - 45%
    2:50 - 40%
    3:00 - 35%
    3:10 - 30%
    3:20 - 25%
    3:30 - 20%
    3:40 - 15%
    3:50 - 10%
    4:00 - 5%
    4:10 - 0%



Luck/Endurance Drop:
    0:00 - Eat item -> nothing happens for 1 hour. PC has 100% of current LUCK/END
    1:00 - PC now has 98% of current LUCK/END
    1:10 - PC then has 96% of current LUCK/END
    1:20 - 94% LUCK/END
    1:30 - 92%
    1:40 - 90%
    1:50 - 88%
    2:00 - 86%
    2:10 - 84%
    2:20 - 82%
    2:30 - 80%
    2:40 - 78%
    2:50 - 76%
    3:00 - 74%
    3:10 - 72%
    3:20 - 70%
    3:30 - 68%
    3:40 - 66%
    3:50 - 64%
    4:00 - 62%
    4:10 - 60%

I already made a short global variable and made a global script and individual local scripts. They're right here in this post: http://forums.bethsoft.com/index.php?/t ... __15878178

Re: Scripting Lactose Intolerance

PostPosted: Sat May 01, 2010 1:38 pm
by Jac
Morrowind can't do percentages, you'll have to tell it how to figure that stuff out. What you want are ModLuck and ModEndurance. All three require a whole number. To reduce them, use a minus sign before the number. An example for luck would be Player->ModLuck -1. For fatigue, it's ModCurrentFatigue. MWSE might support percentages, but regular scripting does not.

Re: Scripting Lactose Intolerance

PostPosted: Sun May 02, 2010 12:23 am
by Tes96
Uhm, thanks but I don't even know how to go about setting up something like that. Maybe I'll just wait for Stuporstar to get back to me. Thanks any ways.

Re: Scripting Lactose Intolerance

PostPosted: Sun May 02, 2010 6:49 am
by Jac
Morrowind Scripting for Dummies. Learn it. Live it. Love it.