MTrop / DoomTools

Doom-related tools for Java. Home of DECOHack and lots of other utilities. Build WAD projects (and soon, other kinds) with ease!
https://mtrop.github.io/DoomTools/
MIT License
46 stars 5 forks source link

[DECOHACKED to DEHACKED] Some things are not being compiled #117

Closed snekyo closed 1 month ago

snekyo commented 1 month ago

I've pasted my entire DECOHACKED file below, for reference with the paragraph directly below. I believe I've done everything correctly, yet SSbot is the only think mentioned here that doesn't get compiled. I've tried replacing the text after the "thing" text with a number for all of the thing descriptions, but that makes it so SSbot appears, and the Chair thing disappears. Is this a bug or a problem with my amateur coding skills?

Edit: It appears to have fixed itself, somehow? I'm still gonna leave this up just in case anyone could identify if the issue was with my code, or if it is an issue that happens only sometimes.


#include <dsdhacked>
#include <friendly>

alias thing SecurityBot MT_EXTRA03

auto thing HangingBodyBothLegs {}

auto thing HangingBodyCrucified {}

auto thing HangingBaronOfHell {}

auto thing SSbot {}
auto thing Chair {}
auto thing Marine {}

#define DSPPOACT "ppoact"
#define DSPPOPAI "ppopai"
#define DSPPODTH "ppodth"

#define DOOMEDNUM_SECURITYBOT       5010

#define DOOMEDNUM_HANGING_BODY_BOTH_LEGS        5020

#define DOOMEDNUM_HANGING_BODY_CRUCIFIED        5030

#define DOOMEDNUM_HANGING_BARON_OF_HELL       5040

#define DOOMEDNUM_CHAIR       5040

#define DOOMEDNUM_MARINE        5060

#define DOOMEDNUM_STAT_BOT       5070

thing HangingBodyBothLegs "Security Bot Corpse"
{
    //$Category Decoration
    EdNum DOOMEDNUM_HANGING_BODY_BOTH_LEGS

    Radius 20
    Height 10

    states
    {
    spawn:
        CROB A -1
        stop
    }
}

thing HangingBodyCrucified "Decapitated Marine"
{
    //$Category Decoration
    EdNum DOOMEDNUM_HANGING_BODY_CRUCIFIED

    Radius 20
    Height 10

    states
    {
    spawn:
        CHES A -1
        stop
    }
}

thing HangingBaronOfHell "Halved Marine"
{
    //$Category Decoration
    EdNum DOOMEDNUM_HANGING_BARON_OF_HELL

    Radius 20
    Height 10

    states
    {
    spawn:
        CTOR A -1
        stop
    }
}

thing Chair "Stupid Chair"
{
    //$Category Obstacles
    EdNum DOOMEDNUM_CHAIR

    Radius 16
    Height 16

    +SOLID

    states
    {
    spawn:
        CHR1 A -1
        stop
    }
}

thing SSbot "Stationary Bot"
{
    //$Category Obstacles
    EdNum DOOMEDNUM_STAT_BOT

    Radius 16
    Height 16

    +SOLID

    states
    {
    spawn:
        PPOS A -1
        stop
    }
}

thing Marine "Marine"
{
    //$Category Obstacles
    EdNum DOOMEDNUM_MARINE

    Radius 16
    Height 56

    +SOLID

    states
    {
    spawn:
        PLAY A -1
        stop
    }
}

thing SecurityBot "Security Bot"
{
    //$Category Monsters
    EdNum DOOMEDNUM_SECURITYBOT

    Health 30
    Speed 8
    Radius 16
    Height 56
    ReactionTime 8
    PainChance 0
    Mass 100

    +SOLID
    +SHOOTABLE
    +COUNTKILL

    ActiveSound DSPPOACT
    PainSound   DSPPOPAI
    DeathSound  DSPPODTH

    states
    {
        spawn:
            PPOS AB 10 A_Look
            loop
        see:
            PPOS AABBCCDD 2 A_Chase
            loop
        missile:
            PPOS E 10 A_FaceTarget
            PPOS F 2  A_MonsterBulletAttack(22,0,3,5,3)
            goto see
        pain:
            PPOS G 1 
            PPOS G 1 A_Pain
            goto see
        death:
            PPOS H 0 A_FaceTarget
            PPOS I 5 A_Scream
            PPOS J 5 A_Fall
            PPOS KL 5
            PPOS M -1
            stop
        xdeath:
            PPOS N 5
            PPOS O 5 A_XScream
            PPOS P 5 A_Fall
            PPOS Q 0 A_FaceTarget
            PPOS RST 5
            PPOS U -1
            stop
        raise:
            PPOS MLKJIH 5
            goto see
    }

```}
MTrop commented 1 month ago

It appears that SecurityBot and SSBot are being allocated to the same slot (154), which is due to line 4:

alias thing SecurityBot MT_EXTRA03

...and then being overwritten by the thing declaration on line 137 (thing SecurityBot "Security Bot").

You should probably auto thing that alias, instead of just declaring an alias, since that won't "touch" that thing slot to take it out of the "auto" pool.

Closing as "not a bug."