0.15 modding related changelog as of March 6, 2017

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

0.15 modding related changelog as of March 6, 2017

Post by Rseding91 »

This is the current changelog for 0.15 relating to modding and scripting as of March 6, 2017:

Modding:
  • Fast cropping of sprite boundaries - it's no longer necessary to delete crop-cache.dat when existing sprites are modified.
  • Utility sprites are now defined fully in the core mod prototypes.
  • Added support for burner type generator-equipment.
  • Added "simple-entity-with-force" and "simple-entity-with-owner" entity types.
  • Boiler has now dynamically specified energy source (as inserter and similar).
  • Added support for mod settings: startup, runtime, and runtime-per-user.
  • Added commandline option --check-unused-prototype-data
  • Added a "nothing" technology modifier type with an "effect_key" property for script-based-effect research.
  • Redundant technology prerequisites are logged when verbose logging is enabled.
  • Changed technology prototype icon_size to default to 32 instead of 64.
  • In any instance an icon isn't 32x32 the icon_size property must be set to the actual size of the (square) icon.
  • Renamed "armor-making-2" to "heavy-armor".
  • Renamed "armor-making-3" to "power-armor".
  • Removed "alien-technology".
  • Added the ability to have "friend" forces. Friend forces are given unrestricted access to buildings and won't be attacked.
  • Changed container entities to not scale info icons by default + added the optional prototype property "scale_info_icons" to enable scaling.
  • Added property "turret_base_has_direction" to turret entity types. Set it to true if you want to use turn_range property in turret attack_parameters. This property has to be true for any fluid-turret, because of pipe connections.
  • Added support for different recipe and technology complexity definitions.
  • Added "item-with-tags" item type that can store any basic arbitrary Lua data.
  • Lamps, roboports, walls, rail signals, and accumulators now accept any signal type (item, fluid, virtual).
  • "animation_speed" property of animation definitions has to be greater than 0.
