Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Scet

DECORATE questions

Recommended Posts

Me again, this time I'm trying to implement DECORATE for ZDoom support.

1) When exactly I'm I supposed to run the action functions? Ever tick, frame change or state change?

2) What class do I use for the normal Doom player? The ZDoom wiki lists a whole bunch, but there's no info on them. I also looked through the GZDoom.pak file and couldn't find anything.

Right now I can load ZDoom Doom in Hexen format maps, but the only classes I've implemented are decorations and spawn spots, so it's really boring. I'd really like to know how the player class works so I can continue.

Sorry about all the techie questions lately. Normally I'd just refer to the wikis, but they are lacking in some areas. Thank you for any help.

Share this post


Link to post
Scet said:

Me again, this time I'm trying to implement DECORATE for ZDoom support.

1) When exactly I'm I supposed to run the action functions? Ever tick, frame change or state change?

2) What class do I use for the normal Doom player? The ZDoom wiki lists a whole bunch, but there's no info on them. I also looked through the GZDoom.pak file and couldn't find anything.

Right now I can load ZDoom Doom in Hexen format maps, but the only classes I've implemented are decorations and spawn spots, so it's really boring. I'd really like to know how the player class works so I can continue.

Sorry about all the techie questions lately. Normally I'd just refer to the wikis, but they are lacking in some areas. Thank you for any help.


1) Every state change.
2) The normal Doom player is called - 'DoomPlayer'! As of 2.1.7 it is still defined internally but that will change for the next version.

If you want to know how the player works, I'm afraid you will have to look at the source. This isn't anything that can't be explained with a few words. The source file that contains all player related code (p_user.cpp) is 55 k in size - and that only contains the basic player functionality.

Share this post


Link to post
Graf Zahl said:

1) Every state change.


That seems strange. I'll use the HellKnight as an example here:

Missile:
BOS2 EF 8 A_FaceTarget
BOS2 G 8 A_BruisAttack // See BaronBall
goto See

I'm assumning the 8 ticks is the time between frames, so the fisrt state takes 8 * 2 = 16 ticks. So A_FaceTarget is only called 16 ticks into the Missile state and it then goes to the second definition which is 8 ticks long and calls A_BruisAttack after 8 ticks. Is this correct? I'm guessing no since functions like A_Chase wouldn't be called very oftern and would result in jerky motion, unless there's some kind of internal state machine as well.

Graf Zahl said:

2) The source file that contains all player related code (p_user.cpp) is 55 k in size - and that only contains the basic player functionality.


I can add the behaviour myself, I'm was just wondering what a decorate class for the doom player would look like. I searched through the source and found a bunch of "PClass::FindClass(NAME_DoomPlayer)" lines, but no place where it actually adds the player class.

Share this post


Link to post
Scet said:

That seems strange. I'll use the HellKnight as an example here:

Missile:
BOS2 EF 8 A_FaceTarget
BOS2 G 8 A_BruisAttack // See BaronBall
goto See

I'm assumning the 8 ticks is the time between frames, so the fisrt state takes 8 * 2 = 16 ticks. So A_FaceTarget is only called 16 ticks into the Missile state and it then goes to the second definition which is 8 ticks long and calls A_BruisAttack after 8 ticks. Is this correct? I'm guessing no since functions like A_Chase wouldn't be called very oftern and would result in jerky motion, unless there's some kind of internal state machine as well.


You misunderstood something. A_FaceTarget is called for both the E and F state.


I can add the behaviour myself, I'm was just wondering what a decorate class for the doom player would look like. I searched through the source and found a bunch of "PClass::FindClass(NAME_DoomPlayer)" lines, but no place where it actually adds the player class.


What do you mean by 'add'?
If you want to see the DECORATE definition of the DoomPlayer, you can get it from the subversion repository. It's in the file 'wadsrc/decorate/doom/doomplayer.txt'

Share this post


Link to post

Why is there only one animation for the melee and missle states? Shouldn't the animation be different based on the players weapon?

Share this post


Link to post

'Melee' and 'Missile' have different meanings for players.

'Missile' means beginning of the attack and 'Melee' means the weapon flash. They will be superseded by more meaningful names in upcoming versions but the functionality had to be made functional before the implementation of custom state names.

Share this post


Link to post

Thanks for your help Graf Zahl. Any idea what it'll look like or how it would function? I was thinking of just setting the sprite to PLAYF when the current weapon frame is "bright" and PLAYE if the weapon is not in the rest state and not "bright". Seems like the easiest way to do it.

Also what is spawnid for? I'm guessing it's used to spawn actors that don't have offical DoomEd numbers?

Edit: Oh yeah another question. Where are the Heretic monster classes? I couldn't find them in the gzdoom.pk3 file or the ZDoom class list.

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
×