Redxone Posted August 23, 2018 (edited) SwitchTracker is a lightweight mod written in ZScript. Its function is simple, it shows you all useable linedefs in whatever map you're playing so you don't have to go hunting for them! Screenshot: Spoiler More Info: Spoiler Options (Options -> SwitchTracker Options): XOffset, YOffset : strkr_xoffset, strkr_yoffset Radar Zoom : strkr_radarzoom Minimap render distance : strkr_maprenderdist Maximum switch draw range : strkr_maxswitchdist Only show linedefs with specific special : strkr_specific Must be useable (Must have SPAC_Use) : strkr_mustuse Show repeatable switches, Show switch distance : strkr_showrepeatable, strkr_showdistance Hide minimap : strkr_drawmap (To draw all linedefs - strkr_mapshowall) Hide : strkr_hide Apply settings : strkr_applysettings 9 Download: http://korbincraft.com/doom/SwitchTracker.wad Edited August 25, 2018 by Redxone : Fixed switch positioning relative to minimap + Added option. 22 Share this post Link to post
elend Posted August 23, 2018 Man, I really need this, I think. 50 % of my playtime of every wad is spent hunting switches. :O 0 Share this post Link to post
Nems Posted August 23, 2018 I need to try this with Eternal Doom one day. :D 5 Share this post Link to post
Nevander Posted August 23, 2018 Question: does it work with new switches that get added by SetLineSpecial? And could it be extended to show things on the map which also have specials assigned to them? 0 Share this post Link to post
Degree23 Posted August 23, 2018 2 hours ago, Nems said: I need to try this with Eternal Doom one day. :D That was the first WAD that came to my mind as well. 0 Share this post Link to post
Redxone Posted August 23, 2018 (edited) 5 hours ago, Nevander said: Question: does it work with new switches that get added by SetLineSpecial? And could it be extended to show things on the map which also have specials assigned to them? If a new switch is added to the map you can go into the options menu and press "Apply" to refresh all found switches. Yeah, showing things with specials should be possible (via Actor iterator). 0 Share this post Link to post
eharper256 Posted August 23, 2018 (edited) Nice, this is a great idea for switch-hunt levels. Don't forget to post it on the ZDoom forums as well. XD 1 Share this post Link to post
printz Posted August 23, 2018 I wonder if you can program guide bots in ZScriot too. By this I mean a way to find which switches are accessible from your position (and also worth pressing, not just doors leading nowhere), and an actor to lead you to them. 0 Share this post Link to post
Redxone Posted August 24, 2018 2 hours ago, printz said: I wonder if you can program guide bots in ZScriot too. By this I mean a way to find which switches are accessible from your position (and also worth pressing, not just doors leading nowhere), and an actor to lead you to them. No guide bots as of yet but i just added the option to only show linedefs that do specific things. 0 Share this post Link to post
KVELLER Posted August 28, 2018 I'm not using this, but it's amusing to me that someone made it. 1 Share this post Link to post
Pirx Posted August 30, 2018 Big On 8/28/2018 at 3:04 AM, KVELLER said: I'm not using this, but it's amusing to me that someone made it. And it took so long until someone made it. Big thumbs up. 2 Share this post Link to post
Gutawer Posted August 30, 2018 Cool mod! Just to note though, there's a pretty severe and incredibly easy to fix performance problem. On Ancient Aliens MAP12, in the starting shot, I get a drop from ~325 FPS without your mod to ~55 FPS with it. I looked at your code for a bit and this is the culprit: for (int i = 0; i < Level.Lines.Size(); i++) { Line ln = Level.Lines[i]; if( !(ln.flags & Line.ML_MAPPED) && !CVar.FindCVar("strkr_mapshowall").getBool() ) continue; This wastes a hell of a lot of time by re-accessing the CVar every single iteration. Since it's not going to change, this will bring a significant FPS boost: bool dontShowAll = !CVar.FindCVar("strkr_mapshowall").getBool(); for (int i = 0; i < Level.Lines.Size(); i++) { Line ln = Level.Lines[i]; if( !(ln.flags & Line.ML_MAPPED) && dontShowAll ) continue; On my computer, this brings it from ~55FPS to ~195FPS, so a very significant increase. 4 Share this post Link to post
Black Star Posted August 30, 2018 Most interesting mod! Will this detect switches in secret sectors? Or can that be disabled? 0 Share this post Link to post
Redxone Posted September 2, 2018 On 8/30/2018 at 7:33 AM, Gutawer said: Cool mod! Just to note though, there's a pretty severe and incredibly easy to fix performance problem. On Ancient Aliens MAP12, in the starting shot, I get a drop from ~325 FPS without your mod to ~55 FPS with it. I looked at your code for a bit and this is the culprit: for (int i = 0; i < Level.Lines.Size(); i++) { Line ln = Level.Lines[i]; if( !(ln.flags & Line.ML_MAPPED) && !CVar.FindCVar("strkr_mapshowall").getBool() ) continue; This wastes a hell of a lot of time by re-accessing the CVar every single iteration. Since it's not going to change, this will bring a significant FPS boost: bool dontShowAll = !CVar.FindCVar("strkr_mapshowall").getBool(); for (int i = 0; i < Level.Lines.Size(); i++) { Line ln = Level.Lines[i]; if( !(ln.flags & Line.ML_MAPPED) && dontShowAll ) continue; On my computer, this brings it from ~55FPS to ~195FPS, so a very significant increase. Wow, I had no idea it'd be that easy to fix the performance issue! Thanks. 0 Share this post Link to post