DEHACKED lumps and gzdoom.pk3:dehsupp.txt

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
m8f
 
 
Posts: 1445
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)
Contact:

DEHACKED lumps and gzdoom.pk3:dehsupp.txt

Post by m8f »

Hello. Reporting strange behavior, maybe a bug.

Situation:
  1. I'm trying to load wad with DEHACKED lump that replaces some strings (I have a reason not to use LANGUAGE lump for this). Example of my wad is in an attachment.
  2. I want to load my wad with Back To Saturn X E1. It works:

    Code: Select all

    gzdoom -iwad doom/DOOM2.WAD -file btsx/e1/btsx_e1a.wad btsx/e1/btsx_e1b.wad  ~/tmp/dehacked-could-not-load-deh-support-data.wad
    ...
    DecalLibrary: Load decals.
    Adding dehacked patch btsx_e1a.wad:DEHACKED
    Patch installed
    Adding dehacked patch dehacked-could-not-load-deh-support-data.wad:DEHACKED
    Patch installed
    M_Init: Init menus.
    ...
    
    Everything is OK. But:
  3. I want to load my wad with Back To Saturn X E2. It doesn't work:

    Code: Select all

    gzdoom -iwad doom/DOOM2.WAD -file btsx/e2/btsx_e2a.wad btsx/e2/btsx_e2b.wad  ~/tmp/dehacked-could-not-load-deh-support-data.wad
    ...
    DecalLibrary: Load decals.
    Adding dehacked patch btsx_e2a.wad:DEHACKED
    Patch installed
    Adding dehacked patch dehacked-could-not-load-deh-support-data.wad:DEHACKED
    Script error, "gzdoom.pk3:dehsupp.txt" line 325:
    Invalid state range in 'CommanderKeen'
    
    Could not load DEH support data
    M_Init: Init menus.
    ...
    
    Interesting note 1: there is no errors if I load BTSX E2 without my wad:

    Code: Select all

    gzdoom -iwad doom/DOOM2.WAD -file btsx/e2/btsx_e2a.wad btsx/e2/btsx_e2b.wad
    ...
    DecalLibrary: Load decals.
    Adding dehacked patch btsx_e2a.wad:DEHACKED
    Patch installed
    M_Init: Init menus.
    ...
    
    Interesting note 2: if I load DEHACKED lump separately with -deh, there is no errors:

    Code: Select all

    gzdoom -iwad doom/DOOM2.WAD -file btsx/e2/btsx_e2a.wad btsx/e2/btsx_e2b.wad -deh ~/tmp/dehacked-could-not-load-deh-support-data.deh
    ...
    DecalLibrary: Load decals.
    Adding dehacked patch /home/allkromm/tmp/dehacked-could-not-load-deh-support-data.deh
    Patch installed
    Adding dehacked patch btsx_e2a.wad:DEHACKED
    Patch installed
    M_Init: Init menus.
    ...
    
    Maybe because of DEHACKED load order?
(BTSX E1 and E2 are the latest from here and here.)
It seems that the main difference between DEHACKED lumps in E1 and E2 is that E2 redefines Thing 25 (Commander Keen).

The questions are:
  1. If gzdoom.pk3:dehsupp.txt and btsx_e2a.wad:DEHACKED somehow conflict on Commander Keen, why there is no error without loading second wad with DEHACKED lump?
  2. Why loading harmless mod with DEHACKED containing only [STRINGS] causes and error to appear that is not even in mod's file?
I'm using GZDoom g3.2.5 - 2018-01-03 23:41:06 -0500 - SDL version.
Attachments
dehacked-could-not-load-deh-support-data.deh.txt
(115 Bytes) Downloaded 29 times
dehacked-could-not-load-deh-support-data.wad
(143 Bytes) Downloaded 29 times
Last edited by m8f on Mon Feb 12, 2018 7:35 pm, edited 2 times in total.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: DEHACKED lumps and gzdoom.pk3:dehsupp.txt

Post by _mental_ »

Didn’t you forget to attach the mod?
User avatar
m8f
 
 
Posts: 1445
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)
Contact:

Re: DEHACKED lumps and gzdoom.pk3:dehsupp.txt

Post by m8f »

Oops. Attached the file.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: DEHACKED lumps and gzdoom.pk3:dehsupp.txt

Post by Graf Zahl »

This looks like it loads DEHSUPP again for the second patch. But at that point the state table has already been altered which causes the error message.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: DEHACKED lumps and gzdoom.pk3:dehsupp.txt

Post by Graf Zahl »

Turns out this was just a minor oversight. The code already handled the case of keeping the state table for the second patch. But aside from ignoring the data it should also have disabled the validation checks. When the error messages are disabled for the second pass the problem goes away.
User avatar
m8f
 
 
Posts: 1445
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)
Contact:

Re: DEHACKED lumps and gzdoom.pk3:dehsupp.txt

Post by m8f »

Great! Thanks a lot.
Post Reply

Return to “Closed Bugs [GZDoom]”