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

Brutal doom code question

Question

I’m new to doom editing but I have managed to do some things like change the health of enemies or there speed. But right now I’m trying to find a line of code in Brutal doom that decides if the pinky daemon dies or goes into a berserk mode at death. I’m sure I could figure it out if I just only find the line of code were its decided.

Share this post


Link to post

4 answers to this question

Recommended Posts

  • 0

Assuming that you're talking about BDv20b and that "berserk mode" refers to the armless form: The Demon's behavior is defined in file "DEMONS.txt". His death animation begins with several A_Jump calls, which randomly branch the animation. One branch ends by calling A_SpawnItemEx ("PoorPinkyLostHisArm"). PoorPinkyLostHisArm is defined in file "DECORATE.DyingGuys.txt". After this actor spawns, it also calls A_Jump several times to branch its animation. One branch ends by calling A_SpawnItemEx ("ArmlessDemon"). ArmlessDemon is once again defined in file "DEMONS.txt" and is the armless form of the demon that survives. So, if all the abovementioned random jumps lead the animation up to here, the demon ends up spawning this form that survives, otherwise the demon dies.

Share this post


Link to post
  • 0

Got it working but why is it in DECORATE.DyingGuys.txt I’ve spent hours looking through DEMONS.txt since it would seem like the logical place to put it. I heard people say the guy who makes this mode is a sloppy programmer is that why we have this spaghetti code, or is there a good reason for it being there. Or is that that’s just the style people adhere to because the original doom code was done that why or do I just need to get good. If you’re interested in the end I got working by commenting out this line of code

TNT1 A 0 A_Jump(90, "PutAFight")

 

But now I have a new problem I thought I could just extract DECORATE.DyingGuys.txt into my own pk3 file load that after the original pk3 and it would override the old txt file with the new. But that does not seem to be working and I’m instead forced to create a whole new version of the original pk3 and load that instead. Is there any way to get txt files with the same name to override each other according to load order?

Share this post


Link to post
  • 0

ZDoom parses DECORATE files cumulatively, so that loading a file after a file with the same name will not override it, rather ZDoom will parse both files (and reject the actors defined in the new one for being already defined in the old one). If you're trying to make a small mod that loads after BD and redefines some of its behavior and/or replaces some of its content, you need to go slightly differently about it: Make a file named DECORATE in your pk3, define new actors in it (or in text files included from your DECORATE using the #include keyword) that inherit from the BD actors and replace them using the replaces keyword, and redefine the parts of their definition that you wish to change.

Share this post


Link to post
  • 0

figured it out thanks for all your help scifista42 couldn't have done it without you, even managed to get rid of the Revenant getting chopped in half and still fighting (another annoyance). One more question when I made modes that changed monster health my old method of just loading up the new txt file over the old worked so why didn’t it here? You would think that changing health would exhibit the same behavior as changing the death animations but it doesn’t.

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
×