[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.
DarkkOne
Posts: 279
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.9.2] Gun Bonsai -- everything-compatible weapon upgrading

Post by DarkkOne »

ToxicFrog wrote: Sat Sep 03, 2022 6:06 am This is true, but there are also some people who are into that -- Dark Souls and System Shock both work that way, and Diablo made it an explicit marketing point that "the action never stops" even when you're rummaging through your inventory or assigning level-up stat points.

In my experience this mostly means that you just wait until you're out of combat to do character management, which you can always simulate in this by not pressing the level-up button when you're in combat.
Yeah, without the pause you're just going to do it somewhere that the pause is irrelevant anyway almost every time.


Question about the new change to melee detection: How does it decide how much XP is needed for the next level? I thought Melee weapons were cheaper, but now if you haven't used the weapon at all, is the first level just going to cost the same as a ranged weapon?
Netheritor
Posts: 123
Joined: Tue Dec 03, 2019 5:22 am

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

Post by Netheritor »

I think you really need to undo the change for melee weapon tag. The chainsaw costs as much like ranged weapons. Sure, it's unfair for melee weapon that has ranged attack, but most mods with that weapons either; need alternate ammo for that, it's secondary fire, has limited projectiles range, or the projectiles are slow. I'm still thinking how to detects that, for now change back the detection.

Though, this is my idea (or question);
1. Can your mod detect if the melee weapon has projectiles range? If the range is quite short, it will be melee weapon.
2. Does it has secondary function?
3. The base damage. It should not be a problem if the melee weapon with big damage has ranged weapon upgrade xp. Can your mod detect that?
4. Does the melee weapon strictly use ammo? Though I advise you to not make code for this. I'm concerned about hexen/fighter.
User avatar
ToxicFrog
Posts: 240
Joined: Thu Oct 05, 2017 10:09 am
Preferred Pronouns: She/Her
Operating System Version (Optional): NixOS
Contact:

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

Post by ToxicFrog »

(1) No. That's all part of the actor's state table, which you can't really inspect from outside.
(2) I can check if it has AltFire/UserN states, but not what they do. This is of limited use; e.g. in some mods those are used for flashlight, offhand melee/grenades, are aliases for primary fire, etc.
(3) I can only detect the damage dealt when attacks actually hit something, not the nominal damage of the weapon.
(4) This I can detect, via the ammotype/ammouse fields.

But yeah, I think with 0.9.3 I'll stop trying to be clever about melee weapon detection and just go back to relying on the +MELEEWEAPON flag.
User avatar
mamaluigisbagel
Posts: 528
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.9.2] Gun Bonsai -- everything-compatible weapon upgrading

Post by mamaluigisbagel »

Might be a good idea. I actually just found a bug with BDLite where the Super Shotgun gets melee weapon upgrades, which it never did before, so it may be causing more issues than fixing it.
DarkkOne
Posts: 279
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.9.2] Gun Bonsai -- everything-compatible weapon upgrading

Post by DarkkOne »

I'd say "+MELEEWEAPON" or "Doesn't use ammo" are both worth giving them the melee upgrades. I know that'll catch a lot of ranged weapons, but those are almost universally "plinkers" that aren't meant to be fought with, so throwing them Shield and Dark Harvest might actually make them interesting. Say a player trying to soften up enemies, then switch to the plinker to try to finish them off for the health gain, etc. Also, plinkers, being pretty weak, would probably benefit from the lower upgrade costs too.
User avatar
Ryuhi
Posts: 374
Joined: Tue Feb 21, 2017 11:00 pm

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

Post by Ryuhi »

I wonder if there could be a way to allow an "override" option for the player, maybe by slot? Since melee is most commonly tied to slot 1, wimpy/starting weapon to slot 2, etc. Probably wouldn't even need to do it for all slots, since melee weapons in anything more tend to use ammo or be hybrid melee/ranged weapons (much like the aforementioned hexen ones)

Could be as simple as using the flags for the core detection then giving players a manual switch for those two slots. Could go all in and include more slots but i feel like that itself would cover most of the concerns. Not familiar with the methods under the hood so dunno how much that helps.
Netheritor
Posts: 123
Joined: Tue Dec 03, 2019 5:22 am

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

