ZDoom / gzdoom

GZDoom is a feature centric port for all Doom engine games, based on ZDoom, adding an OpenGL renderer and powerful scripting capabilities
http://zdoom.org
GNU General Public License v3.0
2.43k stars 535 forks source link

[BUG?/FEATURE?] UMAPINFO not fully compatible with basic gameplay mods? #2115

Closed Chonkblonk closed 1 year ago

Chonkblonk commented 1 year ago

GZDoom version

GzDoom 4.10.0

Which game are you running with GZDoom?

Doom 2

What Operating System are you using?

Windows 10

Please describe your specific OS version

No response

Relevant hardware info

No response

Have you checked that no other similar issue already exists?

A clear and concise description of what the bug is.

An MBF21 mapset has the player kill the lone Cyberdemon in one level to trigger an action and allow the player to progress, this works normally, but if the player loads a gameplay mod which replaces the Cyberdemon with its own variant using Decorate, then the UMAPINFO lump cannot find GzDoom's stock Cyberdemon actor being killed, and nothing happens, thus the level softlocks.

I am not sure if this is regarded as a bug by the dev team, and playing mapsets with gameplay mods you DO accept that the inherent risk that you may very well break something, but is it at all possible to add some sort of functionality to GzDoom where an UMAPINFO lump is used, and the relevant action is present, that it could somehow check to see if the monster it asks for is being replaced by Decorate or ZScript, and then accept the replacement monster as good? I imagine this might still leave mods with random spawners for replacements out to dry, but maybe it could be solved there too?

Steps to reproduce the behaviour.

Explain how to reproduce

  1. Add line for a level in UMAPINFO lump which calls a death action for a monster type.
  2. Load that level up with a gameplay mod which replaces the monster type with Decorate
  3. Nothing happens when the replacement dies, be it a completely new replacement or an inheriting one.

Your configuration

No response

Provide a Log

No response

RicardoLuis0 commented 1 year ago

pretty sure a few UMAPINFO boss trigger issues were fixed relatively recently, can you try with a devbuild and see if the issue persists?

coelckers commented 1 year ago

Please post a specific reproducible test case where this problem happens, not some vague instructions that may actually miss the real problem.

mc776 commented 1 year ago

but if the player loads a gameplay mod which replaces the Cyberdemon with its own variant using Decorate

i'm almost willing to bet real money that it's an issue with the mod. is there a download link for the exact version of the mod that you used?

Chonkblonk commented 1 year ago

Please post a specific reproducible test case where this problem happens, not some vague instructions that may actually miss the real problem.

Uh, lemme assemble a demo once I get back home. Might be a few hours.

i'm almost willing to bet real money that it's an issue with the mod. is there a download link for the exact version of thee mod that you used? I can provide the code for the replacement actor, or I guess part of this all with the demo when I do that. Best I can tell there's nothing about him which is off though.

We also attempted a workaround by altering the Cyberdemon with MBF21's DeHacked, where on death it spits out a dummy for the UMAPINFO lump to look for, and the idea was that the Decorate counterpart would spawn the same Deh_Actor###, without that one being replaced at all, but apparently that didn't want to work on the DSDA or Woof end (didn't seem to spawn it for some reason) so that'd just flip the problem around on the other end. We might have done something incorrectly there, but ultimately we can just use A_KeenDie to solve the immediate problem. I just figure if this is an error on the engine end, maybe it needs addressing.

Anyway, I'll try to show up with a demo featuring this replacement dude.

Chonkblonk commented 1 year ago

pretty sure a few UMAPINFO boss trigger issues were fixed relatively recently, can you try with a devbuild and see if the issue persists?

I guess I could also try that.

mc776 commented 1 year ago

I can provide the code for the replacement actor, or I guess part of this all with the demo when I do that.

Best to just skip straight to the demo - in my experience there's a roughly even chance when someone posts dec/zs out of context whether the bug they're reporting is actually replicable through something contained in that snippet.

Chonkblonk commented 1 year ago

Alright, here we go, a demo map, and a demo replacer: https://cdn.discordapp.com/attachments/1083430033831497840/1133499968439713892/UMAPINFOTEST1.wad https://cdn.discordapp.com/attachments/1083430033831497840/1133499968120954990/CYBERREPLACETEST1.wad (apologies for hosting them on Discord).

Here's my test results so far for just the level itself: Boss action works with DSDA v0.26.2 Boss action works with Woof v11.1.1 Boss action works with GzDoom v4.10.0 Boss action works with the latest devbuild I could find, v4.11.pre222 (something like that)

Now, adding the Cyberdemon replacement, the boss action does not work at all in either v4.10.0 nor in the latest devbuild, you're completely stuck. Best I can tell, nothing should be wrong on my end, but I welcome you gentlemen to look for yourself.

mc776 commented 1 year ago

I'll copypaste the DECORATE here for ease of reference:

ACTOR NewCyberdemon Replaces Cyberdemon
{                                     
  Health 4000                        
  Radius 40                         
  Height 110                       
  Mass 1000                       
  Speed 16                       
  PainChance 20                 
  Monster
  MinMissileChance 160
  +BOSS
  +MISSILEMORE
  +FLOORCLIP
  +NORADIUSDMG
  +DONTMORPH
  +BOSSDEATH
  SeeSound "cyber/sight"
  PainSound "cyber/pain"
  DeathSound "cyber/death"
  ActiveSound "cyber/active"
  Obituary "$OB_CYBORG"
  States
  {
  Spawn:
    CYBR AB 10 A_Look
    Loop
  See:
    CYBR A 3 A_Hoof
    CYBR ABBCC 3 A_Chase
    CYBR D 3 A_Metal
    CYBR D 3 A_Chase
    Loop
  Missile:
    CYBR E 6 A_FaceTarget
    CYBR F 12 A_CyberAttack  //The only real difference in this guy is that he shoots a cosmetically different rocket
    CYBR E 12 A_FaceTarget   //Since the one for the rocketlauncher doesn't quite fit aesthetically
    CYBR F 12 A_CyberAttack  //I didn't include the new rocket since it doesn't seem like it should matter
    CYBR E 12 A_FaceTarget   //Doesn't do anything special
    CYBR F 12 A_CyberAttack
    Goto See
  Pain:
    CYBR G 10 A_Pain
    Goto See
  Death:
    CYBR H 10
    CYBR I 10 A_Scream
    CYBR JKL 10
    CYBR M 10 A_NoBlocking
    CYBR NO 10
    CYBR P 30
    CYBR P -1 //A_KeenDie
    Stop      //Current workaround.
  }           //If we need to use A_KeenDie for another monster, but Cybie is still there
}             //I figure we'll just do a copy of him in DeHacked who lacks this function call
              //Also, I still get nothing happening even when making a very simple inheriting replacement in Decorate

Comparing this to the model ZScript on the wiki the main difference appears to be the missing A_BossDeath call.

Does it work if you add that back in?

EDIT: Just curious, have you tried this on vanilla E2M8?

RicardoLuis0 commented 1 year ago

missing A_BossDeath call

yes, that would indeed cause boss death triggers to not work

Chonkblonk commented 1 year ago

Ah, that's indeed a very embarrassing error on my behalf, and a very obvious one too. Apologies for wasting your time.