Prototype/AssemblingMachine: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(Created page.)
 
(Updated styling of prototype doc migration note)
 
(13 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== Basics ==
<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/AssemblingMachinePrototype.html https://lua-api.factorio.com/latest/prototypes/AssemblingMachinePrototype.html]
An assembling machine - like the assembling machines 1/2/3 in the game, but you can use your own recipe categories. Based on [[Prototype/EntityWithHealth]].


== Properties ==
</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>
This prototype inherits all the properties from [[Prototype/EntityWithHealth]].


=== animation ===
Type: [[Types/Animation]]


The animation played when crafting. When the assembling machine is idle, the animation will be paused.


=== crafting_categories ===
{{Prototype parent|Prototype/CraftingMachine}}
Type: [[Types/table]]
An assembling machine - like the assembling machines 1/2/3 in the game, but you can use your own recipe categories.


A list of [[Prototype/RecipeCategory|recipe categories]] this assembling machine can use.
{{Prototype TOC|assembling-machine}}


Example:
== Extensions ==
<pre>
* [[Prototype/RocketSilo]] '''rocket-silo'''
crafting_categories = {"crafting", "smelting"}
</pre>


=== crafting_speed ===
== Optional properties ==
Type: [[Types/double]]
This prototype inherits all the properties from [[Prototype/CraftingMachine]].


How fast this assembling machine can craft, compared to the player.
{{Prototype property|fixed_recipe|[[Types/string|string]]|""|optional=true}}
The preset recipe of this machine. This machine does not show a recipe selection if this is set. The base game uses this for the [[rocket silo]].


If this is 0.75, for example, the assembling machine will craft at 75% of the speed of the player.
{{Prototype property|gui_title_key|[[Types/string|string]]|""|optional=true}}
The locale key of the title of the GUI that is shown when the player opens the assembling machine. May not be longer than 200 characters.  


=== energy_source ===
{{Prototype property|ingredient_count|[[Types/uint8|uint8]]|255|optional=true}}
Type: [[Types/EnergySource]]
Sets the maximum number of ingredients this machine can craft with. Any recipe with more ingredients than this will be unavailable in this machine.


Defines how the assembling machine is powered.
This only counts item ingredients, not fluid ingredients! This means if ingredient count is 2, and the recipe has 2 item ingredients and 1 fluid ingredient, it can still be crafted in the machine.
 
=== energy_usage ===
Type: [[Types/EnergyPower]]
 
Sets how much energy this machine uses while crafting.
 
=== ingredient_count ===
Type: [[Types/unsigned]]
 
Sets the maximum number of ingredients this machine can craft with.
 
Any recipe with more ingredients than this will be unavailable in this machine.
 
=== module_slots ===
Type: [[Types/unsigned]]
 
The number of module slots in this machine.
 
=== allowed_effects ===
Type: [[Types/AllowedEffects]]
 
Sets the module effects that are allowed to be used on this machine.

Latest revision as of 10:42, 21 September 2023

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/AssemblingMachinePrototype.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.


Prototype definitions » PrototypeBase » Prototype/Entity » Prototype/EntityWithHealth » Prototype/EntityWithOwner » Prototype/CraftingMachine » Prototype/AssemblingMachine


An assembling machine - like the assembling machines 1/2/3 in the game, but you can use your own recipe categories.


Prototype/AssemblingMachine — assembling-machine
fixed_recipe::string (optional)
gui_title_key::string (optional)
ingredient_count::uint8 (optional)
Inherited from Prototype/CraftingMachine
crafting_categories::table of strings
crafting_speed::double
energy_source::EnergySource
energy_usage::Energy
allowed_effects::EffectTypeLimitation (optional)
always_draw_idle_animation::bool (optional)
animation::Animation4Way (optional)
base_productivity::float (optional)
default_recipe_tint::table of Color (optional)
draw_entity_info_icon_background::bool (optional)
entity_info_icon_shift::vector (optional)
fluid_boxes::table of FluidBox (optional)
idle_animation::Animation4Way (optional)
match_animation_speed_to_activity::bool (optional)
module_specification::ModuleSpecification (optional)
return_ingredients_on_change::bool (optional)
scale_entity_info_icon::bool (optional)
shift_animation_transition_duration::uint16 (optional)
shift_animation_waypoint_stop_duration::uint16 (optional)
shift_animation_waypoints::table of table (array) of vector (optional)
show_recipe_icon::bool (optional)
show_recipe_icon_on_map::bool (optional)
status_colors::table of Color (optional)
working_visualisations::table of WorkingVisualisation (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)

Extensions

Optional properties

This prototype inherits all the properties from Prototype/CraftingMachine.

fixed_recipe

Type: string
Default: ""
The preset recipe of this machine. This machine does not show a recipe selection if this is set. The base game uses this for the rocket silo.

gui_title_key

Type: string
Default: ""
The locale key of the title of the GUI that is shown when the player opens the assembling machine. May not be longer than 200 characters.

ingredient_count

Type: uint8
Default: 255
Sets the maximum number of ingredients this machine can craft with. Any recipe with more ingredients than this will be unavailable in this machine.

This only counts item ingredients, not fluid ingredients! This means if ingredient count is 2, and the recipe has 2 item ingredients and 1 fluid ingredient, it can still be crafted in the machine.