Issue with DEHACKED loading after ZScript

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
User avatar
MartinHowe
Posts: 1978
Joined: Mon Aug 11, 2003 1:50 pm
Location: Waveney, United Kingdom

Issue with DEHACKED loading after ZScript

Post by MartinHowe »

Does anyone know of any issues with loading a DEHACKED patch after ZScript when the patch does not alter any actor referenced by the ZScript?

I am, believe it or not, still working on the Black Cats of Doom and was trying out urbanside when it gives a syntax error for the "Bits = 0" statements in the patch in that mod, specifically, "Bad numeric constant 0 for Bits". BlackCat is normally loaded before everything else, like an autoload, and is entirely ZScript with no DEHACKED.

I don't get how the DEHACKED script parser can be put in a bad state merely by the presence of ZScript code. It's not saying that the actors have been messed up, just the syntax of 0 for "Bits" is wrong :?

BlackCat has 3000 lines of non-comment code, that would have lots of errors if any part were removed and it will take ages to isolate the problem without knowing where to look; so has anyone else encountered this?
User avatar
Player701
 
 
Posts: 1522
Joined: Wed May 13, 2009 3:15 am
Graphics Processor: nVidia with Vulkan support
Location: Russia

Re: Issue with DEHACKED loading after ZScript

Post by Player701 »

Could you please send me a link to your mod? If I'm able to reproduce this, perhaps I could find something interesting by running GZDoom with the VS debugger attached.
User avatar
MartinHowe
Posts: 1978
Joined: Mon Aug 11, 2003 1:50 pm
Location: Waveney, United Kingdom

Re: Issue with DEHACKED loading after ZScript

Post by MartinHowe »

Hello Player701

Thanks very much; it'd be nice to know where to start.

mod https://www.dropbox.com/s/luwxjjk5gsdln ... t.pk3?dl=0
txt https://www.dropbox.com/s/z0umo3jdkge9x ... t.txt?dl=0

Thanks :D
User avatar
Player701
 
 
Posts: 1522
Joined: Wed May 13, 2009 3:15 am
Graphics Processor: nVidia with Vulkan support
Location: Russia

Re: Issue with DEHACKED loading after ZScript

Post by Player701 »

I'm unable to reproduce this regardless of whether I load your mod before or after urbanside.wad. I'm using GZDoom 4.10.0. Try upgrading if you're running an older version; otherwise, it might be something else (a third, autoloaded mod?) at play here.

As a side note, I get a truncation of floating point value warning in your mod (file mixins/blackcat_leaping.zds, line 167).
User avatar
MartinHowe
Posts: 1978
Joined: Mon Aug 11, 2003 1:50 pm
Location: Waveney, United Kingdom

Re: Issue with DEHACKED loading after ZScript

Post by MartinHowe »

Thanks for that. I'm not worried about the FP warning too much; once I know how to do truncation casting in ZScript I can fix it; how does one do someint = (int)somedouble in ZScript?

As for the DEHACKED error, I've at least established it's a Linux vs Windows issue.

GZDoom 4.10.0, blackcat.pk3 as linked above, urbanside.wad as linked in the OP.

GZDoom Linux built from source, GZDoom Windows downloaded from ZDoom.org and run in a Windows 10 VM with VMWare Player 17.

Using the same invocation, with the same files, it fails on Linux and works on Windows :shock:

If I install the official Linux GZDoom 4.10.0 from the software repo it fails the same way also. So does the official portable Linux build from zdoom.org I'm using Mint so a port targeting Ubuntu should be a valid test.

I'd escalate this to a bug report, but graf & rachel always insist on a small test case being provided and I've no freaking idea where it's being triggered in order to do that :(

FWIW:

Code: Select all

martin@luna:~/Downloads/urbanside$ file /usr/games/gzdoom/gzdoom
/usr/games/gzdoom/gzdoom: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=df58b1f847c985305bf762f20438f93eaa40ec7c, for GNU/Linux 3.2.0, stripped

Code: Select all

martin@luna:~/Downloads/urbanside$ /usr/games/gzdoom/gzdoom -iwad doom2 -file blackcat.pk3 urbanside.wad -warp 04
GZDoom 4.10.0 - 2022-12-04 15:23:05 +0100 - SDL version
Compiled on Dec  4 2022

OS: Linux Mint 21, Linux 5.15.0-56-generic on x86_64
GZDoom version 4.10.0
W_Init: Init WADfiles.
 adding /usr/games/gzdoom/gzdoom.pk3, 672 lumps
 adding /usr/games/gzdoom/game_support.pk3, 2559 lumps
 adding /usr/share/doom2/doom2.wad, 2919 lumps
 adding /usr/games/gzdoom/game_widescreen_gfx.pk3, 214 lumps
 adding blackcat.pk3, 262 lumps
 adding urbanside.wad, 1576 lumps
S_Init: Setting up sound.
I_InitSound: Initializing OpenAL
  Opened device Built-in Audio Analogue Stereo
  EFX enabled
I_Init: Setting up machine state.
CPU Vendor ID: GenuineIntel
  Name: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
  Family 6, Model 60, Stepping 3
  Features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX AVX2 F16C FMA3 BMI1 BMI2 HyperThreading
V_Init: allocate screen.
ST_Init: Init startup screen.
Checking cmd-line parameters...
S_InitData: Load sound definitions.
G_ParseMapInfo: Load map definitions.
Texman.Init: Init texture manager.
ParseTeamInfo: Load team definitions.
LoadActors: Load actor definitions.
script parsing took 146.59 ms
R_Init: Init Doom refresh subsystem.
DecalLibrary: Load decals.
Adding dehacked patch urbanside.wad:DEHACKED
Bad numeric constant 0 for Bits
Bad numeric constant 0 for Bits
Patch installed
M_Init: Init menus.
P_Init: Init Playloop state.
ParseSBarInfo: Loading custom status bar definition.
D_CheckNetGame: Checking network game status.
player 1 of 1 (1 nodes)
Using video driver x11
GL_VENDOR: NVIDIA Corporation
GL_RENDERER: NVIDIA GeForce GT 1030/PCIe/SSE2
GL_VERSION: 4.6.0 NVIDIA 515.86.01 (Core profile)
GL_SHADING_LANGUAGE_VERSION: 4.60 NVIDIA

Max. texture size: 32768
Max. texture units: 32
Max. varying: 124
Max. combined shader storage blocks: 96
Max. vertex shader storage blocks: 16
Resolution: 1920 x 1080

----------------------------------------

MAP04 - Rooftops of Diluvio

martin@luna:~/Downloads/urbanside$ 
User avatar
Player701
 
 
Posts: 1522
Joined: Wed May 13, 2009 3:15 am
Graphics Processor: nVidia with Vulkan support
Location: Russia

Re: Issue with DEHACKED loading after ZScript

Post by Player701 »

MartinHowe wrote: Wed Dec 07, 2022 3:25 pm someint = (int)somedouble
someint = int(somedouble)
MartinHowe wrote: Wed Dec 07, 2022 3:25 pm As for the DEHACKED error, I've at least established it's a Linux vs Windows issue.
Ah, I see. Well, then, I'm afraid I can't do much here because I do not have access to a desktop Linux system. Sorry :cry:
MartinHowe wrote: Wed Dec 07, 2022 3:25 pm I'd escalate this to a bug report, but graf & rachel always insist on a small test case being provided and I've no freaking idea where it's being triggered in order to do that
I'd still do that if I were you. There is no harm in trying, as they say.

Return to “Scripting”