Prototype/Car: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(0.16)
(1.1.74: immune_to_cliff_impacts added)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Basics ==
{{Prototype parent|Prototype/Vehicle}}
Entity with specialized properties for acceleration, braking, and turning. Extends [[Prototype/Vehicle]].
Entity with specialized properties for acceleration, braking, and turning.
 
{{Prototype TOC|car}}


== Usage in base ==
== Usage in base ==
Line 9: Line 11:
This prototype inherits all the properties from [[Prototype/Vehicle]].
This prototype inherits all the properties from [[Prototype/Vehicle]].


=== animation ===
{{Prototype property|animation|[[Types/RotatedAnimation|RotatedAnimation]]}}
'''Type''': [[Types/RotatedAnimation]]
 
Animation speed 1 means 1 frame per tile.
Animation speed 1 means 1 frame per tile.


=== effectivity ===
{{Prototype property|effectivity|[[Types/double|double]]}}
'''Type''': [[Types/double]]
 
Modifies the efficiency of energy transfer from burner output to wheels.
Modifies the efficiency of energy transfer from burner output to wheels.


=== consumption ===
{{Prototype property|consumption|[[Types/Energy|Energy]]}}
'''Type''': [[Types/Energy]]


=== rotation_speed ===
{{Prototype property|rotation_speed|[[Types/double|double]]}}
'''Type''': [[Types/double]]


=== burner ===
{{Prototype property|burner or energy_source|[[Types/EnergySource|EnergySource]]}}
'''Type''': [[Types/EnergySource]]
Must be a burner energy source when using "burner", otherwise it can also be a void energy source.
 
Must be a burner energy source.
 
=== inventory_size ===
'''Type''': [[Types/ItemStackIndex]]


{{Prototype property|inventory_size|[[Types/ItemStackIndex|ItemStackIndex]]}}
Size of the car inventory.
Size of the car inventory.


== Optional properties ==
== Optional properties ==


=== turret_animation ===
{{Prototype property|turret_animation|[[Types/RotatedAnimation|RotatedAnimation]]|optional=true}}
'''Type''': [[Types/RotatedAnimation]]
 
Animation speed 1 means 1 frame per tile.
Animation speed 1 means 1 frame per tile.


=== render_layer ===
{{Prototype property|light_animation|[[Types/RotatedAnimation|RotatedAnimation]]|optional=true}}
'''Type''': [[Types/RenderLayer]]
Must have the same frame count as <code>animation</code>.
 
'''Default''': "object"
 
=== tank_driving ===
'''Type''': [[Types/bool]]


'''Default''': false
{{Prototype property|render_layer|[[Types/RenderLayer|RenderLayer]]|"object"|optional=true}}


{{Prototype property|tank_driving|[[Types/bool|bool]]|false|optional=true}}
If this car prototype uses tank controls to drive.
If this car prototype uses tank controls to drive.


=== has_belt_immunity ===
{{Prototype property|has_belt_immunity|[[Types/bool|bool]]|false|optional=true}}
'''Type''': [[Types/bool]]
 
'''Default''': false
 
If this car is immune to movement by belts.
If this car is immune to movement by belts.


=== immune_to_tree_impacts ===
{{Prototype property|immune_to_tree_impacts|[[Types/bool|bool]]|false|optional=true}}
'''Type''': [[Types/bool]]
If this car gets damaged by driving over/against [[Prototype/Tree]]s.


