pub struct Character {Show 40 fields
pub name: &'static str,
pub build_distance: i64,
pub damage_hit_tint: Color,
pub distance_per_frame: f64,
pub drop_item_distance: i64,
pub inventory_size: i64,
pub item_pickup_distance: f64,
pub loot_pickup_distance: f64,
pub maximum_corner_sliding_distance: f64,
pub mining_speed: f64,
pub reach_distance: i64,
pub reach_resource_distance: f64,
pub running_speed: f64,
pub ticks_to_keep_aiming_direction: i64,
pub ticks_to_keep_gun: i64,
pub ticks_to_stay_in_combat: i64,
pub animations: LuaAny,
pub mining_with_tool_particles_animation_positions: LuaAny,
pub moving_sound_animation_positions: LuaAny,
pub running_sound_animation_positions: LuaAny,
pub hidden: Option<bool>,
pub order: Option<&'static str>,
pub subgroup: Option<&'static str>,
pub collision_box: Option<BoundingBox>,
pub flags: Option<&'static [&'static str]>,
pub icon: Option<&'static str>,
pub minable: Option<MinableProperties>,
pub selection_box: Option<BoundingBox>,
pub max_health: Option<f64>,
pub crafting_categories: Option<&'static [&'static str]>,
pub crafting_speed: Option<f64>,
pub factoriopedia_description: Option<&'static str>,
pub hidden_in_factoriopedia: Option<bool>,
pub localised_description: Option<&'static str>,
pub localised_name: Option<&'static str>,
pub parameter: Option<bool>,
pub factoriopedia_alternative: Option<&'static str>,
pub additional_pastable_entities: Option<&'static [&'static str]>,
pub alert_icon_scale: Option<f64>,
pub allow_copy_paste: Option<bool>,
}Expand description
Minimal CharacterPrototype for data.extend.
Entity that you move around on the screen during the campaign and freeplay.
type = "character" is injected by the Lua generator.
Fields§
§name: &'static strUnique textual identification of the prototype. May only contain alphanumeric characters, dashes and underscores. May not exceed a length of 200 characters.
For a list of all names used in vanilla, see data.raw.
build_distance: i64Prototype property build_distance.
damage_hit_tint: ColorPrototype property damage_hit_tint.
distance_per_frame: f64Prototype property distance_per_frame.
drop_item_distance: i64Prototype property drop_item_distance.
inventory_size: i64Number of slots in the main inventory. May be 0.
item_pickup_distance: f64Prototype property item_pickup_distance.
loot_pickup_distance: f64Prototype property loot_pickup_distance.
maximum_corner_sliding_distance: f64Prototype property maximum_corner_sliding_distance.
mining_speed: f64Prototype property mining_speed.
reach_distance: i64Prototype property reach_distance.
reach_resource_distance: f64Prototype property reach_resource_distance.
running_speed: f64Prototype property running_speed.
ticks_to_keep_aiming_direction: i64Prototype property ticks_to_keep_aiming_direction.
ticks_to_keep_gun: i64Prototype property ticks_to_keep_gun.
ticks_to_stay_in_combat: i64Prototype property ticks_to_stay_in_combat.
animations: LuaAnyPrototype property animations.
mining_with_tool_particles_animation_positions: LuaAnyList of positions in the mining with tool animation when the mining sound and mining particles are created.
moving_sound_animation_positions: LuaAnyList of positions in the running animation when the moving sound is played.
running_sound_animation_positions: LuaAnyList of positions in the running animation when the walking sound is played.
Prototype property hidden.
order: Option<&'static str>Used to order prototypes in inventory, recipes and GUIs. May not exceed a length of 200 characters.
subgroup: Option<&'static str>The name of an ItemSubGroup.
collision_box: Option<BoundingBox>Specification of the entity collision boundaries. Empty collision box means no collision and is used for smoke, projectiles, particles, explosions etc.
The {0,0} coordinate in the collision box will match the entity position. It should be near the center of the collision box, to keep correct entity drawing order. The bounding box must include the {0,0} coordinate.
Note, that for buildings, it is customary to leave 0.1 wide border between the edge of the tile and the edge of the building, this lets the player move between the building and electric poles/inserters etc.
flags: Option<&'static [&'static str]>Prototype property flags.
icon: Option<&'static str>Path to the icon file.
Either this or icons is mandatory for entities that have at least one of these flags active: "placeable-neutral", "placeable-player“, "placeable-enemy".
Only loaded if icons is not defined.
minable: Option<MinableProperties>The item given to the player when they mine the entity and other properties relevant to mining this entity.
selection_box: Option<BoundingBox>Specification of the entity selection area. When empty the entity will have no selection area (and thus is not selectable).
The selection box is usually a little bit bigger than the collision box. For tileable entities (like buildings) it should match the tile size of the building.
max_health: Option<f64>The unit health can never go over the maximum. Default health of units on creation is set to max. Must be greater than 0.
crafting_categories: Option<&'static [&'static str]>Names of the crafting categories the character can craft recipes from. The built-in categories can be found here. See also RecipeCategory.
crafting_speed: Option<f64>Prototype property crafting_speed.
factoriopedia_description: Option<&'static str>Provides additional description used in factoriopedia.
Prototype property hidden_in_factoriopedia.
localised_description: Option<&'static str>Overwrites the description set in the locale file. The description is usually shown in the tooltip of the prototype.
localised_name: Option<&'static str>Overwrites the name set in the locale file. Can be used to easily set a procedurally-generated name because the LocalisedString format allows to insert parameters into the name directly from the Lua script.
parameter: Option<bool>Whether the prototype is a special type which can be used to parametrize blueprints and doesn’t have other function.
factoriopedia_alternative: Option<&'static str>The ID type corresponding to the prototype that inherits from this.
For example, if this is an EntityPrototype, this property’s type is EntityID.
additional_pastable_entities: Option<&'static [&'static str]>Names of the entity prototypes this entity prototype can be pasted on to in addition to the standard supported types.
This is used to allow copying between types that aren’t compatible on the C++ code side, by allowing mods to receive the on_entity_settings_pasted event for the given entity and do the setting pasting via script.
alert_icon_scale: Option<f64>Prototype property alert_icon_scale.
allow_copy_paste: Option<bool>Prototype property allow_copy_paste.