Trouble with DoomEdNums

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, 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.
User avatar
Doctor Doomer
Posts: 7
Joined: Sun Mar 30, 2025 6:01 am

Trouble with DoomEdNums

Post by Doctor Doomer »

Hi everyone,

I've been mapping for a long time, and never have had this issue before. I'm having a problem with UDB in that my custom items don't appear. Well they do, but only on their own. When I put them in my mod they don't. They don't have the same doomednums as anything else. They're defined correctly in MAPINFO and ZSCRIPT equally in both alone and my mod. I've checked a dozen times, I've had AI check. There's nothing wrong. Thing is none of my other items such as my DECORATE things appear either despite also being defined correctly and working on their own. Something in my mod, despite having the correct code doesn't allow it to show in UDB. No other numbers occupy the same numbers either.

Is there a specific order that MAPINFO or ZSCRIPT needs to have for specific syntaxes? I've attached the code. It should work right?

It doesn't make any sense. I can't share my mod because it's very large with a lot of stuff in it. But as long as the code is correct and it is in the same format both MAPINFO and ZSCRIPT as is. Shouldn't be an issue no? Is it a bug?

I've attached images showing how it works alone as Spawners.pk3 (try it for yourself) but doesn't when integrated with my mod.

Any help will be greatly appreciated!

EDIT: I just used BLOOM as the mod instead of my mod, and it works. Any idea what I could be doing wrong?
You do not have the required permissions to view the files attached to this post.
User avatar
Enjay
 
 
Posts: 26909
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Trouble with DoomEdNums

Post by Enjay »

Do you have any lumps in your mod that might be conflicting with the mapinfo somehow? These lumps should be cumulative. So, it shouldn't be a problem. I'm just throwing out guesses really.

For what it's worth, loading the PK3 that you uploaded works for me too.

So there must indeed be something in your bigger mod that is preventing the items from loading.
User avatar
Doctor Doomer
Posts: 7
Joined: Sun Mar 30, 2025 6:01 am

Re: Trouble with DoomEdNums

Post by Doctor Doomer »

Thanks Enjay, I think you're right. I merged two mods together actually, my mod with pandemonium and project malice. It's a bold side project I'm working on other than Doom X. Anyway, my original mod works with it fine, but when P or PM are in with it it doesn't. Any idea what lumps could interfere? For example any ZSCRIPT or Decorate functions that might? I'm afraid I might have to trial and error it 🫡
User avatar
Enjay
 
 
Posts: 26909
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Trouble with DoomEdNums

Post by Enjay »

The obvious candidates are the ZScript files or and mapinfo/zmapinfo files - or any files that they #include. If you are lucky, it will be a short list. It all depends how the mods are set up. sometimes it's nice and logical, at other times you might find a whole bunch of files in the WAD/PK3 with the same name.

You could maybe try something like removing all possible suspect files and seeing if it works, then add half of them back - if it no longer works, you know that at least one of the files you restored is responsible, so you can remove half of of them and try again... And just repeat until you get the responsible ones. Then you can figure out how to incorporate them into you files without causing a conflict - which should be reasonably straight forward once you know where the problem lies.

As I said, all these lumps should be cumulative, and it sounds like GZDoom is able to handle them. However, sometimes UDB is stricter about loading things than GZDoom is and it seems like that might be what's going on.
User avatar
Doctor Doomer
Posts: 7
Joined: Sun Mar 30, 2025 6:01 am

Re: Trouble with DoomEdNums

Post by Doctor Doomer »

Thanks Enjay, had a good dive into it and figured it out, its much more straightforward than it seemed to be honest.

