Custom player/hexen classes in decorate

Moderator: GZDoom Developers

Post Reply
User avatar
Necromage
Posts: 484
Joined: Thu Feb 10, 2005 3:13 pm
Location: NJ
Contact:

Custom player/hexen classes in decorate

Post by Necromage »

Grubber said he was working on something like this for the community build but unless he does something with it (even if that means just handing an uncomplete version of it to randy or graf) it will have very little use. And thers have wanted simiular things as well (like skin changing). So here is my idea (based on Grubber's):

Code: Select all

//this is an abstract class that allows for seprate weaponsclasses
class CustomWeaponsClass : TestWeaponsClass

//a weapon based on a special weapons class
actor TestStaff : TestWeaponsClass
{
    //weapons crap here
}

actor TestHexenPlayer : MagePlayer  
{ 
    // name to use in playerclass CVAR, menu etc. 
    Player.ClassName TestMage 
    // sound class for this player (see $player* commands in SNDINFO) 
    Player.SoundClass TestMageSound 
    //deafult health, I do not know if its possible but have healing things outmatically heal to this number 
    Player.StartHealth 100
    //Max health is number that health can be raised to with stuff like health bonus
    Player.MaxHealth 100
      // jump z, actual jump height = jump z * 8
    Player.JumpZ 9.75 
    // speed modifiers, first number is for walking, the other (optional) is for running 
    Player.ForwardMove 0.9 1.1 
    Player.SideMove 0.5

    //armor depends on what game you are playing
    //probably more you can add to this but I am not sure what would be needed
    //doom and I think heritic
    Player.StartArmor 0
    Player.MaxArmor 200
    //hexen
    Player.StartArmorClass 1
    Player.ArmorClass MagePlayer //this defines how much armor you get from items like the amulet (you can define a custom armorclass too)
    //strife, I do not know how strife's armor works

    //optional flags
    +NoSkin //doesn't allow for custom skins
    +NotRandom //class cannot be selected as random in hexen
    +Float //same as the monster flag, actor can fly
    +NoKillTelefrag //actor cannot telegrag
    +NoTelefrag //actor cannot be killed by telefrags    

    //Hexen player classes have to give this info:
    Player.weaponsclass TestWeaponsClass
    Player.ThingFlag 32768 //a thing with this flag bit shows up in when playing this class 
    Player.Box M_MBOX //this is the mage box
    Player.Walk1 M_MWALK1 //this is the mage gfx walks
    Player.Walk2 M_MWALK2
    Player.Walk3 M_MWALK3
    Player.Walk4 M_MWALK4
    Player.SkillModes Very Easy, Easy, Medium, Hard, Very Hard
                              //these are the 5 strings for the dificulty
    //this isn't really needed but should be there
    Player.PoisonBagMode MagePlayer //this changes how the flaccetta acts for this person
    Player.hexenboss MageBoss

    // default items 
    Player.StartItem TestStaff
    states
    {
    //player states go here
    }
}
I think this goes without saying but inheriting from an existing class (other then HexenPlayer, HeriticPlayer, DoomPlayer, etc...) means that you do have to supply all the properties. Then it would be nice if you can use the hexen classsstruct in other supported game modes like Doom. The only other thing I can think of that would need support is some sort of custom hud (like how you see how many pieces of your weapon you in hexen) but that is not what this is about.

Some functions that I would like for this: str GetPlayerClass(int playernumer); a built in function that returns the player class of the player, null MorphPlayer(tid of actor, str classname) changes the player to this class tid of 0 is the activator.

So how about it? This would be uber awesome.

On a side note. Can we have #include functionality for decorate cause decorate can get very long and confusing. It would make my life a lot easer.

edit:just some changes
User avatar
Nash
 
 
Posts: 17506
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

I'm all for supporting it. But what difference can I make - I can only support the idea.

I've been waiting for skin changing for YEARS! I think I've requested such a feature all the way back when zdoom.org wasn't even around yet.
User avatar
Shadelight
Posts: 5113
Joined: Fri May 20, 2005 11:16 am
Location: Labrynna

Post by Shadelight »

I'd rather wait for the offical decorate classes to be released though.....maybe Graf can add it to GZDoom?
User avatar
Grubber
Posts: 1031
Joined: Wed Oct 15, 2003 12:19 am
Location: Czech Republic
Contact:

Post by Grubber »

I can finish it eventually but I haven't got much time now..I've already got basic DECORATE handling and player class menu done and morphing and skin handling done partially.

Code: Select all

    //armor depends on what game you are playing 
    //probably more you can add to this but I am not sure what would be needed 
    //doom and I think heritic 
    Player.StartArmor 0 
    Player.MaxArmor 200 
    //hexen 
    Player.StartArmorClass 1 
    Player.ArmorClass MagePlayer //this defines how much armor you get from items like the amulet (you can define a custom armorclass too) 
    //strife, I do not know how strife's armor works
That won't work. You have to use e.g. Player.StartItem GreenArmor 50. Maximum armor values are defined in the armor itself (Armor.SaveAmount, Armor.MaxSaveAmount). Custom armor classes would require a lot of work, so now they are done by inheriting the player class from FighterPlayer/ClericPlayer/MagePlayer.

Code: Select all

    //optional flags 
    +NoSkin //doesn't allow for custom skins 
    +NotRandom //class cannot be selected as random in hexen 
    +Float //same as the monster flag, actor can fly 
    +NoKillTelefrag //actor cannot telegrag 
    +NoTelefrag //actor cannot be killed by telefrags
NOSKIN is already implemented. Classes visible in menus are defined in KEYCONF.

Code: Select all

    //Hexen player classes have to give this info: 
    Player.weaponsclass TestWeaponsClass 
    Player.ThingFlag 32768 //a thing with this flag bit shows up in when playing this class 
    Player.Box M_MBOX //this is the mage box 
    Player.Walk1 M_MWALK1 //this is the mage gfx walks 
    Player.Walk2 M_MWALK2 
    Player.Walk3 M_MWALK3 
    Player.Walk4 M_MWALK4 
    Player.SkillModes Very Easy, Easy, Medium, Hard, Very Hard 
                              //these are the 5 strings for the dificulty 
    //this isn't really needed but should be there 
    Player.PoisonBagMode MagePlayer //this changes how the flaccetta acts for this person 
    Player.hexenboss MageBoss
Again, Hexen-specific things are done by inheriting from Hexen player classes. Player image in menu is generated from the see (walking) state (similar to player setup menu). I'm still not sure about how to handle class-specific pickups, but they will be defined in items for sure, by some property (Inventory.PlayerClass) and/or state jump action (A_CheckPlayerClass).

KEYCONF definition:

Code: Select all

playerclasses FighterPlayer ClericPlayer MagePlayer
ACS built-in functions:
int PlayerClass () returns # of player class of activating player based on the list in KEYCONF (e.g. FighterPlayer is 0, ClericPlayer is 1, ...). Returns -1 for non-player activators.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Grubber wrote: Custom armor classes would require a lot of work, so now they are done by inheriting the player class from FighterPlayer/ClericPlayer/MagePlayer.

Can't you just add the 5 parameters for Hexen class armor as properties to the player? It's really just these 5 values. 4 are factors for the 4 armor classes and the fifth is the fixed amount of protection a player class has.

Code: Select all

	armor->SlotsIncrement[0] = 25*FRACUNIT;
	armor->SlotsIncrement[1] = 20*FRACUNIT;
	armor->SlotsIncrement[2] = 15*FRACUNIT;
	armor->SlotsIncrement[3] =  5*FRACUNIT;
	armor->Slots[4] = 15*FRACUNIT;
User avatar
Grubber
Posts: 1031
Joined: Wed Oct 15, 2003 12:19 am
Location: Czech Republic
Contact:

Post by Grubber »

What I don't like on Hexen armor is the restriction on 4 armor pieces.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

What I don't like is that after knowing the code inside out I still don't know how it works! :mrgreen:
User avatar
Necromage
Posts: 484
Joined: Thu Feb 10, 2005 3:13 pm
Location: NJ
Contact:

Post by Necromage »

Grubber wrote:I can finish it eventually but I haven't got much time now..I've already got basic DECORATE handling and player class menu done and morphing and skin handling done partially.
I would do it but I everytime I look at the doom source code I get confused somewhere. :cry:
That won't work. You have to use e.g. Player.StartItem GreenArmor 50. Maximum armor values are defined in the armor itself (Armor.SaveAmount, Armor.MaxSaveAmount). Custom armor classes would require a lot of work, so now they are done by inheriting the player class from FighterPlayer/ClericPlayer/MagePlayer.
Shame on me for forgetting that armor sets its own values.
Again, Hexen-specific things are done by inheriting from Hexen player classes. Player image in menu is generated from the see (walking) state (similar to player setup menu). I'm still not sure about how to handle class-specific pickups, but they will be defined in items for sure, by some property (Inventory.PlayerClass) and/or state jump action (A_CheckPlayerClass).
If keyconfig can define all the stuff needed for the hexen class (the box and the four walk sprites are all gfx and the 5 dificulty settings) then I am all for it.
ACS built-in functions:
int PlayerClass () returns # of player class of activating player based on the list in KEYCONF (e.g. FighterPlayer is 0, ClericPlayer is 1, ...). Returns -1 for non-player activators.
If I read this right then the numbers would be the order in which the player classes are listed.

Some other stuff that I though of. For very simple vehicles support you can have a flag RemberLast which causes the class to save the skin that it was morphed from into some variable. Then you can have an acs function that you can call. Something like NULL MorpheLast(). One praticle use of this is that say you have a horse. The pickup calls the MorphPlayer() function. The player then becomes a horserider. When the horse dies it can call MorpheLast() which would respawn the player. For the hexen armor fragments you can define a CustomArmorFragment that sets the max armor amount and then have inherited peices from that which would give have the amount of armor given for each class.
User avatar
The Ultimate DooMer
Posts: 2109
Joined: Tue Jul 15, 2003 5:29 pm
Location: Industrial Zone

Post by The Ultimate DooMer »

Grubber wrote:What I don't like on Hexen armor is the restriction on 4 armor pieces.
Graf Zahl wrote:What I don't like is that after knowing the code inside out I still don't know how it works! :mrgreen:
That's why I created my own armour system :P
User avatar
Cardboard Marty
Posts: 1151
Joined: Sat Oct 23, 2004 8:29 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Robot Mountain
Contact:

Post by Cardboard Marty »

He's alive!
User avatar
Grubber
Posts: 1031
Joined: Wed Oct 15, 2003 12:19 am
Location: Czech Republic
Contact:

Post by Grubber »

Image

Image
User avatar
Caligari87
Admin
Posts: 6244
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Post by Caligari87 »

:shock:
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

But what is it worth without a source port which supports it...
User avatar
Necromage
Posts: 484
Joined: Thu Feb 10, 2005 3:13 pm
Location: NJ
Contact:

Post by Necromage »

Me wants very very much... :shock:
User avatar
BouncyTEM
Posts: 3823
Joined: Sun Aug 24, 2003 5:42 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: 2280 Lol Street: The Calamitous Carnival (formerly Senators Prison)

Post by BouncyTEM »

NecroMage wrote:Me wants very very much... :shock:
FTW.

GIVE THE PRECIOUS TO USSSSS!!!!![/gollum mode]
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”