I need help with a Perk

Post » Mon Oct 04, 2010 2:35 am

I don't use VATS at all, in fact I'm using a mod that disables it completely. So up until now Action Points have been totally useless to me. But I've just discovered an Entry Point, Calculate Weapon Attack AP Cost, that will register the use of APs whenever I fire a weapon outside of VATS. Now I've created the perk and I have a script that will add it to my character immediately, and got my Action Points to decrease as I fire my 10mm pistol the way that I want to. The problem is that even when my APs reach 0 I can still keep on firing, which makes the Perk kind of useless. I've had a look at the condition functions and there doesn't seem to be anything obvious to force me to stop firing as soon as I run out of APs. So how would I go about accomplishing that?

PS: If I can't manage to stop firing completely when my APs run out, I would at least like to have some sort of penalty for having 0 points. Again though, I see nothing obvious that I can use. If someone has any suggestions, I would appreciate it.
User avatar
Sarah Kim
 
Posts: 3407
Joined: Tue Aug 29, 2006 2:24 pm

Post » Mon Oct 04, 2010 5:46 am

OK, so I could use some help with a script. I've only gone a few lines in and already I'm stuck already, and I can't find anything on the Wiki to help me. This is what I have so far:

scn a2zNoAPScripBegin GameModeGetActorValue ActionPointsif ActionPoints == 0endifEnd


But the GECK doesn't recognize ActionPoints == 0 as a valid command. What I want to do is have it so that if I run out of APs, I do 50% less damage and I have a 50% less chance of making a critical hit.
User avatar
Far'ed K.G.h.m
 
Posts: 3464
Joined: Sat Jul 14, 2007 11:03 pm

Post » Sun Oct 03, 2010 5:28 pm

its because 'actionpoint' is not defined as a variable.

scn a2zNoAPScripshort myPtsBegin GameMode   set myPts to GetActorValue ActionPoints   if myPts == 0      ;do something   endifEnd

User avatar
Phillip Brunyee
 
Posts: 3510
Joined: Tue Jul 31, 2007 7:43 pm

Post » Sun Oct 03, 2010 6:29 pm

OK thanks. I did manage to get it to save by adding GetActorValue before that. But I'm stumped again. I tried using Calculate Weapon Damage as a command but that doesn't work, and I don't see anything in the function list I can use. I don't see anything about critical hit chance either. So how can I work those two things in? So far I've managed to get everything to work. I've turned that into a quest script and attached it to the Perk, which does indeed reduce my APs out of combat. Now all I have to do is get the penalties working.
User avatar
Jesus Duran
 
Posts: 3444
Joined: Wed Aug 15, 2007 12:16 am

Post » Sun Oct 03, 2010 7:42 pm

OK, I found something that can work:

scn a2zNoAPScripshort myPtsBegin GameMode   set myPts to player.GetActorValue ActionPoints   	if myPts == 0     	        player.DamageActorValue Strength 1		player.DamageActorValue Endurance 1		player.DamageActorValue Agility 1   	endif	if myPts >0		player.RestoreActorValue Strength 1		player.RestoreActorValue Endurance 1		player.RestoreActorValue Agility 1	endifEnd


I haven't tested it yet but at least the script is saving. Indirectly I'll be doing less damage overall, and it makes a bit more sense as far as having no APs goes. I'm seeing it kind of like Fatigue in Oblivion. I might have to make the penalties a bit more severe, I'm won't be sure until I've tested it. Thanks for the help.
User avatar
Helen Quill
 
Posts: 3334
Joined: Fri Oct 13, 2006 1:12 pm

Post » Sun Oct 03, 2010 4:24 pm

Damn it, it's not working. My stats aren't being reduced if I run out of APs. Any idea what I'm doing wrong?
User avatar
Alexis Estrada
 
Posts: 3507
Joined: Tue Aug 29, 2006 6:22 pm

