[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.
Post Reply
User avatar
openroadracer
Posts: 496
Joined: Mon Sep 23, 2019 1:03 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 7 Professional 64-bit SP1
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Doomworld Forums
Contact:

Re: [0.8.5] Gun Bonsai -- everything-compatible weapon upgra

Post by openroadracer »

ToxicFrog wrote:Unfortunately the rate of fire is defined by the actor's fire state definition. As far as I know the state API isn't sophisticated enough to get that information out of it, and even if it supported queries like "how long, in tics, is this particular state", the Fire state is just the entry point and the actual pathway it takes to get from "first shot leaves the barrel" to "second shot" can be extremely convoluted -- take a look at Legendoom's weapon definitions for an example of how complex this can get. :(

There's a bunch of stuff I'd like to be able to read and/or modify like rate of fire, accuracy, melee range, etc that I just can't without breaking the mod's general-purpose compatibility.

And yeah, scatter weapons are kind of unusual in that they tend to be good with both poison (because they land lots of individual hits) and acid (because the total damage from all the hits at once is usually high).
Ah, that's a shame. Oh well.

I presume you started your reply before I made my edit about Treasure Tech. Don't worry, I'd understand it might be a bit of work that I'm asking; but it'd also be nice if you could figure out much the same I'm asking there to apply to Trailblazer with upgrades on the Macheterang applying to the quick melee punch instead of whatever upgrades are on the currently held gun.
User avatar
ToxicFrog
Posts: 229
Joined: Thu Oct 05, 2017 10:09 am
Preferred Pronouns: She/Her
Operating System Version (Optional): NixOS
Contact:

Re: [0.8.5] Gun Bonsai -- everything-compatible weapon upgra

Post by ToxicFrog »

openroadracer wrote:Ah, that's a shame. Oh well.

I presume you started your reply before I made my edit about Treasure Tech. Don't worry, I'd understand it might be a bit of work that I'm asking; but it'd also be nice if you could figure out much the same I'm asking there to apply to Trailblazer with upgrades on the Macheterang applying to the quick melee punch instead of whatever upgrades are on the currently held gun.
The horrible truth is that there is no "quick melee punch" weapon. Similarly, there's no Shoulder Ram or Ground Pound weapon in Treasure Tech, and no Boot Knife weapon in Ashes 2063. Instead, all of these are implemented as an alternate firing mode that is duplicated on every weapon in the mod and has its own separate sprites.

It's not, I think, impossible, but it would require a significant reworking of the code that looks up upgrades for the current weapon to check the weapon's state as well as its class and, if it's in certain states, delegate to the upgrades for a melee weapon. It would also need per-mod configuration since both what states to look for, and what melee weapon to look up, are completely different across different mods.

I'm not ruling it out, and I've made a note of it as something to investigate later, but at best it's not something I can even begin to investigate until BONSAIRC support is implemented; don't expect it anytime soon.
User avatar
openroadracer
Posts: 496
Joined: Mon Sep 23, 2019 1:03 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 7 Professional 64-bit SP1
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Doomworld Forums
Contact:

Re: [0.8.5] Gun Bonsai -- everything-compatible weapon upgra

Post by openroadracer »

ToxicFrog wrote:The horrible truth is that there is no "quick melee punch" weapon. Similarly, there's no Shoulder Ram or Ground Pound weapon in Treasure Tech, and no Boot Knife weapon in Ashes 2063. Instead, all of these are implemented as an alternate firing mode that is duplicated on every weapon in the mod and has its own separate sprites.

It's not, I think, impossible, but it would require a significant reworking of the code that looks up upgrades for the current weapon to check the weapon's state as well as its class and, if it's in certain states, delegate to the upgrades for a melee weapon. It would also need per-mod configuration since both what states to look for, and what melee weapon to look up, are completely different across different mods.

I'm not ruling it out, and I've made a note of it as something to investigate later, but at best it's not something I can even begin to investigate until BONSAIRC support is implemented; don't expect it anytime soon.
Well, crap. Don't worry; it's just me being completely code-illiterate for why I come up with these ideas.

EDIT: Now that I'm thinking on Treasure Tech again, my mind went to a different mod called Avarice Coins, and the reason why is that both feature enemies dropping coins on death. Would said currency drops possibly interact with the "points=EXP" system already in place within Gun Bonsai? You already have it for the points awarded in MetaDOOM, and that has treasure pickups, from what I recall.
AvzinElkein
Posts: 619
Joined: Wed Nov 17, 2010 6:35 pm

Re: [0.8.5] Gun Bonsai -- everything-compatible weapon upgra

Post by AvzinElkein »

Tried it with vanilla Heretic. It seems to assume that powered wand and non-powered wand are different weapons, given the XP track changed when I activated the tome.
DarkkOne
Posts: 263
Joined: Mon Jun 06, 2016 11:26 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Widnows 11
Graphics Processor: nVidia with Vulkan support

Re: [0.8.4] Gun Bonsai -- everything-compatible weapon upgra

Post by DarkkOne »

ToxicFrog wrote: Embrittlement has a feature (documented in the manual but not in-game, because I couldn't come up with a way to phrase it that would fit) where enemies with enough acid stacks die instantly once their health is low. The threshold increases with amount of acid and levels in both Concentrated Acid and Embrittlement. However, if it's working properly, you'd need over 700 acid stacks on that enemy for instakill to kick in when it still has 1300hp, based on your upgrade levels, which would require you to be routinely landing hits for, idk, 300-400+ damage? More if it's a slower weapon? Maybe that's an easier threshold to reach than I expect; I'll turn on element stack debugging and have another look at it.
Yeah, that's about the damage range of the weapon at that point. It's a fairly heavy-hitting melee weapon in that mod.
User avatar
m8f
 
 
Posts: 1445
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)
Contact:

Re: [0.8.5] Gun Bonsai -- everything-compatible weapon upgra

Post by m8f »

Excellent work! Mods that work on top of other mods are my favorite.

I experience frame drops when Fragmentation Shots does its thing. I wonder if anything can be done to mitigate this?
DarkkOne
Posts: 263
Joined: Mon Jun 06, 2016 11:26 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Widnows 11
Graphics Processor: nVidia with Vulkan support

Re: [0.8.5] Gun Bonsai -- everything-compatible weapon upgra

Post by DarkkOne »

Another idea: For a leveling mode, an option to have "score" only go toward player levels, while damage goes toward weapon levels.

Also, how does armor interact with Hexen armor? Is it just useless in the case of Hexen, or does it work with Hexen's weird armor system?

Also also, apparently Burning Terror seems to lock centaurs into their invulnerable state in Hexen. Paralysis seems to put them in it too, but at least it seems to end, though it's still very much a pain. I mean the centaurs were already a pain but both of these upgrades make them worse to kill, rather than better. Any way to test if an enemy is invulnerable, and if so either not apply a status effect, or end existing stacks? It might make sense for enemies that go invulnerable to be able to clear status effects anyway...
User avatar
ToxicFrog
Posts: 229
Joined: Thu Oct 05, 2017 10:09 am
Preferred Pronouns: She/Her
Operating System Version (Optional): NixOS
Contact:

Re: [0.8.5] Gun Bonsai -- everything-compatible weapon upgra

Post by ToxicFrog »

AvzinElkein wrote:Tried it with vanilla Heretic. It seems to assume that powered wand and non-powered wand are different weapons, given the XP track changed when I activated the tome.
That's because they are different weapons -- when you activate the tome the game hides the normal versions and replaces them with the powered-up versions.

They're linked via the SisterWeapon field, though, and with some of the internal cleanup I'm doing for 0.9 I should be able to add support for that.
openroadracer wrote:EDIT: Now that I'm thinking on Treasure Tech again, my mind went to a different mod called Avarice Coins, and the reason why is that both feature enemies dropping coins on death. Would said currency drops possibly interact with the "points=EXP" system already in place within Gun Bonsai? You already have it for the points awarded in MetaDOOM, and that has treasure pickups, from what I recall.
Doing it for MetaDoom/Reelism/etc points is easy because they use Doom's built in scoring system; it actually has a fully functional mechanism for tracking a score for each player and awarding points to them, it's just not used in normal Doom 2 gameplay. Currency systems generally don't interact with the score system, though, so they'd need mod-specific compatibility code. "Add a more general XP source plugin system" is also on my list of things to do but that's a "someday" thing.
DarkkOne wrote:Yeah, that's about the damage range of the weapon at that point. It's a fairly heavy-hitting melee weapon in that mod.
Oh. Ok, in that case it's working as intended. I'll still fiddle with it a bit; maybe the diminishing returns on the stacking need to be made a bit heavier.
DarkkOne wrote:Another idea: For a leveling mode, an option to have "score" only go toward player levels, while damage goes toward weapon levels.

Also, how does armor interact with Hexen armor? Is it just useless in the case of Hexen, or does it work with Hexen's weird armor system?

Also also, apparently Burning Terror seems to lock Centaurs into their invulnerable state in Hexen.
Implementing that leveling mode would be tricky balance-wise because at the moment player levels are based entirely on how many weapon levels you've gained; they don't really get "XP" at all and they don't get more expensive as you gain more of them (except indirectly, as your weapons get harder to level up). I'm not going to rule it out completely but at the moment I have no plans for more complicated XP splitting arrangements.

In Hexen, armour works fine, although it's displayed oddly: it gives you +6 AC that lasts until you've taken a certain amount of damage. You can't see how much is left without a printinv, but you do see the +6 on the armour display, and properly stacks with stuff like the Falcon Shield.

As for the centaurs, I think what's happening is this:
- Burning Terror, in addition to the fear effect, adds a chance to enter pain state, with more fire damage meaning more pain -- so newly ignited enemies will enter it more often.
- The pain chance is based on the amount of damage fire is trying to inflict, not the amount of damage actually inflicted.
- centaurs respond to pain by raising their shield, completing negating the fire damage.
- thus, setting a centaur on fire causes it to perma-pain, becoming immobile and harmless, but immortal.

Fixing this will require removing the pain effect from Burning Terror, but I was considering doing that anyways -- that'll be in the next version, which is probably going to be 0.9 unless people find a bunch more issues with 0.8.5.
User avatar
mamaluigisbagel
Posts: 509
Joined: Wed Jul 09, 2014 7:25 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support

Re: [0.8.5] Gun Bonsai -- everything-compatible weapon upgra

Post by mamaluigisbagel »

Just wanted to update that I found out why FreeDoom wasn't working. Turns out for some reason "XP gained from damage" was set to 0. Once I changed it it worked fine. I have no idea how that happened.
Starman the Blaziken
Posts: 279
Joined: Thu Mar 07, 2019 9:40 pm
Graphics Processor: ATI/AMD (Modern GZDoom)
Location: United States, MI

Re: [0.8.5] Gun Bonsai -- everything-compatible weapon upgra

Post by Starman the Blaziken »

ToxicFrog wrote:As for the centaurs, I think what's happening is this:
- Burning Terror, in addition to the fear effect, adds a chance to enter pain state, with more fire damage meaning more pain -- so newly ignited enemies will enter it more often.
- The pain chance is based on the amount of damage fire is trying to inflict, not the amount of damage actually inflicted.
- centaurs respond to pain by raising their shield, completing negating the fire damage.
- thus, setting a centaur on fire causes it to perma-pain, becoming immobile and harmless, but immortal.

Fixing this will require removing the pain effect from Burning Terror, but I was considering doing that anyways -- that'll be in the next version, which is probably going to be 0.9 unless people find a bunch more issues with 0.8.5.
Actually, I do have one small problem, and it is with the text scaling with the mod. Pretty much the HUD and the text when in the sub-menu of the mod is pretty small for my 4k screen size if not for my settings. Not sure if it is a GZDoom that can be tweaked for the mod or that you might need to include a text scaler for the mod itself too.
DarkkOne
Posts: 263
Joined: Mon Jun 06, 2016 11:26 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Widnows 11
Graphics Processor: nVidia with Vulkan support

Re: [0.8.5] Gun Bonsai -- everything-compatible weapon upgra

Post by DarkkOne »

ToxicFrog wrote: Sun Aug 07, 2022 9:03 am As for the centaurs, I think what's happening is this:
- Burning Terror, in addition to the fear effect, adds a chance to enter pain state, with more fire damage meaning more pain -- so newly ignited enemies will enter it more often.
- The pain chance is based on the amount of damage fire is trying to inflict, not the amount of damage actually inflicted.
- centaurs respond to pain by raising their shield, completing negating the fire damage.
- thus, setting a centaur on fire causes it to perma-pain, becoming immobile and harmless, but immortal.

Fixing this will require removing the pain effect from Burning Terror, but I was considering doing that anyways -- that'll be in the next version, which is probably going to be 0.9 unless people find a bunch more issues with 0.8.5.
Something similar (though far less permanent) happens with Paralysis too. No "can't do damage" infinite loop, but it still just turn Centaurs into even more of roadblock than they used to be. It seems they're immortal until the paralysis wears off, so if your only weapon has paralysis, killing them becomes SUPER slow.

Also, "Bounce" doesn't seem to make my projectiles bounce as the mage.

Also, unrelated, do I understand correctly that 'projectile speed' and 'pierce' are in a way a downgrade, because it'll pass through the enemy faster and thus do less ticks of damage?

How do "Bounce" (level 3+) and "Pierce" interact? How does "Pierce" interact, if at all, with shots that already pierce like the Sapphire Wand's shots (which I think pierce infinitely? Or at least, quite a lot.)
User avatar
ToxicFrog
Posts: 229
Joined: Thu Oct 05, 2017 10:09 am
Preferred Pronouns: She/Her
Operating System Version (Optional): NixOS
Contact:

Re: [0.8.5] Gun Bonsai -- everything-compatible weapon upgra

Post by ToxicFrog »

Starman the Blaziken wrote: Sun Aug 07, 2022 11:05 am Actually, I do have one small problem, and it is with the text scaling with the mod. Pretty much the HUD and the text when in the sub-menu of the mod is pretty small for my 4k screen size if not for my settings. Not sure if it is a GZDoom that can be tweaked for the mod or that you might need to include a text scaler for the mod itself too.
The in-game HUD can be scaled from the mod settings, but that doesn't scale the text, just the artwork -- I hoped text would scale with your screen resolution and/or HUD scale settings, but gzd's text handling is pretty opaque to me. For the menus, it uses the standard gzDoom options menu, which I thought would scale automatically -- do gzDoom's other option menus look ok? If they look fine and only the mod's menus are busted, I've probably done something that breaks how the scaling works, and need to investigate that. If they all look wrong...I don't know what to do about that.
DarkkOne wrote: Sun Aug 07, 2022 1:48 pm Something similar (though far less permanent) happens with Paralysis too. No "can't do damage" infinite loop, but it still just turn Centaurs into even more of roadblock than they used to be. It seems they're immortal until the paralysis wears off, so if your only weapon has paralysis, killing them becomes SUPER slow.

Also, "Bounce" doesn't seem to make my projectiles bounce as the mage.

Also, unrelated, do I understand correctly that 'projectile speed' and 'pierce' are in a way a downgrade, because it'll pass through the enemy faster and thus do less ticks of damage?

How do "Bounce" (level 3+) and "Pierce" interact? How does "Pierce" interact, if at all, with shots that already pierce like the Sapphire Wand's shots (which I think pierce infinitely? Or at least, quite a lot.)
I'm not even playing Hexen and it still finds ways to bedevil me!

Seriously though, thanks for the feedback.
- I'll look into non-bouncy mage shots. Do projectiles bounce for other classes?
- Speed + Pierce are a downgrade against single targets (but an upgrade against multiple targets still, and of course faster shots means more of them will connect when fighting a dodgeful enemy). Pierce is arguably extremely overpowered due to the fact that it does damage repeatedly while inside the target, which I didn't realize until several versions after I'd implemented it and am not sure how to address.
- I have no idea how pierce interacts with high levels of bounce.
- I think in that case it actually makes things worse -- I should refrain from spawning it on weapons that have piercing shots (to the extent that I can determine that at all) and in the meantime add a fallback where it won't make weapons worse.
Starman the Blaziken
Posts: 279
Joined: Thu Mar 07, 2019 9:40 pm
Graphics Processor: ATI/AMD (Modern GZDoom)
Location: United States, MI

Re: [0.8.5] Gun Bonsai -- everything-compatible weapon upgra

Post by Starman the Blaziken »

ToxicFrog wrote: Sun Aug 07, 2022 3:15 pm
Starman the Blaziken wrote: Sun Aug 07, 2022 11:05 am Actually, I do have one small problem, and it is with the text scaling with the mod. Pretty much the HUD and the text when in the sub-menu of the mod is pretty small for my 4k screen size if not for my settings. Not sure if it is a GZDoom that can be tweaked for the mod or that you might need to include a text scaler for the mod itself too.
The in-game HUD can be scaled from the mod settings, but that doesn't scale the text, just the artwork -- I hoped text would scale with your screen resolution and/or HUD scale settings, but gzd's text handling is pretty opaque to me. For the menus, it uses the standard gzDoom options menu, which I thought would scale automatically -- do gzDoom's other option menus look ok? If they look fine and only the mod's menus are busted, I've probably done something that breaks how the scaling works, and need to investigate that. If they all look wrong...I don't know what to do about that.
Yeah, it is not the HUD size I am talking about, that I scaled which still has the small text. Everything else is normal for GZDoom menus, the Gun Bonsai gun menu, and the options are all scaled properly. Just what is not scaled is the black and white tooltip box for the Gun Bonsai options menu and the text for the HUD itself.
DarkkOne
Posts: 263
Joined: Mon Jun 06, 2016 11:26 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Widnows 11
Graphics Processor: nVidia with Vulkan support

Re: [0.8.5] Gun Bonsai -- everything-compatible weapon upgra

Post by DarkkOne »

ToxicFrog wrote: Sun Aug 07, 2022 3:15 pm I'm not even playing Hexen and it still finds ways to bedevil me!

Seriously though, thanks for the feedback.
- I'll look into non-bouncy mage shots. Do projectiles bounce for other classes?
- Speed + Pierce are a downgrade against single targets (but an upgrade against multiple targets still, and of course faster shots means more of them will connect when fighting a dodgeful enemy). Pierce is arguably extremely overpowered due to the fact that it does damage repeatedly while inside the target, which I didn't realize until several versions after I'd implemented it and am not sure how to address.
- I have no idea how pierce interacts with high levels of bounce.
- I think in that case it actually makes things worse -- I should refrain from spawning it on weapons that have piercing shots (to the extent that I can determine that at all) and in the meantime add a fallback where it won't make weapons worse.
Okay, did a tiny bit of testing. Serpent Staff seems to bounce. Piercing doesn't work on Frost Shards. Didn't get Bounce to show up after a couple dozen tests. The "shoots out a burst of hitscans" worked for Frost Shards though. So like... some effects do and some don't on the same weapon. Couldn't seem to get "Homing" shots to have a noticeable effect on Sapphire Staff, Frost Shards, or Serpent Staff, though I don't know if 1 level of it is just too subtle, since I don't know what it looks like.

Any chance you could throw a build my way that like... disabled the elemental effects and damage, or even just makes all the (valid for the weapon) effects visible so I can test everything? It takes a pretty decent amount of time to like, start a new game, cheat in a weapon, then do enough damage to get the first level and hope it's right over and over, but I'd love to give you a list of each of the Hexen weapons and which work/don't with which upgrades.
DarkkOne
Posts: 263
Joined: Mon Jun 06, 2016 11:26 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Widnows 11
Graphics Processor: nVidia with Vulkan support

Re: [0.8.5] Gun Bonsai -- everything-compatible weapon upgra

Post by DarkkOne »

Starman the Blaziken wrote: Sun Aug 07, 2022 4:39 pm Yeah, it is not the HUD size I am talking about, that I scaled which still has the small text. Everything else is normal for GZDoom menus, the Gun Bonsai gun menu, and the options are all scaled properly. Just what is not scaled is the black and white tooltip box for the Gun Bonsai options menu and the text for the HUD itself.
Had noticed this myself - if you make the Gun Bonsai EXP window larger, the txt in the window (P:O W:O, and the XP numbers) don't also grow.
Post Reply

Return to “Gameplay Mods”