[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.
User avatar
stainedofmind
Posts: 154
Joined: Sun Sep 01, 2019 10:59 am

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

Post by stainedofmind »

ToxicFrog wrote: Wed Dec 20, 2023 5:31 pm On the plus side, while writing this I had an idea for how to rework Bandoliers: instead of touching the ammo limits at all, instead have it siphon off and store ammo when you're nearly full, and feed the ammo back into your inventory when you run low.
I like Bandoliers, as broken as it may be, but your alternative idea sounded interesting as well. I threw together a very quick and dirty prototype, basically just hardcoded for vanilla "Clip" only, and gave it a whirl. I only got a few maps in, then ran into a backpack related issue, but it feels pretty good so far. I might whip together a test mod for Gun Bonsai to see how it plays in a real playthrough setting.
ToxicFrog wrote: Wed Dec 20, 2023 6:55 pm I've done my best to make it easy for people to write addons for GB, so they can implement cool mod-specific behaviour that can't go into the core mod.
I've made a few personal addons for GB (that I'll probably release sometime in the future when I give it the ole polish), and I can safely say you've made it VERY easy to do so!
User avatar
ToxicFrog
Posts: 229
Joined: Thu Oct 05, 2017 10:09 am
Preferred Pronouns: She/Her
Operating System Version (Optional): NixOS

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

Post by ToxicFrog »

Major Cooke wrote: Thu Dec 21, 2023 2:00 pm Any chance you could introduce service into your mod? Some mods might make use of Score and ScoreItem for different things. Using Service classes will provide seamless integration for others and minimize conflicts.
Oh, yeah, I really should do that and it'd be way better than what I'm doing right now. This is going to delay Indestructable 0.3/GB 0.10.5 some, but the end results will be better for everyone.
User avatar
Dan_The_Noob
Posts: 878
Joined: Tue May 07, 2019 12:24 pm
Graphics Processor: nVidia with Vulkan support

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

Post by Dan_The_Noob »

minor thing, but maybe for the built-in health/armor drops consider removing the dynamic light and instead make them fullbright.
in the more chaotic maps (where this mod shines the most) it can really bog down the framerate. (or implement some kind of cleanup/timer for the health drops)
User avatar
Major Cooke
Posts: 8193
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

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

Post by Major Cooke »

Glad to hear that, Toxic!
I would also like to recommend recording the exp via a static event handler with a recording class/struct per player. That way it ensures score and scoreitem don't have any conflicts with other mods.
User avatar
ToxicFrog
Posts: 229
Joined: Thu Oct 05, 2017 10:09 am
Preferred Pronouns: She/Her
Operating System Version (Optional): NixOS

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

Post by ToxicFrog »

Major Cooke wrote: Fri Dec 22, 2023 12:17 pm Glad to hear that, Toxic!
I would also like to recommend recording the exp via a static event handler with a recording class/struct per player. That way it ensures score and scoreitem don't have any conflicts with other mods.
Unless I've misunderstood you, that's already what it does -- there's a StaticEventHandler that has an array of PerPlayerStats[MAXPLAYERS] that records all the per-player and per-weapon information. A small PerPlayerStatsProxy item is injected into each player to detect things like incoming damage. This allows for fast lookups by player number and is also how it's able to make death-exit and pistol-start mode optional.

GB itself doesn't do anything with ScoreItems, nor does it touch the player's score; turning on the "XP from score" feature just means that it reads the player's score and grants XP based on that. This is what gives it seamless compatibility with stuff like LazyPoints and Reelism, since those use the existing score field.
User avatar
stainedofmind
Posts: 154
Joined: Sun Sep 01, 2019 10:59 am

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

Post by stainedofmind »

Okay, so I've been working on the ammo reserve upgrade prototype I had mentioned previously, and while using it with Vanilla Doom worked well, and felt good, trying to run it with something like Brutal Doom, which uses the second ammotype for the clip, ended up just being a nightmare, cause it was constantly trying to pull the full clip into the reserve, and I can't for the life of me figure out a way to deal with it, just because there's a bajillion ways to do ammo that isn't standard. I currently have it just read all the ammo in the player's inventory, same as bandoliers. My first attempt used the "onpickup" override from BaseUpgrade, but it didn't work well for getting ammo from weapons or backpacks.

... So long story short, I really like the idea/feel of ammo reserves instead of expanding backpacks, but it's beyond my personal skillset to implement fully.
Last edited by stainedofmind on Sat Dec 23, 2023 7:52 pm, edited 1 time in total.
Proydoha
Posts: 70
Joined: Thu Jan 21, 2016 2:25 am

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

Post by Proydoha »

Small bug report. There is a typo in LANGUAGE.en-upgrades:

