Prototype/Character
Template:Prototype parent Entity that you move around on the screen during the campaign and freeplay.
Mandatory properties
Inherits all properties from Prototype/EntityWithHealth.
Template:Prototype property The sound file played when the character's health is low.
Template:Prototype property The sound file played when the character eats (fish for example).
Template:Prototype property List of positions in the running animation when the walking sound is played.
running_sound_animation_positions = {14, 29}
Template:Prototype property 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}
Optional properties
Template:Prototype property Names of the crafting categories the character can craft recipes from. The built-in categories can be found here. See also Prototype/RecipeCategory.
Template:Prototype property Names of the resource categories the character can mine resources from.
Template:Prototype property Must be >= 0.
Template:Prototype property Time in seconds. Must be positive
Template:Prototype property Name of the character corpse that is spawned whend this character dies.
Template:Prototype property
Array of CreateParticleTriggerEffectItem. Each CreateParticleTriggerEffectItem needs the extra mandatory property tiles
, which is a table (array) of string which is the name of a tile.
Alternatively, instead of specifying the CreateParticleTriggerEffectItem directly in the table with the tiles
property, a actions
property that is an array of CreateParticleTriggerEffectItem can be specified in the table with the tiles
property.
Examples:
footstep_particle_triggers =
{
{
tiles = { "water", "water-shallow" },
type = "create-particle",
particle_name = "water-particle",
....
},
{
tiles = { "grass-1", "grass-2" },
type = "create-particle",
particle_name = "grass-particle",
....
},
....
}
footstep_particle_triggers =
{
{
tiles = { "water", "water-shallow" },
actions =
{
{
type = "create-particle",
particle_name = "water-particle-1",
....
},
{
type = "create-particle",
particle_name = "water-particle-2",
....
},
....
}
},
{
tiles = { "grass-1", "grass-2" },
actions =
{
{
type = "create-particle",
particle_name = "grass-particle-1",
....
},
{
type = "create-particle",
particle_name = "grass-particle-2",
....
},
....
}
},
}