Scripting:
  • Mod events are now fired by the mod dependency order instead of the mod name starting with the scenario script.
  • Utility sprites can be used in the sprite button.
  • Added 4th custom gui root position "goal", which is used in the objectives.
  • The goal and left gui element has default direction vertical.
  • Added LuaGuiElement::clear to remove all the contents of the element.
  • Added column_alignments settings in table style.
  • LuaForce::reset() now resets everything about the force to the default state.
  • Added on_selected_entity_changed - fires when the selected entity for a player changes.
  • Added on_market_item_purchased - fires when a player purchases something from a market entity.
  • Added on_player_dropped_item - fires when a player drops an item that results in an item-on-ground entity.
  • Added on_biter_base_built - fires when biters build bases during migration.
  • Added on_player_changed_force - fires when a players force is changed.
  • Added on_entity_renamed - fires when an entity is renamed either by the player or through script.
  • Added on_gui_selection_state_changed - fires when an item in a drop-down gui element is selected.
  • Added on_surface_deleted, on_pre_surface_deleted, and on_surface_created events.
  • Added on_player_mined_entity and on_robot_mined_entity events.
  • Added on_train_created event.
  • Changed less_then to less_than in lua GUI progress bar style specification. (33196)
  • Added remote interface to freeplay and sandbox scripts.
  • Added the ability for mods to register commands.
  • Added LuaRandomGenerator.
  • Changed LuaEntityPrototype::underground_belt_distance to LuaEntityPrototype::max_underground_distance and changed it to work on both underground pipes and underground belts.
  • Added LuaEntityPrototype::drawing_box, sticker_box, flags, remains_when_mined, additional_pastable_entities, allow_copy_paste, shooting_cursor_size, created_smoke, created_effect, map_color, friendly_map_color, enemy_map_color, build_base_evolution_requirement read.
  • Added LuaEntity::graphics_variation read/write for simple entities and trees.
  • Added LuaSurface::destroy_decoratives and LuaSurface::create_decoratives.
  • Added LuaBurner - readable off entities and equipment - the burner energy source for the entity.
  • Added optional "surface" to LuaForce::chart_all().
  • Added "recipe" to on_player_crafted_item.
  • Added "cause" to on_entity_died - the entity that did the killing if available.
  • Added the ability to read item_requests from item request proxy entities as well as ghosts.
  • Changed LuaEntity::item_requests to match the docs format.
  • Added "by_script" to on_research_finished.
  • Added LuaCircuitNetwork::network_id read.
  • Added LuaGui::children read.
  • Added LuaGuiElement::children read.
  • Added LuaGuiElement drop-down type.
  • Removed LuaGameScript::evolution_factor.
  • Added LuaForce::evolution_factor.
  • Added optional fields "durability" and "ammo" when using SimpleItemStack definitions.
  • Added LuaItemPrototype fuel_category, burnt_result, fuel_acceleration_multiplier, fuel_top_speed_multiplier read.
  • Removed LuaSurface::get_tileproperties.
  • Added LuaPlayer::opened write.
  • Added LuaPlayer::opened_gui_type read.
  • Added on_runtime_mod_setting_changed event - fires when a player changes runtime mod settings.
  • Expanded LuaStyle read/write property support.
  • Fixed LuaSurface::spill_item_stack didn't interpret "enable_looted" parameter properly. (38717)
  • Added player_index to the entity settings pasted events.
  • Added support for specifying the "max_range" of a projectile when created through create_entity.
  • Added LuaSurface::find_logistic_networks_by_construction_area(..).
  • Added support for turret orientation read/write through LuaEntity::orientation.
  • Added LuaEntity::shooting_target read/write for turrets.
  • Added LuaLogisticPoint - read access to logistic data about provider, storage, and requester points.
  • Added LuaEntity::get_logistic_point().
  • Added LuaLogisticNetwork::provider_points, empty_provider_points, requester_points, full_or_satisfied_requester_points, and storage_points read.
  • Added LuaPlayer::add_alert, remove_alert, and get_alerts.
  • Changed LuaSurface::create_entity{name="item-on-ground", stack=...} to accept the same format for item stacks as the rest of the Lua API.
  • Removed LuaPlayer::build_from_cursor + LuaPlayer::rotate_for_build as they aren't replay/MP safe.
  • Added optional parameter "return_item_request_proxy" to LuaEntity::revive. If true and revive creates item request proxy, the proxy will be returned as the third value.
  • Added LuaPlayer::mute_alert, unmute_alert, is_alert_muted, enable_alert, disable_alert, is_alert_enabled.
  • Added LuaForce::set_friend/get_friend.
  • Moved game.get_event_handler and game.raise_event to "script".
  • Added LuaSurface::get_trains() and LuaForce::get_trains().
  • Added LuaSurface::regenerate_decorative().
  • Added LuaDecorativePrototype.
  • Added Mod gui script for easy consistent styling of mod buttons and frames within the game.
  • Added remote interface functions for the rocket silo gui: add_tracked_item, remove_tracked_item, get_tracked_items, update_gui
  • Changed LuaForce::clear_chart() to take an optional surface to clear the chart for.
  • Added LuaGuiElement::single_line and want_ellipsis for the CustomLabel type.
  • Added LuaGuiElement type "camera".
  • Added LuaEntity::stickers read. The stickers attached to a given entity.
  • Changed the player built event to include the item name used to do the building if possible and include the tags from the "item-with-tags" item if possible.
  • Added LuaEntityPrototype::module_inventory_size read.
  • Added LuaEntityPrototype::get_inventory_size().
  • Added LuaTransportLine::operator[] and operator#.
  • Added support for full copying LuaItemStack in most places that take the SimpleItemStack type.
  • Added LuaInventory::entity_owner, player_owner, and equipment_owner read.
  • Changed LuaEntity::passenger to work with both character entities and players.
  • Added LuaEntityPrototype::ingredient_count read.
  • Added support for LuaFlowStatistics read on electric poles.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1190
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: 0.15 modding related changelog as of January 7, 2017

Post by Mooncat »

Just saw this post. Wow!!!
Added LuaEntity::shooting_target read/write for turrets.
Does it mean we can force a turret to attack a certain target!? :o
So this request is solved? viewtopic.php?f=28&t=35361 :mrgreen:


