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

DoomTools Tutorial

Recommended Posts

 

I decided to dedicate to you how to work with doomtools. To understand this program I had to spend a lot of time

 

DoomTools download: https://mtrop.github.io/DoomTools/

If you have a problem with installation, disable the antivirus and then insert this program into the exception rule

 

DoomTools MBF21 specification:

https://github.com/kraflab/mbf21/blob/master/docs/spec.md

https://mtrop.github.io/DoomTools/decohack.html

 

++++ Infos ++++

CodePointer: https://doomwiki.org/wiki/Category:Monster_code_pointers

CodePointer full: https://doomwiki.org/wiki/DeHackEd#Code_pointers

Classes: https://zdoom.org/wiki/Classes:Doom

Spirite: https://zdoom.org/wiki/Sprite

Actor properies: https://zdoom.org/wiki/Actor_properties

Actor flags: https://zdoom.org/wiki/Actor_flags

 

++++ Share codes ++++

In zip are all Doom2 monsters codes with sound. Check bevore use (Arachnotron is strange)

Monsters.zip

 

https://www.doomworld.com/forum/topic/136393-doomtools-new-weapon-solved/

https://www.doomworld.com/forum/topic/136288-doomtools-a_spidrefire-solved/

 

BetterImp

Spoiler

#include "classpath:decohack/mbf21.dh"

auto thing BetterImp "BetterImp"
{
  //$Category Monsters/Strong
  //$EditorSprite TROOA1       
  EdNum 1000
  
  Health 150
  Radius 20
  Height 56
  Mass 100
  Speed 8
  PainChance 200
  ReactionTime 8
  
  clear flags
  +SOLID
  +SHOOTABLE
  +COUNTKILL
  
        SeeSound "bgsit1"
        AttackSound ""
        PainSound "popain"
        DeathSound "bgdth1"
        ActiveSound "bgact"

  States
  {
  Spawn:
    TROO AB 10 A_Look
    Loop
  See:
    TROO AABBCCDD 3 A_Chase
    Loop
  Melee:
  Missile:
    TROO EF 8 A_FaceTarget
    TROO G 6 A_BruisAttack
    Goto See
  Pain:
    TROO H 2
    TROO H 2 A_Pain
    Goto See
  Death:
    TROO I 8
    TROO J 8 A_Scream
    TROO K 6
    TROO L 6 A_Fall
    TROO M -1
    Stop
  XDeath:
    TROO N 5
    TROO O 5 A_XScream
    TROO P 5
    TROO Q 5 A_Fall
    TROO RST 5
    TROO U -1
    Stop
  Raise:
    TROO ML 8
    TROO KJI 6
    Goto See
  }
}

 

Imptron

Spoiler

auto thing Imptron "Imptron"
{
  //$Category Monsters/Strong
  //$EditorSprite SP01A1
  EdNum 1001
  
  Health 300
  Radius 20
  Height 56
  Mass 40
  Speed 16
  PainChance 0
  ReactionTime 8
  
          clear flags
        +SOLID
        +SHOOTABLE
        +COUNTKILL
    
        SeeSound "fre001"
        AttackSound ""
        PainSound "fre002"
        DeathSound "fre003"
        ActiveSound "fre004"

  States
  {
  Spawn:
    SP01 AB 10 A_Look
    Loop
  See:
    SP01 AABBCCDD 3 A_Chase
    Loop
  Melee:
  Missile:
    SP01 EF 2 A_FaceTarget
    SP01 G 2 A_TroopAttack
    SP01 G 1 A_SpidRefire
    Goto Missile
  Pain:
    SP01 H 2
    SP01 H 2 A_Pain
    Goto See
  Death:
    SP01 I 8
    SP01 J 8 A_Scream
    SP01 K 6
    SP01 L 6 A_Fall
    SP01 M -1
    Stop
  XDeath:
    SP01 N 5
    SP01 O 5 A_XScream
    SP01 P 5
    SP01 Q 5 A_Fall
    SP01 RST 5
    SP01 U -1
    Stop
  Raise:
    SP01 ML 8
    SP01 KJI 6
    Goto See
  }
}

 

ImpMoreBalls

Spoiler

