[1.1.0] Mod related changelog

Place to post guides, observations, things related to modding that are not mods themselves.
Post Reply
Rseding91
Factorio Staff
Factorio Staff
Posts: 11523
Joined: Wed Jun 11, 2014 5:23 am
Contact:

[1.1.0] Mod related changelog

Post by Rseding91 »

This is the mod-related changelog for 1.1 (as of November 23 2020)

I'm posting this here so mod devs get more visibility into the new things/changes before 1.1 is out - and probably a little after as well. Since not everyone reads the official changelog.

Modding:
  • New item flag "spawnable", every item has to have that flag to be creatable through the shortcuts directly. (87777)
  • Renamed create-blueprint-item shortcut action to spawn-item and item_to_create to item_to_spawn.
  • Increased the total number of collision masks from 14 to 55. See the lua-api collision mask concepts page for which layers the game doesn't actively use.
  • Changed collision mask 'layer-11' to 'rail-layer'.
  • Changed collision mask 'layer-12' to 'transport-belt-layer'.
  • Changed loader to only connect to the front belt, not from side. This is to fix internal problems related to modded loaders with custom sizes and side loading of it.
  • Implemented NoiseExpressions::fromPropertyTree for the "offset-points" noise expression function.
  • Removed rocket silo rocket prototype property "result_items" because it did nothing.
  • Added draw_as_light and draw_as_glow property to sprite definitions. draw_as_shadow, draw_as_light and draw_as_glow are mutually exclusive and draw_as_shadow takes precedence.
  • Unified laser and beam related ammo categories to just "laser" and "beam".
  • Renamed technology "laser-turret-speed"->"laser-shooting-speed", it now affects both robots and laser turrets.
  • Renamed technology "turrets"->"gun-turret", "laser-turrets"->"laser-turret", "combat-robotics"->"defender", "combat-robotics-2"->"distractor", "combat-robotics-3"->"destroyer", "tanks"->"tank", "stone-walls"->"stone-wall", "gates"->"gate"
  • Internal spidertron specification in a way to make torso and leg scaling much easier.
  • Renamed "source_effects" property of line trigger item to "range_effects", due to ambiguity with source_effects on action delivery. (90591)
  • Added the "linked-container" entity type.
  • Removed 'small-plane', 'computer', 'railgun-dart' and 'railgun' items.
  • Removed 'bait-chest', 'crash-site-assembling-machine-1-broken', 'crash-site-assembling-machine-1-repaired', 'crash-site-assembling-machine-2-broken', 'crash-site-assembling-machine-2-repaired', 'crash-site-electric-pole', 'crash-site-generator', 'crash-site-lab-broken' and 'crash-site-lab-repaired' entities.
  • Removed the "auto-character-logistic-trash-slots" modifier and forceDataValues. The auto trash are now always enabled when any trash slots present.
  • Added direction to SimpleEntityWithOwner and SimpleEntityWithForce.
  • Constrained collision_box and collision_mask of transport belt connectable prototypes so it is not possible to build the entities in overlapping positions. (82294)
  • Added optional draw_fluid_icon_override boolean to pipe to ground prototypes. Causes fluid icon to be drawn, ignoring the usual pair requirement.
  • Removed fluid turret prototype property 'indicator_light'.
  • Added fluid turret prototype properties 'enough_fuel_indicator_light' and 'not_enough_fuel_indicator_light'.
  • Added locomotive and car prototype properties 'front_light_pictures' and 'darkness_to_render_light_animation'.
  • Renamed logistic-container prototype property 'logistic_slots_count' to 'max_logistic_slots'.
  • The data stage files are no longer divided into demo and non-demo. This means the files with the demo- prefix were either merged into files without the prefix and/or the prefix was removed from the file name.
