Need help with a few modding problems

Post » Sat May 28, 2011 3:00 am

Hi all.
I'm working on a mod of my own, and I have stumbled upon a few issues.

First, is there any way to increase the rate at which you gain hunger/starvation via a perk?
If so, how?

Secondly, I was checking out the Mysterious Stranger perk, and I wanted to make a similar perk, except with a stray wolf or dog. The problem is, I don't know how to make that work. I made a copy of Cheyenne and copied the stats(where applicable) from the Mysterious Stranger, but the problem lies in activating it via the perk.

Third, is there a way to negate or lessen the damage taken from falling, again via a perk?

Any help regarding these problems would be much appreciated, thanks! :)
User avatar
Queen Bitch
 
Posts: 3312
Joined: Fri Dec 15, 2006 2:43 pm

Post » Fri May 27, 2011 6:37 pm

I've figured out that I can use the perk to link to an actor ability, which in turn links to a base effect, which in turn links to a script - and it that script, I figure the hunger-part could be done... But how?
User avatar
Penny Courture
 
Posts: 3438
Joined: Sat Dec 23, 2006 11:59 pm

Post » Fri May 27, 2011 10:26 pm

the hunger/thirst stuff is all brand new ... i gots no experience with it. meh.
User avatar
Rachel Tyson
 
Posts: 3434
Joined: Sat Oct 07, 2006 4:42 pm

Post » Sat May 28, 2011 1:27 am

Many ingestibles have Ishardcoe checks to deal with hunger/thirst. You could add a (Player.HasPerk YourPerk == 1) conditions to new effect entries, then add a '(If Player.HasPerk YourPerk == 0)' to the originals. Then your perk would impact hunger/thirst however you saw fit. There might be other ways to do something like this though without editing all the ingestibles, but that's what came to mind.
User avatar
Marina Leigh
 
Posts: 3339
Joined: Wed Jun 21, 2006 7:59 pm

Post » Fri May 27, 2011 10:57 pm

The problem is not the ingestibles, since I already got them covered.
Back in Fallout 3 I found a script that would slowly reduce your radiation level.
I don't have it here with me right now, but it was similar to the DLV03APRegenScript, which goes as follows:

ScriptName DLC03APRegenScript

Float MicroRegen

Begin ScriptEffectUpdate
Set MicroRegen to ScriptEffectElapsedSeconds / 10
RestoreAv ActionPoints MicroRegen
End


I have tried replacing the last line with DamageAv Hunger MicroRegen in a new script, but it didn't seem to have any effect.
Anyone knows how to make scripts? Could certainly use some help with this. :)

The idea of the perk I'm working on, is to unlock a more bestial and feral side of the Courier, this will place a greater emphasis on the Survival skill, keeping yourself supplied with enough food and water at all times, or even take Cannibalism to make sure you don't run out of food.
But for this purpose, the standard rate at which you become hungry is way too slow, so I need a way to speed it up.

Again, any help you can offer will be much appreciated. :)
User avatar
Connor Wing
 
Posts: 3465
Joined: Wed Jun 20, 2007 1:22 am

Post » Fri May 27, 2011 6:36 pm

Ah.. Probably over syntax or spelling (AVSleepDeprevation "Sleep Deprivation" [AVIF:000005F9] threw me off). Took a bit of testing, but...
Spoiler
scn TestTokenSCPTInt bMessageInt iButtonInt iValueBegin OnAdd	DisablePlayerControls 1 1 0 0 1 0 0EndBegin GameMode	If bMessage		Set iButton to GetButtonPressed		If (iButton == -1)			Return		ElseIf (iButton == 0)			Set bMessage to 0			Player.ModAV "SleepDeprevation" 10			Set iValue to Player.GetAV "SleepDeprevation"			ShowMessage SleepMESG iValue		ElseIf (iButton == 1)			Set bMessage to 0			Player.ModAV "SleepDeprevation" -10			Set iValue to Player.GetAV "SleepDeprevation"			ShowMessage SleepMESG iValue		ElseIf (iButton == 2)			Set bMessage to 0			Player.ModAV "Dehydration" 10			Set iValue to Player.GetAV "Dehydration"			ShowMessage DehydrationMESG iValue		ElseIf (iButton == 3)			Set bMessage to 0			Player.ModAV "Dehydration" -10			Set iValue to Player.GetAV "Dehydration"			ShowMessage DehydrationMESG iValue		ElseIf (iButton == 4)			Set bMessage to 0			Player.ModAV "Hunger" 10			Set iValue to Player.GetAV "Hunger"			ShowMessage HungerMESG iValue		ElseIf (iButton == 5)			Set bMessage to 0			Player.ModAV "Hunger" -10			Set iValue to Player.GetAV "Hunger"			ShowMessage HungerMESG iValue		ElseIf (iButton == 6) ; Done			EnablePlayerControls 1 1 0 0 1 0 0			RemoveMe		EndIf	Else		Set bMessage to 1		ShowMessage TestMESG	EndIfEnd
...seems to be verificably modding Sleep deprivation, Hunger, and Dehydration.

http://www.mediafire.com/download.php?ndqc67afptj9ffv
User avatar
Prohibited
 
Posts: 3293
Joined: Tue Jun 12, 2007 6:13 am

Post » Sat May 28, 2011 12:23 am

Whoah, what does all that do? o.O

I feel kinda stupid about this, but... I figured out how to easily add 1 Hunger level per second.
I was looking up how the Rad Resistant perk was working, and I noticed it used an Ability form, and not an Actor Effect - which I had been previously using!
So I moved the "Damage Hunger" to the Ability form, and it worked!
No need for game effects, scripts and twisted turnabouts in order to accomplish this simple feature. >_<

So, all I need now, is to figure out how to replace the Mysterious Stranger with another npc without overwriting the original Stranger!
User avatar
latrina
 
Posts: 3440
Joined: Mon Aug 20, 2007 4:31 pm


Return to Fallout: New Vegas