Prototype/Character: Difference between revisions
(documented collision_mask default) |
(0.16) |
||
Line 1: | Line 1: | ||
==Basics== | ==Basics== | ||
Entity that you move around on the screen during the campaign and freeplay. Extends | Entity that you move around on the screen during the campaign and freeplay. Extends [[Prototype/EntityWithHealth]]. | ||
== | == Mandatory properties == | ||
Inherits all properties from [[Prototype/EntityWithHealth]]. | |||
=== | === mining_speed === | ||
'''Type''': [[Types/ | '''Type''': [[Types/double]] | ||
=== | === running_speed === | ||
'''Type''': [[Types/ | '''Type''': [[Types/double]] | ||
=== | === distance_per_frame === | ||
'''Type''': [[Types/ | '''Type''': [[Types/double]] | ||
=== | === maximum_corner_sliding_distance === | ||
'''Type''': [[Types/ | '''Type''': [[Types/double]] | ||
=== | === heartbeat === | ||
'''Type''': | '''Type''': [[Types/Sound]] | ||
The sound file played when the character's health is low. | |||
=== eat === | |||
'''Type''': [[Types/Sound]] | |||
The sound file played when the character eats (fish for example). | |||
=== | === inventory_size === | ||
'''Type''': | '''Type''': [[Types/ItemStackIndex]] | ||
=== build_distance === | |||
'''Type''': [[Types/uint32]] | |||
=== | === drop_item_distance === | ||
'''Type''': [[Types/ | '''Type''': [[Types/uint32]] | ||
=== | === reach_distance === | ||
'''Type''': | '''Type''': [[Types/uint32]] | ||
=== reach_resource_distance === | |||
'''Type''': [[Types/double]] | |||
=== | === item_pickup_distance === | ||
'''Type''': [[Types/ | '''Type''': [[Types/double]] | ||
=== | === loot_pickup_distance === | ||
'''Type''': [[Types/double]] | '''Type''': [[Types/double]] | ||
=== | === ticks_to_keep_gun === | ||
'''Type''': [[Types/ | '''Type''': [[Types/uint32]] | ||
=== ticks_to_keep_aiming_direction === | |||
'''Type''': [[Types/uint32]] | |||
=== | === ticks_to_stay_in_combat === | ||
'''Type''': [[Types/ | '''Type''': [[Types/uint32]] | ||
=== | === damage_hit_tint === | ||
'''Type''': [[Types/ | '''Type''': [[Types/Color]] | ||
=== | === running_sound_animation_positions === | ||
'''Type''': [[Types/ | '''Type''': [[Types/table]] of [[Types/float]] | ||
List of positions in the running animation when the walking sound is played. | |||
running_sound_animation_positions = {14, 29} | |||
=== | === mining_with_hands_particles_animation_positions === | ||
'''Type''': [[Types/ | '''Type''': [[Types/table]] of [[Types/float]] | ||
List of positions in the mining with hand animation when the mining sound and mining particles are created. | |||
mining_with_hands_particles_animation_positions = {29, 63} | |||
=== | === mining_with_tool_particles_animation_positions === | ||
'''Type''': [[Types/ | '''Type''': [[Types/table]] of [[Types/float]] | ||
= | List of positions in the mining with tool animation when the mining sound and mining particles are created. | ||
mining_with_tool_particles_animation_positions = {28} | |||
=== animations === | |||
'''Type''': [[Types/table]] of [[Types/CharacterArmorAnimation]] | |||
=== | == Optional properties == | ||
=== crafting_categories === | |||
'''Type''': [[Types/table]] of [[Types/string]] | |||
Names of the crafting categories the player can craft recipes from. | |||
=== mining_categories === | |||
'''Type''': [[Types/table]] of [[Types/string]] | |||
Names of the resource categories the player can mine resources from. | |||
=== light === | |||
'''Type''': [[Types/LightDefinition]] | |||
=== | === enter_vehicle_distance === | ||
'''Type''': [[Types/double]] | '''Type''': [[Types/double]] | ||
'''Default''': 3.0 | |||
Must be positive. | |||
=== respawn_time === | |||
'''Type''': [[Types/uint32]] | |||
'''Default''': 10 | |||
''' | |||
Time in seconds. Must be positive | |||
=== | === character_corpse === | ||
'''Type''': [[Types/ | '''Type''': [[Types/string]] | ||
Name of the character corpse that is spawned whend this character dies. | |||
== Differing defaults == | == Differing defaults == | ||
collision_mask defaults to <code>{ "player-layer", "train-layer", "consider-tile-transitions"}</code> and not the [[Prototype/Entity]] default. | collision_mask defaults to <code>{ "player-layer", "train-layer", "consider-tile-transitions"}</code> and not the [[Prototype/Entity]] default. | ||
Revision as of 12:31, 23 May 2018
Basics
Entity that you move around on the screen during the campaign and freeplay. Extends Prototype/EntityWithHealth.
Mandatory properties
Inherits all properties from Prototype/EntityWithHealth.
mining_speed
Type: Types/double
running_speed
Type: Types/double
distance_per_frame
Type: Types/double
maximum_corner_sliding_distance
Type: Types/double
heartbeat
Type: Types/Sound
The sound file played when the character's health is low.
eat
Type: Types/Sound
The sound file played when the character eats (fish for example).
inventory_size
Type: Types/ItemStackIndex
build_distance
Type: Types/uint32
drop_item_distance
Type: Types/uint32
reach_distance
Type: Types/uint32
reach_resource_distance
Type: Types/double
item_pickup_distance
Type: Types/double
loot_pickup_distance
Type: Types/double
ticks_to_keep_gun
Type: Types/uint32
ticks_to_keep_aiming_direction
Type: Types/uint32
ticks_to_stay_in_combat
Type: Types/uint32
damage_hit_tint
Type: Types/Color
running_sound_animation_positions
Type: Types/table of Types/float
List of positions in the running animation when the walking sound is played.
running_sound_animation_positions = {14, 29}
mining_with_hands_particles_animation_positions
Type: Types/table of Types/float
List of positions in the mining with hand animation when the mining sound and mining particles are created.
mining_with_hands_particles_animation_positions = {29, 63}
mining_with_tool_particles_animation_positions
Type: Types/table of Types/float
List of positions in the mining with tool animation when the mining sound and mining particles are created.
mining_with_tool_particles_animation_positions = {28}
animations
Type: Types/table of Types/CharacterArmorAnimation
Optional properties
crafting_categories
Type: Types/table of Types/string
Names of the crafting categories the player can craft recipes from.
mining_categories
Type: Types/table of Types/string
Names of the resource categories the player can mine resources from.
light
Type: Types/LightDefinition
enter_vehicle_distance
Type: Types/double
Default: 3.0
Must be positive.
respawn_time
Type: Types/uint32
Default: 10
Time in seconds. Must be positive
character_corpse
Type: Types/string
Name of the character corpse that is spawned whend this character dies.
Differing defaults
collision_mask defaults to { "player-layer", "train-layer", "consider-tile-transitions"}
and not the Prototype/Entity default.