After some tinkering. It boils down to syntax errors in ZSCRIPT (who'd have thought). I've attached two simple pk3s as an example with a blatant code omission error. So, to show an item correctly in UDB (with ZSCRIPT) you first need to do the following:

In order to get objects to appear correctly in UDB you need to:

1: $// Definition go after the SECOND { in ZSCRIPT - see below (e.g //$Category Decoration)
2: ZSCRIPT is clearly referenced in the main ZSCRIPT lump ("ZSCRIPT/Thing").
3: All ZSCRIPT classes are defined as an ACTOR or WEAPON or INHERITED CLASS, etc. For example (Class Thing : Actor)
4: Define the class DoomEdNums in MAPINFO. e.g 10000 = Thing
5: Syntaxes must be correct, ZERO errors:

In this example what I've done is incorrectly create a second actor, and if an actor has a base actor, if you try to make it an actor also, and add its own state definitions such as Radius, Height +SOLID, etc WITHOUT adding the required code & parenthesis (basically any coding error) UDB has a fit and won't display any custom classes at all afterwards. Even if they aren't related to this class. I'm using a game breaking error as an example, to emphasize testing your mod in GZDOOM first, before using UDB with this problem. They don't even have to be game breaking errors that forbid booting the game either. and they will cause problems with other classes, as they did with my original example when I started this post with Project Malice (yes, if you use two resources in UDB that AREN'T compatible with one another, you will get the same problem).

See below with a standard parenthesis error:

Code: Select all

// BONE PILE 1 IS THE SAME FOR BOTH EXAMPLES //

class BonePile1 : Actor
{

Default
{
//$Category Decoration/Gore Props  // (see how this is AFTER the second parenthesis? Failing to do this makes it appear in "USER DEFINED" instead)
//$Title "Bone Pile 1"
//$Sprite "SBONA0"
Radius 16;
Height 16;
+SOLID;
}
States
{
Spawn:
SBON A -1;
Stop;
}
}


///////GOOD /////// (Inheriting from BonePile 1)

class BonePile2 : BonePile1
{
//$Category Decoration/Gore Props
//$Title "Bone Pile 2"
//$Sprite "SBONB0"

States
{
Spawn:
SBON B -1;
Stop;
}
}


///////// BAD /////// (Is it's own class within the same lump, omitting Default: { and then the closing parenthesis )

class BonePile2 : Actor
{
//$Category Decoration/Gore Props
//$Title "Bone Pile 2"
//$Sprite "SBONB0"
Radius 16;
Height 16;
+SOLID;

States
{
Spawn:
SBON B -1;
Stop;
}
}

I've attached both pk3s (without the sprites) to test in UDB, BAD won't load in GZDOOM obviously due to the syntax error but when loaded in UDB you will notice it doesn't show the corresponding custom class (Bone Pile).

Anyone reading this try both and see what I mean. Not only does it NOT show the intended classes (in this case the Bone Piles) but it will stop showing ALL classes even if they were correct previously (custom monsters, weapons, items, etc). It just shuts down all custom classes appearing in UDB. This is why it is vital to ensure there are no errors, even script errors in general not just forbidding booting GZDOOM. And that you also follow the guidelines mentioned above.

I wanted to be thorough here as I noticed a lot of unresolved posts online here and in Doomworld that weren't clear on this issue.


--------

I hope this can act as a guide to show what exactly you must do to ensure your class appears in UDB for anyone reading. Have fun mapping!
You do not have the required permissions to view the files attached to this post.
Last edited by Doctor Doomer on Sun May 04, 2025 9:07 am, edited 1 time in total.
User avatar
Enjay
 
 
Posts: 26909
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Trouble with DoomEdNums

Post by Enjay »

Thanks for providing the detailed feedback. If anyone has the same problem, this could well provide the help that they need.

BTW, I *think* you have enough posts for code tags etc to work for you now.
User avatar
Doctor Doomer
Posts: 7
Joined: Sun Mar 30, 2025 6:01 am

Re: Trouble with DoomEdNums

Post by Doctor Doomer »

You're right I do, added the code tags! On an additional note I noticed, if you have a class that refers to a class that does not exist within it, even if it is associated with a main class, every class that comes after it in ZSCRIPT will return the error "Failed to apply MAPINFO DoomEdNum override "25282 = THING": failed to find corresponding actor class..."

For example this was causing other classes to not appear until I fixed it. Notice that it isn't referred to as an ACTOR. Ignore whatever code it says when you download a wad/pk3 and make sure it is called ACTOR or ensure that the parent class it refers to is already previously defined in the order that ZSCRIPT parses the lumps defined within it.

Code: Select all

class ZCorpseCrucified : ZBannerTattered
{

States
{
//$Category Decoration/Gore Props
//$Title "Crucifed Corpse"
//$Sprite "CRUXA0"
Spawn:
CRUX A -1;
Stop;
}
}

Return to “Mapping”