[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 YOUR 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.

Re: [WIP] KEYMASTER - a tiny gameplay mod

Postby JPL » Wed Jun 21, 2017 10:57 am

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
 
 
 
Joined: 09 Apr 2012

Re: [WIP] KEYMASTER - a tiny gameplay mod

Postby JPL » Wed Jun 21, 2017 11:54 am

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
 
 
 
Joined: 09 Apr 2012

Re: [WIP] KEYMASTER - a tiny gameplay mod

Postby JPL » Thu Jun 22, 2017 6:53 pm

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.
User avatar
JPL
 
 
 
Joined: 09 Apr 2012

Re: [WIP] KEYMASTER - a tiny gameplay mod

Postby Someone64 » Thu Feb 08, 2018 11:21 pm

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.
Someone64
 
Joined: 23 Feb 2016

Re: [WIP] KEYMASTER - a tiny gameplay mod

Postby JPL » Sat Apr 28, 2018 1:35 pm

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.
User avatar
JPL
 
 
 
Joined: 09 Apr 2012

Re: [WIP] KEYMASTER - a tiny gameplay mod

Postby Neophyte_Ronin » Sun Mar 31, 2019 9:31 pm

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.
Neophyte_Ronin
 
Joined: 06 Oct 2017

Re: [WIP] KEYMASTER - a tiny gameplay mod

Postby JPL » Sun Mar 31, 2019 10:02 pm

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
JPL
 
 
 
Joined: 09 Apr 2012

Re: [WIP] KEYMASTER - a tiny gameplay mod

Postby Baratus » Mon Apr 01, 2019 8:03 am

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
Baratus
 
Joined: 08 Jun 2006
Location: A land of dust and spiders

Re: [WIP] KEYMASTER - a tiny gameplay mod

Postby wildweasel » Tue Apr 02, 2019 9:18 am

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.
User avatar
wildweasel
change o' pace.
Moderator Team Lead
 
Joined: 16 Jul 2003

Re: [WIP] KEYMASTER - a tiny gameplay mod

Postby Neophyte_Ronin » Tue Apr 02, 2019 9:58 am

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.
Neophyte_Ronin
 
Joined: 06 Oct 2017

Re: [WIP] KEYMASTER - a tiny gameplay mod

Postby Zhs2 » Tue Apr 02, 2019 10:35 am

Code: Select allExpand view
        // 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.+ (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
Zhs2
Power of meh.
 
Joined: 07 Nov 2008
Location: Maryland, USA, but probably also in someone's mod somewhere
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: ATI/AMD with Vulkan Support

Re: [WIP] KEYMASTER - a tiny gameplay mod

Postby JPL » Tue Apr 02, 2019 10:54 am

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
 
 
 
Joined: 09 Apr 2012

Re: [WIP] KEYMASTER - a tiny gameplay mod

Postby JPL » Wed Apr 03, 2019 10:25 pm

Okay, a new fixed build should now be up here: https://jp.itch.io/doom-keymaster
User avatar
JPL
 
 
 
Joined: 09 Apr 2012

Re: [WIP] KEYMASTER - a tiny gameplay mod

Postby Neophyte_Ronin » Thu Apr 04, 2019 9:41 pm

"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".
Neophyte_Ronin
 
Joined: 06 Oct 2017

Re: [WIP] KEYMASTER - a tiny gameplay mod

Postby JPL » Thu Apr 04, 2019 11:42 pm

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.
User avatar
JPL
 
 
 
Joined: 09 Apr 2012

PreviousNext

Return to Gameplay Mods

Who is online

Users browsing this forum: eharper256, Wivicer and 13 guests