679b1156dd8c3

679b1156df403
2 Guests are here.
 

Topic: SS2 Unstable Grenades mod Read 3861 times  

679b1156dfd25ZylonBane

679b1156dfda8
The Many's corrosive influence has spread beyond just degrading the guns. Now it's degrading the grenades as well! Grenade ammo has become dangerously unstable, and will explode if damaged or dropped too far. Use this to your advantage to set explosive traps for your enemies.

https://www.youtube.com/watch?v=kAlrtwdy7_E

This is a first draft of a mod that makes all grenade ammo explode if shot, struck, or dropped further than at your feet. If you set off a stack of grenade ammo, they'll ALL explode. Seems to work okay, but I figured I'd post it here first in case anyone finds any problems or has any suggested enhancements.

The type of explosion spawned by each ammo type hasn't been hard-coded. Instead it actually follows the links back from the ammo object and grabs the corpse links from its projectile (for firing mode 1), so it should be compatible with all weapon mods, no matter how extreme.

I figure this change will give players who don't put points into Heavy Weapons something more fun to do with all that grenade ammo than recycling it. And being able to blow up grenade rounds just feels more immersive-simmy.

Also I really hope nobody's already done this.

EDIT: Thread closed. Mod released here: https://www.systemshock.org/index.php?topic=12217.0
« Last Edit: 29. March 2023, 16:19:05 by ZylonBane »

679b1156e00c4sarge945

679b1156e0131
You should call it "SS1 style Throwable Grenades for SS2" if you want to inflate your download count with a clickbait title.

679b1156e026evoodoo47

679b1156e02cc
would probably change the world object from a grenade pile to a single grenade. would be less weird, I think.

679b1156e039aZylonBane

679b1156e03ee
AFAIK there are no models of single grenades for each grenade type. The game displaying a pile of three even when there's actually more or less than three in the stack is an issue that's always existed.

679b1156e04fbvoodoo47

679b1156e0553
very sure Olfred could carve one out.

679b1156e095cZylonBane

679b1156e09b7
very sure Olfred could carve one out.
Also, including alternate grenade ammo models could produce visual weirdness when used with any mods that alter the vanilla models. Though I don't know of any that actually do that.

679b1156e0a87voodoo47

679b1156e0ad6
I don't believe there are any. and I mean yes, we would be just trading one weirdness for another (any number of grenades looking like a pile of three for any number of grenades looking like just one), but in this kind of scenario, it would be better, I think.

679b1156e0bb7ZylonBane

679b1156e0c0d
I'll look into it then. Deleting bits from the vanilla models is something that probably even I could do.

679b1156e0cf3sarge945

679b1156e0d4f
I thought dynamic grenade models based on stack size was a good idea for SCP rather than this mod including it's own grenade model, and was going to suggest it, but voodoo makes a good point. If it stops changing after 3 it's just as janky as if it never changes.

Honestly I think a "box of grenades" makes the most sense for a world model if you don't want to run into stack size weirdness.

679b1156e0df7voodoo47

679b1156e0e46
it's still weird even if it's a box, because it still can be dozens of grenades.

679b1156e0f4fZylonBane

679b1156e0fb5
Okay, first post updated with test version 2. Now switches models of all grenades to a single-grenade model for grenade objects with a stack count of 1.

This was even more of a pain in the ass than I was anticipating, because Dark apparently has an issue where if you set a model on a concrete object, then later remove the model property from the concrete, it won't revert to using the model set on the archetype. I had to copy the concrete object's model property onto it from its own archetype to get it to use the default model again, which is just... so stupid.
Acknowledged by: Chandlermaki

679b1156e107eZylonBane

679b1156e10d9
Voodoo, you didn't link to an unfinished mod on the Night Dive discord, did you?

679b1156e11a5voodoo47

679b1156e11f3
I did - Engineering is public, so even if the mod is beta, it shouldn't be a problem. no harm in a few more people taking a look and finding potential issues?

can kill the post if you think this is too beta.
« Last Edit: 07. March 2023, 21:16:43 by voodoo47 »

679b1156e12c2ZylonBane

679b1156e1311
I like to think of Engineering as a place where people who are slightly more technical can look at something before it's released to the masses. The sort of people who generally understand not to grab everything posted here and throw it in their mod pack.

It may not be true, but I like to think of it that way.

679b1156e139bvoodoo47

679b1156e13e6
ok, will not do that next time. //beta warning added.
« Last Edit: 07. March 2023, 22:57:16 by voodoo47 »

679b1156e149fZylonBane

679b1156e14ef
Posted as v1.0. Seems stable enough.
Acknowledged by: voodoo47

679b1156e160fvoodoo47

679b1156e166d
I would do two more things - edit the single grenade model to not be thrown in a vertical position (looks even weirder when just dropped onto the ground without exploding), and once that is done, change the thrown grenade (projectile) model of the grenade hybrid into that. another discrepancy gone.

//actually, in addition to laying the single grenade object on its side, I think a completely new world model for the grenade bundle would be appropriate, see the mockup below. the vanilla model is very ok when sitting on the ground, but doesn't look too great once being flung through the air.

also, a little bit of rotation when being thrown wouldn't be too bad.
[grenade_bundle.jpg expired]
« Last Edit: 08. March 2023, 15:07:47 by voodoo47 »

679b1156e1746ZylonBane

679b1156e1792
Nope, nope, and nope.

If the model was rotated on its side, it would be floating above the ground. To make it not float above the ground, its physics model would have to be made tiny, which would make it very difficult to shoot

Hybrids don't throw grenade launcher ammo. They throw grenades. No, I don't know where they get them.

Nothing in SS2 rotates when dropped by the player.
Acknowledged by: voodoo47

679b1156e183cZylonBane

679b1156e189f
That being said, a mod or upgrade that allowed looting the grenades off grenade hybrids could be interesting. Maybe use them directly, or convert them into frag grenade ammo.

679b1156e1b5esarge945

679b1156e1bbb
Nothing in SS2 rotates when dropped by the player.

The gamepig rotates as it hits the ground

679b1156e1c51voodoo47

679b1156e1c9c
that's the rest axis, that is something different.

679b1156e1da6ZylonBane

679b1156e1dfb
So this is interesting. Basically, with the mod active, single grenades split off from a stack add TWO to the stack count when loaded into the grenade launcher instead of one. And it combines, so if you put two single split-off grenades back into a stack of two, they'll add four when loaded.

Here's the really crazy thing: The mod DML adds a script to the Grenades object, which by default doesn't have any scripts. If I modify the gamesys so it has an empty Scripts object, the duplication bug stops happening.

??????????

679b1156e1f09voodoo47

679b1156e1f5d
try some random (dml) things, like ticking the not inherit flag, and/or add the scripts prop via dml first and then the actual script.

if it's stupid but it works..


//or I can just try it myself - change the Script number from 3 to 0, fixed. assign custom script via metaprop also works ok;
Code: [Select]
CreateArch "Misc Metaprops" "UnstableGrenMeta"
{
}
+MetaProp "Grenades" "UnstableGrenMeta"
+ObjProp "UnstableGrenMeta" "Scripts" {
"Script 3" "zbUnstableGrenades"
}
and that's probably the way the script should be assigned anyway. would still use Script 0 slot on the meta, as there is no reason not to.
« Last Edit: 02. October 2024, 11:04:26 by voodoo47 »

Your name:
This box must be left blank:

TriOptimum counter-terrorism consultant Rebecca ____ (Fill in the last name):
2 Guests are here.
You are standing in an open field west of a white house, with a boarded front door. There is a small mailbox here.
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
679b1156e3179