Scripting:
  • Renamed the clean_cursor method to clear_cursor.
  • Renamed on_put_item to on_pre_build, as it is much more precise name for that event. It fires when anything is used for building: item, blueprint, blueprint record or ghost cursor.
  • Changed 'control_behavior.parameters.parameters' to just 'control_behavior.parameters' for LuaDeciderCombinatorControlBehavior, LuaConstantCombinatorControlBehavior, and LuaArithmeticCombinatorControlBehavior.
  • Changed LuaItemStack::active_index to return `nil` if the blueprint book inventory has zero slots. (88427)
  • Changed LuaItemStack::count to return 0 instead of failing when the stack is empty.
  • Changed LuaControl for players in cutscenes so the character is still usable.
  • Changed on_player_cancelled_crafting 'cancel_count' to report the exact number of crafts cancelled.
  • Decoupled deactivation by script and deactivation by circuit network.
  • mod-gui.lua no longer defines 'mod_gui' as a global variable, it is now only available when required: local mod_gui = require("mod-gui")
  • Made LuaEntity::speed read work with spider-vehicle.
  • Made LuaEntityPrototype::guns read work for spider-vehicle.
  • Removed LuaEntityPrototype::production read.
  • Removed LuaBootstrap::is_game_in_debug_mode read.
  • Added LuaEntityPrototype::max_energy_production read.
  • Added LuaEntity::trains_limit read/write.
  • Added LuaEntity::trains_count read.
  • Added LuaTrainStopControlBehavior::trains_count_signal, trains_limit_signal, set_trains_limit and read_trains_count read/write.
  • Added LuaEntity::tree_gray_stage_index, read/write.
  • Added LuaEntity::tree_gray_stage_index_max read.
  • Added LuaEntity::can_wires_reach().
  • Added LuaEntity::crafting_queue_progress read.
  • Added on_spider_command_completed event.
  • Added LuaEntity::get_connected_rolling_stock().
  • Added 'create_at_cursor' to LuaPlayer::create_local_flying_text().
  • Added LuaGameScript::map_gen_presets read.
  • Added LuaStyle::extra_margin_when_activated and extra_padding_when_activated write, which also accept arrays of values.
  • Added LuaStyle::size write.
  • Added LuaGuiElement::name write support.
  • Added LuaGuiElement::tags read/write.
  • Added LuaTile::to_be_deconstructed().
  • Added LuaGuiElement::bring_to_front().
  • Added 'has-rocket-launch-products' filter to ItemPrototypeFilters.
  • Added support to save/load LuaProfilers. They simply reset the time when saved/loaded.
  • Added LuaEntityPrototype::guns for artillery turrets and wagons.
  • Added LuaEntity::combat_robot_owner read/write.
  • Added LuaPlayer::clear_recipe_notifications and LuaPlayer::add_recipe_notification
  • Added LuaGuiElement::add "index" property, allowing insertion to anywhere in the parent element.
  • Added LuaGuiElement::get_index_in_parent().
  • Added support to connect/disconnect power switches through LuaEntity::connect_neighbour/disconnect_neighbour.
  • Added LuaForce::get_linked_inventory().
  • Added LuaEntity::link_id read/write.
  • Added LuaGui 'relative' (player.gui.relative). For showing a CustomGuiElement relative to some base game C++ GUI.
  • Added LuaGuiElement::anchor read/write.
  • Added 'alt_mode' to on_player_toggled_alt_mode event.
  • Added 'cursor_position' to the custom input events.
  • Added 'queued_count' to on_pre_player_crafted_item.
  • Added LuaPlayer::cutscene_character read.
If you want to get ahold of me I'm almost always on Discord.

gheift
Fast Inserter
Fast Inserter
Posts: 188
Joined: Tue Mar 03, 2015 9:20 pm
Contact:

Re: [1.1.0] Mod related changelog

Post by gheift »

Rseding91 wrote:
Sat Nov 21, 2020 9:51 pm
Modding:
  • Added direction to SimpleEntityWithOwner and SimpleEntityWithForce.
Is there some documentation, how I can define the sprites based on the selected direction? The documentation in the wiki is not yet updated. I tried sprites like within the ConstantCombinator, but this did not work.

Thanks
Gerhard

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3263
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: [1.1.0] Mod related changelog

Post by DaveMcW »

Code: Select all

local entity = table.deepcopy(data.raw["simple-entity-with-owner"]["simple-entity-with-owner"])
entity.name = "fake-combinator"
entity.picture = table.deepcopy(data.raw["constant-combinator"]["constant-combinator"].sprites)
data:extend{entity}

gheift
Fast Inserter
Fast Inserter
Posts: 188
Joined: Tue Mar 03, 2015 9:20 pm
Contact:

Re: [1.1.0] Mod related changelog

Post by gheift »

Thanks!

robot256
Fast Inserter
Fast Inserter
Posts: 145
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: [1.1.0] Mod related changelog

Post by robot256 »

Is there an example of how to use `player.gui.relative`? Maybe some more explanation of what each of the `defines.relative_gui_types` is used for? I'm trying to add a button to the Artillery Wagon entity gui, and so far I can't get anything to appear unless I use one of the other roots like gui.center or gui.left.

I just started looking at GUIs, and didn't realize this feature was only added two weeks ago!

Rseding91
Factorio Staff
Factorio Staff
Posts: 11523
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [1.1.0] Mod related changelog

Post by Rseding91 »

robot256 wrote:
Thu Dec 03, 2020 9:52 pm
Is there an example of how to use `player.gui.relative`? Maybe some more explanation of what each of the `defines.relative_gui_types` is used for? I'm trying to add a button to the Artillery Wagon entity gui, and so far I can't get anything to appear unless I use one of the other roots like gui.center or gui.left.

I just started looking at GUIs, and didn't realize this feature was only added two weeks ago!
You'd probably have better luck in the mod-making channel in discord. But, the artillery wagon uses the "container" GUI type so you'd want to use that with a filter on the prototype type or prototype name.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Modding discussion”

Who is online

Users browsing this forum: No registered users