Post by Netheritor »

Ah yes. Usually ranged weapon without ammo is quite weak, may weaker than vanilla doom. I think "wimpy" weapon should be given melee upgrade too. Though, a few mods sometimes don't have tag "wimpy" in their weak weapons.
User avatar
ToxicFrog
Posts: 240
Joined: Thu Oct 05, 2017 10:09 am
Preferred Pronouns: She/Her
Operating System Version (Optional): NixOS
Contact:

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

Post by ToxicFrog »

Yeah, GB already gives an experience discount to weapons with the +WIMPY_WEAPON flag, but a lot of mods don't use that flag in the first place. Treating wimpy weapons and weapons that don't use ammo as wimpy/melee weapons is an interesting idea. I don't think I'll implement it for 0.9.3 but I won't rule it out yet either.

As for overrides -- weapon slots are annoying because they can be declared in five different places (weapon class, player class, MAPINFO, KEYCONF, and ini) and I can only see the first two of those. Individual weapons can already be overridden, though -- that feature's been in since 0.9.0, the BONSAIRC lump.
User avatar
stainedofmind
Posts: 272
Joined: Sun Sep 01, 2019 10:59 am

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

Post by stainedofmind »

Quick bug report, Rapid fire doesn't get reapplied at the start of a new map and requires a quick weapon switch to redo. I also somehow managed to overflow my XP in Metadoom, but I'm not 100% certain how I did it. I had the pistol upgraded with many levels of Fragmentation, Lightning Upgrades with Chain Lightning, Fire Upgrades with Conflagration, Submunissions, Explosive Death, and over 10 levels of Damage. For player upgrades, I think I had a few levels of Blast protection, maybe a damage increaser, Thorns, and I think Ammo scavenging. I had begun to notice that I was arbitrarily getting really large chunks of XP, but when I hit Dead Simple, it went nuts and I even managed to accidentally overflow my shotgun by switching to it at the right time. Don't have a lot of time right now, but I'll get a list of mods I was using at the time if needed.
User avatar
ToxicFrog
Posts: 240
Joined: Thu Oct 05, 2017 10:09 am
Preferred Pronouns: She/Her
Operating System Version (Optional): NixOS
Contact:

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

Post by ToxicFrog »

Thanks for the report; I'll have a fix for OnActivate not firing right on level entry in the next release.

This is not the first overflow report, but it always seems intermittent and hard to trigger on command -- XP is stored as a double precisely to avoid overflow/wraparound issues. What does the HUD look like when it "overflows"? What's the exact XP number it displays?
User avatar
stainedofmind
Posts: 272
Joined: Sun Sep 01, 2019 10:59 am

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

Post by stainedofmind »

I'll have to see if my old save still works, but it hits a really large negative number and stays there. I've been trying to recreate the issue with just vanilla doom and uber powering my pistol, but since it lacks the Fragmentation upgrade, I haven't been able to do so. I would say the leveling is about on pace from what I'd expect.
User avatar
ToxicFrog
Posts: 240
Joined: Thu Oct 05, 2017 10:09 am
Preferred Pronouns: She/Her
Operating System Version (Optional): NixOS
Contact:

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

Post by ToxicFrog »

You can use the debug commands to give yourself XP or specific upgrades, if that helps.
User avatar
stainedofmind
Posts: 272
Joined: Sun Sep 01, 2019 10:59 am

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

Post by stainedofmind »

Ooooooooooooooookie-dokie, so I had an old save from right before things went to hell (pun intended?). I managed to narrow things down to it occurring when multiple monsters are on the same spot and one or more die, which I was able to reliably replicate starting from my save pre-overflow and spawning multiple arachnotrons/mancubus'. My mod 'som_zurvival,pk3' was responsible for the monsters being able to stack, but it was a combination of that and the upgrades I had that caused the overflow, as I attempted to replicate the issue with a clean slate and everything operated as expected. Other than the monster stacking caused by Zurvival, I don't think any of the other mods contributed to the issue, but if you need more info on anything, let me know.

I had the following mods enabled during this play through:

