[minimod][v2.0.1] Target Spy: Health Bar on Steroids

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
m8f
 
 
Posts: 1446
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)

Re: [minimod] Target Spy [0.14.1] (health bars +)

Post by m8f »

namsan wrote:Hello, I found a bug.
Using this mod with Babel(https://babel-mod.neocities.org) causes save file bloat for some reason.
I tested with GZDOOM 3.4.1 and 3.5.0, and I confirmed this bug on both versions.
I'm afraid I cannot reproduce this. There is a new version (see below) that is almost entirely rewritten in ZScript. Can you please check if the problem persists in the new version? If it does, please provide more information (what map you save, what player class you use).

Update (v0.14 - v0.14.1):
- mod is rewritten in pure ZScript;
- fixed "Kill Confirmed" message appearing after turning TS on and off;
- added crosshair and TS scaling (two separate options);
- added optional hit confirmation (after target is successfully hit, crosshair changes its color for a brief moment of time);
- added BIG FONT to a list of selectable fonts (you may want to adjust scaling and newline step);
- added crosshair horizontal adjustment (if selected font characters aren't centered).
User avatar
namsan
Posts: 147
Joined: Sat Mar 31, 2012 4:27 am
Preferred Pronouns: He/Him
Location: Japan

Re: [minimod] Target Spy [0.14.1] (health bars +)

Post by namsan »

Thanks for update!
I tested the latest version of your mod for 20 minutes, and I think your mod doesn't have that problem anymore.
User avatar
m8f
 
 
Posts: 1446
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)

Re: [minimod] Target Spy [v1.0] (health bars +)

Post by m8f »

Small update: (v0.14.2 - v1.0):
- added an option to hide crosshair on slot 1;
- renamed ZScript files to prevent potential conflicts;
- disabled Target Spy on automap;
- added an option to display beautified class names.
User avatar
Silentdarkness12
Posts: 1555
Joined: Thu Aug 15, 2013 5:34 pm
Location: Plains of Pride

Re: [minimod] Target Spy [v1.0] (health bars +)

Post by Silentdarkness12 »

This mod seems to be causing instant desyncs in netplay, using the current git.
User avatar
m8f
 
 
Posts: 1446
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)

Re: [minimod] Target Spy [v1.0] (health bars +)

Post by m8f »

Target Spy was not designed for multiplayer, sorry. Currently I don't even know if it's possible or not to support netplay.
User avatar
Zhs2
Posts: 1288
Joined: Fri Nov 07, 2008 3:29 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Maryland, USA, but probably also in someone's mod somewhere

Re: [minimod] Target Spy [v1.0] (health bars +)

Post by Zhs2 »

Should be completely possible to support netplay. I took a look through your code and I suspect the problem lies in loading settings from consoleplayer in WorldLoaded, which has a high chance not to incur the same results for every client. Should be handled in PlayerEntered, no? That said, I guess I'm not sure whether EventHandlers are singular and due to that will store only one copy - the last copy - of settings data... Could probably store the settings struct on something like a static thinker spawned for each player, or an item...
User avatar
Silentdarkness12
Posts: 1555
Joined: Thu Aug 15, 2013 5:34 pm
Location: Plains of Pride

Re: [minimod] Target Spy [v1.0] (health bars +)

Post by Silentdarkness12 »

....Sounds like it is doable. If this thing worked with netplay, it'd be perfect. Gonna hold out some hope that it gets reworked to do good with netplay.
User avatar
m8f
 
 
Posts: 1446
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)

Re: [minimod] Target Spy [v1.1]: Health Bars++ (+netplay?)

Post by m8f »

Okay. Update is out (v1.1) with experimental netplay support. I checked, I don't get desyncs anymore. I couldn't playtest netplay support thoroughly because running two instances of GZDoom at the same time is too much for my laptop. So it would be great if anyone checked if Target Spy doesn't cause desyncs with different TS options, more than two players, and actual play sessions.

User avatar
Silentdarkness12
Posts: 1555
Joined: Thu Aug 15, 2013 5:34 pm
Location: Plains of Pride

Re: [minimod] Target Spy [v1.1]: Health Bars++ (+netplay?)

Post by Silentdarkness12 »

+Netplay confirmed on my end! Works fine.
User avatar
Zhs2
Posts: 1288
Joined: Fri Nov 07, 2008 3:29 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Maryland, USA, but probably also in someone's mod somewhere

Re: [minimod] Target Spy [v1.1]: Health Bars++ (+netplay?)

Post by Zhs2 »

Confirmed here too, tested with a couple hours' worth of Guncaster. Reminded me that some of the things in that mod don't have pretty tags... One thing I noticed missing is handling for checking a player's MaxHealth property (instead of SpawnHealth) in the case it changes during the course of a game, but otherwise it works great.
User avatar
m8f
 
 
Posts: 1446
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)

Re: [minimod] Target Spy [v1.1.1]: Health Bars++ (+netplay)

Post by m8f »

This is my first mod with official netplay support. It is big step for me :D Thanks to Silentdarkness12 for pushing me in this direction!
And thanks for testing!

Small update (v1.1.1): player's MaxHealth property should be taken into account now.
User avatar
Zhs2
Posts: 1288
Joined: Fri Nov 07, 2008 3:29 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Maryland, USA, but probably also in someone's mod somewhere

Re: [minimod] Target Spy [v1.1.1]: Health Bars++ (+netplay)

Post by Zhs2 »

Another small issue: when loading from a save in a netplay game in which a player is already staring at an object, the appropriate internal settings structs may not initialize (update?) quickly enough from CVars to avoid a division by zero VM abort:

Code: Select all

VM execution aborted: division by zero.
Called from m8f_ts_EventHandler.draw at target-spy-1.1.1.pk3:zscript/m8f_ts_event_handler.txt, line 297
Called from m8f_ts_EventHandler.drawEverything at target-spy-1.1.1.pk3:zscript/m8f_ts_event_handler.txt, line 180
Called from m8f_ts_EventHandler.RenderOverlay at target-spy-1.1.1.pk3:zscript/m8f_ts_event_handler.txt, line 170
User avatar
m8f
 
 
Posts: 1446
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)

Re: [minimod] Target Spy [v1.1.2]: Health Bars++ (+netplay)

Post by m8f »

Should be fixed in v1.1.2. Thanks for reporting!
User avatar
Lime
Posts: 128
Joined: Sat May 07, 2016 12:31 am
Location: Outside of an Abandoned Building

Re: [minimod] Target Spy [v1.1.2]: Health Bars++ (+netplay)

Post by Lime »

For A Universal Health Bar, This has to be the One I've been looking for! Nice.
User avatar
Dutchygamer
Posts: 73
Joined: Sun Apr 23, 2017 1:00 pm

Re: [minimod] Target Spy [v1.1.2]: Health Bars++ (+netplay)

Post by Dutchygamer »

Been trying this mod out together with LegenDoomLite 2.0 (viewtopic.php?f=43&t=51035), and I found an interesting thing: you can easily identify which monsters are legendary by looking at the health bar. If the health doesn't decrease when you shoot the monster, it is legendary. This is prolly due to how LegenDoom multiplies the health of legendaries, and for this mod that counts as being 'overcharged' with health. In example, a Hell Knight normally has 500 health, which means that 500 is 100%. If made legendary with a boost of 200%, the mod still sees 500 as 100%, while it actually has 1500 health (thus a 1000 health overcharged).

My question / request: could it be possible to have an option so that in case of a legendary monster, the 100% of the health bar is with this additional health bonus? Or is this something that is too difficult to implement?

Return to “Gameplay Mods”