auto thing ImpMoreBall "ImpMoreBall"
{
  //$Category Monsters/Strong
  //$EditorSprite SP02A1
  EdNum 1002
  
  Health 500
  Radius 20
  Height 56
  Mass 100
  Speed 8
  PainChance 200
  ReactionTime 8
  
        clear flags
        +SOLID
        +SHOOTABLE
        +COUNTKILL
    
        SeeSound "bgsit1"
        AttackSound ""
        PainSound "popain"
        DeathSound "bgdth1"
        ActiveSound "bgact"

  States
  {
  Spawn:
    SP02 AB 10 A_Look
    Loop
  See:
    SP02 AABBCCDD 3 A_Chase
    Loop
  Melee:
  Missile:
    SP02 EF 8 A_FaceTarget
    SP02 G 0 A_MonsterProjectile(DoomImpBall, 0, 0, 0, 0)
    SP02 G 0 A_MonsterProjectile(DoomImpBall, 20, 0, 0, 0)
    SP02 G 0 A_MonsterProjectile(DoomImpBall, -20, 0, 0, 0)
    SP02 G 0 A_MonsterProjectile(DoomImpBall, 40, 0, 0, 0)
    SP02 G 6 A_MonsterProjectile(DoomImpBall, -40, 0, 0, 0)
    Goto See
  Pain:
    SP02 H 2
    SP02 H 2 A_Pain
    Goto See
  Death:
    SP02 I 8
    SP02 J 8 A_Scream
    SP02 K 6
    SP02 L 6 A_Fall
    SP02 M -1
    Stop
  XDeath:
    SP02 N 5
    SP02 O 5 A_XScream
    SP02 P 5
    SP02 Q 5 A_Fall
    SP02 RST 5
    SP02 U -1
    Stop
  Raise:
    SP02 ML 8
    SP02 KJI 6
    Goto See
  }
}

 

ImpSurprise

Spoiler

auto thing ImpSurprise "ImpSurprise"
{
  //$Category Monsters/Strong
  //$EditorSprite TROOA1
  EdNum 1003
  
  Health 1000
  Radius 20
  Height 56
  Mass 100
  Speed 8
  PainChance 200
  ReactionTime 8
  
        clear flags
        +SOLID
        +SHOOTABLE
        +COUNTKILL
    
        SeeSound "bgsit1"
        AttackSound ""
        PainSound "popain"
        DeathSound "bgdth1"
        ActiveSound "bgact"

  States
  {
  Spawn:
    TROO AB 10 A_Look
    Loop
  See:
    TROO AABBCCDD 3 A_Chase
    Loop
  Melee:
  Missile:
    TROO EF 8 A_FaceTarget
    TROO EF 0 A_JumpIfHealthBelow(missile2, 600)
    TROO G 6 A_TroopAttack
    Goto See
  Missile2:
    TROO G 0 A_MonsterProjectile(DoomImpBall, 0, 0, 0, 0)
    TROO G 0 A_MonsterProjectile(DoomImpBall, 20, 0, 0, 0)
    TROO G 0 A_MonsterProjectile(DoomImpBall, -20, 0, 0, 0)
    TROO G 0 A_MonsterProjectile(DoomImpBall, 40, 0, 0, 0)
    TROO G 6 A_MonsterProjectile(DoomImpBall, -40, 0, 0, 0)
    Goto See
  Pain:
    TROO H 2
    TROO H 2 A_Pain
    Goto See
  Death:
    TROO I 8
    TROO J 8 A_Scream
    TROO K 6
    TROO L 6 A_Fall
    TROO M -1
    Stop
  XDeath:
    TROO N 5
    TROO O 5 A_XScream
    TROO P 5
    TROO Q 5 A_Fall
    TROO RST 5
    TROO U -1
    Stop
  Raise:
    TROO ML 8
    TROO KJI 6
    Goto See
  }
}

 

ImpDistance

Spoiler

