[0.10.6] Gun Bonsai -- everything-compatible weapon upgrading

Projects that alter game functions but do not include new maps belong here.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
Gourry
Posts: 117
Joined: Tue Dec 05, 2017 4:25 pm
Graphics Processor: nVidia (Modern GZDoom)

Re: [0.9.7] Gun Bonsai -- everything-compatible weapon upgrading

Post by Gourry »

Getting a vm abort from event handler by shooting a hell warden's shield every time when they block.
Sometimes it's crashes with pistol, other times it doesn't.

https://imgur.com/a/sxaOnyt

load order:
Hellbnd.wad
Pandemonia-v2.3.pk3
CorruptionCards-v4.3.pk3
Pand-Cards-v1.0.pk3
GunBonsai-0.9.7.pk3
BDBE_v3.2b_Flashlight.pk3
gearbox-v0.7.2.pk3
target-spy-v2.0.1.pk3

pistol augments:

Dark harvest (10)
Damage (2)
Rapid fire (9)
Shield (9)
Shocking Inscription (4)
Revivification (4)
Thunderbolt (2)
Searing Inscription (3)
Burning Terror (2)
Conflagration (2)
Elemental Beam (1)
User avatar
ToxicFrog
Posts: 229
Joined: Thu Oct 05, 2017 10:09 am
Preferred Pronouns: She/Her
Operating System Version (Optional): NixOS

Re: [0.9.7] Gun Bonsai -- everything-compatible weapon upgrading

Post by ToxicFrog »

I feel like the longer I work on this mod, the weirder the crashes get.

