Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Zeea

Weird Doom Builder 2 sprite behavior

Recommended Posts

So, I've discovered a weird and annoying issue in Doom Builder 2. Anyone got any solutions, or seen this happen? This is a bit more advanced than the usual "my monsters don't work, help!" thing and I know what's causing it, just not why it happens.

 

Situation:

--I'm using a pk3 file with custom sprites and a decorate file.

--Everything works fine in game; summoning the monsters/weapons works.

--Everything works fine when I place the monsters in Doom Builder 2 and then test the monsters/weapons.

--There are no conflict DoomEd numbers or error messages.

--(Random) I'm not going to upload this, it's just for personal use, so no need to tell me not to put a bunch of IWAD content together in a custom WAD.

 

The problem:

 

--Doom Builder 2 only displays sprites for things if the sprite graphic has been used inside a states{} somewhere in the DECORATE.

--Otherwise, it shows a blank placeholder thing display. It still works in the game, but it makes it harder to see what the level will look like in 3d mode.

--This happens even if there's a default sprite for the thing in question. (For example, I'm putting the Heretic weapons in this and have the Heretic sprites in the pk3, so there was no reason to go through and define all the states{} again since ZDoom already knows what Heretic weapons use as sprites.)

 

 

Examples of the Weirdness (sample code below this):

 

--x1Gauntlets and x1Elvenwand are just inheriting from Gauntlets and GoldWand. But Gauntlets displays a sprite in DoomBuilder2, and GoldWand doesn't.

--That's because the gauntlet sprite is reused (with a Translation recolor) later in the code, in the states{} forx2FighterFists.

--Sorcerer1 doesn't display a graphic, but Sorcerer2 does. Because I didn't reference the Sorcerer1 sprites anywhere in the decorate, but Sorcerer2 has a states{} that references them and thus it applies.

 

So, basically, unless I explicitly put every single sprite I have into a states{} somewhere in my decorate file, Doom Builder 2 won't show them. It's bizarre. Any way around it? (My current idea is just making a dummy ACTOR that uses every single sprite in its states{} so that DB2 loads them all.)

 

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

ACTOR x1Gauntlets : Gauntlets 17002 {Weapon.SlotNumber 1}
ACTOR x1ElvenWand : GoldWand 17003 {Weapon.SlotNumber 2}

ACTOR x2FighterFists : FWeapFist 17101 {
  Weapon.SlotNumber 1
  Inventory.PickupMessage "Fighter Gauntlets"
  Translation "0:255=%[0,0,0]:[1,0,0]"

  States
  {
  Spawn:
    WGNT A -1
    Stop
  }

}

ACTOR x1Sorcerer1 : Sorcerer1 16015 {}
ACTOR x1Sorcerer2 : Sorcerer2 replaces Sorcerer2 16016 {
States
  {
  Spawn:
    SOR2 MN 10 A_Look
    Loop
  See:
    SOR2 MNOP 4 A_Chase
    Loop
  Rise:
    SOR2 AB 4
    SOR2 C 4 A_PlaySound("dsparil/rise", CHAN_BODY, 1, FALSE, ATTN_NONE)
    SOR2 DEF 4
    SOR2 G 12 A_PlaySound("dsparil/sight", CHAN_BODY, 1, FALSE, ATTN_NONE)
    Goto See
  Pain:
    SOR2 Q 3
    SOR2 Q 6 A_Pain
    Goto See
  Missile:
    SOR2 R 9 A_Srcr2Decide
    SOR2 S 9 A_FaceTarget
    SOR2 T 20 A_Srcr2Attack
    Goto See
  Teleport:
    SOR2 LKJIHG 6
    Goto See
  Death:
    SDTH A 8
    SDTH B 8
    SDTH C 8 A_PlaySound("dsparil/scream", CHAN_BODY, 1, FALSE, ATTN_NONE)
  DeathLoop:
    SDTH DE 7
    SDTH F 7 A_Sor2DthLoop
    SDTH G 6 A_PlaySound("dsparil/explode", CHAN_BODY, 1, FALSE, ATTN_NONE)
    SDTH H 6
    SDTH I 18
    SDTH J 6 A_NoBlocking
    SDTH K 6 A_PlaySound("dsparil/bones", CHAN_BODY, 1, FALSE, ATTN_NONE)
    SDTH LMN 6
    SDTH O -1 A_BossDeath
    Stop
  }
}

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

Share this post


Link to post

It looks to me like the reason this is going on is that which you've already figured out. All you have to do is define a spawn state and it will appear in DB2/GZDB, whatever you're using.

 

An alternative solution is using the //$Sprite function in this DECORATE code:

actor DualBerettas : Weapon 5010
{
 //$Category Weapons
 //$Sprite BERRA0
 //$NotAngled
 (Functions, states, etc)
}

Where //$Sprite is the image/sprite you want to represent the actor in the editor, in this event, the sprite BERRA0 represents the weapon DualBerettas (from my own project).

Unless I'm mistaken, the //$Sprite function works for DB2 just like GZDB, so the solution might be as simple as this.

And it must be written as such. Doom Builder reads for those custom functions and uses them. Otherwise they have no bearing on anything, so //$Category Weapons puts it under the weapons tab, and //$NotAngled removes the cute little direction arrow defining what direction this actor is facing.

Share this post


Link to post

Oh, thanks so much! I'd forgotten about $Category and didn't know about $Sprite at all. That should help tremendously.

Share this post


Link to post

Okay, implemented that with a lot of typing and got it working. Thanks again.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×