auto thing ImpDistance "ImpDistance"
{
  //$Category Monsters/Strong
  //$EditorSprite TROOA1
  EdNum 1004
  
  Health 500
  Radius 20
  Height 56
  Mass 100
  Speed 8
  PainChance 200
  ReactionTime 15
  
        clear flags
        +SOLID
        +SHOOTABLE
        +COUNTKILL
    
        SeeSound "bgsit1"
        AttackSound ""
        PainSound "popain"
        DeathSound "bgdth1"
        ActiveSound "bgact"

  States
  {
  Spawn:
    TROO AB 10 A_Look
    Loop
  See:
    TROO AABBCCDD 3 A_Chase
    Loop
  Melee:
  Missile:
    TROO EF 8 A_FaceTarget

    TROO EF 0 A_JumpIfTargetCloser(missile2, 500)
    TROO G 6 A_TroopAttack
    Goto See
  Missile2:
    TROO G 0 A_MonsterProjectile(FatShot, 0, 0, 0, 0)
    TROO G 0 A_MonsterProjectile(FatShot, 20, 0, 0, 0)
    TROO G 6 A_MonsterProjectile(FatShot, -20, 0, 0, 0)
    Goto See
  Pain:
    TROO H 2
    TROO H 2 A_Pain
    Goto See
  Death:
    TROO I 8
    TROO J 8 A_Scream
    TROO K 6
    TROO L 6 A_Fall
    TROO M -1
    Stop
  XDeath:
    TROO N 5
    TROO O 5 A_XScream
    TROO P 5
    TROO Q 5 A_Fall
    TROO RST 5
    TROO U -1
    Stop
  Raise:
    TROO ML 8
    TROO KJI 6
    Goto See
  }
}

 

BfGSpider

Spoiler

auto thing BFGmissile "BFGmissile"
{
    Height 8
    Radius 13
    
    Speed 25
    +MISSILE
    +DROPOFF
    +NOBLOCKMAP
    +NOGRAVITY
    +TRANSLUCENT
    
    States
    {
            Spawn:
                BFS1 AB 4 
                Loop
              Death:
                BFE1 AB 8 
                BFE1 C 8 A_BFGSpray
                BFE1 DEF 8 
                Stop
    }    
}


auto thing BFGSpider "BFGSpider"
    {     
    //$Category Monsters/Strong
    //$EditorSprite SPIDA1
        EdNum 1000
        
        Health 8000
        Speed 16
        Radius 128
        Height 100
        Damage 0
        ReactionTime 8
        PainChance 40
        Mass 1000
    
        clear flags
        +SOLID
        +SHOOTABLE
        +COUNTKILL
    
        SeeSound "spisit"
        AttackSound ""
        PainSound "dmpain"
        DeathSound "spidth"
        ActiveSound "dmact"
        
        states
        {
              Spawn:
                SPID AB 10 A_Look
                Loop
              See:
                SPID A 3 A_Metal
                SPID ABB 3 A_Chase
                SPID C 3 A_Metal
                SPID CDD 3 A_Chase
                SPID E 3 A_Metal
                SPID EFF 3 A_Chase
                Loop
              Missile:
                SPID A 20 Bright A_FaceTarget
                SPID G 4 A_MonsterProjectile(BFGmissile)
                SPID H 4 A_MonsterProjectile(BFGmissile)
                SPID H 1 A_SpidRefire
                Goto Missile
              Pain:
                SPID I 3
                SPID I 3 A_Pain
                Goto See
              Death:
                SPID J 20 A_Scream
                SPID K 10 A_Fall
                SPID LMNOPQR 10
                SPID S 30
                SPID S -1 A_BossDeath
                Stop
        }
    }

 

Edited by CrazyDoomguy

Share this post


Link to post

Finally, someone who decided to spend some time doing a tutorial on DoomTools.

 

Thanks!

Share this post


Link to post

You should probably leave the headers in the main.dh file as-is. Those two include lines do the exact same thing as the "classpath:" include.

 

This is good enough for the GUI route so far, but there will be more things added to the DoomTools GUI soon-ish that will make patch building far simpler.

 

Share this post


Link to post

I found a better code for repriggering to another state like A_JumpIfHealthBelow. It's smoother and no strange behaviors. 

 

