Prototype/Character: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(Converted to SMW format)
(Removed old prototype docs)
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Prototype parent|Prototype/EntityWithHealth}}
<div class="stub"><p>'''The prototype docs have moved to a new website with an improved format.''' This documentation page can now be found here: [https://lua-api.factorio.com/latest/prototypes/CharacterPrototype.html https://lua-api.factorio.com/latest/prototypes/CharacterPrototype.html]
Entity that you move around on the screen during the campaign and freeplay.  


{{Prototype TOC|character}}
</p><p>This wiki page is no longer updated and '''will be removed at some point in the future''', so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback [https://forums.factorio.com/viewforum.php?f=233 on the forums].</p></div>
 
== Mandatory properties ==
Inherits all properties from [[Prototype/EntityWithHealth]].
 
{{Prototype property|mining_speed|[[Types/double|double]]}}
 
{{Prototype property|running_speed|[[Types/double|double]]}}
 
{{Prototype property|distance_per_frame|[[Types/double|double]]}}
 
{{Prototype property|maximum_corner_sliding_distance|[[Types/double|double]]}}
 
{{Prototype property|heartbeat|[[Types/Sound|Sound]]}}
The sound file played when the character's health is low.
 
{{Prototype property|eat|[[Types/Sound|Sound]]}}
The sound file played when the character eats (fish for example).
 
{{Prototype property|inventory_size|[[Types/ItemStackIndex|ItemStackIndex]]}}
 
{{Prototype property|build_distance|[[Types/uint32|uint32]]}}
 
{{Prototype property|drop_item_distance|[[Types/uint32|uint32]]}}
 
{{Prototype property|reach_distance|[[Types/uint32|uint32]]}}
 
{{Prototype property|reach_resource_distance|[[Types/double|double]]}}
 
{{Prototype property|item_pickup_distance|[[Types/double|double]]}}
 
{{Prototype property|loot_pickup_distance|[[Types/double|double]]}}
 
{{Prototype property|ticks_to_keep_gun|[[Types/uint32|uint32]]}}
 
{{Prototype property|ticks_to_keep_aiming_direction|[[Types/uint32|uint32]]}}
 
{{Prototype property|ticks_to_stay_in_combat|[[Types/uint32|uint32]]}}
 
{{Prototype property|damage_hit_tint|[[Types/Color|Color]]}}
 
{{Prototype property|running_sound_animation_positions|[[Types/table|table]] of [[Types/float|float]]}}
List of positions in the running animation when the walking sound is played.
    running_sound_animation_positions = {14, 29}
 
{{Prototype property|mining_with_tool_particles_animation_positions|[[Types/table|table]] of [[Types/float|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}
 
{{Prototype property|animations|[[Types/table|table]] of [[Types/CharacterArmorAnimation|CharacterArmorAnimation]]}}
 
== Optional properties ==
 
{{Prototype property|crafting_categories|[[Types/table|table]] of [[Types/string|string]]|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]].
 
{{Prototype property|mining_categories |[[Types/table|table]] of [[Types/string|string]]|optional=true}}
Names of the resource categories the character can mine resources from.
 
{{Prototype property|light|[[Types/LightDefinition|LightDefinition]]|optional=true}}
 
{{Prototype property|enter_vehicle_distance|[[Types/double|double]]|3.0|optional=true}}
Must be >= 0.
 
{{Prototype property|tool_attack_distance|[[Types/double|double]]|1.5|optional=true}}
 
{{Prototype property|respawn_time|[[Types/uint32|uint32]]|10|optional=true}}
Time in seconds. Must be positive
 
{{Prototype property|character_corpse|[[Types/string|string]]|optional=true}}
Name of the character corpse that is spawned whend this character dies.
 
{{Prototype property|footstep_particle_triggers|[[Types/table|table]] of [[Types/CreateParticleTriggerEffectItem|CreateParticleTriggerEffectItem]]|optional=true}}
Array of [[Types/CreateParticleTriggerEffectItem|CreateParticleTriggerEffectItem]]. Each [[Types/CreateParticleTriggerEffectItem|CreateParticleTriggerEffectItem]] needs the extra mandatory property <code>tiles</code>, which is a [[Types/table|table]] (array) of [[Types/string|string]] which is the name of a tile.
 
{{Prototype property|tool_attack_result|[[Types/Trigger|Trigger]]|optional=true}}

Latest revision as of 14:32, 25 October 2024

The prototype docs have moved to a new website with an improved format. This documentation page can now be found here: https://lua-api.factorio.com/latest/prototypes/CharacterPrototype.html

This wiki page is no longer updated and will be removed at some point in the future, so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback on the forums.