[WIP] KEYMASTER - a tiny gameplay mod

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
JPL
 
 
Posts: 523
Joined: Mon Apr 09, 2012 12:27 pm
Contact:

Re: [WIP] KEYMASTER - a tiny gameplay mod

Post by JPL »

Someone64 wrote:New bug report: Sometimes the key gives up floating towards the player from terrain obstructions then gets stuck in really bad places.
Just curious, was the keymaster in these situations a Lost Soul? I'm investigating a spot where the issue you describe happens consistently - doom.wad E2M5 on HMP - and it's because the keymaster ceased to exist (as opposed to just lying around dead like all other monsters do).
User avatar
JPL
 
 
Posts: 523
Joined: Mon Apr 09, 2012 12:27 pm
Contact:

Re: [WIP] KEYMASTER - a tiny gameplay mod

Post by JPL »

Okay, I've updated the build with some better handling for when the keymaster is destroyed; it definitely fixes the E2M5 HMP case.
Also added a repeat delay for the "need key" sound so it doesn't spam when you run across exit teleporters.
User avatar
JPL
 
 
Posts: 523
Joined: Mon Apr 09, 2012 12:27 pm
Contact:

Re: [WIP] KEYMASTER - a tiny gameplay mod

Post by JPL »

JPL wrote:- A keyless player can get stuck on a level like TNT MAP31, where you fall down a pit to exit. Since this mod is most fun when you have some prior knowledge of a given level layout, presumably you can avoid such pitfalls.
I figured out how to fix this, and have updated the build. "Cross to exit" ie exit teleporter lines are now marked blocking on start, and give the "need key" message when you bump into them. Getting the key sets these lines back to non-blocking.
Someone64
Posts: 417
Joined: Tue Feb 23, 2016 11:59 am

Re: [WIP] KEYMASTER - a tiny gameplay mod

Post by Someone64 »

Sorry to necro the thread but I love this mod and I got a bug report for it: When playing with the DUMP-3 Weapons Pack using the SSG "Maestro", it causes a VM execution error when you pump the shotgun on a Keymaster. It fires a ton of projectiles that all stick to where they hit then detonates them in a staggered fashion when you pump it.
Spoiler:
I haven't had this happen when playing with the weapon pack by itself so I assume Keymaster is at fault here.

Also, this strange thing will sometimes happen where a Keymaster will die and the key just stays on its corpse and I have absolutely no idea what causes it. I can't even interact with the key after that. Happens ever so slightly more often when playing with Russian Overkill.
User avatar
JPL
 
 
Posts: 523
Joined: Mon Apr 09, 2012 12:27 pm
Contact:

Re: [WIP] KEYMASTER - a tiny gameplay mod

Post by JPL »

Someone64 wrote:Sorry to necro the thread but I love this mod and I got a bug report for it: When playing with the DUMP-3 Weapons Pack using the SSG "Maestro", it causes a VM execution error when you pump the shotgun on a Keymaster. It fires a ton of projectiles that all stick to where they hit then detonates them in a staggered fashion when you pump it.
Spoiler:
I haven't had this happen when playing with the weapon pack by itself so I assume Keymaster is at fault here.

Also, this strange thing will sometimes happen where a Keymaster will die and the key just stays on its corpse and I have absolutely no idea what causes it. I can't even interact with the key after that. Happens ever so slightly more often when playing with Russian Overkill.
Just uploaded a new version to the mod's permanent home: https://jp.itch.io/doom-keymaster . It should fix the VM abort you're seeing there, just a simple null check.
Not sure what to do about the second issue, it's possible some other mod is modifying the key on spawn or something? If you come up with a reliable repro case let me know.
Neophyte_Ronin
Posts: 55
Joined: Thu Oct 05, 2017 8:26 pm

Re: [WIP] KEYMASTER - a tiny gameplay mod

Post by Neophyte_Ronin »

Script error, "keymaster.pk3:keymaster_zscript/handler.txt" line 97:
Invalid statement
Script error, "keymaster.pk3:keymaster_zscript/handler.txt" line 191:
Invalid statement
Got this from the latest release. When I checked the lines, all they have is a "{" Bracket. I'm going to check to see if changing this will let it through GZDoom 3.7.1.
User avatar
JPL
 
 
Posts: 523
Joined: Mon Apr 09, 2012 12:27 pm
Contact:

Re: [WIP] KEYMASTER - a tiny gameplay mod

Post by JPL »

Neophyte_Ronin wrote:
Script error, "keymaster.pk3:keymaster_zscript/handler.txt" line 97:
Invalid statement
Script error, "keymaster.pk3:keymaster_zscript/handler.txt" line 191:
Invalid statement
Got this from the latest release. When I checked the lines, all they have is a "{" Bracket. I'm going to check to see if changing this will let it through GZDoom 3.7.1.
Are you playing the build that I uploaded about 3 hours ago? I fixed a crash in that one and ripped out some old code. I don't see the error you're seeing in 3.3.1 release and in latest git master.
User avatar
Baratus
Posts: 117
Joined: Thu Jun 08, 2006 10:15 am
Preferred Pronouns: They/Them
Location: A land of rain and mountains
Contact:

