[Added] Custom player/hexen classes in decorate

Moderator: Developers

Custom player/hexen classes in decorate

Postby Necromage » Tue Jan 03, 2006 6:42 pm

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 allExpand view
//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
Necromage
Your neighborely friendly hobo
 
Joined: 10 Feb 2005
Location: NJ

Postby Nash » Wed Jan 04, 2006 9:29 pm

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
Nash
http://twitter.com/ISurvivorGame
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia

Postby BlazingPhoenix » Wed Jan 04, 2006 10:09 pm

I'd rather wait for the offical decorate classes to be released though.....maybe Graf can add it to GZDoom?
User avatar
BlazingPhoenix
Woof
 
Joined: 20 May 2005
Location: Inside a nova

Postby Grubber » Thu Jan 05, 2006 2:46 am

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 allExpand view
    //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 allExpand view
    //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 allExpand view
    //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 allExpand view
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
Grubber
I can wire anything directly into anything. I am the professor!
 
Joined: 15 Oct 2003
Location: Czech Republic

Postby Graf Zahl » Thu Jan 05, 2006 4:18 am

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 allExpand view
   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
Graf Zahl
 
Joined: 19 Jul 2003
Location: Germany

Postby Grubber » Thu Jan 05, 2006 1:06 pm

What I don't like on Hexen armor is the restriction on 4 armor pieces.
User avatar
Grubber
I can wire anything directly into anything. I am the professor!
 
Joined: 15 Oct 2003
Location: Czech Republic

Postby Graf Zahl » Thu Jan 05, 2006 1:26 pm

What I don't like is that after knowing the code inside out I still don't know how it works! :mrgreen:
User avatar
Graf Zahl
 
Joined: 19 Jul 2003
Location: Germany

Postby Necromage » Thu Jan 05, 2006 3:26 pm

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
Necromage
Your neighborely friendly hobo
 
Joined: 10 Feb 2005
Location: NJ

Postby The Ultimate DooMer » Tue Jan 10, 2006 2:42 am

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
The Ultimate DooMer
Serpent: Resurrection - available now.
 
Joined: 15 Jul 2003
Location: UK

Postby Marty Kirra » Wed Jan 11, 2006 8:26 pm

He's alive!
User avatar
Marty Kirra
Rating: Awesome
 
Joined: 23 Oct 2004
Location: They can give us oxygen, but they can't give us FREEDOM!

Postby Grubber » Sat Feb 11, 2006 10:50 am

Image

Image
User avatar
Grubber
I can wire anything directly into anything. I am the professor!
 
Joined: 15 Oct 2003
Location: Czech Republic

Postby Caligari_87 » Sat Feb 11, 2006 11:04 am

:shock:
User avatar
Caligari_87
Lets see how this goes...
 
Joined: 26 Feb 2004
Location: Salt Lake City, Utah, USA

Postby Graf Zahl » Sat Feb 11, 2006 11:13 am

But what is it worth without a source port which supports it...
User avatar
Graf Zahl
 
Joined: 19 Jul 2003
Location: Germany

Postby Necromage » Sat Feb 11, 2006 12:06 pm

Me wants very very much... :shock:
User avatar
Necromage
Your neighborely friendly hobo
 
Joined: 10 Feb 2005
Location: NJ

Postby Bouncy » Sat Feb 11, 2006 2:12 pm

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

FTW.

GIVE THE PRECIOUS TO USSSSS!!!!![/gollum mode]
User avatar
Bouncy
All Caps Guy, Maker of Sir Belfin Dramatic Reading Series.
 
Joined: 24 Aug 2003
Location: 2280 Lol Street: The Calamitous Carnival (formerly Senators Prison)

Next

Return to Closed Feature Suggestions

Who is online

Users browsing this forum: Tristan885 and 0 guests