Jump to content

FNV GECK help - is it possible to stack object effects?


SDB16

Recommended Posts

Hello, I am working on a realism overhaul mod and I need to know if its possible to stack object effect, the purpose of the question is because I'm working on a bleeding system and I'd like it to be dynamic so I assume I am going to have to make scripts but i am a little uneducated in that department, if anyone could point me in the best direction to where I can learn I will appreciate that a lot but I have been to the GECK site and im not learning anything from the tutorials there and I cant find any on YouTube or if someone could help me with the scripting that'd be fantastic too but I'm seriously stumped here so any help is MUCH appreciated.

Link to comment
Share on other sites

If you be more specific, I can help you a good amount with scripting. There are others far more knowledgeable, but I'm here a lot and can get most things done all right.

 

I'm not sure what you mean by stacking object effects. You can, but it's extremely simple and intuitive, so I have a feeling I've misunderstood what you want.

Link to comment
Share on other sites

If you be more specific, I can help you a good amount with scripting. There are others far more knowledgeable, but I'm here a lot and can get most things done all right.

 

I'm not sure what you mean by stacking object effects. You can, but it's extremely simple and intuitive, so I have a feeling I've misunderstood what you want.

Well if I might hit you up on the scripting lol but as for stacking object effects i was wondering if the effect could stack, like when I shoot someone using my bleeding effect the damage doesn't seem to stack. and to Mktavish I was wanting a bleeding system that was dynamic, each bullet has their own unique properties just like in real life, I can handle very small and basic scripts like CIOS scripts and add item scripts but not much else so thats where I'm stuck, it seems that the bleeding effects applied by my object effects are not stacking only the duration, I'm trying to make it to where the more you get shot the more you bleed, I have a basic bleeding stopping scripts for super stims for small caliber bleeding and one for the doctor bag for medium and large calibers, however I think I should add lead poisoning too but I have much more to focus on, illnesses will come later once I've gotten a little more knowledge on scripting because I want sickness to come in stages.

Edited by SDB16
Link to comment
Share on other sites

I see now. It should have occurred to me what you meant. I thought you meant, can an object have multiple effects, which obviously they can.

 

There are a few ways to handle this. The first thing that comes to mind is using an event handler:

https://geckwiki.com/index.php/SetEventHandler

 

There may well be an easier way, but this is the first place my head went. So, you would just set up this event handler for when anyone hits anyone, and have it check whether the ammo has the bleeding effect and which one. For each check that comes back positive, we'll then check is the actor already bleeding, and handle that accordingly. You could get even more complex if you like, with various other types of checks, like where the actor was hit, the damage of the bullet, maybe the armour, a random element, survival skill, endurance, perhaps a custom perk if you like, whatever you want. I get that it's a realism mod, so maybe most of that would be irrelevant, but my point is that you can do whatever you want here.

 

Another way would be to use a dummy effect and an object script. In that case, you would want to look at the fatigue script I think, to see how they use GetOwnerLastTarget, and then use a timer to implement the bleeding damage and modify it at will.

 

There's probably other ways, but I think both of those have a lot of potential.

Link to comment
Share on other sites

Hmmm ... the problem of stacking object effects seems to be with the weapon ... which is where you would attach an object effect ... will not apply it's effect more than once. Or only have one instance of itself , ergo it gets overwritten on the second hit. So having a damage health over time , will then restart it's count down.

 

Is this what you have tried to do ?... putting a damage health(base effect) on an object effect , then setting it's magnitude and duration. To 20 health over 1 minute ... for example . And you were hoping to get that to take 20 health over a minute for every shot ?

 

Unlike the ammo effect will apply per bullet. Which is to bad those don't have a duration you can set.

But there is a spot to put an impact script on the ammo object. Which needs to be an "Effect" type script.

 

I'm not very familiar with event handlers ... so can't really say if those are the better way to go ?

Link to comment
Share on other sites

Here is a pretty simple script ( just a thought experiment , untested) To place as an impact script on the ammo objects. And prior to this you would set up 5 different actor effects , using the base effect of "DamageHealth" Then set your different magnitudes and duration for each. And all 5 should stack , damaging health while their durations are still active during their time overlaps.

 

 

~~~~~~~~~~~~~~~~~~~~~~~

SCN MyBeedingScript

 

Int iShotTime

Int DoOnce

 

Begin ScriptEffectStart

 

If iShotTime == 4

Set iShotTime to 5

elseIf iShotTime == 3

Set iShotTime to 4

elseIf iShotTime == 2

Set iShotTime to 3

elseIf iShotTime == 1

Set iShotTime to 2

elseIf iShotTime == 0

Set iShotTime to 1

 

; etc for how many possible times they could be shot before dying.

 

endif

End

 

Begin ScriptEffectUpdate

 

If iShotTime == 1 && DoOnce == 0

CIOS MyBleedSpell01

Set DoOnce to 1

If iShotTime == 2 && DoOnce == 1

CIOS MyBleedSpell02

Set DoOnce to 2

If iShotTime == 3 && DoOnce == 2

CIOS MyBleedSpell03

Set DoOnce to 3

If iShotTime == 4 && DoOnce == 3

CIOS MyBleedSpell04

Set DoOnce to 4

If iShotTime == 5 && DoOnce == 4

CIOS MyBleedSpell05

Set DoOnce to 5

 

endif

endif

endif

endif

endif

 

END

~~~~~~~~~~~~~~~

 

Add edit : I swapped the order of lines in the "ScriptEffectStart" block checking the iShotTimes ... incase it might have a cascade effect reading down the lines even though the frame only fires once per bullet impact. But the "ScriptEffectUpdate" block won't have that same possible problem. Hence why they are not counting down also ... but you could also swap them for consistency if you want.

Link to comment
Share on other sites

Okies ... I just realized that script and method won't work ... since each bullet will have it's own script and instances of those variables. Figured I would just leave it up though ... since it at least outlines the stacking method. The solution imo would be to make the subject of the impact script (NPC) start storing the variables ... by way of giving them a token in inventory. And this impact script would just check what tokens they have , and give them others based on that.

 

So basically using a "GetItemCount" instead of the int variables. IDK , will need to think it through some more.

And will wait to see what Ideas ya'll come back with.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...