Editing EDF player reference

From Eternity Wiki
Jump to navigationJump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 6: Line 6:
     altattackstate ''name''
     altattackstate ''name''
     initialhealth ''number''  // default: 100
     initialhealth ''number''  // default: 100
    maxhealth ''number''
    superhealth ''number''
    viewheight ''floating_point_number''
   
   
     speedwalk ''number''      // default: 25
     speedwalk ''number''      // default: 25
Line 19: Line 16:
     speedlookslow ''number''  // default: 450
     speedlookslow ''number''  // default: 450
     speedlookfast ''number''  // default: 512
     speedlookfast ''number''  // default: 512
    speedjump ''floating_point_number''  // default: 8.0
   
   
     default ''boolean''      // default: false
     default ''boolean''      // default: false
    clearrebornitems
   
   
     rebornitem ''name'', ''amount''
     rebornitem ''name'', ''amount''
    ...
    +AlwaysJump
   
   
     weaponslot 1 { clear }
     weaponslot 1 { clear }
     weaponslot 2 { weapons: Chainsaw, Fist }
     weaponslot 2 { weapons: Chainsaw, Fist }
    ...
  }
  }


By default, under the base folder, in the root player.edf, there are two classes defined: DoomMarine (only if game is Doom) and Corvus (only if game is Heretic). Any of these classes may be redefined in mods. So if you want to change the player speed and initial health, you can do so in mods by redefining game's default class.
By default, under the base folder, in the root player.edf, there are two classes defined: DoomMarine (only if game is Doom) and Corvus (only if game is Heretic). Any of these classes may be redefined in mods, there's no need for a delta structure. So if you want to change the player speed and initial health, you can do so in mods by redefining game's default class.


You can also define a new player class and make it the default by setting '''default true'''.
You can also define a new player class and make it the default by setting '''default true''' .
 
===Explanation of fields===
*'''defaultskin'''
:Required. The default skin (sprite and sounds) associated with the player class. It works as a reskin on the '''thingtype''' specification. See the '''skin''' definition.
*'''thingtype'''
:Required. The avatar [[thingtype]] associated with the player class. It's usually the "player" thing of the game, with states supporting movement, attacks, pain and death.
*'''altattackstate'''
:Default: '''thingtype''''s '''missilestate'''. This is the state to go into when the weapon is in the flashing state, which is usually separate from '''thingtype''''s '''missilestate'''. By default it will use that state. Doom works based on this principle of a separate firing state to that of the missile state.
*'''initialhealth'''
:Default: 100. This is the health the player starts in this class. It doesn't need to be the same as the max health.
*'''maxhealth'''
:Default: 100. This is the maximum health to which this player can be healed by items with the '''@maxhealth''' placeholder and by actions such as [[HealThing]] and the powered Heretic gauntlets.
*'''superhealth'''
:Default: '''maxhealth'''. This is the bonus maximum health to which this player can be healed by items with the '''@superhealth''' placeholder and by [[HealThing]] when set to go past the normal maximum health. By default it's the same as '''maxhealth''' but it's common to want a higher value for it.
*'''viewheight'''
:Default: 41.0. This is the "camera" height relative to ground when playing as this class.
*'''speedwalk'''
:Default: 25. This is the walking forward/backward speed, when using the simple keyboard actions.
*'''speedrun'''
:Default: 50. This is the running forward/backward speed, when using the keyboard actions with the "run" modifier pressed. It also works as a mouse movement limiter.
*'''speedstrafe'''
:Default: 24. This is the walking sideways speed, when using the keyboard actions with the "strafe" modifier pressed.
*'''speedstraferun'''
:Default: 40. This is the running sideways speed, when using the keyboard actions with the "strafe" and "run" modifiers pressed.
*'''speedturn'''
:Default: 640. This is the normal turning speed with the keyboard.
*'''speedturnfast'''
:Default: 1280. This is the running turning speed with the keyboard.
*'''speedturnslow'''
:Default: 320. This is the turning speed during the first few tics of pressing the keyboard.
*'''speedlookslow'''
:Default: 450. This is the looking speed with the keyboard when not running.
*'''speedlook'''
:Default: 512. This is the looking speed with the keyboard when looking.
*'''speedjump'''
:Default: 8.0. This is the jumping speed. If you want the class to always be able to jump regardless of compatibility settings, make sure to also set '''+AlwaysJump'''.
*'''default'''
:Default: '''false'''. If '''true''', causes this class to be the default you start in the new game.
*'''clearrebornitems'''
:Default: omitted. If present, this marker causes the class to remove any startup items from previous definitions. This is only useful in '''playerdelta''' sections.
*'''rebornitem'''
:This is a list of 0 or more items to start with in a fresh game. Each item is an [[EDF item effects and inventory|artifact]] followed optionally by a comma and a list of how many such items to give (if applicable).
*'''+AlwaysJump'''
:Default: omitted. If present, this flag allows the player to jump all the time. Use this for any class where jumping is expected. Currently the Doom marine and Heretic hero don't have it, even though they have '''jumpspeed'''. For them, you need to enable jumping in the compatibility settings. Future games like Hexen and Strife will have their base classes with '''+AlwaysJump'''. When using '''playerdelta''', you can remove this flag by putting '''-AlwaysJump'''.
*'''weaponslot'''
:This is a list of 1 or more weapon slots associated with each selection key. A weapon may appear on more than one slot. A slot can have multiple weapons, with the most superior first in the list. When using '''playerdelta''', instead of '''weapons:''' ''list'' you can put '''clear''' to remove that slot.
 
===Player class delta structure===
You can use the '''playerdelta''' section to change an already defined player class. The syntax is as follows:
playerdelta
{
    name ''playerclass_name''
    ''any_fields_from_playerclass''
}
''any_fields_from_playerclass'' means that you can list any of the settings from the base class here, with modified values, using the same syntax as in '''playerclass'''. See '''playerclass''' for explanations of the fields.


== Player skin ==
== Player skin ==
Please note that all contributions to Eternity Wiki are considered to be released under the GNU Free Documentation License 1.2 (see Eternity Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)