Prototype/Character: Difference between revisions
m (→Mandatory properties: description for inventory size) |
(Some people in Discord have found this unclear) |
||
Line 56: | Line 56: | ||
== Optional properties == | == Optional properties == | ||
{{Prototype property|crafting_categories|[[Types/table|table]] of [[Types/string|string]]|optional=true}} | {{Prototype property|crafting_categories|[[Types/table|table]] of [[Types/string|string]]|empty table|optional=true}} | ||
Names of the crafting categories the character can craft recipes from. The built-in categories can be found [[Data.raw#recipe-category|here]]. See also [[Prototype/RecipeCategory]]. | Names of the crafting categories the character can craft recipes from. The built-in categories can be found [[Data.raw#recipe-category|here]]. See also [[Prototype/RecipeCategory]]. | ||
{{Prototype property|mining_categories |[[Types/table|table]] of [[Types/string|string]]|optional=true}} | {{Prototype property|mining_categories |[[Types/table|table]] of [[Types/string|string]]|empty table|optional=true}} | ||
Names of the resource categories the character can mine resources from. | Names of the resource categories the character can mine resources from. | ||
Revision as of 11:06, 22 December 2022
Template:Prototype parent Entity that you move around on the screen during the campaign and freeplay.
Mandatory properties
Inherits all properties from Prototype/EntityWithOwner.
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 Number of slots in the main inventory. May be 0.
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 Whether this character is moved by belts when standing on them.
Template:Prototype property Name of the character corpse that is spawned when this character dies.
Template:Prototype property Triggered every tick of the running animation.
Template:Prototype property
Triggered when the running animation (#animations) rolls over the frames defined in right_footprint_frames
and left_footprint_frames
.
Template:Prototype property
Array of footprint particles. Triggered when the running animation (#animations) rolls over the frames defined in right_footprint_frames
and left_footprint_frames
.
Template:Prototype property
Offset from the center of the entity for the left footprint. Used by footprint_particles
.
Template:Prototype property
Offset from the center of the entity for the right footprint. Used by footprint_particles
.
Template:Prototype property An array of float. The frames in the running animation (#animations) where the right foot touches the ground.
Template:Prototype property An array of float. The frames in the running animation (#animations) where the left foot touches the ground.