Code: Select all

TFLV_Upgrade_AggressiveDefence_TT = "Attacing an enemy
User avatar
TheVanessii
Posts: 18
Joined: Mon Feb 22, 2021 5:44 pm
Preferred Pronouns: She/Her
Graphics Processor: nVidia (Modern GZDoom)

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

Post by TheVanessii »

I noticed that when weapons get fast, the muzzle flash sprite that's laid over the main gun sprite lingers longer than it should; leading to the cutoff muzzleflash sprite hovering when the weapon itself has already moved. Still a really interesting mod though!

https://imgur.com/a/o8ztfYl
User avatar
Major Cooke
Posts: 8193
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

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

Post by Major Cooke »

ToxicFrog wrote: Sat Dec 23, 2023 11:17 amThis allows for fast lookups by player number and is also how it's able to make death-exit and pistol-start mode optional.
I can't tell you how happy I am to hear this, because there's nothing more dislikeable than forced pistol starting and losing all progress. Glad to see we have similar viewpoints. I don't mind losing the guns, that's fine, but no one can take away my upgrades.
User avatar
ToxicFrog
Posts: 229
Joined: Thu Oct 05, 2017 10:09 am
Preferred Pronouns: She/Her
Operating System Version (Optional): NixOS

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

Post by ToxicFrog »

It's in the options menu under "keep upgrades on death exit/pistol start", added back in version 0.9.
TheVanessii wrote: Sat Dec 23, 2023 7:40 pm I noticed that when weapons get fast, the muzzle flash sprite that's laid over the main gun sprite lingers longer than it should; leading to the cutoff muzzleflash sprite hovering when the weapon itself has already moved. Still a really interesting mod though!
Oh yeah, Rapid Fire has a bunch of weird visual glitches. I don't realistically think I understand enough about psprite hacking to fix it, although if someone who does wants to submit a patch, I'm all ears. :P

Typo in LANGUAGE lump fixed, RPC service appears to be working based on some quick tests, lzDoom and Hedon compatibility has been restored, I think I'm on track for a christmas release if nothing else comes up at the last minute!
User avatar
ToxicFrog
Posts: 229
Joined: Thu Oct 05, 2017 10:09 am
Preferred Pronouns: She/Her
Operating System Version (Optional): NixOS

Bugfix release: 0.10.5

Post by ToxicFrog »

0.10.5 is out! This is mostly bugfixes for issues reported in the thread or discovered while doing some holiday dooming with my daughter. Two new features were added, however: an RPC service for easier integration with other mods, and a requested feature, the ability to "downlevel" learned upgrades from the status screen to dial back their effects.

As ever, I hope that this will be the last release in the 0.10 series and I can move on to 0.11 after this, but no promises.

Download from github.
Spoiler: Changelog
User avatar
Dan_The_Noob
Posts: 878
Joined: Tue May 07, 2019 12:24 pm
Graphics Processor: nVidia with Vulkan support

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

Post by Dan_The_Noob »

"Execution could not continue.

VM execution aborted: Cannot construct play class TFLV_GunBonsaiService from data context"
User avatar
mamaluigisbagel
Posts: 521
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.10.5] Gun Bonsai -- everything-compatible weapon upgrading

Post by mamaluigisbagel »

I got the same error as Dan_The_Noob.

I noticed when playing on the newest version of GZDoom, the mod works fine, but the newest version of GZDoom doesn't work well on my PC. (OpenGL renderer crashes, Vulkan renderer causes constant flickering) Is it due to the mod requiring the newest GZDoom version, or does it require a new config file possibly?
User avatar
ToxicFrog
Posts: 229
Joined: Thu Oct 05, 2017 10:09 am
Preferred Pronouns: She/Her
Operating System Version (Optional): NixOS

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

Post by ToxicFrog »

That's weird (and annoying). I test on latest gzdoom (4.11.x) on windows and linux, and less rigorously, lzdoom and hdoom on windows. Generally speaking if something works in lzdoom I assume it will also work in old-ish gzdoom. But in this case it looks like it works in lzdoom and in gzdoom 4.11, but not in gzdoom 4.10. My completely wild guess is that this is a problem with service instantiation introduced in gzdoom 4.something and not fixed until 4.11.

It's probably fixable by moving the service from play to data scope and then doing stupid netevent tricks, but it'll require completely reworking the API. :(
User avatar
Dan_The_Noob
Posts: 878
Joined: Tue May 07, 2019 12:24 pm
Graphics Processor: nVidia with Vulkan support

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

Post by Dan_The_Noob »

maybe jus have 0.10.4 available for download on front page for legacy. then note 4.11.x for 10.5

Return to “Gameplay Mods”