2.0 Modding API changelog preview

Place to post guides, observations, things related to modding that are not mods themselves.
Locked
Bilka
Factorio Staff
Factorio Staff
Posts: 3295
Joined: Sat Aug 13, 2016 9:20 am
Contact:

2.0 Modding API changelog preview

Post by Bilka »

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.

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.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Bilka
Factorio Staff
Factorio Staff
Posts: 3295
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: 2.0 Modding changelog preview

Post by Bilka »

Scripting:
  • Added new controller type (remote), which is to build space platforms, so it allows ghost building but not any physical manipulation.
  • Added LuaPlayer::physical_surface, physical_surface_index, physical_vehicle and physical_position read.
  • LuaInventory::get_contents() will now return an array of {name = name, count = count, quality = quality}.
  • Changed market price items to be defined as {name = name, count = count, quality = quality }.
  • Added 8 new directions into defines.direction. If mods are storing any direction values in their storage, they will need to migrate them by multiplying by 2.
  • LuaEntity::rotate no longer takes "spill_items", "enable_looted" nor "force" parameter.
  • Removed LuaEntity::get_upgrade_direction() method.
  • Changed on_built_entity event. Instead of stack/item, it passes consumed_items - modifiable stack of items used for the building.
  • LuaTile::to_be_deconstructed() and related events can be given a force. If not given, it checks if tile is to be deconstructed by any force.
  • Moved LuaItemPrototype::mapper_count property to LuaItemCommon.
  • Renamed LuaLogisticContainerControlBehavior::circuit_mode_of_operation into circuit_exclusive_mode_of_operation.
  • Added LuaCustomEventPrototype type and LuaGameScript::custom_event_prototypes read for the custom event prototypes.
  • Added on_achievement_gained event.
  • Added on_undo_applied event.
  • LuaBootstrap::raise_event()'s "event" parameter now also accepts event names as string as alternative to their numerical IDs. The event names are needed to raise custom events.
  • LuaBootstrap::on_event()'s "event" parameter now accepts event names for built-in events too, in addition to for custom inputs and the new custom events.
  • Added new attribute "icon_selector" to LuaGuiElement::add() for creating textfields and text-boxes with the icon selector button.
  • Removed __self from the LuaObjects. Intended way of checking if an object is a lua object is to check type is userdata.
  • Changed LuaForce::evolution_factor, evolution_factor_by_pollution, evolution_factor_by_time and evolution_factor_by_killing_spawners to get_* and set_* methods.
  • Type of LuaObjects is now "userdata" instead of "table".
  • Added defines.wire_connector_id.
  • Added LuaEntity::get_wire_connector and LuaEntity::get_wire_connectors.
  • Added LuaWireConnector.
  • Added LuaRecipePrototype::hide_from_signal_gui.
  • Removed LuaEntity::circuit_connected_entities, LuaEntity::circuit_connection_definitions and LuaEntity::copper_connection_definitions.
  • Removed LuaEntity::neighbours support for electric poles and power switches.
  • Removed LuaEntity::connect_neighbour and LuaEntity::disconnect_neighbour.
  • LuaCircuitNetwork is now binding to WireConnectorID. Removed LuaCircuitNetwork::circuit_connector_id. Added LuaCircuitNetwork::wire_connector_id.
  • LuaEntity::get_circuit_network and LuaControlBehavior::get_circuit_network now require exactly 1 parameter: wire_connector_id.
  • Replaced LuaEntity::get_merged_signal with LuaEntity::get_signal and LuaEntity::get_merged_signals with LuaEntity::get_signals. They no longer take circuit_connector_id but wire_connector_id.
  • Removed defines.circuit_connector_id.
  • Electric pole created through LuaSurface::create_entity can be requested to not auto connect.
  • Replaced LuaFlowStatistics::get_flow_count parameter "bool input" with "string category" to reflect the addition of the "storage" category.
  • Added LuaFlowStatistics::set_storage_count() and get_storage_count() methods.
  • Added LuaFlowStatistics::storage_counts read.
  • Removed LuaForce::item_production_statistics, fluid_production_statistics, kill_count_statistics and entity_build_count_statistics reads.
  • Added LuaForce::get_item_production_statistics(), get_fluid_production_statistics(), get_kill_count_statistics() and get_entity_build_count_statistics() methods.
  • Removed LuaGameScript::pollution_statistics read.
  • Added LuaGameScript::get_pollution_statistics() method.
  • Unified the way logistic filters are accessed, removed specific character/spidertron logistic filter methods, and all is done through get_logistic_point and get_section.
  • Added LuaControl::get_requester_point() method.
  • Removed LuaControl::clear_vehicle_logistic_slot, get_vehicle_logistic_slot, set_vehicle_logistic_slot,
    clear_personal_logistic_slot, get_personal_logistic_slot and set_personal_logistic_slot.
  • Removed LuaEntity::clear_request_slot(), get_request_slot() and set_request_slot() methods.
  • Removed LuaEntity::request_slot_count read.
  • Added LuaLogisticSection.
  • Added LuaLogisticPoint::get_section(), add_section() and remove_section() methods.
  • Added LuaLogisticPoint::enabled read/write.
  • Added LuaLogisticNetwork::network_id read.
  • Added LuaRailEnd.
  • Added LuaEntity::get_rail_end.
  • Removed LuaTrain::front_rail, back_rail, rail_direction_from_front_rail, rail_direction_from_back_rail. They are replaced with LuaTrain::get_rail_end.
  • Added LuaFluidBox::add_linked_connection(), remove_linked_connection(), get_linked_connection() and get_linked_connections() methods.
  • Renamed LuaFluidBox::get_fluid_system_id() to get_fluid_segment_id().
  • Renamed LuaFluidBox::get_fluid_system_contents() to get_fluid_segment_contents().
  • Removed LuaFluidBox::get_flow() method.
  • Added LuaPlayer::land_on_planet() method.
  • Added LuaPlayer::enter_space_platform() and leave_space_platform() method.
  • Removed LuaEntityPrototype::collision_mask_with_flags, LuaTilePrototype::collision_mask_with_flags and LuaDecorativePrototype::collision_mask_with_flags. Respective collision_mask returns mask with flags instead.
  • Added LuaSurface::global_effect read/write.
  • Removed LuaTechnology::effects, use LuaTechnologyPrototype::effects instead.
  • Added LuaAirbornePollutantPrototype.
  • Removed LuaNoiseLayerPrototype.
  • Removed LuaItemPrototype::limitations and LuaItemPrototype::limitation_message_key reads.
  • Removed LuaGameScript::get_active_entities_count() method.
  • Removed LuaGameScript::count_pipe_groups() method.
  • Removed LuaForce::zoom_to_world_* properties.
  • Removed LuaForce::research_queue_enabled read/write.
  • Removed LuaGuiElement::get_slider_discrete_slider(), set_slider_discrete_slider(), and discrete_slider.
  • Removed LuaGuiElement::clear_and_focus_on_right_click, it is now always true.
  • Removed LuaEntity::text.
  • Removed LuaPlayer::log_active_entity_chunk_counts() and log_active_entity_counts() methods.
  • Removed LuaAutoplaceControl::control_order since it was a duplicate of ::order.
  • CircuitCondition passed to or given by LuaControlBehavior no longer uses the "condition" table, condition should be given directly.
  • Renamed LuaItemStack::blueprint_icons into preview_icons.
  • Added LuaTrainManager available through LuaGameScript::train_manager (read).
  • Added LuaTrainManager::get_trains. Removed LuaSurface::get_trains and LuaForce::get_trains.
  • Added LuaTrainManager::get_train_stops. Removed LuaSurface::get_train_stops, LuaForce::get_train_stops and LuaGameScript::get_train_stops.
  • Added snap_to_grid to LuaSurface::create_entity() and LuaControl::teleport().
  • Added LuaRenderObject. All LuaRendering methods for manipulating object selected by id were moved to LuaRenderObject.
  • Added LuaSurface::localised_name read/write.
  • Moved LuaGameScript::get_train_by_id into LuaTrainManager::get_train_by_id.
  • Added LuaRecord representing records in the blueprint library.
  • Added LuaPlayer::blueprints read.
  • Added LuaGameScript::blueprints read.
  • LuaGameScript::print, LuaPlayer::print, LuaSurface::print and LuaForce::print no longer accept Color as a second parameter.
  • Changed permission related events to also fire when mods edit permissions.
  • Changed LuaForce::ghost_time_to_live to LuaForce::create_ghost_on_entity_death bool read/write.
  • Renamed on_entity_destroyed event into on_object_destroyed.
  • Renamed LuaBootstrap::register_on_entity_destroyed into LuaBootstrap::register_on_object_destroyed.
  • Removed help() method from every Factorio Lua object.
  • Removed LuaObject::isluaobject.
  • Renamed LuaUnitGroup into LuaCommandable. Renamed LuaCommandable::group_number into LuaCommandable::id.
  • Added LuaEntity::commandable read. LuaEntity::unit_group moved to LuaCommandable::parent_group. LuaEntity::spawner moved to LuaCommandable::spawner.
  • Removed LuaEntity::set_command, set_distraction_command, command, distraction_command and moving.
  • Added LuaEquipment::quality read.
  • Added LuaEquipment::to_be_removed read.
  • Added LuaEquipment::ghost_prototype, ghost_type and ghost_name read.
  • Added LuaEquipmentGrid::revive() method.
  • Added quality and ghost parameters to LuaEquipmentGrid::put() method.
  • Added search_ghosts parameter to LuaEquipmentGrid::find() method.
  • Added LuaEquipmentGrid::order_removal() and cancel_removal() methods.
  • Added LuaEquipmentGrid::entity_owner and player_owner read.
  • Changed LuaEquipmentGrid::generator_energy read to LuaEquipmentGrid::get_generator_energy() method.
  • Added LuaPrototypeBase as the common superclass for all Lua*Prototype classes.
  • Added LuaItem and LuaItemCommon. LuaItemCommon is the common superclass for LuaItem and LuaItemStack.
  • Moved LuaControl::get_blueprint_entities to LuaItemCommon and LuaRecord.
  • Added LuaUndoRedoStack available through LuaPlayer::undo_redo_stack (read).
  • Added player and undo_index parameters for undo queue to LuaSurface::set_tiles() method.
  • Added player and item_index parameters for undo queue to LuaEntity::destroy() method.
  • Added item_index parameter for undo queue to LuaSurface::cancel_deconstruct_area() method.
  • Added item_index parameter for undo queue to LuaSurface::create_entity() method.
  • Added item_index parameter for undo queue to LuaEntity::order_upgrade() method.
  • Added item_index parameter for undo queue to LuaEntity::order_deconstruction() method.
  • Added super_forced parameter to cancel_deconstruct_area and deconstruct_area in LuaSurface, LuaRecord and LuaItemCommon.
  • Added quality condition to count_entities_filtered and find_entities_filtered methods in LuaSurface.
  • Added has_double_hidden_tile boolean to count_tiles_filtered and find_tiles_filtered methods in LuaSurface.
  • Added LuaSurface::set_property() and get_property() methods.
  • Added LuaSurface::set_double_hidden_tile() and get_double_hidden_tile() methods.
  • Added LuaTile::double_hidden_tile read.
  • Added LuaSurface::execute_lightning() method.
  • Added max_gap_size and max_attack_distance to LuaSurface::request_path() method.
  • Added LuaSurface::create_global_electric_network() and destroy_global_electric_network() methods.
  • Added LuaSurface::has_global_electric_network read.
  • Added LuaSurface::platform read.
  • Added LuaSurface::pollutant_type read.
  • Added LuaSurface::deletable read.
  • Added LuaNamedNoiseFunction.
  • Added LuaSpacePlatform and LuaPlanet.
  • Added LuaEntity::custom_status read/write.
  • Added LuaEntity::use_filters read/write.
  • Added LuaEntity::name_tag read/write.
  • Added LuaEntity::get_priority_target() and set_priority_target() methods.
  • Added LuaEntity::ignore_unprioritised_targets read/write.
  • Changed LuaEntity::electric_output_flow_limit and electric_input_flow_limit read to get_electric_output_flow_limit() and get_electric_input_flow_limit() methods.
  • Added quality parameter to LuaEntity::set_recipe() method.
  • Added LuaEntity::combinator_description read/write.
  • Added LuaEntity::tick_grown read/write.
  • Added LuaEntity::quality read.
  • Added LuaEntity::always_on read/write.
  • Renamed LuaEntity::electric_emissions to electric_emissions_per_joule.
  • Added LuaEntity::copy_color_from_train_stop read/write.
  • Added LuaEntity::train_stop_priority read/write.
  • Added LuaEntity::rail_layer read.
  • Added LuaEntity::mirroring read/write.
  • Added LuaEntity::crane_grappler_destination and crane_grappler_destination_3d write.
  • Added LuaEntity::crane_destination and crane_destination_3d read/write.
  • Added LuaEntity::robot_order_queue read.
  • Added LuaItemCommon::owner_location read.
  • Added LuaForce::unlock_space_location(), lock_space_location() and is_space_location_unlocked() methods.
  • Added LuaForce::create_space_platform() method.
  • Added LuaForce::unlock_space_platforms(), lock_space_platforms() and is_space_platforms_unlocked() methods.
  • Added LuaForce::set_surface_hidden() and get_surface_hidden() methods.
  • Added LuaForce::unlock_quality(), lock_quality() and is_quality_unlocked() methods.
  • Added LuaForce::copy_from() and copy_chart() methods.
  • Added LuaForce::platforms read.
  • Renamed LuaForce::stack_inserter_capacity_bonus to bulk_inserter_capacity_bonus.
  • Added LuaForce::beacon_distribution_modifier and belt_stack_size_bonus read/write.
  • Added LuaSimulation available through LuaGameScript::simulation (read).
  • Added LuaGameScript::get_entity_by_unit_number() method.
  • Added LuaGameScript::set_win_ending_info() and set_lose_ending_info() methods.
  • Added LuaGameScript::planets read.
  • Added LuaGameScript::get_vehicles.
  • Moved LuaGameScript::request_train_path into LuaTrainManager::request_train_path.
  • Removed LuaEntity::get_rail_segment_entity. Added LuaEntity::get_rail_segment_signal and get_rail_segment_stop.
  • Added LuaEntity::get_item_insert_specification.
  • Added LuaEntity::get_line_item_position, LuaTransportLine::get_line_item_position and LuaTransportLine::line_length.
  • Added LuaTransportLine::get_detailed_contents.
  • Added LuaEntity::fluids_count read, get_fluid() and set_fluid().
  • Removed ability of reading FluidWagon's fluid storage or FluidTurret's internal buffer fluid storage using LuaFluidBox.
  • Added LuaPlayer::locale read and on_player_locale_changed event.
  • Removed LuaForce::get_saved_technology_progress() and set_saved_technology_progress(). Added LuaTechnology::saved_progress (read/write).
  • Added LuaGameScript::technology_notifications_enabled (read/write).
  • Renamed LuaEntityPrototype::stack to LuaEntityPrototype::bulk.
  • Added LuaTechnology::successors and LuaTechnologyPrototype::successors read.
  • Renamed `global` into `storage`.
  • Lua functions inside of `storage` will now throw an error when saving instead of being silently discarded.
  • Added preserve_ghosts_and_corpses argument to LuaSurface::create_entity.
  • Added cause argument to LuaSurface::create_entity.
  • Added on_pre_scenario_finished event.
  • Added optional gui_title to game.create_inventory().
  • Changed on_entity_damaged.cause semantics
  • Added on_entity_damaged.source
  • Replaced dealer argument with source and cause arguments in LuaEntity::damage().
  • Added LuaEntityPrototype::growth_grid_tile_size read.
  • Added LuaEntityPrototype::harvest_emissions read.
  • Added LuaEntityPrototype::research_products read.
  • Added LuaSurfacePrototype::surface_properties read.
  • Added max_radius and use_start_position_on_failure to LuaSurface::spill_item_stack.
  • Changed LuaSurface::spill_item_stack to take a table of parameters.
  • Renamed LuaSettings::player to player_default.
  • Changed Vectors to always be read from the game as the two-element array format instead of sometimes using x and y keys.
    This mostly affects properties of TriggerEffectItem. Writing a Vector to the game still accepts both formats.
  • Removed util.online_players. Use game.connected_players instead.
  • Removed LuaEntity::is_entity_with_force. Use LuaEntity::is_military_target instead.
  • Added LuaPrototypes globally visible under `prototypes` in control stage, including in `on_load`.
  • Moved prototypes access from LuaGameScript::X_prototypes to LuaPrototypes::X.
  • Moved filtered prototypes access from LuaGameScript::get_filtered_X_prototypes to LuaPrototypes::get_X_filtered.
  • Moved LuaBootstrap::get_prototype_history to LuaPrototypes::get_history.
  • Moved LuaGameScript::styles to LuaPrototypes::style.
  • Moved LuaGameScript::map_gen_presets to LuaPrototypes::map_gen_preset.
  • Moved LuaGameScript::named_noise_expressions to LuaPrototypes::named_noise_expression.
  • Removed LuaPlayer::open_map, zoom_to_world, and close_map. LuaPlayer::set_controller with type 'remote' replaces these.
  • Added LuaPlayer::centered_on read/write.
  • Added LuaHelpers class globally visible under `helpers` in control stage, including in `on_load`.
  • Moved LuaGameScript::table_to_json, json_to_table, write_file, remove_path, direction_to_string, evaluate_expression,
    encode_string, decode_string, parse_map_exchange_string, check_prototype_translations, is_valid_sound_path,
    is_valid_sprite_path to LuaHelpers.
  • Removed LuaGui::is_valid_sprite_path. Use LuaHelpers::is_valid_sprite_path instead.
  • Removed LuaRendering::is_font_valid. Use LuaPrototypes::font instead.
  • Removed LuaGameScript::active_mods. Use LuaBootstrap::active_mods instead.
  • Added on_player_controller_changed event.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Locked

Return to “Modding discussion”