Post » Mon Oct 04, 2010 4:59 am

So I'm having a slight problem I don't know what to do about.

scn a2zNoAPScriptshort myPtsshort RestoreRatefloat fquestdelaytimeBegin GameMode	set fquestdelaytime to 0.01        set myPts to player.GetActorValue ActionPoints	set RestoreRate to getgamesetting fActionPointRestoreRate   				if myPts < 0     		        player.DamageActorValue Strength -1			player.DamageActorValue Endurance -1			player.DamageActorValue Agility -1   		endif   		if myPts > 0     		        player.RestoreActorValue Strength 1			player.RestoreActorValue Endurance 1			player.RestoreActorValue Agility 1   		endif		if player.isrunning == 1      		       player.DamageActorValue ActionPoints -30		       set RestoreRate to 0		endif		if myPts < 25			playsound a2zGasp01		endifEnd


Everything is working in this script except for one small thing. I tried to shut off the regeneration of my Action Points while I'm running but it won't do it. The result is that I'm getting a really jerky loss in points. The action points will regenerate, then all of a sudden the DamageActorValue will kick in and my points will drop a bunch, then the whole process keeps repeating itself and I end up with a jerky up and down movement on my counter. If I could turn off the Action Point from regenerating, I could set the DamageActorValue to a nice low number so that I would get a steady, smooth drop in APs. I tried using some of the code that the Sprint mod has but I couldn't get that to work in this script. Somehow it manages a nice smooth loss, but I'm not sure why.

And as usual the Wiki is absolutely no help to me as it doesn't have any info at all on the fActionPointRestoreRate setting.
User avatar
Becky Cox
 
Posts: 3389
Joined: Thu Jun 22, 2006 8:38 am

Post » Sun Oct 03, 2010 7:21 pm

So I see what the problem is and I have a vague notion on how to fix it, but I'm not exactly sure how to go about it. It's coming out jerky because the game is suddenly removing all those Action Points all at once, 30 at a time. What I need to do is have that loss spread out evenly rather than coming off in one big clump. I was thinking I could maybe use the fquestdelaytime somehow, so that the Action Points get damaged each frame instead of all at once, but I'm not sure how I would go about doing that.

It would be really easy to get this script to work right if I could simply stop the Action Points from regenerating while I'm running. :brokencomputer:
User avatar
matt white
 
Posts: 3444
Joined: Fri Jul 27, 2007 2:43 pm

Post » Mon Oct 04, 2010 12:31 am

I got it! I was using the wrong command. Fallout doesn't use the fquestdelaytime command, I needed to use SetQuestDelay instead. I now have a nice smooth loss of APs while running and a loss of APs while in combat out of VATS. My very first real script, I'm so proud of myself. :celebration:
User avatar
Daniel Lozano
 
Posts: 3452
Joined: Fri Aug 24, 2007 7:42 am

Post » Sun Oct 03, 2010 11:08 pm

Ok, so one more thing. I'm going to need a separate script in order to get some sound effects in, to have my player pant like he's out of breath. With the sound effects I'll be using, I'll have to set a different SetQuestDelay time to make them sound right but the Wiki recommends turning off that function if it's not really necessary. So if I have something like this:

if myPts <0  SetQuestDelay 1  playsound a2zgasp04endif


Will that automatically have the script revert to the default delay time once my Action Points are no longer less than 0, or will I have to include an else statement in order for that to happen?
User avatar
Claire Vaux
 
Posts: 3485
Joined: Sun Aug 06, 2006 6:56 am

Post » Sun Oct 03, 2010 6:52 pm

So why isn't this working?

		if myPts < 0 && > -25			SetQuestDelay a2zNoAPGaspQuest 2				playsound a2zGasp01   		endif


I get a panting sound if I just have it set to <0 but as soon as I add the && > -25 it stops working. I have some more penalties kicking in at -25 and I want to have a heavier panting noise to let the player know they've reached a new stage. I'd also like to add a vision blur at -25 like the one you get with a crippled head, but I can't quite figure that one out.
User avatar
Lyndsey Bird
 
