Here is the program and its source code: https://drive.google.com/file/d/1PpLIow ... sp=sharing
Don't stare too hard at the source code, it has been a VERY long time since I did much coding, so the code is kind of a mess (also not really sure why I wrote it in C++). I will hopefully rewrite it entirely at some point in the future.
To use it, simply drag the dehacked file onto the exe. You can also call it from the command line. It will output a decorate file and a log file describing how the operation went.
- Only processes the thing, weapon, and state changes at the moment. Stuff like strings, sounds, or ammo are intentionally left to the dehacked file. As such, it meant to be used alongside the dehacked file, not instead of.
- Does not yet do MBF-style parameters; will likely incorporate this later once I figure out how that works.
- It is rather basic in checking codepointers; it will always just write "A_(name of codepointer)" unless it is null. Thus invalid codepointers such as A_Suicide or A_Scratch may end up in the output file. You should check/run the decorate file to possibly correct these mistakes for now, I will hopefully deal with this later.
- Output actors are based on using inheritance and replacement to only change modified properties.
- Tends to duplicate certain states (i.e. Missile state writes the See state explicitly once before the "goto See" line). Doesn't affect behavior, but I'll try to fix it later.
- Because adding a state to a thing means removing it from another in dehacked, the output file will often have a lot of extraneous actors, as both things have technically been modified (see below). It's hard to tell what is and isn't extraneous without playing the wad first, so you may want to figure out and remove the extraneous actors.
Code: Select all
Actor DH_WolfensteinSS : WolfensteinSS replaces WolfensteinSS 84
{
Health 250
Speed 16
PainChance 30
Translation 2
SeeSound "grunt/sight"
DeathSound "grunt/death"
States
{
Spawn:
PLAY AB 10 A_Look
goto Spawn
See:
PLAY AABBCCDD 1 A_Chase
goto See
Pain:
PLAY G 3
PLAY G 3 A_Pain
PLAY AABBCCDD 1 A_Chase
goto See
Missile:
PLAY E 2 A_FaceTarget
PLAY F 1 Bright A_BspiAttack
PLAY E 2 A_FaceTarget
PLAY F 1 Bright A_BspiAttack
PLAY E 2 A_FaceTarget
PLAY F 1 Bright A_BspiAttack
PLAY AABBCCDD 1 A_Chase
goto See
Death:
PLAY H 10
PLAY I 10 A_Scream
PLAY J 10 A_Fall
PLAY K 10
PLAY N -1
stop
XDeath:
PLAY O 5
PLAY P 5 A_XScream
PLAY Q 5 A_Fall
PLAY RSTUV 5
PLAY W -1
stop
Raise:
PLAY MKJIH 5
PLAY AABBCCDD 1 A_Chase
goto See
}
}
Actor DH_CommanderKeen : CommanderKeen replaces CommanderKeen 72
{
Health 2500
Speed 8
Radius 20
Height 64
PainChance 30
Mass 400
-SPAWNCEILING
+FLOAT
SeeSound "baron/sight"
PainSound "demon/pain"
DeathSound "baron/death"
ActiveSound "demon/active"
States
{
Spawn:
KEEN A 10 Bright A_Look
goto Spawn
See:
KEEN ABCD 3 Bright A_Chase
goto See
Pain:
KEEN H 8 Bright
KEEN A 3 Bright A_Pain
KEEN ABCD 3 Bright A_Chase
goto See
Missile:
KEEN EF 6 Bright A_FaceTarget
KEEN G 1 Bright A_FatAttack1
KEEN G 1 Bright A_FatAttack2
KEEN G 1 Bright A_FatAttack3
KEEN G 1 Bright A_FaceTarget
KEEN GG 1 Bright A_SkelMissile
KEEN G 8 Bright A_SkelMissile
KEEN ABCD 3 Bright A_Chase
goto See
Death:
KEEN I 5 Bright
KEEN J 5 Bright A_Scream
KEEN K 5 Bright
KEEN L 5 Bright A_Fall
KEEN MNOPQ 5 Bright
KEEN R 5 Bright A_BossDeath
KEEN R 1 Bright
stop
}
}
Actor DH_BossEye : BossEye replaces BossEye 89
{
States
{
Spawn:
KEEN C 3 Bright A_Chase
KEEN DAB 3 Bright A_Chase
goto Spawn
See:
KEEN DAB 3 Bright A_Chase
KEEN C 3 Bright A_Chase
goto See
}
}
Actor DH_SpawnShot : SpawnShot replaces SpawnShot -1
{
States
{
Spawn:
KEEN J 5 Bright A_Scream
KEEN K 5 Bright
KEEN L 5 Bright A_Fall
KEEN MNOPQ 5 Bright
KEEN R 5 Bright A_BossDeath
KEEN R 1 Bright
stop
}
}
Actor DH_SpawnFire : SpawnFire replaces SpawnFire -1
{
States
{
Spawn:
KEEN F 6 Bright A_FaceTarget
KEEN G 1 Bright A_FatAttack1
KEEN G 1 Bright A_FatAttack2
KEEN G 1 Bright A_FatAttack3
KEEN G 1 Bright A_FaceTarget
KEEN GG 1 Bright A_SkelMissile
KEEN G 8 Bright A_SkelMissile
State_774:
KEEN ABCD 3 Bright A_Chase
goto State_774
}
}