That one is crashing on if (evt.thing.health <= 0) {, which implies that either evt or evt.thing (which is the monster being attacked) is null. However, the preceding function does a lot of work with evt, so that must not be null, and it also checks a bunch of flags on evt.thing, so we know evt.thing must not be null. And evt.thing.health is an int, which is non-nullable.

The only possibility I can think of is that the preceding line, stats.OnDamageDealt(evt.inflictor, evt.thing, evt.damage);, which is what fires the on-damage effects for upgrades (applying elemental effects, fragmentation/HE shots detonating, etc) is somehow causing evt.thing to be Destroy()ed. My best guess here is that the chain of events is:
- you shoot the target
- this triggers the OnDamageDealt handler for Thunderbolt, which does the damage immediately rather than queuing it for the next tick of the dot -- I should probably change that just for consistency with other elements!
- somehow this causes the target to cease to exist
- the wheels fall off

Does this only happen when you have Thunderbolt on the weapon, or can you trigger it without it as well?
stainedofmind wrote: Mon Jan 02, 2023 11:28 am On the topic of Submunitions, I've been experimenting with a few changes to the power up on my end, and while I haven't done a really good test yet, I found limiting the life time of the "flak" and NOT scaling it with level, as well as reducing the over all number of "flaks" makes the power up feel a lot better. I've also been fiddling with Shocking Inscription, trying to find a good balance for a chance based stun, but that's proving more difficult to balance without completely rewriting the entire power up.
In the upcoming version, Shocking Inscription is a 50% slow rather than a stun, which in my testing still feels pretty good but no longer completely trivializes most encounters.

Apropos Submunitions, the current set of changes I'm fiddling with are:
- spawn 4+level rather than 4*level bomblets
- damage scales with target health, but is split across all bomblets
- bomblet impacts no longer trigger elemental procs (I played with the reverse, elemental dot kills no longer spawning submunitions, but that had really bad gamefeel)

I hadn't considered making the bomblet ttl not scale with level, nor randomizing the count, but those are good ideas and I'll play around with them.

I also realized that the fix for Burning Terror not respecting +NOFEAR never made it into 0.9.7. Should be in the next one for real now.
User avatar
Dan_The_Noob
Posts: 873
Joined: Tue May 07, 2019 12:24 pm
Graphics Processor: nVidia with Vulkan support

Re: [0.9.7] Gun Bonsai -- everything-compatible weapon upgrading

Post by Dan_The_Noob »

ToxicFrog wrote: Tue Jan 03, 2023 10:40 am In the upcoming version, Shocking Inscription is a 50% slow rather than a stun, which in my testing still feels pretty good but no longer completely trivializes most encounters.
what will upgrades do in this case?
ToxicFrog wrote: Tue Jan 03, 2023 10:40 am
- damage scales with target health, but is split across all bomblets
wouldn't this make it weaker every upgrade?

maybe you could have it divide by 4 (base bomblets) for the damage calc but never go up with the bomblet count.
Gourry
Posts: 117
Joined: Tue Dec 05, 2017 4:25 pm
Graphics Processor: nVidia (Modern GZDoom)

Re: [0.9.7] Gun Bonsai -- everything-compatible weapon upgrading

Post by Gourry »

ToxicFrog wrote: Tue Jan 03, 2023 10:40 am I feel like the longer I work on this mod, the weirder the crashes get.

That one is crashing on if (evt.thing.health <= 0) {, which implies that either evt or evt.thing (which is the monster being attacked) is null. However, the preceding function does a lot of work with evt, so that must not be null, and it also checks a bunch of flags on evt.thing, so we know evt.thing must not be null. And evt.thing.health is an int, which is non-nullable.

The only possibility I can think of is that the preceding line, stats.OnDamageDealt(evt.inflictor, evt.thing, evt.damage);, which is what fires the on-damage effects for upgrades (applying elemental effects, fragmentation/HE shots detonating, etc) is somehow causing evt.thing to be Destroy()ed. My best guess here is that the chain of events is:
- you shoot the target
- this triggers the OnDamageDealt handler for Thunderbolt, which does the damage immediately rather than queuing it for the next tick of the dot -- I should probably change that just for consistency with other elements!
- somehow this causes the target to cease to exist
- the wheels fall off

Does this only happen when you have Thunderbolt on the weapon, or can you trigger it without it as well?



With Thunderbolt on, going test with it disabled to see if it still does it with the pistol

Edit: it doesn't
User avatar
ToxicFrog
Posts: 229
Joined: Thu Oct 05, 2017 10:09 am
Preferred Pronouns: She/Her
Operating System Version (Optional): NixOS

Re: [0.9.7] Gun Bonsai -- everything-compatible weapon upgrading

Post by ToxicFrog »

Dan_The_Noob wrote: Tue Jan 03, 2023 3:42 pm what will upgrades do in this case?
Same as they do now, extend the duration.
wouldn't this make it weaker every upgrade?

maybe you could have it divide by 4 (base bomblets) for the damage calc but never go up with the bomblet count.
Total damage increases each upgrade, even if individual bomblets get weaker.
User avatar
stainedofmind
Posts: 139
Joined: Sun Sep 01, 2019 10:59 am

Re: [0.9.7] Gun Bonsai -- everything-compatible weapon upgrading

Post by stainedofmind »

ToxicFrog wrote: Tue Jan 03, 2023 10:40 am In the upcoming version, Shocking Inscription is a 50% slow rather than a stun, which in my testing still feels pretty good but no longer completely trivializes most encounters.
Hadn't thought about switching it to a slow down, but that does sound like it would feel good just based on my hacky attempts to switch it to a chance based effect.
ToxicFrog wrote: Tue Jan 03, 2023 10:40 am - bomblet impacts no longer trigger elemental procs (I played with the reverse, elemental dot kills no longer spawning submunitions, but that had really bad gamefeel)
Weird, cause bomblets triggering elements seems better then elements triggering bomblets in theory. Odd how implementing something can expose how bad an idea can be! Off topic aside/example related to this:
Spoiler:
User avatar
Dan_The_Noob
Posts: 873
Joined: Tue May 07, 2019 12:24 pm
Graphics Processor: nVidia with Vulkan support

Re: [0.9.7] Gun Bonsai -- everything-compatible weapon upgrading

Post by Dan_The_Noob »

ToxicFrog wrote: Tue Jan 03, 2023 10:40 am - bomblet impacts no longer trigger elemental procs (I played with the reverse, elemental dot kills no longer spawning submunitions, but that had really bad gamefeel)
I didn't notice this the other day, but i don't think it should be changed... or bomblets should be removed entirely, the only reason i take bomblets is to make elements spread anyway.
User avatar
ToxicFrog
Posts: 229
Joined: Thu Oct 05, 2017 10:09 am
Preferred Pronouns: She/Her
Operating System Version (Optional): NixOS

Re: [0.9.7] Gun Bonsai -- everything-compatible weapon upgrading

Post by ToxicFrog »

Dan_The_Noob wrote: Wed Jan 04, 2023 11:48 pm I didn't notice this the other day, but i don't think it should be changed... or bomblets should be removed entirely, the only reason i take bomblets is to make elements spread anyway.
stainedofmind wrote: Wed Jan 04, 2023 8:13 pm Weird, cause bomblets triggering elements seems better then elements triggering bomblets in theory. Odd how implementing something can expose how bad an idea can be!
I'll expand on this a bit, because there are three possibilities here and they all have issues.
- Status quo: Bomblets trigger elements, and elemental kills trigger bomblets. It tends to cause room-clearing infinite chains where you kill something with bomblets, they do a lot of damage to everything around them and add a dot, the dot kills the enemies, they release more bomblets, etc. This is what people were originally complaining about (along with lag from huge numbers of bomblets at high levels) and is what got me looking at redesigning it.
- Option #1: bomblets trigger elemental effects, but elemental dot kills don't trigger bomblets. The problem here is that if you're actively attacking an enemy, it's taking damage both from you and the dot, and if the latter gets last-hit on it, the bomblets don't fall out. In practice this happens a lot, so your submunitions upgrade suddenly becomes a lot worse as soon as you take an elemental upgrade as well.
- Option #2: elemental dot kills trigger bomblets but bomblets don't trigger elemental effects. This feels better when you're actually shooting enemies but makes submunitions useless for spreading elemental effects. I'm still not super happy with it, though.

Thinking about it over the past few days and typing this out has me turning over two other ideas:
- Option #3: keep both triggers but reduce damage and number of bomblets. I'm already experimenting with this. It'll make it harder to produce chain reactions against groups of identical enemies but easier by going after the biggest meanest thing in the room first, which seems cool.
- Option #4: keep track of the last few enemies damaged and trigger bomblets only if the dying enemy was one that you damaged with something other than a bomblet or an elemental effect in the last, say, second. I'm reluctant to do this because it adds a lot of complication for something that it feels like I should be able to fix in a different way.
Spoiler:
That's hilarious and I love it. Reminds me of playing through old Descent megaWADs (megaHOGs?) -- there was one where the mapper had realized they could put anything inside an enemy's inventory, including other enemies, and it had lots of surprises like that, including multi-phase boss fights, enemies that dropped themselves plus some loot, etc.
User avatar
Dan_The_Noob
Posts: 873
Joined: Tue May 07, 2019 12:24 pm
Graphics Processor: nVidia with Vulkan support

Re: [0.9.7] Gun Bonsai -- everything-compatible weapon upgrading

Post by Dan_The_Noob »

I found a situation last night with conflagration and bomblets (separately)
i was playing with corruption cards and have the shifting enemy card (one enemy swaps places with others around the map)

soon as conflag caught an enemy and it teleported, every enemy in the whole map would eventually be on fire/awake and framerate tanks to 1 FPS
but similar issue happened with bomblets where i would hit an enemy with my corrosion, it would teleport away and die from the corrosion which caused bomblets to spew out in other rooms, corrode guys and repeat. also 1 FPS.

maybe there's a way to stop conflag particles once they stop dealing burn damage? (most enemies burn down to 50% in a few seconds anyway)
Gourry
Posts: 117
Joined: Tue Dec 05, 2017 4:25 pm
Graphics Processor: nVidia (Modern GZDoom)

Re: [0.9.7] Gun Bonsai -- everything-compatible weapon upgrading

Post by Gourry »

New bug? After an enemy is revived with the revivification upgrade; can't walk through them anymore.
User avatar
ToxicFrog
Posts: 229
Joined: Thu Oct 05, 2017 10:09 am
Preferred Pronouns: She/Her
Operating System Version (Optional): NixOS

Re: [0.9.7] Gun Bonsai -- everything-compatible weapon upgrading

Post by ToxicFrog »

That code hasn't changed in a while and I can still walk through them just fine. Might be another mod flipping the SOLID flag back on after Revivification unsets it?
Dan_The_Noob wrote: Thu Jan 05, 2023 5:13 pm I found a situation last night with conflagration and bomblets (separately)
i was playing with corruption cards and have the shifting enemy card (one enemy swaps places with others around the map)

soon as conflag caught an enemy and it teleported, every enemy in the whole map would eventually be on fire/awake and framerate tanks to 1 FPS
but similar issue happened with bomblets where i would hit an enemy with my corrosion, it would teleport away and die from the corrosion which caused bomblets to spew out in other rooms, corrode guys and repeat. also 1 FPS.

maybe there's a way to stop conflag particles once they stop dealing burn damage? (most enemies burn down to 50% in a few seconds anyway)
Oh noooooooooooooo

So, first of all, Conflagration doesn't use particles (it adds a single sprite effect per conflagrating monster). Fire itself does add particles. I'm not sure whether the framerate issues come from the profusion of particles, or the simple fact that after a while every single enemy in the map will be awake and thinking.

I have been working my way towards a bonsai_enable_particles option, which when turned off will disable all particle effects and either replace them with colour washes or just disable some vfx entirely; once that's in you can try that to see if it helps. If the issue is everything being awake, though, that won't help.

Conflagration does have limits on its spread, but if the first enemy to catch fire teleported into a large enough group that might not help. It's somewhat unusual in that it's in the only elemental AoE that can trigger multiple times without player intervention -- Putrefaction and Chain Lightning trigger on death, and Acid Spray requires you to be actively attacking the enemy.

I think this would be solved by changes like: enemies ignited by conflagration cannot themselves ignite other enemies, and enemies that are no longer taking damage from fire don't proc conflagration -- I don't want to heavily nerf Conflagration just to deal with this fairly niche occurrence, though, so I'll give this some more thought. (In the meantime, you can always turn off Conflagration when you pick that card.)
User avatar
Dan_The_Noob
Posts: 873
Joined: Tue May 07, 2019 12:24 pm
Graphics Processor: nVidia with Vulkan support

Re: [0.9.7] Gun Bonsai -- everything-compatible weapon upgrading

Post by Dan_The_Noob »

maybe you could make conflagration spread by shooting a burning enemy, rather than passively?
though i was just mentioning the funny situation more than anything... and wondering about a way to save on some particle/sprite spawning.
ToxicFrog wrote: Fri Jan 06, 2023 2:06 pm That code hasn't changed in a while and I can still walk through them just fine. Might be another mod flipping the SOLID flag back on after Revivification unsets it?
I think this is referring to an archvile reviving the dead revived monster, maybe?
I came across a similar situation but i usually just blast my own revived monsters anyway, need an alternative to revivification for that element i think.
User avatar
ToxicFrog
Posts: 229
Joined: Thu Oct 05, 2017 10:09 am
Preferred Pronouns: She/Her
Operating System Version (Optional): NixOS

Re: [0.9.7] Gun Bonsai -- everything-compatible weapon upgrading

Post by ToxicFrog »

I am open to suggestions for Reviv alternatives; personally I really like picking up Reviv and Chain Lightning and then raising half a room as my loyal minions, but it does seem to be more cool than practical in most maps.

One idea I've been toying with is a "vortex" upgrade that pulls enemies towards the impact point; I wonder if it would be useful to rework that as "magnetism" and make belightninged enemies attract each other, which would give lightning a niche as the "good for aoe weapons" element.

(If I do axe Reviv from the lightning tree, I may keep it around as a non-elemental upgrade you can roll on any weapon, just because I really like the idea, though. And if I do that it doesn't become a mandatory pick for unlocking higher-level abilities, which means I can make them stick around longer...hmmm)
User avatar
Dan_The_Noob
Posts: 873
Joined: Tue May 07, 2019 12:24 pm
Graphics Processor: nVidia with Vulkan support

Re: [0.9.7] Gun Bonsai -- everything-compatible weapon upgrading

Post by Dan_The_Noob »

ToxicFrog wrote: Fri Jan 06, 2023 5:45 pm I am open to suggestions for Reviv alternatives; personally I really like picking up Reviv and Chain Lightning and then raising half a room as my loyal minions, but it does seem to be more cool than practical in most maps.
I think swap thunderbolt and revivify. so revivify is an alternate pick to chain lightning on the branching choices (I guess ? never seen chain lightning ever show up)

might end up needing to scale down thunderbolts starting damage though, as it easily obliterates everything whenever i get to it

once the "slow" is in place over the stun, it will make lightning tree feel much less "cheap" as a pick.
currently I avoid lightning, explosive death and bomblets because they make the game a little too easy (I still get lightning on BFG and explosive death/bomblets on rocket some times)

and fragmentation (because of framerate when combined with rapid fire plasma rifle + large enemy counts though)

--EDIT--
OH - also, what is the difference between corrosion and poison other than corrosion seems super weak?
User avatar
ToxicFrog
Posts: 229
Joined: Thu Oct 05, 2017 10:09 am
Preferred Pronouns: She/Her
Operating System Version (Optional): NixOS

Re: [0.9.7] Gun Bonsai -- everything-compatible weapon upgrading

Post by ToxicFrog »

Swapping reviv would also let me make it a bit beefier, like say you only get one minion but it sticks around for the rest of the level (or until you kill something bigger and meaner than it -- so if you get a pet imp at the start you can still trade it in for a baron later). Maybe add in a way for it to teleport to you if it gets stuck? Argh, there's too many cool ideas and not enough hours in the day!

Poison scales with number of attacks per second (so it's really powerful on the chaingun and really weak on the rocket launcher), corrosion scales with damage per hit (so it's really weak on the chaingun and really powerful on the RL). Poison is strongest when first applied and gets weaker over time, corrosion starts out weak and accelerates as the target's health drops. Interestingly, both are good on the SSG because it both does a lot of hits per trigger pull and a lot of damage per attack. In my experience, corrosion is best used against beefier targets and works especially well in conjunction with fire, since just as the fire is burning out the corrosion is starting to ramp up to full power; I like to pick one high-power-per-shot weapon (the SSG is good for this in the vanilla weaponset) and put both elements on it as a boss killer.

Return to “Gameplay Mods”