Posts: 3539
Joined: Sun Oct 22, 2006 2:57 am

Post » Sun Oct 03, 2010 11:40 pm

Because you need to specify the variable again.

if myPts < 0 && myPts > -25


But its easier to code like this:

if myPts < -75   ;do massive penaltyelseif myPts < -50   ;do damaging penaltyelseif myPts < -25   ;do hurtful penaltyelseif myPts < 0   ;do minor penaltyendif

If you start from the lowest number, this will work because ONLY the FIRST true condition will be executed, the rest will be skipped.
User avatar
Natalie Harvey
 
Posts: 3433
Joined: Fri Aug 18, 2006 12:15 pm

Post » Mon Oct 04, 2010 12:32 am

Doh, I figured I'd missed something obvious. And thanks for that format tip. Any idea how I could work the blurred vision into a -25 stage? I tried creating a new effect from the Concussion effect, without the Perception penalty, turned it into an addiction then used the AddSpell function to have it kick in. But while the effect was added in the game, I kept seeing the message every .1 second, I didn't get the blurred vision. Obviously an effect isn't the way to go since I don't want to have that message appear each time the script cycles through, I just want to have a blurred vision kick in.

PS: Cool that worked. I now have 3 different panting sounds working at different points. Just a couple more things to figure out and the mod will be complete. I still have to figure out how to factor in my Endurance level into the loss of APs. The one thing I've tried so far didn't work. And I'd like to get the vision blur working as well. The mod is working out beautifully now that I've figured out that SetQuestDelay. My attribute loss is fairly low but it's constant, so the longer my Action Points remain below 0, the more of a penalty I suffer.
User avatar
kennedy
 
Posts: 3299
Joined: Mon Oct 16, 2006 1:53 am

Post » Sun Oct 03, 2010 4:47 pm

So I can't seem to get the endurance thing to work out. I'm trying to do something like this:

float RestoreRateset RestoreRate to -.75 + (player.GetActorValue Endurance /100)


But no matter which way I try it I keep getting a "Missing Parameter Amount" error on the "Set" line. What parameter am I missing there?

PS: OK I was being a dummy and using DamageActorValue instead of Get, so I wasn't missing a parameter. But that above equation still doesn't work. My Action Points aren't going down if I use RestoreRate on my "player.DamageActorValue ActionPoints" line. It seems to me that it should.

Never mind I finally got it working. I'm not sure what I did wrong in the first place but I have it now at least. So all I have left is the blurring effect. Any suggestions on how I can make that work?
User avatar
Eileen Müller
 
Posts: 3366
Joined: Fri Apr 13, 2007 9:06 am

Post » Sun Oct 03, 2010 8:43 pm

Blur effects would use the http://geck.gamesas.com/index.php/Imod command.
User avatar
maddison
 
Posts: 3498
Joined: Sat Mar 10, 2007 9:22 pm

Post » Mon Oct 04, 2010 7:39 am

Thanks. I had come across TriggerHitShader but that didn't seem to do anything. I'm thinking of adding a 4th stage at -50, since I have 4 different pant sounds to work with, where the player has a chance to stumble and fall. SteveDog came up a script for crippled legs where you'd have a chance of falling every so often, and I want to see about adapting that to this mod. All in all, it's progressing very nicely.

PS: Any suggestions on which Image Space Modifier might work for something like a Fatigue effect? There's a few to go through on a strictly experimental basis.

PS: Never mind, the Concussion Effect is perfect. This is getting too cool, I've even added the heartbeat sound to it. All I have left to do is adapt SteveDog's stumble script.
User avatar
Hazel Sian ogden
 
Posts: 3425
Joined: Tue Jul 04, 2006 7:10 am


Return to Fallout 3