2.0 Modding API changelog preview
Posted: Fri Oct 04, 2024 1:03 pm
This a preview of the Factorio 2.0 modding changelog. It is neither exhaustive nor the final version of the 2.0 modding API, but it should hopefully answer a lot of questions regarding upcoming mod breaking changes. Some API additions that are considered spoilers have been removed from this preview.
Please see the 2.0.7 changelog for the full modding API changelog: 116184
Modding:
Please see the 2.0.7 changelog for the full modding API changelog: 116184
Modding:
- Increased the limit of different tile types from 255 to 65535.
- Collision layers are now defined by prototypes. There is still limit of 55 layers but the layers themselves can have any name.
- Collision mask has a mandatory table "layers" which must specify layers as dictionary.
- Removed collision layers from "layer-13" to "layer-55".
- Changed prototypes from straight-rail to legacy-straight-rail and curved-rail to legacy-curved-rail
- New rail prototypes: straight-rail, curved-rail-a, curved-rail-b, half-diagonal-rail, rail-ramp, elevated-straight-rail, elevated-curved-rail-a, elevated-curved-rail-b, elevated-half-diagonal-rail.
- Added rail-support prototype.
- Changed way of defining rail prototype graphics: pictures are tied to direction of an entity they will be used by.
- Changed prototype data loading to enforce the correct types are used.
- Restricted prototype names to only contain alphanumeric characters, dashes and underscores.
- Added RailPrototype::ending_shifts to fine-tune render position of rail endings.
- Added RollingStockPrototype::transition_collision_mask and RollingStockPrototype::elevated_collision_mask.
- Changed rail planner prototype: it now takes list of rail entities it is allowed to place and optional support for use with elevated rails.
- Added EntityPrototypeFlag "building-direction-16-way".
- Reworked noise expression definition system.
- Added circuit connections to TurretPrototype and ArtilleryPrototype.
- Changed most entity graphics definitions to be optional.
- Changed various entity prototypes to only accept "energy_source" for the energy source, not "burner".
- Changed PumpPrototype::fluid_box into input_fluid_box and output_fluid_box.
- Changed TileEffectDefinition to allow for different effects.
- Changed "finish-the-game-achievement" achievement type to "complete-objective-achievement".
- Renamed until_second to within for various achievement prototypes.
- Moved subgroup property from individual prototypes to PrototypeBase.
- Removed "axially_symmetrical" property from RotatedSprite and RotatedAnimation definitions.
- Removed the entity flag fast-replaceable-no-cross-type-while-moving and fast-replaceable-no-build-while-moving.
- Removed support for emissions_per_second from worker robots.
- Renamed track_coverage_during_build_by_moving to track_coverage_during_drag_building and changed the default to true
- Added optional tile_condition to the place_as_tile, which allows to specify explicit list of tiles it can be built over.
- Added vector_to_place_result (drop target) support to crafting machines.
- Changed default value of TilePrototype::check_collision_with_entities to true.
- The fluid generated by offshore pump is property of the tile instead of the pump.
- Replaced ModulePrototype::limitation and ModulePrototype::limitation_blacklist with RecipePrototype::allow_[effect-name] properties (e.g. RecipePrototype::allow_productivity). By default, all effects except productivity are allowed.
- Replaced ModulePrototype::limitation_message_key with RecipePrototype::allow_[effect-name]_message properties (e.g. RecipePrototype::allow_productivity_message). If not set, the game uses "item-limitation.[effect-name]-effect".
- Added ElectricPolePrototype::auto_connect_up_to_n_wires.
- Added RecipePrototype::hide_from_signal_gui.
- Replaced min_perceived_performance, performance_to_sound_speedup, min_animation_progress and max_animation_progress with perceived_performance table containing minimum, maximum and performance_to_activity_rate.
- Entity selection priority is no longer deduced from collision masks. Use property 'selection_priority' for that purpose.
- Several prototype types have been given new 'selection_priority' default values, documented in '__base__/prototypes/entities/entity_util.lua'.
- The prototype names of logistic chests have been changed to match their English display name. 'logistic-chest-requester' became 'requester-chest', etc. This applies to entities, items and recipes.
Saves, exported blueprint/book/planner strings, and rich text tags in labels and destriptions will have their contents migrated automatically. - Added RocketSiloPrototype::rocket_quick_relaunch_start_offset, specifying the starting position for rockets created with the new quick-launch feature. 0 is the regular starting position, 1 is the end of the rising animation.
- Added optional RocketSiloPrototype::rocket_parts_storage_cap, denoting when a silo is considered "full" for crafting rocket parts. Has to be at least rocket_parts_required, and defaults to that value.
- Reworked how PipeConnectionDefinitions are specified. Added 'connection_type'. Added ability to specify 'linked' connection_type. Renamed 'type' into 'flow_direction'. Added direction. 'position' now has to be inside of the entity. Added 'connection_category'. Added 'linked_connection_id'.
- Deprecated player-port prototype.
- Changed type of 'entity-unknown', 'tile-proxy', 'tree-dying-proxy', 'tree-proxy' from flying-text to entity-ghost.
- Removed the "flying-text" entity type. Use LuaPlayer::create_local_flying_text or LuaRendering::draw_text instead.
- Removed the "flame-thrower-explosion" entity type.
- Removed "smoke" entity prototype.
- Removed "mining-tool" item prototype.
- Removed "noise-layer" prototypes. Places previously accepting them now take a 32-bit integer or a string which gets converted using CRC32.
- Removed SpiderEnginePrototype::military_target check. If a spider vehicle should be a military target, set EntityWithOwnerPrototype::is_military_target directly.
- Removed RecipePrototype::result and result_count. Use RecipePrototype::results instead.
- ProductPrototype now has a mandatory "type" field and does not accept simplified syntax for item products.
- Unified the way hidden property of all prototypes is specified, which is always a hidden bool instead of different kind of flags.
- Added MiningDrillPrototype::effect_receiver, CraftingMachinePrototype::effect_receiver and LabPrototype::effect_receiver.
- Removed MiningDrillPrototype::base_productivity, CraftinMachinePrototype::base_productivity and LabPrototype::base_productivity. They were moved into EffectReceiverPrototype::base_effect.
- Restructured SelectionToolPrototype: specific modes are described under select(required), alt_select(required), reverse_select(optional) and alt_reverse_select(optional) tables.
- Added airborne-pollutant prototype and changed various pollution related properties to support multiple pollution types.
- Rearranged BoilerPrototype's pictures.
- Added CorpsePrototype::expires, defaulting to 'true'. Denotes whether corpses of this type expire by default.
- Moved character guns inventory size to the prototype as guns_inventory_size defaulting to 3.
- Removed hr_version from all graphics definitions. The graphics are now always considered to be in high definition.
- Removed ability of ItemWithInventory to extend inventory.
- Removed ItemPrototype::default_request_amount and wire_count.
- Removed normal and expensive properties from TechnologyPrototype and RecipePrototype.
- Removed deprecated graphics definitions from TransportBeltConnectablePrototype, use belt_animation_set instead.
- Removed RocketSiloPrototype::rocket_result_inventory_size.
- Removed ConstantCombinatorPrototype::item_slot_count.
- Changed "combat-robot-count" achievement type to "combat-robot-count-achievement".
- Changed "ghost-time-to-live" modifier type to "create-ghost-on-entity-death" and changed the modifier from double to bool.
- Added EntityPrototype::icon_draw_specification, to control the scale and shift of alt-info icons for entities.
- Removed AmmoTurretPrototype::entity_info_icon_shift.
- Removed CraftingMachinePrototype::entity_info_icon_shift.
- Removed CraftingMachinePrototype::scale_entity_info_icon.
- Removed StorageTankPrototype::scale_entity_info_icon.
- Removed LinkedContainerPrototype::scale_info_icons.
- Removed ContainerPrototype::scale_info_icons.
- Removed RobotWithLogisticInterfacePrototype::cargo_centered.
- Removed utility constant pollution_color.
- Removed biter_ai_settings global variable. Instead, when requiring "biter-ai-settings.lua", assign the returned table to a local variable.
- Added BeamPrototype::graphics_set and moved graphics related properties there.
- Added CraftingMachinePrototype::graphics_set and moved graphics related properties there.
- Added AccumulatorPrototype::chargable_graphics and moved graphics related properties there.
- [space-age] Added space-platform-hub and cargo-bay prototypes.
- [space-age] Added asteroid, asteroid-collector and thruster prototype.
- Added asteroid-chunk prototype.
- Added cargo-landing-pad prototype.
- Added space-platform-starter-pack, space-location, planet and space-connection prototypes.
- Added surface-property and surface prototypes.
- Added active-trigger and chain-active-trigger prototypes.
- Added quality prototype and various related prototype properties.
- Added spider-unit prototype.
- [space-age] Added segment and segmented-unit prototypes.
- [space-age] Added lightning-attractor prototype.
- Added lightning prototype.
- Added plant prototype.
- [space-age] Added agricultural-tower prototype.
- Added selector-combinator and display-panel prototypes.
- Added fusion-generator and fusion-reactor prototypes.
- Added burner-usage prototype.
- Added equipment-ghost prototype.
- Added remote-controller prototype.
- Added stateless_visualisation_variations to DecorativePrototype, SimpleEntityPrototype, SimpleEntityWithOwnerPrototype and TreePrototype.
- Added stateless_visualisation to DecorativePrototype and EntityPrototype.
- Added RoboportPrototype::radar_range.
- Added ShortcutPrototype::unavailable_until_unlocked.
- Added MiningDrillPrototype::resource_drain_rate_percent and filter_count.
- [space-age] Added MiningDrillPrototype::drops_full_belt_stacks.
- [space-age] Added LoaderPrototype::max_belt_stack_size.
- [space-age] Added InserterPrototype::max_belt_stack_size.
- Added InserterPrototype::grab_less_to_match_belt_stack and enter_drop_mode_if_held_stack_spoiled.
- Added BeaconPrototype::profile and beacon_counter.
- Added AmmoItemPrototype::ammo_category.
- Added LogisticContainerPrototype::trash_inventory_size.
- Added LabPrototype::trash_inventory_size.
- Added CarPrototype::auto_sort_inventory and trash_inventory_size.
- Added RocketSiloPrototpye::rocket_supply_inventory_size, logistic_trash_inventory_size, render_not_in_network_icon and cargo_station_parameters.
- Added TilePrototype::built_animations and related properties.
- Added TilePrototype::weight, max_health, dying_explosion, destroys_dropped_items and default_destroyed_dropped_item_trigger.
- Added ItemPrototype::weight, random_tint_color, has_random_tint, plant_result, destroyed_by_dropping_trigger and default_import_location.
- [space-age] Added ItemPrototype::spoil_result, spoil_to_trigger_result and spoil_ticks.
- Added CliffPrototype::place_as_crater.
- Added TurretPrototype::graphics_set and other graphics related properties.
- Added TechnologyPrototype::research_trigger and allows_productivity.
- Added AmbientSound::planet and variable_sound.
- Added Prototype::factoriopedia_alternative and PrototypeBase::factoriopedia_description, hidden_in_factoriopedia and factoriopedia_simulation.
- Added RecipePrototype::preserve_products_in_machine_output, surface_conditions and maximum_productivity.
- Added VehiclePrototype::allow_remote_driving.
- Added MapSettings::asteroids.
- Added RollingStockPrototype::default_copy_color_from_train_stop.
- Added AmmoTurretPrototype::energy_source and energy_per_shot.
- Added EntityPrototype::ambient_sounds, tile_buildability_rules, icons_positioning and surface_conditions.
- Added RadarPrototype::connects_to_other_radars, energy_fraction_to_connect and energy_fraction_to_disconnect.
- Added CustomInputPrototype::block_modifiers.
- [space-age] Added capture-robot prototype.
- Added EnemySpawnerPrototype::captured_spawner_entity and time_to_capture.
- Added FluidPrototype::visualization_color.
- Added PipeToGroundPrototype::visualization.
- Added "get-by-unit-number" entity prototype flag.
- Increased the limit of different "optimized-decorative" types from 255 to 65535.
-
Added dynamic prototype migrations support.(Removed in 2.0.7) - Removed EntityPrototype::drawing_box and replaced it with drawing_box_vertical_extension.
- Add more prototype properties for shaping Spidertron and spider unit legs and behaviors.
- Loader is now circuit connectable.
- Renamed InserterPrototype::stack to InserterPrototype::bulk.
- Changed "forward-then-backward" animation run mode to not repeat the first and the last frame when running backward.
- Determining whether a tile draws transitions over different tile takes into consideration also TilePrototype::layer_group now.
- Renamed TileRenderLayer "ground" to "ground-natural" and added "ground-artificial".
- Reduced number of layers in "zero" tile render layer group from 128 to 64. And "water" from 64 to 8.
- Removed TilePrototype::draw_in_water_layer.
- On prototypes of entities with circuit connector removed circuit_wire_connection_points and circuit_connector_sprites but added circuit_connector.
- Renamed boiler "heat-water-inside" mode to "heat-fluid-inside".
- Replaced TileSpriteLayoutVariant::tall with TileSpriteLayoutVariant::tile_height.
- Removed WorkingVisualisation::draw_as_sprite and WorkingVisualisation::draw_as_light. Use SpriteParameters::draw_as_light and draw_as_glow instead.
- Removed BeaconModuleVisualization::draw_as_sprite and BeaconModuleVisualization::draw_as_light.
- Removed AnimationElement::draw_as_sprite and AnimationElement::draw_as_light.
- Removed BeaconGraphicsSet::apply_module_tint_to_light.
- Reset technology effects is automatically run when technology unlocks change.
- Added OffshorePumpPrototype::energy_source and energy_usage.
- Changed research unit ingredients to only be specified by a tuple.
- Changed recipe ingredients to only be specified by a table with named keys.
- Removed catalyst_amount from recipe ingredients and products.
- Added ignored_by_stats to recipe ingredients.
- Added ignored_by_stats and ignored_by_productivity to recipe products.
- Added 'R' (ronna) and 'Q' (quetta) SI prefixes.
- Removed 'K' from allowed SI prefixes - use 'k' instead.
- Renamed "effectivity-module" to "efficiency-module", including all items, recipes, and technologies.
- Renamed ItemPrototype::placed_as_equipment_result to place_as_equipment_result to match the runtime name.
- Removed BurnerEnergySource::fuel_category. Use BurnerEnergySource::fuel_categories instead.
- Removed slice, slice_x and slice_y from Sprite and RotatedSprite.
- Changed PipeToGround::pictures to use a standard Sprite4Way.
- Removed OffshorePumpPrototype::picture. Use OffshorePumpPrototype::graphics_set instead.
- Removed ContainerPrototype::enable_inventory_bar.
- Added ContainerPrototype::inventory_type "normal".
- Added LinkedContainerPrototype::inventory_type "normal".
- Removed ItemPrototype::rocket_launch_product. Use rocket_launch_products instead.
- Moved FluidBoxManagerPrototype::off_when_no_fluid_recipe up to AssemblingMachinePrototype::fluid_boxes_off_when_no_fluid_recipe.
- Added delayed-active-trigger ActiveTrigger type.
- Added ability to attach a SmokeWithTrigger to a target entity and make it fade when the target entity is destroyed.
- Added time-based cooldowns to TriggerEffectWithCooldown.
- Removed deprecated "compressed" SpriteFlag.
- Removed icon_mipmaps from various prototypes using icons. Mipmap count will be inferred from icon_size and actual dimensions of the source image.
- Changed icon_size default to be always 64, which is also defined by defines.default_icon_size, for the case we ever wanted to change this.
- Changed plural localisation format to use double underscores around parameter index.
- Added new prototype type "custom-event" to define custom events in the data stage. Custom events share the same namespace as custom inputs and built-in events for subscribing to and raising them.