(Is the rich-text support for GUI still being developed? Haven't heard any news related to it for some time. Will the console also support rich text? :P )

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

Re: 0.15 modding related changelog as of January 7, 2017

Post by Rseding91 »

Mooncat wrote:(Is the rich-text support for GUI still being developed? Haven't heard any news related to it for some time. Will the console also support rich text? :P )
No. The GUI system we use doesn't support it and it's not worth our time to work on implementing it.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1190
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: 0.15 modding related changelog as of January 7, 2017

Post by Mooncat »

Rseding91 wrote:No. The GUI system we use doesn't support it and it's not worth our time to work on implementing it.
Aww.. I thought it will at least support inline color and inline style...

But the list is already very good! Many thanks! :D

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: 0.15 modding related changelog as of January 7, 2017

Post by aubergine18 »

Full of awesome win! As always!!
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.

Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: 0.15 modding related changelog as of January 7, 2017

Post by Nexela »

Added optional fields "durability" and "ammo" when using LuaSimpleItemStack definitions.
Currently ItemStack::ammo (and possibly durability) error if the stack isn't an ammo type, can this be changed to return nil if not ammo type? Thanks!

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: 0.15 modding related changelog as of January 7, 2017

Post by bobingabout »

Mooncat wrote:Just saw this post. Wow!!!
Added LuaEntity::shooting_target read/write for turrets.
Does it mean we can force a turret to attack a certain target!? :o
So this request is solved? viewtopic.php?f=28&t=35361 :mrgreen:


(Is the rich-text support for GUI still being developed? Haven't heard any news related to it for some time. Will the console also support rich text? :P )
You might be able to write a script to make a turret attack a certain target.

Assuming that's the case, perhaps a script that scans all targets within range, and changes the target to specifically target a small biter, rather than behemoth, or vica verca.

Probably a heavy script though.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

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

Re: 0.15 modding related changelog as of March 6, 2017

Post by Rseding91 »

I've updated the main post with the changelog as of right now.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1190
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: 0.15 modding related changelog as of March 6, 2017

Post by Mooncat »

bobingabout wrote:Assuming that's the case, perhaps a script that scans all targets within range, and changes the target to specifically target a small biter, rather than behemoth, or vica verca.
Probably a heavy script though.
I just need the turret to attack an invisible target, so it will always emit projectiles. (But I will need to test if it will generate unnecessary warning signal.) :P



Now the list is very long and I can't remember which points exist before. :lol:
Changed technology prototype icon_size to default to 32 instead of 64.
In any instance an icon isn't 32x32 the icon_size property must be set to the actual size of the (square) icon.
Does that mean the vanilla technology icons are also changed to 32x32? I hope we don't need to use icon_size when we follow vanilla, because it is confusing to see that icon_size is not needed by the base mod but it is needed in our mods. :)
"animation_speed" property of animation definitions has to be greater than 0.
Can it be 0? I have an explosion with 6 frames in a sprite sheet. I use "starting_frame" and "starting_frame_deviation" to randomized its frame. And I lock it by setting its animation_speed = 0. Hope this is still possible in 0.15.

Added LuaGuiElement type "camera".
!?!? So we can reproduce the train management panel? :o :o :o :o :o


Tho the removal of some APIs may cause some works for me (us) to update the mods, I am now very excited for the new features. :D :D :D :D

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: 0.15 modding related changelog as of March 6, 2017

Post by posila »

Mooncat wrote:Can it be 0? I have an explosion with 6 frames in a sprite sheet. I use "starting_frame" and "starting_frame_deviation" to randomized its frame. And I lock it by setting its animation_speed = 0. Hope this is still possible in 0.15
It is currently not possible. What do you use that for? Problem with explosion with 0 animation speed is that the entity won't be ever destroyed by the engine. If the explosion has some movement vector it will drift forever cause lot of chunks to be generated. We had some saves that consumed 16 GB of RAM because of this.

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1190
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: 0.15 modding related changelog as of March 6, 2017

Post by Mooncat »

posila wrote:
Mooncat wrote:Can it be 0? I have an explosion with 6 frames in a sprite sheet. I use "starting_frame" and "starting_frame_deviation" to randomized its frame. And I lock it by setting its animation_speed = 0. Hope this is still possible in 0.15
It is currently not possible. What do you use that for? Problem with explosion with 0 animation speed is that the entity won't be ever destroyed by the engine. If the explosion has some movement vector it will drift forever cause lot of chunks to be generated. We had some saves that consumed 16 GB of RAM because of this.
Oh, sorry, it is not an "explosion". It is a "smoke" instead, pretending to be an explosion. :P

My approach is:
1) the smoke has 6 frames, 1,2,3,4,5,6
2) when creating the smoke using "create-smoke" effect, I give it "starting_frame = 3" and "starting_frame_deviation = 6" so it starts with a random frame.
3) "animation_speed = 0", so it won't change to another frame.
4) it will automatically fade out because it is a smoke.

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: 0.15 modding related changelog as of March 6, 2017

Post by posila »

In that case you can set animation_speed = 6 and it will always wrap around to the same frame.

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1190
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: 0.15 modding related changelog as of March 6, 2017

Post by Mooncat »

posila wrote:In that case you can set animation_speed = 6 and it will always wrap around to the same frame.
oh. I didn't know this works too. Thanks! :D

CmdrKeen
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Tue Sep 29, 2015 9:03 pm
Contact:

Re: 0.15 modding related changelog as of March 6, 2017

Post by CmdrKeen »

The new entries from the march 6 additions to the change log:

Modding:

Changed technology prototype icon_size to default to 32 instead of 64.
In any instance an icon isn't 32x32 the icon_size property must be set to the actual size of the (square) icon.
Renamed "armor-making-2" to "heavy-armor".
Renamed "armor-making-3" to "power-armor".
Removed "alien-technology".
Added the ability to have "friend" forces. Friend forces are given unrestricted access to buildings and won't be attacked.
Changed container entities to not scale info icons by default + added the optional prototype property "scale_info_icons" to enable scaling.
Added property "turret_base_has_direction" to turret entity types. Set it to true if you want to use turn_range property in turret attack_parameters. This property has to be true for any fluid-turret, because of pipe connections.
Added support for different recipe and technology complexity definitions.
Added "item-with-tags" item type that can store any basic arbitrary Lua data.
Lamps, roboports, walls, rail signals, and accumulators now accept any signal type (item, fluid, virtual).
"animation_speed" property of animation definitions has to be greater than 0.