Re: [WIP] KEYMASTER - a tiny gameplay mod

Post by Baratus »

This is such a cool mod, and I love how it changes the order of progression with whatever levelset you load it up with, plus the replay value of having the keymaster/arrow spawns randomised each time. I've found this particularly fun to play with Heretic, as many of the levels are large and non-linear and have a focus on exploration, and it's certainly freeing to have full access to the level while still having a clear objective to follow. Two thumbs up!
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: [WIP] KEYMASTER - a tiny gameplay mod

Post by wildweasel »

For some reason I had never given this mod a chance until now, it's actually rather excellent and has served to revitalize some old megawads that I had grown bored of before. That said, I do have a VM abort to report:

This occurred on Map11 of MARSW301.wad; I had just laid the killing blow on the Keymaster who happened to be a Cyberdemon and the last monster in the map. It is entirely possible this is a conflict of my rather absurd load order, but I suspect the most likely conflict is with the DoomRLA Monster Pack. Probably a case of "don't do that," but it's worth noting that the mod works quite well otherwise, and this is the first problem I've observed with it in several hours.
Neophyte_Ronin
Posts: 55
Joined: Thu Oct 05, 2017 8:26 pm

Re: [WIP] KEYMASTER - a tiny gameplay mod

Post by Neophyte_Ronin »

I got that exact same execution abortion just an hour ago as of this post. I was astounded--it was during a romp through Project Brutality, but I did not have the Doom RLA Monster Pack going.

EDIT: And yes, this mod is a whole new way to experience any Doom Level Pack. It turns linear maps into somewhat non-linear and exploratory--approaching the game out of order is very tricky and leaves so many opportunities for awesome multi-player.
User avatar
Zhs2
Posts: 1271
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
Contact:

Re: [WIP] KEYMASTER - a tiny gameplay mod

Post by Zhs2 »

Code: Select all

        // if key has been dropped, lerp it towards last player to damage KM
        // (player #0 if no player ever has, which should be rare)
        if ( masterKey )
        {
            Vector3 d = masterKey.Vec3To(lastKMDamagePlayer);
            if ( d.length() > 10 )
            {
                d /= KEY_MOVE_RATE;
                d += masterKey.pos;
                masterKey.SetOrigin(d, true);
            }
            // once spawned, glitter on key not master
            if ( keyGlitter )
            {
                keyGlitter.SetOrigin(masterKey.pos, true);
            }
        }
        else
        {
            // position stuff attached to keymaster
            keyGlitter.SetOrigin(keyMaster.pos, true);
            int keyZ = int(keyMaster.pos.z + (keyMaster.height / 2));
            keyZ += GetKeyIndicatorOffset(keyMaster);
            Vector3 kip = (keyMaster.pos.x, keyMaster.pos.y, keyZ);
            keyIndicator.SetOrigin(kip, true);
        }
Relevant code, line 389 being the first statement in the else block. Neither keyGlitter nor keyMaster are null-checked at this point, which means if either is removed from the world (keyMaster is more likely for this to happen to I think) and their pointer becomes null the game goes kaboom.
User avatar
JPL
 
 
Posts: 523
Joined: Mon Apr 09, 2012 12:27 pm
Contact:

Re: [WIP] KEYMASTER - a tiny gameplay mod

Post by JPL »

Good catch, thanks for the bug report folks. I should have a fix for this out within a day or two.

These are pretty rookie ZScript mistakes, which goes to show that I made Keymaster before most of my other ZScript mods and didn't yet know when a NULL check was necessary.

I'll probably also rework the HUD drawing to use Screen instead of StatusBar, as that's the best way I've found to make something resolution-independent.

Most of all though, thank you all for playing and for the kind words!
User avatar
JPL
 
 
Posts: 523
Joined: Mon Apr 09, 2012 12:27 pm
Contact:

Re: [WIP] KEYMASTER - a tiny gameplay mod

Post by JPL »

Okay, a new fixed build should now be up here: https://jp.itch.io/doom-keymaster
Neophyte_Ronin
Posts: 55
Joined: Thu Oct 05, 2017 8:26 pm

Re: [WIP] KEYMASTER - a tiny gameplay mod

Post by Neophyte_Ronin »

"Called from KeyMasterHandler.WorldTick at keymaster (most recent version) : keymaster_zscript/handler.txt, line 456"

It crashed via "VM execution aborted: tried to read from address zero. In function parameter "t".
User avatar
JPL
 
 
Posts: 523
Joined: Mon Apr 09, 2012 12:27 pm
Contact:

Re: [WIP] KEYMASTER - a tiny gameplay mod

Post by JPL »

Neophyte_Ronin wrote:"Called from KeyMasterHandler.WorldTick at keymaster (most recent version) : keymaster_zscript/handler.txt, line 456"

It crashed via "VM execution aborted: tried to read from address zero. In function parameter "t".
Dang, another null check I missed. New build up on itch now.
Post Reply

Return to “Gameplay Mods”