'''Default''': false
{{Prototype property|immune_to_rock_impacts|[[Types/bool|bool]]|false|optional=true}}
If this car gets damaged by driving over/against [[Prototype/SimpleEntity#count_as_rock_for_filtered_deconstruction|rocks]].


If this car gets damaged by drving over/against trees.
{{Prototype property|immune_to_cliff_impacts|[[Types/bool|bool]]|true|optional=true}}
If this car gets damaged by driving against [[Prototype/Cliff]]s.


=== turret_rotation_speed ===
{{Prototype property|turret_rotation_speed|[[Types/double|double]]|0.01|optional=true}}
'''Type''': [[Types/double]]


'''Default''': 0.01
{{Prototype property|turret_return_timeout|[[Types/uint32|uint32]]|60|optional=true}}
Timeout in ticks specifying how long the turret must be inactive to return to the default position.


=== turret_return_timeout ===
{{Prototype property|light|[[Types/LightDefinition|LightDefinition]]|optional=true}}
'''Type''': [[Types/uint32]]
 
'''Default''': 60
 
Timeout in ticks specifying how long the turret must be inactive to return to the default position.


=== light ===
{{Prototype property|sound_no_fuel|[[Types/Sound|Sound]]|optional=true}}
'''Type''': [[Types/LightDefinition]]


=== sound_no_fuel ===
{{Prototype property|darkness_to_render_light_animation|[[Types/float|float]]|0.3|optional=true}}
'''Type''': [[Types/Sound]]


=== guns ===
{{Prototype property|track_particle_triggers|[[Types/FootstepTriggerEffectList|FootstepTriggerEffectList]]|optional=true}}
'''Type''': [[Types/table]] of [[Types/string]]s of prototype names


The guns this car prototype uses.
{{Prototype property|guns|[[Types/table|table]] of [[Types/string|string]]|optional=true}}
The names of the [[Prototype/Gun]]s this car prototype uses.

Latest revision as of 17:55, 16 December 2022

Prototype definitions » PrototypeBase » Prototype/Entity » Prototype/EntityWithHealth » Prototype/EntityWithOwner » Prototype/Vehicle » Prototype/Car


Entity with specialized properties for acceleration, braking, and turning.


Prototype/Car — car
animation::RotatedAnimation
burner or energy_source::EnergySource
consumption::Energy
effectivity::double
inventory_size::ItemStackIndex
rotation_speed::double
darkness_to_render_light_animation::float (optional)
guns::table of string (optional)
has_belt_immunity::bool (optional)
immune_to_cliff_impacts::bool (optional)
immune_to_rock_impacts::bool (optional)
immune_to_tree_impacts::bool (optional)
light::LightDefinition (optional)
light_animation::RotatedAnimation (optional)
render_layer::RenderLayer (optional)
sound_no_fuel::Sound (optional)
tank_driving::bool (optional)
track_particle_triggers::FootstepTriggerEffectList (optional)
turret_animation::RotatedAnimation (optional)
turret_return_timeout::uint32 (optional)
turret_rotation_speed::double (optional)
Inherited from Prototype/Vehicle
braking_power or braking_force::Energy or double
energy_per_hit_point::double
friction or friction_force::double
weight::double
allow_passengers::bool (optional)
crash_trigger::TriggerEffect (optional)
equipment_grid::string (optional)
minimap_representation::Sprite (optional)
selected_minimap_representation::Sprite (optional)
sound_minimum_speed::double (optional)
sound_scaling_ratio::double (optional)
stop_trigger::TriggerEffect (optional)
stop_trigger_speed::double (optional)
terrain_friction_modifier::float (optional)
Inherited from Prototype/EntityWithOwner
allow_run_time_change_of_is_military_target::bool (optional)
is_military_target::bool (optional)
Inherited from Prototype/EntityWithHealth
alert_when_damaged::bool (optional)
attack_reaction::AttackReaction (optional)
corpse::string or table of strings (optional)
create_ghost_on_death::bool (optional)
damaged_trigger_effect::TriggerEffect (optional)
dying_explosion::ExplosionDefinition or table of ExplosionDefinition (optional)
dying_trigger_effect::TriggerEffect (optional)
healing_per_tick::float (optional)
hide_resistances::bool (optional)
integration_patch::Sprite4Way (optional)
integration_patch_render_layer::RenderLayer (optional)
loot::Loot (optional)
max_health::float (optional)
random_corpse_variation::bool (optional)
repair_sound::Sound (optional)
repair_speed_modifier::float (optional)
resistances::Resistances (optional)
Inherited from Prototype/Entity
icons, icon, icon_size (IconSpecification)::IconSpecification
additional_pastable_entities::table of string (optional)
alert_icon_scale::float (optional)
alert_icon_shift::vector (optional)
allow_copy_paste::bool (optional)
autoplace::AutoplaceSpecification (optional)
build_base_evolution_requirement::double (optional)
build_grid_size::uint8 (optional)
build_sound::Sound (optional)
close_sound::Sound (optional)
collision_box::BoundingBox (optional)
collision_mask::CollisionMask (optional)
created_effect::Trigger (optional)
created_smoke::CreateTrivialSmokeEffectItem (optional)
drawing_box::BoundingBox (optional)
emissions_per_second::double (optional)
enemy_map_color::Color (optional)
fast_replaceable_group::string (optional)
flags::EntityPrototypeFlags (optional)
friendly_map_color::Color (optional)
hit_visualization_box::BoundingBox (optional)
map_color::Color (optional)
map_generator_bounding_box::BoundingBox (optional)
minable::MinableProperties (optional)
mined_sound::Sound (optional)
mining_sound::Sound (optional)
next_upgrade::string (optional)
open_sound::Sound (optional)
placeable_by::ItemToPlace or table of ItemToPlace (optional)
protected_from_tile_building::bool (optional)
radius_visualisation_specification::RadiusVisualisationSpecification (optional)
remains_when_mined::string or table of string (optional)
remove_decoratives::string (optional)
rotated_sound::Sound (optional)
selectable_in_game::bool (optional)
selection_box::BoundingBox (optional)
selection_priority::uint8 (optional)
shooting_cursor_size::double (optional)
sticker_box::BoundingBox (optional)
subgroup::string (optional)
tile_height::uint32 (optional)
tile_width::uint32 (optional)
trigger_target_mask::TriggerTargetMask (optional)
vehicle_impact_sound::Sound (optional)
water_reflection::WaterReflectionDefinition (optional)
working_sound::WorkingSound (optional)
Inherited from PrototypeBase
name::string
type::string
localised_description::LocalisedString (optional)
localised_name::LocalisedString (optional)
order::Order (optional)

Usage in base

Mandatory properties

This prototype inherits all the properties from Prototype/Vehicle.

animation

Type: RotatedAnimation
Animation speed 1 means 1 frame per tile.

effectivity

Type: double
Modifies the efficiency of energy transfer from burner output to wheels.

consumption

Type: Energy

rotation_speed

Type: double

burner or energy_source

Type: EnergySource
Must be a burner energy source when using "burner", otherwise it can also be a void energy source.

inventory_size

Type: ItemStackIndex
Size of the car inventory.

Optional properties

turret_animation

Type: RotatedAnimation
Animation speed 1 means 1 frame per tile.

light_animation

Type: RotatedAnimation
Must have the same frame count as animation.

render_layer

Type: RenderLayer
Default: "object"

tank_driving

Type: bool
Default: false
If this car prototype uses tank controls to drive.

has_belt_immunity

Type: bool
Default: false
If this car is immune to movement by belts.

immune_to_tree_impacts

Type: bool
Default: false
If this car gets damaged by driving over/against Prototype/Trees.

immune_to_rock_impacts

Type: bool
Default: false
If this car gets damaged by driving over/against rocks.

immune_to_cliff_impacts

Type: bool
Default: true
If this car gets damaged by driving against Prototype/Cliffs.

turret_rotation_speed

Type: double
Default: 0.01

turret_return_timeout

Type: uint32
Default: 60
Timeout in ticks specifying how long the turret must be inactive to return to the default position.

light

Type: LightDefinition

sound_no_fuel

Type: Sound

darkness_to_render_light_animation

Type: float
Default: 0.3

track_particle_triggers

Type: FootstepTriggerEffectList

guns

Type: table of string
The names of the Prototype/Guns this car prototype uses.