Going about a disease script

Post » Tue May 17, 2011 7:52 am

Hello thar.

I've wanted a good disease mod for sometime, I've found one on Nexus but it doesn't really satisfy my needs...That and I need some scripting practice.

Say you get attacked by a mole rat and you have a 20% chance of catching rabies, and if you have a crippled limb it's doubled.

I'm not too good with all of the commands in the GECK, but I know it would have to be ifPlayerHit or DoOnce or...Something like that. Not only this, but I'd at least like to find the Radiation script so I could at least get a hint at where to start with the effects of and how to cure the disease.

Any help would be appreciated, or if you know a disease script's name from the Construction Set that could be helpful too.

Okay so...I have to create an Actor Effect...Hm...
User avatar
Zualett
 
Posts: 3567
Joined: Mon Aug 20, 2007 6:36 pm

Post » Tue May 17, 2011 3:52 am

Hello thar.

I've wanted a good disease mod for sometime, I've found one on Nexus but it doesn't really satisfy my needs...That and I need some scripting practice.

Say you get attacked by a mole rat and you have a 20% chance of catching rabies, and if you have a crippled limb it's doubled.

I'm not too good with all of the commands in the GECK, but I know it would have to be ifPlayerHit or DoOnce or...Something like that. Not only this, but I'd at least like to find the Radiation script so I could at least get a hint at where to start with the effects of and how to cure the disease.

Any help would be appreciated, or if you know a disease script's name from the Construction Set that could be helpful too.

Okay so...I have to create an Actor Effect...Hm...


My thoughts without dwelling on it to much would be you'd have to add a perk to the various creatures (or more realistically make new creatures and call them diseased or something, and include them in leveled lists, you'd have to make compatability patches thought I think) and then the perk adds an effect to the creature that has a script attached to it on hit and say like a 10 or 20% chance on hit to give the target a disease (actor effect or whatever). You could have really expensive medicine from doctors to remove the effect and/or modify their dialogue scripts to have it included in one of their choices or something.
User avatar
Sabrina garzotto
 
Posts: 3384
Joined: Fri Dec 29, 2006 4:58 pm

Post » Tue May 17, 2011 7:24 am

there aren't too many creatures in the world. And I didn't know you could make perks for NPCs. :blink:

Thanks for the response, it should help me more than my own "research" today.
User avatar
Farrah Lee
 
Posts: 3488
Joined: Fri Aug 17, 2007 10:32 pm

Post » Tue May 17, 2011 1:46 pm

You just make a perk like normal and then add it to their perk list, its one of the tabs IIRC.
User avatar
Damian Parsons
 
Posts: 3375
Joined: Wed Nov 07, 2007 6:48 am

Post » Tue May 17, 2011 9:56 am

Okay but how can I give the perk to the player while the animal doesn't have the actual disease. I really don't want to have compatibility issues with MMM

And I'm not sure the perk will show up when you contract something, like radiation or addiction would.

EDIT: I'm not sure how...But is it possible to create the disease via actor effect, attach it to specific monsters via script and when the monster hits the player, the script would trigger giving a small chance of contracting a disease.
User avatar
Campbell
 
Posts: 3262
Joined: Tue Jun 05, 2007 8:54 am

Post » Tue May 17, 2011 7:54 am

/dumb minibump

I'm getting somewhere now. I've created the effect (thanks Scarecrow :celebration: ) and added a message box to show the mod's working.

But, of course, it's not working. this is my script:

ScriptName RabiesTestScript

Begin onActivate

if isActorRef == 1

player.AddSpell Rabies
ShowMessage "TraptripwireDisarmMsg" ;only using that because I don't feel like creating my own
endif
end
User avatar
+++CAZZY
 
Posts: 3403
Joined: Wed Sep 13, 2006 1:04 pm

Post » Tue May 17, 2011 11:18 am

I think you misunderstood me the perk is on the diseased creature (it will work on NPCs too) then when the player contracts the disease he just gets an actor effect, like morphine or rad-x (NOT the perk, the perk is just how you attach the script to the creature essentially) except it does negative stuff.
User avatar
anna ley
 
Posts: 3382
Joined: Fri Jul 07, 2006 2:04 am

Post » Tue May 17, 2011 3:27 pm

Okay maybe I don't understand again but I don't want the creature to be affected by the disease.

And I'm not sure how an effect can be carried by a perk...

Sorry for my slowness.
User avatar
Carys
 
Posts: 3369
Joined: Wed Aug 23, 2006 11:15 pm

Post » Tue May 17, 2011 7:20 am

Create a script with the ScriptEffect blocktype and on a random percentage add the disease to the target ref, so something like

Short RNGRef thisRefBegin ScriptEffectStart	Set RNG to GetRandomPercent	Set thisRef to GetSelf		If RNG < 15		If thisRef.GetHasPerk DISEASE			thisRef.AddPerk DISEASE		EndIf	EndIfEnd


Attach the script to a Base Effect, attach said Base Effect to a Perk and give the perk to the diseased creatures.

You'll have to make the "Disease" (another Perk with an attached actor effect or whatever) before you do this so the GECK doesn't complain when you make the script.
User avatar
Stace
 
Posts: 3455
Joined: Sun Jun 18, 2006 2:52 pm

Post » Tue May 17, 2011 3:35 pm

Thank you so so much for that but now I'm feeling really dumb. Perks can only take actor effects, but actor effects don't take scripts.
User avatar
Prisca Lacour
 
Posts: 3375
Joined: Thu Mar 15, 2007 9:25 am

Post » Tue May 17, 2011 10:31 am

So...If anyone could tell me how to attach a script to an actor effect...I'll leave you alone. Pinky promise.
User avatar
Krista Belle Davis
 
Posts: 3405
Joined: Tue Aug 22, 2006 3:00 am

Post » Tue May 17, 2011 4:07 am

You should be able to attach the base effect to an actor effect... look at the various flamer stuff for idea's.
User avatar
Averielle Garcia
 
Posts: 3491
Joined: Fri Aug 24, 2007 3:41 pm


Return to Fallout 3