WIP noob modder, need some help with a specific script

Post » Sat May 28, 2011 4:01 am

I'm working on my very first mod to be distributed. It will be a quest line mod. I'm following the tutorial on the geck wiki but i need something more specific. The quest will involve a gang of supermutant who will capture the player in a given area during a rest time to bring him/her in their hideout to conduct scientific test on him/her. The main objective will be to get the f*** outta here alive with maybe an implant installed or a mutation or something like that as a reward. However right now, i need some help to figure out how to do something very specific :

Since the SM are conducting tests on the player, i need a script that will trigger a change to inflict a sickness, curable by a doctor... something similar to the Jet addiction but i cannot figure how to randomise it and how to inflict a disease to the player.

Any guru out there can help me out?

Thanks for your time :)

Please forgive my grammar, english isnt my main language
User avatar
Jade Muggeridge
 
Posts: 3439
Joined: Mon Nov 20, 2006 6:51 pm

Post » Sat May 28, 2011 4:48 am

You can use GetRandomPercent to randomise things in scripts, it returns a random number between 1 and 100 each time it's called.

To inflict a disease, you can make a negative actor effect that's an Ability (hence permanent-effect), and add it to the player using AddSpell. Then a doctor can remove it with RemoveSpell.
User avatar
Chenae Butler
 
Posts: 3485
Joined: Sat Feb 17, 2007 3:54 pm

Post » Sat May 28, 2011 3:50 am

What if you want to inflict a temporary effect on the player? Create a disease type under Game Effects / Actor Effect and then inflict that on the player with AddSpell?
User avatar
Samantha Wood
 
Posts: 3286
Joined: Sun Oct 15, 2006 5:03 am

Post » Fri May 27, 2011 10:33 pm

You'd use CastImmediateOnSelf (CIOS) for non-abilities. Also getrandompercent goes 0-99, I got it wrong.
User avatar
Chloe Botham
 
Posts: 3537
Joined: Wed Aug 30, 2006 12:11 am


Return to Fallout: New Vegas