Jump to content

Fallout3 - What in the GECK would cause a custom grenade to explode prematurely


gman517

Recommended Posts

Does anyone know what would cause a custom grenade to randomly explode on impact in Fallout3?



I made a working Grenade with no problems with timings. And then i had the bright idea of a huge blast 30 second timebomb which seems to have broken my game after testing to the point where my custom grenade explodes on impact even though its set to timer with 0 proximity. (vanilla grenades also)



My M.O.A.G Grenade is set to 5 seconds but only lasts 1-2.5 seconds before exploding.



Enabling/Disabling Destruction data doesnt fix this



My M.O.A.B Timebomb has the same problem as the Grenade. Any thoughts?



As a reminder. these problems only showed up after TESTING the timebomb. I don't get how something like that can break everything.



Edit: Is there some sort of scripting I can do that will ensure my projectiles explode ONLY after x time?



Also this is for a fun mod I plan on releasing on here once I iron out the kinks and finalize level designs etc.



Edit3: <truncated>


Just found a list of all the functions i can possibly use. Now my mod can start to take its functional shape (YAY SCHEMATICS). If only I could iron out this last pesky problem (for now until there's more :laugh:)



And yes I am a complete GECK scripting noob but don't worry. I work best as a programmer so you shouldn't see anything regarding scripting unless its something that really annoys me that I can't figure out.


Edited by gman517
Link to comment
Share on other sites

<truncated>

 

Edited this topic so it is more up to date and matches the duplicate that has no replies.

 

edit: Now with even more updates

 

Edit2: Ok so after some more rigorous testing. I found that the explosion happens approx 0.2-0.5 seconds after impact on anything. Does anyone have any thoughts on this odd projectile behavior. it's driving me nuts as the explosion shouldn't be happening yet period.

And I cant find much in terms of interacting with a thrown projectile in terms of scripting. Is it maybe OnActivate but then how do I set the projectile explode timer so that no matter if it bounces off anything it goes off when I want it to?

 

Scenario: I see a bunch of enemies through a door. go for the epic "nade through the door" only for it to bounce off the doorway and explode where it hits the doorway. Boom! Splat. I'm all over the walls...

 

The grenade in question is set to 5 seconds. See the screenshot in OP.

 

In reality it blows within 2.6 seconds if I'm lucky and it doesn't bounce off anything (sometimes it goes off in as little as 0.5 seconds)

Edited by gman517
Link to comment
Share on other sites

  • 2 weeks later...

Have you tried toggling Archive invalidation ?

Just turn it off then on again with your load order.

Or try a fresh save to see if that's not borked ...

 

 

I started a brand new game.

 

Timebomb lasts 4-6 seconds while the grenade works perfectly. Better than exploding on impact but still not working as intended in terms of the timebomb.

 

and toggled archive invalidation on and off

 

Results still the same after toggling

 

This works well though because I intended on a new game playthrough at some point to test out my mod, perks etc.

 

Any thoughts?

 

Edit: Is archive invalidation bInvalidateOlderFiles in config? If not where would it be?

 

Edit2: Also tried loading my mod as the only mod loaded. all other dlc turned off.

 

Edit3: Also is it the fact that most systems are x64bit and Fallout was never designed for that which causes the game to break so epicly?

Edited by gman517
Link to comment
Share on other sites

Toggling archive invalidation is usually done these days with a mod manager of some sort.

There is a button for it or a tool drop down that you can click it off then on.

But there is a stand alone from awhile ago you just drop in your data folder ... albeit I can't remember how to un apply then re apply that one.

 

It is good for keeping your save spot you test any changes with that you did in the geck.

Which back and forth tinkering / testing from geck to game can create weird results.

I myself always toggle it no matter what change I did in the geck , just to rule out any quirky behavior.

Starting a new save will pretty much give you the same results , but that gets tedious if your doing a lot of back and forth.

 

Since the new save cleared up your grenade ... I guess it fixed it. And am guessing the timer on projectiles ... may not be able to do that long of a count down. And is probably limited to about 5 sec ... which will vary in real time based on your frame rate at that given moment.

And maybe the number you entered , did create some quirky behavior in your save file.

 

So if you would like a time bomb to place ... you probably need to do it a different way , running a timer in a game mode block that starts running once you drop / place it.

Like this for example you place on any inventory object that can hold a script ...

 

SCN MyTimeBombScript

 

Short Dropped

Float Timer

 

Begin OnDrop Player

 

Set Dropped to 1

 

End

 

Begin GameMode

 

If Dropped == 1 && Timer < 30

Set Timer to Timer + GetSecondsPassed

 

elseif Dropped == 1 && Timer >= 30

PlaceAtMe MyExplosion 1

Set Dropped to 0

Set Timer to 0

Disable

MarkForDelete

 

endif

End

 

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

 

That's just a simple Idea , but you could add in another way to start the timer , or even remote detonation.

Hope that helps.

Link to comment
Share on other sites

 

SCN MyTimeBombScript

 

Short Dropped

Float Timer

 

Begin OnDrop Player

 

Set Dropped to 1

 

End

 

Begin GameMode

 

If Dropped == 1 && Timer < 30

Set Timer to Timer + GetSecondsPassed

 

elseif Dropped == 1 && Timer >= 30

PlaceAtMe MyExplosion 1

Set Dropped to 0

Set Timer to 0

Disable

MarkForDelete

 

endif

End

 

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

 

That's just a simple Idea , but you could add in another way to start the timer , or even remote detonation.

Hope that helps.

 

 

 

Edit: Thanks that actually works.

 

I added a playsound to make sure that the code actually fires. The only thing is the playsound is, instead of going beep beep is going brrrrrrrrrrrrrrrrrrrrr....until boom. How do I get it to play sound only once a second?

 

Also timing is perfect. My last problem now is how the sound is seemingly playing as per framerate. When testing on my bad save there is no sound. I guess that saves a goner. What even causes the game to break so much?

 

Edit2: Also I noticed that i don't get the xp from my victims. Is there a way to make the scripted explosion belong to the player so the player gets the XP?

 

Edit3: I can't seem to find a way to fire the script from player throwing the timebomb instead of simply (right click from inventory) dropping it. OnRelease didn't seem to do it. Is this possible? In terms of timer. I thought that a short var should only match a float var once a second. however with this code the sound doesn't play for some reason.

 

Edit4: I could drop one of these with a detonator attached in megaton and it won't affect my karma etc as the explosion isn't connected to me. Any ideas how to fix this?

 

Here is my code.

SCN MoabTimeBombScript
 
Short Dropped
Short stimer
Float Timer
 
Begin OnDrop player
   Set Dropped to 1
End
 
Begin GameMode
   if Dropped == 1  && Timer < 30
       Set Timer to Timer + GetSecondsPassed
       Set stimer to stimer + GetSecondsPassed
       if stimer == Timer
       PlaySound WPNMineTick 1
   endif
   elseif  Dropped == 1 && Timer >= 30
       PlaceAtMe MOABExplosion 1
       Set Dropped to 0
       Set Timer to 0
       Set stimer to 0
       Disable 
       MarkForDelete
   endif
End
Edited by gman517
Link to comment
Share on other sites

So I'm thinking you use a grenade weapon as the inventory object " Lobber " projectile.

Make your own custom one of course. And have it explode on impact.

But this is a fake explosion , give it no force / sound / damage. And I guess you have to use this art file "meshes\effects\fxnullexplosionart.nif"

according to the bottom of this page https://geckwiki.com/index.php?title=Explosion

 

But with this explosion , have it place your time bomb with the placed impact object on the explosion ,which will then run the timer script , and place your moab explosion.

As far as fixing the sound. Just make it a looping sound , then disable it at 29 seconds.

Which if you can't disable the sound as you have it. ( a 2D non placed sound object)

Then create one , and have it place the sound object in the time bomb script , then disable it with a check on the timer. No need for that second stimer variable.

 

Here's sorta what I'm thinking with the time bomb object script.


SCN MoabTimeBombScript

 

Short Dropped
Float Timer

Begin OnLoad
Set Dropped to 1
End

Begin GameMode
if Dropped == 1 && Timer < 30
Set Timer to Timer + GetSecondsPassed
if Timer > 1
PlaySound WPNMineTick

;PlaceAtMe WPNMineTick
If Timer >= 29

WPNMineTick.Disable

elseif Dropped == 1 && Timer >= 30
PlaceAtMe MOABExplosion 1
Set Dropped to 0
Set Timer to 0
Disable
MarkForDelete

 

endif

endif
endif
End

Link to comment
Share on other sites

OK So If I were to make my projectile explode on impact and run my script from that.

 

Is there a way to make it so that:

1. The Timebomb model is visible in world

2. The Timebomb can be disarmed say if I make it remote detonatable only

3. The Timebomb can be picked up after disarming

 

Also What would be a surefire trigger that will definitely run on impact of any object? Or do such scripts require "fake explosions" as you mentioned?

 

Edit: <truncated>

So I found that i needed to create a base effect linked to my bullet explode ScriptEffectStart script, link that to an Object Effect. Which was then attached to an Assault Rifle.

OPTIONAL STORY READING: (epic content inside)

 

 

Which actually provided an epic Avengers style battle between me, my follower Fawkes and a resurrected Super Mutant Master who just happened to have an Assault Rifle.

 

Which resulted in chaos and bodies dead or alive flying everywhere. Since I like to have all my explosions set to knock down actors always to make it more realistic. (Yes this will be part of the final mod).

 

With my power armor it took about 2 minutes to get sent flying in the right direction so I could use my own Assault Rifle on him for kicks.

 

Haha I cannot image Raiders having this much firepower but deciding whether to keep this as my next playthrough for laughs.

 

 

But it only blows on Actors dead or alive. How would I get it to blow up an any impact? (This current behavior gives me an idea for a sniper rifle though)

 

And the other thing is. Having an object effect attached to a weapon MASSIVELY reduces its durability. Any thoughts on this behavior? Is this normal?

 

Edit2: Just learned about how to save the script TYPE so that i could save it as an effect instead of object but still cant get object impacts to fire any scripts.

 

Edit3: I know that I can just simply add my bullet explode enchantment to a fake explosion with no damage force or sound attached to the projectile which ALSO creates explosions on every Actor in range. Which is pretty epic.... Why am I even trying to script bullets to explode when GECK already has that option built in....Nevermind. I'll figure out what I'm trying to do and mess around from there. That would at least fix the durability problem...

 

I'll have a play around with your code idea Mktavish. It makes more sense now. Now to rebuild...

 

Consider this thread [solved]

Edited by gman517
Link to comment
Share on other sites

  • Recently Browsing   0 members

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