Missile:
    TROO EF 8 A_FaceTarget
    TROO EF 0 A_JumpIfHealthBelow(missile2, 600)
    TROO G 6 A_TroopAttack
    Goto See
  Missile2:
    TROO G 0 A_MonsterProjectile(DoomImpBall, 0, 0, 0, 0)
    TROO G 0 A_MonsterProjectile(DoomImpBall, 20, 0, 0, 0)
    TROO G 0 A_MonsterProjectile(DoomImpBall, -20, 0, 0, 0)
    TROO G 0 A_MonsterProjectile(DoomImpBall, 40, 0, 0, 0)
    TROO G 6 A_MonsterProjectile(DoomImpBall, -40, 0, 0, 0)
    Goto See

Add A_JumpIfHealthBelow in missile state after A_FaceTarget. On missile2 remove A_FaceTarget

 

Spoiler

#include "classpath:decohack/mbf21.dh"

auto thing ImpSurprise "ImpSurprise"
{
  //$Category Monsters/Strong
  //$EditorSprite TROOA1
  EdNum 1003
  
  Health 1000
  Radius 20
  Height 56
  Mass 100
  Speed 8
  PainChance 200
  ReactionTime 8
  
        clear flags
        +SOLID
        +SHOOTABLE
        +COUNTKILL
    
        SeeSound "bgsit1"
        AttackSound ""
        PainSound "popain"
        DeathSound "bgdth1"
        ActiveSound "bgact"

  States
  {
  Spawn:
    TROO AB 10 A_Look
    Loop
  See:
    TROO AABBCCDD 3 A_Chase
    Loop
  Melee:
  Missile:
    TROO EF 8 A_FaceTarget
    TROO EF 0 A_JumpIfHealthBelow(missile2, 600)
    TROO G 6 A_TroopAttack
    Goto See
  Missile2:
    TROO G 0 A_MonsterProjectile(DoomImpBall, 0, 0, 0, 0)
    TROO G 0 A_MonsterProjectile(DoomImpBall, 20, 0, 0, 0)
    TROO G 0 A_MonsterProjectile(DoomImpBall, -20, 0, 0, 0)
    TROO G 0 A_MonsterProjectile(DoomImpBall, 40, 0, 0, 0)
    TROO G 6 A_MonsterProjectile(DoomImpBall, -40, 0, 0, 0)
    Goto See
  Pain:
    TROO H 2
    TROO H 2 A_Pain
    Goto See
  Death:
    TROO I 8
    TROO J 8 A_Scream
    TROO K 6
    TROO L 6 A_Fall
    TROO M -1
    Stop
  XDeath:
    TROO N 5
    TROO O 5 A_XScream
    TROO P 5
    TROO Q 5 A_Fall
    TROO RST 5
    TROO U -1
    Stop
  Raise:
    TROO ML 8
    TROO KJI 6
    Goto See
  }
}

 

Edited by CrazyDoomguy

Share this post


Link to post
4 hours ago, LuciferSam86 said:

Good tutorial. 

You could make a GitHub repo, so you don't have to update everytime the zip 

I tried create account in zdoom Wiki, but no sucess

Edited by CrazyDoomguy

Share this post


Link to post
1 hour ago, LuciferSam86 said:

Well Zdoom wiki is more for gzdoom / Zdoom stuff. 

But it is a handy resource. It's quick to open and you don't have to dig through a lot of pages. I think adding a decohack wouldn't hurt.
But the problem is in the registrations. Any account exists here at all like "jsdjls428fdjsk" and some are banned... it looks like the admin has blocked access. But I'm not in the mood to do anything right now

Share this post


Link to post
On 3/16/2023 at 5:28 AM, cyanthegojifan said:

how do you change what monsters can drop

Something I didnt saw your comment

 

You can add 

 

A_SpawnObject( thingId , angle , xoffset , yoffset , zoffset , xvel , yvel , zvel )

 

anywhere on death phase of monster. You can add anything even megasphere etc. You can add z offset highter that it fall naturally

 

Example 

 

             Death:
                SPID J 20 A_Scream
                SPID K 10 A_Fall
                SPID LMNOPQR 10

                SPID S 0 A_SpawnObject(thing 63 , 0 , 0, 0, 30 , 0 , 0 , 0)
                SPID S 30
                SPID S -1 A_BossDeath
                Stop

Edited by CrazyDoomguy

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
×