Public Mods:
simplehudaddons.pk3
DMapArrow.pk3
gearbox-v0.7.0.pk3
nashmove.pk3
libtooltipmenu-0.2.1.pk3
GunBonsai-0.9.2.pk3
mod-menu-v1.1.0.pk3
nashgore.pk3
wrathofcronosdoomtex1_8a.wad
metadoom_v7.1_ghost.pk3
dxnhud.pk3
DOOMTEST.wad

Personal/Modified Mods:
brutalkick_mod.pk3 - Same as brutalkick.pk3 but I added a menudef
ColorfulMap 1.3.mod.pk3 - Same as the original, except I modified it to use a percentage scale instead of on/off toggles
som_utility_pda.pk3 - A PDA item that runs an ACS menu to teleport through walls, teleport to the start of the level, and instantly trigger normal+secret exits
som_compass.pk3 - A small HUD addon that shows what compass direction you're currently facing
som_gimme_map.pk3 - Gives you the 'allmap' item at the start of each level
som_level_info_v2.pk3 - A small HUD addon that displays the current level, map ID of the normal exit, and if valid, the map ID of the secret exit
som_multi_jump.pk3 - Small mod that allows for double/triple/etc jumps, universal and does not modify any actors, simply reads player input and give the player Z-Velocity if they qualify for a second+ jump
som_no_weap_drop.pk3 - Semi-universal mod that prevents certain, simply implemented weapon drops from monsters
som_nsu_kill_rewards.pk3 - A simple mod that randomly drops health, armor, or ammo when a monster dies, uses "WorldThingDied" Event Handler
som_player_damage.pk3 - Uses 'DamageMultiply' and 'DamageFactor' to affect damage done/received, applied every 'WorldTick'
som_proto_magnet_tele.pk3 - A prototype mod that causes selected items to move toward the player within a certain radius, this version teleporting the items instead of slowly moving them
som_regen_v2.pk3 - Restores player health over time
som_secret_fix.pk3 - Small mod that gives the player an inventory item that triggers Secrets when they are entered instead of when the player hits the ground in them
som_sector_light.pk3 - Basically DarkDoomZ with all its guts ripped out so I can modify light levels on maps on the fly
som_soft_respawn_z.pk3 - Resurrects the player on "death" (1hp) using the Buddha flag
som_starting_loadout.pk3 - Gives the player weapons/armor/items/etc on game start, map start, or respawn
som_uni_inf_ammo.pk3 - A "universal" addon that allows the player to select a weapon to have infinite ammo, works by giving the player the minimum amount of ammo required to shoot the weapon when you have less then that
som_lith_flashlight.pk3 - Ripped the flashlight code out of Lithium to use as a standalone mod
som_zurvival.pk3 - Continuously spawns new monsters in the map, similar to AI-Director, Demoncounterstrike, etc...

Snapshot of the XP display:
https://i.postimg.cc/hvwH0HBQ/Screensho ... 204519.png

Current Upgrades (Sorry the sides got cut off):
https://i.postimg.cc/hvhkTKHq/upgrades.png
Craneo
Posts: 248
Joined: Sat Jun 22, 2019 9:12 am
Graphics Processor: Intel (Modern GZDoom)
Location: Gone.

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

Post by Craneo »

I am unsure if this has been added as I have not played GB in a while, but what about a "Parry" upgrade for melee weapons? With maybe a max of two, update once and it gives a basic parry, update twice and the parry adds to the projectile's velocity and makes it deal higher damage, what do you think? Not sure how doable its, but maybe it can be done, IIRC there is a "reflect" type of actor thing some shields use, maybe also have a "projectile" sprite actor indicator in front of the weapon to make the parry timing more easier to read? Just an idea thought... (And yes I played a lot of Ultrakill in the past month or so lol)
User avatar
Ferretmanjcdenton
Posts: 419
Joined: Mon Mar 09, 2020 5:38 am
Graphics Processor: Not Listed
Location: Germany

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

Post by Ferretmanjcdenton »

Ohh .. thanks a lot for expanding the binding function regarding Borderdoom .Thats awesome
Post Reply

Return to “Gameplay Mods”