Scripting:

Mod events are now fired by the mod dependency order instead of the mod name starting with the scenario script.
Added 4th custom gui root position "goal", which is used in the objectives.
The goal and left gui element has default direction vertical.
Added LuaGuiElement::clear to remove all the contents of the element.
Added column_alignments settings in table style.
Added on_surface_deleted, on_pre_surface_deleted, and on_surface_created events.
Added on_player_mined_entity and on_robot_mined_entity events.
Added on_train_created event.
Added optional parameter "return_item_request_proxy" to LuaEntity::revive. If true and revive creates item request proxy, the proxy will be returned as the third value.
Added LuaPlayer::mute_alert, unmute_alert, is_alert_muted, enable_alert, disable_alert, is_alert_enabled.
Added LuaForce::set_friend/get_friend.
Moved game.get_event_handler and game.raise_event to "script".
Added LuaSurface::get_trains() and LuaForce::get_trains().
Added LuaSurface::regenerate_decorative().
Added LuaDecorativePrototype.
Added Mod gui script for easy consistent styling of mod buttons and frames within the game.
Added remote interface functions for the rocket silo gui: add_tracked_item, remove_tracked_item, get_tracked_items, update_gui
Changed LuaForce::clear_chart() to take an optional surface to clear the chart for.
Added LuaGuiElement::single_line and want_ellipsis for the CustomLabel type.
Added LuaGuiElement type "camera".
Added LuaEntity::stickers read. The stickers attached to a given entity.
Changed the player built event to include the item name used to do the building if possible and include the tags from the "item-with-tags" item if possible.
Added LuaEntityPrototype::module_inventory_size read.
Added LuaEntityPrototype::get_inventory_size().
Added LuaTransportLine::operator[] and operator#.
Added support for full copying LuaItemStack in most places that take the SimpleItemStack type.
Added LuaInventory::entity_owner, player_owner, and equipment_owner read.
Changed LuaEntity::passenger to work with both character entities and players.
Added LuaEntityPrototype::ingredient_count read.
Added support for LuaFlowStatistics read on electric poles.

Eliont
Burner Inserter
Burner Inserter
Posts: 19
Joined: Thu Feb 16, 2017 3:48 pm
Contact:

Re: 0.15 modding related changelog as of March 6, 2017

Post by Eliont »

Added on_entity_renamed - fires when an entity is renamed either by the player or through script.
Will be possible to rename entities that dont have "backer_name" field?

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

Re: 0.15 modding related changelog as of March 6, 2017

Post by Rseding91 »

Eliont wrote:
Added on_entity_renamed - fires when an entity is renamed either by the player or through script.
Will be possible to rename entities that dont have "backer_name" field?
No.
If you want to get ahold of me I'm almost always on Discord.

321freddy
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Sep 23, 2016 10:16 pm
Contact:

Re: 0.15 modding related changelog as of March 6, 2017

Post by 321freddy »

Rseding91 wrote:Added LuaLogisticPoint - read access to logistic data about provider, storage, and requester points.
This sounds interesting. Exactly what data is provided by this type?
And does it contain information about which items are being delivered to a requester chest? (like the little info on the right panel when hover over a requester chest)

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1190
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: 0.15 modding related changelog as of March 6, 2017

Post by Mooncat »

hm... still working on the ChooseEntityButton, ChooseItemButton, ChooseSignalButton? :mrgreen:

User avatar
y.petremann
Filter Inserter
Filter Inserter
Posts: 407
Joined: Mon Mar 17, 2014 4:24 pm
Contact:

Re: 0.15 modding related changelog as of March 6, 2017

Post by y.petremann »

Removed LuaPlayer::build_from_cursor + LuaPlayer::rotate_for_build as they aren't replay/MP safe.
Does that mean that we can have counter clockwise rotation ? You should implement it before anybody complain ...

daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: 0.15 modding related changelog as of March 6, 2017

Post by daniel34 »

y.petremann wrote:
Removed LuaPlayer::build_from_cursor + LuaPlayer::rotate_for_build as they aren't replay/MP safe.
Does that mean that we can have counter clockwise rotation ? You should implement it before anybody complain ...
In 0.15 counter-clockwise rotation is possible, I think by default the key is Shift+R.
quick links: log file | graphical issues | wiki

Post Reply

Return to “Modding discussion”