[Reqz] Critical Failures.

Post » Fri May 27, 2011 9:02 pm

I was really surprised to see nothing in the way of the critical failures from the ye olde Fallouts returning. Now outside of combat I'm happy but I think in combat the player and enemies with weapons should have a chance to end up with dramatic malfunctions. For instance perhaps a raider's pistol backfires and explodes, damaging him and those nearby. Maybe using dynamite or grenades with low explosives skill will result in a premature explosion (Possibly taking the victim's hand with it). But maybe the melee buff isn't safe from these problems, maybe bad luck leads them to having that parried baseball come back to knock him in the nose!

Anyway if anyone could pick up something like this it'd be super, it would give luck a higher use, and maybe even warrant a return of the old "Jinxed" trait?
User avatar
Spooky Angel
 
Posts: 3500
Joined: Thu Aug 10, 2006 5:41 pm

Post » Sat May 28, 2011 12:14 am

Man, I'm getting enough critical failures from FalloutNV.exe as it is!
User avatar
Nicole M
 
Posts: 3501
Joined: Thu Jun 15, 2006 6:31 am

Post » Sat May 28, 2011 4:57 am

Eh I'd have to look. In theory it shouldn't be hard to add something in like that with a trait. Drop all luck(including critters and npc's) to 1, And have it do random stuff like crippling your head, or crippling a limb on chance. But it's not something I'm really interested in working on right now so maybe someone else will do it. :)
User avatar
bimsy
 
Posts: 3541
Joined: Wed Oct 11, 2006 3:04 pm

Post » Fri May 27, 2011 6:00 pm

If I find time this week I might be able to tinker with it, maybe make a proof of concept for a single weapon. It'd probably be a quest script with conditions based on weather or not the player is firing. But extending that to NPC's would be the tough part.
User avatar
Jessica White
 
Posts: 3419
Joined: Sun Aug 20, 2006 5:03 am

Post » Sat May 28, 2011 8:33 am

High recoil weapons blasting you back and sending you into Ragdoll. or crippling your arms

Weapons jamming on reasonably maintained conditions

unarmored targets suddenly having DT ratings

Gernades in your inventory exploding.

getting horrible loot spawns from containers

the more dire your situation ise (hunger, thirst, etc etc) the less likely you'll find relief (food water, stims etc etc)

lol
User avatar
A Dardzz
 
Posts: 3370
Joined: Sat Jan 27, 2007 6:26 pm

Post » Fri May 27, 2011 10:04 pm

All fantastic ideas but still hard to translate to npcs.
User avatar
Micah Judaeah
 
Posts: 3443
Joined: Tue Oct 24, 2006 6:22 pm

Post » Sat May 28, 2011 3:42 am

Loot spawns are already relatively luck affected (with few hand placed items). As for misfires etc it wouldn't be hard to force an npc to reload or to apply a physics effect with 0 damage.
User avatar
Sasha Brown
 
Posts: 3426
Joined: Sat Jan 20, 2007 4:46 pm

Post » Sat May 28, 2011 8:15 am

Yes how exactly I'm rusty with scripting, but I do know adding a script to every NPC would be out of the question. I could add a token that or something but I'd still have to find a way to add that to NPCs without modifying their inventories.
User avatar
Arnold Wet
 
Posts: 3353
Joined: Fri Jul 07, 2006 10:32 am

Post » Sat May 28, 2011 2:53 am

It seems like this would tie in pretty well with the "Miss Fortune" perk.

Basically it would make having "Miss Fortune" like the old "jinxed" perk.

Personally I think all the perks should come with some kind of trade-off...
User avatar
Heather M
 
Posts: 3487
Joined: Mon Aug 27, 2007 5:40 am

Post » Sat May 28, 2011 3:44 am

Traits all have trade offs. Perks weren't meant to be balanced, just not overpowered. :P
User avatar
jessica sonny
 
Posts: 3531
Joined: Thu Nov 02, 2006 6:27 pm

Post » Sat May 28, 2011 1:56 am

I used to script for morrowind then oblivion so it's been a while but I've been meaning to get back into it. What I would do is check if the actor is in combat, and if he/she is set off an *explosion* with a reasonable radius every ~3 seconds. The explosion would add a script to anyone *hurt* by the blast. This would then cover the PC, NPCs everyone. Relatively easy to do. Man I need to dl the GECK
User avatar
Deon Knight
 
Posts: 3363
Joined: Thu Sep 13, 2007 1:44 am

Post » Fri May 27, 2011 8:59 pm

How would you trigger the explosion? Forcelessixplosion.Placeat Player?

EDIT:

Do Gamemode blocks work on inventory tokens?
User avatar
Max Van Morrison
 
Posts: 3503
Joined: Sat Jul 07, 2007 4:48 pm

Post » Fri May 27, 2011 8:41 pm

Here's a draft for a token script I made off the top of my head.

SCN UGCriticalWeaponsFailureTokenScript;Token HolderRef Victim;MisfiringShort WeaponTypeShort WeaponHealthVarShort VictimLuckVarShort NonChanceVarShort ChanceRollOneShort MisfireVariableShort WeaponMisfired;Misfire OutcomeShort ChanceRollTwoShort WeaponMisfireResultBegin Gamemode	Set Victim to GetContainer	Set WeaponType to Victim.GetWeaponAnimType	;Check if carrier is recoiling		If Victim.GetAnimAction == 8		;Calculate Misfire Variable					Set WeaponHealthVar to ( Victim.GetWeaponHealthPerc / 10 )			Set VictimLuckVar to ( Victim.GetAv Luck * 10 )			Set ChanceRollOne to ( GetRandomPercent )			Set NonChanceVar to ( VictimLuckVar * WeaponHealthVar )			Set MisfireVariable to ( NonChanceVar - ChanceRollOne )					Endif		If MisfireVariable < 0			Set WeaponMisfired to 1		Endif;If Weapon Misfired Calculate Result	If WeaponMisfired == 1 && WeaponType >=4 && WeaponType <=8		Set ChanceRollTwo to ( GetRandomPercent ) 		Set MisfireResult to ( VictimLuckVar + ChacneRollTwo)	Endif	If MisfireResult >= 100	;Lucked Out do nothing		Set WeaponMisfired to 0	Elseif MisfireResult < 100 && MisfireResult >= 75;Negative Effect		Set WeaponMisfired to 0	Elseif MisfireResult < 75 && MisfireResult >= 50;Negative Effect		Set WeaponMisfired to 0	Elseif MisfireResult < 50 && MisfireResult >= 25;Negative Effect		Set WeaponMisfired to 0	Elseif MisfireResult < 25 && MisfireResult >= 0;Negative Effect		Set WeaponMisfired to 0	Elseif MisfireResult < 0;Negative Effect		Set WeaponMisfired to 0	EndifEnd


Any scripting buffs wanna take a once over to see if this may work?
User avatar
Calum Campbell
 
Posts: 3574
Joined: Tue Jul 10, 2007 7:55 am

Post » Sat May 28, 2011 12:32 am

It'll be hard to implement for NPCs until we get reference walking function with NVSE. When we do, we can make something like this:

ref foo;set foo to getfirstref 35 3;while (foo) if (foo.isInCombat)  if (foo.IsAttacking) ; <- Don't think this one exists, we need to check if the NPC is firing/attacking   if (getrandompercent <= (10-foo.getav luck))       endif  endif endif set foo to getnextref;loop



EDIT: Err.. or we could do this:
ref foo;set foo to getfirstref 35 3;while (foo) if (foo.getitemcount CritFailToken < 1)  foo.additem CritFailToken 1 endif set foo to getnextref;loop

and just use the token you described
User avatar
emily grieve
 
Posts: 3408
Joined: Thu Jun 22, 2006 11:55 pm

Post » Fri May 27, 2011 11:39 pm

A: You mispelled Chance as Chacne once in the script. B: Since you are using an item will you add it to the surrounding npcs via a self centered explosion or dynamically add it to the level lists for npcs? (This option may actually be better as the idea of running the scripts on say a radscorpion seems rather silly). I feel like someone came up with a method of adding singular objects to npcs without creating incompatabilities. Need to do some review...
User avatar
victoria gillis
 
Posts: 3329
Joined: Wed Jan 10, 2007 7:50 pm

Post » Sat May 28, 2011 10:11 am

It'll be hard to implement for NPCs until we get reference walking function with NVSE. When we do, we can make something like this:

*Snip*

and just use the token you described


So as far as you can see that script will work? Sorry I've just always been bad a scripting.

EDIT: Ok so it seems I'll have to use a script effect instead of a script, gamemode blocks don't work on items in the player's inventory. I'll see what tinkering I can do later.
User avatar
Pumpkin
 
Posts: 3440
Joined: Sun Jun 25, 2006 10:23 am

Post » Sat May 28, 2011 6:38 am

Gamemode blocks should indeed work on items in player inventory, but beware that the GetContainer command doesn't work until a few frames after the item has been added to the inventory. You should use something like this:

begin gamemodeif getcontainer set victim to getcontainerelse  returnendifset WeaponType to victim.getWeaponType(...)

User avatar
WYatt REed
 
Posts: 3409
Joined: Mon Jun 18, 2007 3:06 pm

Post » Sat May 28, 2011 5:09 am

I might be adding something like this into http://www.fallout3nexus.com/downloads/file.php?id=13361 after I transfer it over from FO3. As it is, NPC power armor will explode if you score a torso shot from behind. I'd like to have servos fail and nuclear power supplies go dead though, probably with a 0% chance of occuring if the condition of the armor is above 75% or so, and an increasing probability below that.
User avatar
Melissa De Thomasis
 
Posts: 3412
Joined: Tue Feb 27, 2007 6:52 pm

Post » Fri May 27, 2011 8:50 pm

Gamemode blocks should indeed work on items in player inventory, but beware that the GetContainer command doesn't work until a few frames after the item has been added to the inventory. You should use something like this:

begin gamemodeif getcontainer set victim to getcontainerelse  returnendifset WeaponType to victim.getWeaponType(...)



Will do that may have been the problem.

EDIT:

OK Yes, gamemode blocks work, however I moved the getcontainer function to an onadd block which solved the issue. However the GetAnimAction isn't Working, I'll tinker with the other values for this condition though, maybe recoil isn't ever used.
User avatar
Thema
 
Posts: 3461
Joined: Thu Sep 21, 2006 2:36 am

Post » Fri May 27, 2011 9:53 pm

Recoil is the animation for when you strike someone's block. The action you're looking for is follow-through.

I keep reposting variations on this, should probably set is as my sig or something :P.
ref contshort animbegin gamemodeif(cont)	if(cont.GetAnimAction == 2 && anim == 0)		set anim to 1	elseif(cont.getanimaction != 2 && anim == 1)		;WEAPON FIRED		set anim to 0	endifelse	set cont to getcontainerendifend
Is what I use to track weapon firing http://www.fallout3nexus.com/downloads/file.php?id=12903
User avatar
Claire Jackson
 
Posts: 3422
Joined: Thu Jul 20, 2006 11:38 pm

Post » Fri May 27, 2011 11:24 pm

Actually I've gotten it working on the player, all I have to do is some personal tweaking and testing then maybe I'll release the proof of concept.
User avatar
Trent Theriot
 
Posts: 3395
Joined: Sat Oct 13, 2007 3:37 am

Post » Sat May 28, 2011 12:54 am

I recall the "Jinxed!" trait from fallout two, to a point. It was really handy to have if you pumped your luck up to 10, because everyone else is having horrible accidents while you are normally unaffected. Multiple enemies dropping their guns or having them misfire? Prime time to mess them up real good. The thing about Jinxed, is that there are so many enemies compared to the player and his allies, that Jinxing usually worked out on a positive note.


Below is a pair of links about Critical Failiure in Fallout 2, with effects and odds.


http://fonlinedocs.netii.net/fo2calg.pdf

http://www.nma-fallout.com/forum/viewtopic.php?t=49946&postdays=0&postorder=asc&start=20&sid=1ba79dcfa2580f1aee162165d4711121
User avatar
Rich O'Brien
 
Posts: 3381
Joined: Thu Jun 14, 2007 3:53 am

Post » Sat May 28, 2011 10:11 am

I'll take a look at those later. At this point (Without Luck influence) the weapon's COND is roughly the percentage of the time that the gun will fire successfully. So a weapon at 10% will only work 10% of the time. This is about the best I can get or else anything over 50% COND will never misfire.

The probabitiy isn't my major concern right now, I've got it working so I can tweak it later one everything else is done.
User avatar
Rebekah Rebekah Nicole
 
Posts: 3477
Joined: Fri Oct 13, 2006 8:47 pm

Post » Sat May 28, 2011 10:03 am

SCN UGCriticalWeaponsFailureTokenScript;Token HolderRef Victim;MisfiringShort WeaponTypeShort WeaponHealthVarShort VictimLuckVarShort NonChanceVarShort ChanceRollOneShort WeaponMisfiredBegin OnAdd		If GetContainer			Set Victim to GetContainer		Else			Return		EndifEndBegin Gamemode	Set WeaponType to Victim.GetWeaponAnimType	;Check if carrier is recoiling		If Victim.GetAnimAction == 2 && WeaponType >=4 && WeaponType <=8		;Calculate Misfire Variable					Set WeaponHealthVar to ( Victim.GetWeaponHealthPerc )			Set VictimLuckVar to ( Victim.GetAv Luck * 5 )			Set ChanceRollOne to ( GetRandomPercent )			Set NonChanceVar to ( VictimLuckVar + WeaponHealthVar )		Endif		If ChanceRollOne > NonChanceVar // NonChanceVar	< 2				Set WeaponMisfired to 1		Endif	If WeaponMisfired == 1 && Victim.GetItemCount UGMisfirePreventToken == 0		Victim.CastImmediateOnSelf UGCritFailureRandomEffect		Set WeaponMisfired to 0	EndifEnd


Here's the token script I've come to, there's more scripts than that but I don't feel like describing how they all relate right now. It's working out pretty well now.

If anyone wants to take a look at the Current ESP or Test for it would be really nice. At this point though this seems to be a pretty good proof of concept for someone to build upon.
User avatar
Franko AlVarado
 
Posts: 3473
Joined: Sun Nov 18, 2007 7:49 pm


Return to Fallout: New Vegas