AxlDave Posted March 11, 2014 Share Posted March 11, 2014 I'm trying to make it so that reaching Fatal Sleep Deprivation does not kill the Player, but instead gives them the Concussion effect. I have tried adding the Concussion base effect to the Fatal Sleep Deprivation actor effect, but this appears to do nothing, regardless of how high or low the duration is set to. I have also tried scripting the effect in as shown below: if ( Player.GetAV SleepDeprevation >= 1000 ) Player.CastImmediateOnSelf PlayerConcussed else Player.RemoveSpell PlayerConcussed endif The script saves properly, so I know it is grammatically correct. However this also appears to do nothing, no visual effects and the -4 Perception is not applied. How can I make this work? I have tried looking for the game mechanics that apply when the head is crippled, but I could not seem to find that either. Whilst we're on the topic, does anyone know a way to stop the Sleep Dep value raising above 1000? Link to comment Share on other sites More sharing options...
devinpatterson Posted March 11, 2014 Share Posted March 11, 2014 You can get the concussion visual affect by applying ImageSpaceConcussion (ie ApplyImagespaceModifier ImageSpaceConcussion) and the effects of a concussion by wounding the head (ie damageActorValue PerceptionCondition 100). There's also a bunch of effects for doing the same thing (damaging perception) in the geck, like the RobobrainMesmetron weapon that has the EnchRobobrainAttack OA. Link to comment Share on other sites More sharing options...
devinpatterson Posted March 11, 2014 Share Posted March 11, 2014 BTW have you ever tried editing the actor effect directly? So remove damage health 10000 (possibly rename Fatal Sleep Dep. since it's no longer fatal) and add a concussion effect instead. No script would be required.Here I put together one for you, see if it works. I didn't test it. At the very least it should stop the fatal killing blow. You may need to add or edit teh effect to get the concuss visual effect. I don't know if the effect I chose comes with it. Link to comment Share on other sites More sharing options...
AxlDave Posted March 12, 2014 Author Share Posted March 12, 2014 (edited) Cheers man, I'll give those a try. BTW have you ever tried editing the actor effect directly? So remove damage health 10000 (possibly rename Fatal Sleep Dep. since it's no longer fatal) and add a concussion effect instead. No script would be required. Yeah, that was what I initially did, but like I say it didn't appear to do anything. I tried using the preset PlayerConcussed actor effect, I tried applying the Concussion base effect to Fatal Sleep Deprivation, I even tried making my own brand new base and actor effects but nothing would work. You can get the concussion visual affect by applying ImageSpaceConcussion (ie ApplyImagespaceModifier ImageSpaceConcussion) and the effects of a concussion by wounding the head (ie damageActorValue PerceptionCondition 100). So how would I unapply each of these effects? I assume the inverse to DamageActorValue is RestoreActorValue, but how would I remove an ImagespaceModifier? --EDIT-- After testing, it would seem that the ImageSpaceModifier is the effect I'm after. The only problem is, upon reaching Fatal Sleep Dep it blurs the view and then turns black until I lower my Sleep Dep... do I have to add in any variables to make it blur in and out like when the head is crippled? Edited March 12, 2014 by AxlDave Link to comment Share on other sites More sharing options...
devinpatterson Posted March 12, 2014 Share Posted March 12, 2014 So how would I unapply each of these effects? I assume the inverse to DamageActorValue is RestoreActorValue, but how would I remove an ImagespaceModifier? imod to apply the effect rimod to remove it --EDIT-- After testing, it would seem that the ImageSpaceModifier is the effect I'm after. The only problem is, upon reaching Fatal Sleep Dep it blurs the view and then turns black until I lower my Sleep Dep... do I have to add in any variables to make it blur in and out like when the head is crippled? You know I'v never actually used it, so I have no idea re: the black effect, but change your imagespace and use OWB's concussive ims, see if it does the same thing (just for testing purposes). Also if you added it as an mag effect you could change the duration to something other than 0. Do you want it on all the time that the sleep deprivation is above 1000? I'm not familiar with how the hardcore/survival system works, but I'm sure you can plug into the sleep value. And you could use a quest script that simply checks if your >= 1000 if so it applies the concussive effect, if < 1000 removes it (rimod). If the effect (blurring) lasts 7 seconds before turning dark, set your quest script to fire off every 6 seconds. Anyway a couple of ideas for you to mess around with. Link to comment Share on other sites More sharing options...
AxlDave Posted March 12, 2014 Author Share Posted March 12, 2014 (edited) imod to apply the effect rimod to remove it Just to be clear, is that Player.ApplyImagespaceModifier, and Player.RemoveImageSpaceModifier? Do you want it on all the time that the sleep deprivation is above 1000? I'm not familiar with how the hardcore/survival system works, but I'm sure you can plug into the sleep value. And you could use a quest script that simply checks if your >= 1000 if so it applies the concussive effect, if < 1000 removes it (rimod). If the effect (blurring) lasts 7 seconds before turning dark, set your quest script to fire off every 6 seconds. Currently, I have it so that at SlpDep >= 1000 the effect is applied, at SlpDep < 1000 it removes it. Essentially, I want exactly the same effect as when the Player's head is crippled. I have taken care of the Perception value, it is the visual effect I am trying to achieve. The effect I'm talking about is when the vision blurs for a couple of seconds, then returns to normal for another five seconds, then blurs for two etc etc until the head is repaired. I want this effect until SlpDep is taken below 1000. Curiously, when I included a DoOnce command, the vision blurred a little then returned to normal, but just the once and not for long enough. Nevertheless, it gave me the idea that the turning to black may be the result of a cumulative effect. I have been trying to take advantage of this through the use of fTimer and iStage, though I have only had limited success. Here is the script I am currently using: short DoOncefloat fTimerint iStage BEGIN GameMode if ( Player.GetAV SleepDeprevation >= 1000 ) if ( DoOnce == 0 ) Player.ApplyImagespaceModifier ImageSpaceConcussion if fTimer > 0 set fTimer to fTimer - GetSecondsPassed elseif iStage == 0 set iStage to 1 set fTimer to 2 elseif iStage == 1 set DoOnce to -1 set iStage to 2 set fTimer to 5 elseif iStage == 2 set DoOnce to 0 set iStage to 0 set fTimer to 0 endif endif else Player.RemoveImagespaceModifier ImageSpaceConcussion set DoOnce to 0 endif END The problems I am currently having are that the screen turns black far too quickly, and once it reverts to normal vision the effect does not repeat. --EDIT-- I think I have it cracked, this is the latest script which gives a constant blurring in and out. It's good enough. short DoOncefloat fTimerint iStage BEGIN GameMode if ( Player.GetAV SleepDeprevation >= 1000 ) if fTimer > 0 set fTimer to fTimer - GetSecondsPassed elseif iStage == 0 Player.ApplyImagespaceModifier ImageSpaceConcussion set iStage to 1 set fTimer to 8 elseif iStage == 1 set iStage to 0 set fTimer to 0 endif else Player.RemoveImagespaceModifier ImageSpaceConcussion endif END Edited March 12, 2014 by AxlDave Link to comment Share on other sites More sharing options...
devinpatterson Posted March 13, 2014 Share Posted March 13, 2014 OK the imagespaceConcussion has a duration of 11 seconds. What I would try (FYI not a script guy) is to make a copy imageSpaceConcussionSleep and change the duration to a few (3) seconds (as you mentioned in your post) and create a very simple quest script; if sleepDeprevation >= 1000 Player.ApplyImagespaceModifier ImageSpaceConcussionSleep endIf Then change the quest from it's default, to fire off every 8 seconds. If it goes off every 8 seconds 3 seconds will be taken up by the effect with 5 seconds left before the script fires off again. Link to comment Share on other sites More sharing options...
devinpatterson Posted March 13, 2014 Share Posted March 13, 2014 Doesn't; set fTimer to fTimer - GetSecondsPassed have to be; set fTimer to [fTimer - GetSecondsPassed] Once again not a script guy, but I thought the parenthesis would be required to include the full expression. Link to comment Share on other sites More sharing options...
AxlDave Posted March 15, 2014 Author Share Posted March 15, 2014 OK the imagespaceConcussion has a duration of 11 seconds. What I would try (FYI not a script guy) is to make a copy imageSpaceConcussionSleep and change the duration to a few (3) seconds (as you mentioned in your post) and create a very simple quest script; I have to say I've grown quite fond of the current effect, as anyone who has been awake for more than 48 hours will confirm the blurred vision doesn't go away until sleep happens. But thanks for looking into it further, that might come in handy for another mod, or perhaps another person. Doesn't; set fTimer to fTimer - GetSecondsPassed have to be; set fTimer to [fTimer - GetSecondsPassed] Once again not a script guy, but I thought the parenthesis would be required to include the full expression. Not necessarily, though it can help to keep your scripting tidy. Parenthesising would be necessary for something more complex, like: set fTimer to fTimer - GetSecondsPassed * SomeOtherValue which could mean set fTimer to ( fTimer - GetSecondsPassed ) * SomeOtherValue or set fTimer to fTimer - ( GetSecondsPassed * SomeOtherValue ) In most cases, these two expressions would return different values, so having the parentheses is important. Link to comment Share on other sites More sharing options...
Recommended Posts