Version 0.12.11

Information about releases and roadmap.
User avatar
FactorioBot
Factorio Staff
Factorio Staff
Posts: 425
Joined: Tue May 12, 2015 1:48 pm

Version 0.12.11

Post by FactorioBot »

Warning: Most of the mods will be broken by this release, most of the problems can be solved by find and replace of "game.on_" to "script.on_" in the mod script files.
  • Features
    • Added --no-auto-pause: When running as a server, --no-auto-pause will prevent stopping the game when no players are connected.
  • Optimisations
    • Optimised the particle performance. Helps during heavy fights.
  • Changes
    • Showing the log file location when the game crashes, so it is eaiser to find when reporting the bug.
    • The "graphics.force-opengl" option default value is true when AMD graphics card is present.
  • Bugfixes
  • Scripting
    • Changed LuaSurface::set_multi_command signature. Now the function takes a table with following keys: command(required), unit_count(required), force(optional), unit_search_distance(optional) This solves issue with not finding any enemies to attack: https://forums.factorio.com/forum/vie ... =7&t=16541
    • Removed game.on_save function. There should be no need for it and it was causing too many problems.
    • Lua on_load function is not called when saving the game anymore. It is called only on actual load now.
    • Lua API calls on_load, on_init, on_configuration_changed, on_event and generate_event_name have been moved to a new namespace called script (so from now use script.on_load(...)). This will break many mods! The callback registered in on_load function doesn't have access to the game API. This is to avoid common desyncs. The on_init and on_configuration_changed still retain the access to the game API.
    • on_configuration_changed is fired when the map version changes, a mod version changes, a mod is added, or a mod is removed and passes "data": Pushes old_version="x.x.x", new_version="x.x.x" when loading map versions other than the current version When a mod version is changed it appears as a table of mod changes: {["Mod name"] = {old_version="x.x.x", new_version="x.x.x"}, ...} When a mod is added it appears as: ["Mod name"] = {old_version=nil, new_version="x.x.x"} When a mod is removed it appears as: ["Mod name"] = {old_version="x.x.x", new_version=nil}
    • Changed LuaGameScript::makefile to LuaGameScript::write_file and added an optional third parameter bool to append.
  • Modding
    • Replaced entity type "rail" with types "straight-rail" and "curved-rail". Property "bending_type" is optional for rail entities, but is still mandatory for rail remnants.
Use the automatic updater if you can (check experimental updates in other settings) or download full installation at http://www.factorio.com/download/experimental.
User avatar
oLaudix
Filter Inserter
Filter Inserter
Posts: 285
Joined: Sun Jun 14, 2015 3:24 pm
Contact:

Re: Version 0.12.11

Post by oLaudix »

Any idea why stuff like

Code: Select all

for i,p in ipairs(game.players) do
suddenly throws error that 'game' is nil value after the update? Its the only thing that breaks my mods now and I don't really know why.
Image
Oxyd
Former Staff
Former Staff
Posts: 1428
Joined: Thu May 07, 2015 8:42 am
Contact:

Re: Version 0.12.11

Post by Oxyd »

oLaudix wrote:Any idea why stuff like

Code: Select all

for i,p in ipairs(game.players) do
suddenly throws error that 'game' is nil value after the update? Its the only thing that breaks my mods now and I don't really know why.
FactorioBot wrote:
  • Scripting
    • The callback registered in on_load function doesn't have access to the game API. This is to avoid common desyncs. The on_init and on_configuration_changed still retain the access to the game API.
Maybe?
User avatar
oLaudix
Filter Inserter
Filter Inserter
Posts: 285
Joined: Sun Jun 14, 2015 3:24 pm
Contact:

Re: Version 0.12.11

Post by oLaudix »

Then can someone tell me how can i fix error in line 22 of Module Inserter mod? Because i have no clue how those changes affected that part of code.
Image
Zeblote
Filter Inserter
Filter Inserter
Posts: 973
Joined: Fri Oct 31, 2014 11:55 am
Contact:

Re: Version 0.12.11

Post by Zeblote »

oLaudix wrote:Then can someone tell me how can i fix error in line 22 of Module Inserter mod? Because i have no clue how those changes affected that part of code.
Well, posting the script in question would help... :D
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Version 0.12.11

Post by kovarex »

oLaudix wrote:Any idea why stuff like

Code: Select all

for i,p in ipairs(game.players) do
suddenly throws error that 'game' is nil value after the update? Its the only thing that breaks my mods now and I don't really know why.
This is probably in the on_load method. And yes, this was exactly the goal, to disable the access to the game object in this event. There is no good reason for it, and it brings only possible toruble.

If you want to do some migration, you can use the event on_configuration_changed
User avatar
oLaudix
Filter Inserter
Filter Inserter
Posts: 285
Joined: Sun Jun 14, 2015 3:24 pm
Contact:

Re: Version 0.12.11

Post by oLaudix »

kovarex wrote:This is probably in the on_load method. And yes, this was exactly the goal, to disable the access to the game object in this event. There is no good reason for it, and it brings only possible toruble.
If you want to do some migration, you can use the event on_configuration_changed
So the last line in this code:

Code: Select all

require "defines"
require "util"

MAX_CONFIG_SIZE = 6
MAX_STORAGE_SIZE = 12
DEBUG = false

require "gui"


types = {["mining-drill"]=true,["assembling-machine"]=true,lab=true, ["rocket-silo"] = true, furnace=true, beacon=true}

typeToSlot = {}
typeToSlot.lab = defines.inventory.lab_modules
typeToSlot["assembling-machine"] = defines.inventory.assembling_machine_modules
typeToSlot["mining-drill"] = defines.inventory.mining_drill_modules
typeToSlot["furnace"] = defines.inventory.assembling_machine_modules
typeToSlot["rocket-silo"] = defines.inventory.assembling_machine_modules
typeToSlot["beacon"] = 1

nameToSlots = {}
local metaitem = game.forces.player.recipes["mi-meta"].ingredients
Is not working due to changed to on_load? I don't get how is it possible.
Image
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: Version 0.12.11

Post by Choumiko »

oLaudix wrote:Then can someone tell me how can i fix error in line 22 of Module Inserter mod? Because i have no clue how those changes affected that part of code.
Should be fixed: https://forums.factorio.com/forum/vie ... 97&t=15184
Let me know over there if you run into any issues.

I have to say, i like the changes (or will like them once i'm finished updating my mods :D )
One thing that may be missing is a way to let a mod know what mods are in a save if you add that mod later on.
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Version 0.12.11

Post by kovarex »

Choumiko wrote:
oLaudix wrote:Then can someone tell me how can i fix error in line 22 of Module Inserter mod? Because i have no clue how those changes affected that part of code.
Should be fixed: https://forums.factorio.com/forum/vie ... 97&t=15184
Let me know over there if you run into any issues.

I have to say, i like the changes (or will like them once i'm finished updating my mods :D )
One thing that may be missing is a way to let a mod know what mods are in a save if you add that mod later on.
the on_configuration_changed actually gives quite detailed information about mod additions/removals/version changes, it just needs to be documented.
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Version 0.12.11

Post by kovarex »

oLaudix wrote:
kovarex wrote:This is probably in the on_load method. And yes, this was exactly the goal, to disable the access to the game object in this event. There is no good reason for it, and it brings only possible toruble.
If you want to do some migration, you can use the event on_configuration_changed
So the last line in this code:

Code: Select all

require "defines"
require "util"

MAX_CONFIG_SIZE = 6
MAX_STORAGE_SIZE = 12
DEBUG = false

require "gui"


types = {["mining-drill"]=true,["assembling-machine"]=true,lab=true, ["rocket-silo"] = true, furnace=true, beacon=true}

typeToSlot = {}
typeToSlot.lab = defines.inventory.lab_modules
typeToSlot["assembling-machine"] = defines.inventory.assembling_machine_modules
typeToSlot["mining-drill"] = defines.inventory.mining_drill_modules
typeToSlot["furnace"] = defines.inventory.assembling_machine_modules
typeToSlot["rocket-silo"] = defines.inventory.assembling_machine_modules
typeToSlot["beacon"] = 1

nameToSlots = {}
local metaitem = game.forces.player.recipes["mi-meta"].ingredients
Is not working due to changed to on_load? I don't get how is it possible.
Well, this line is not possible to use in the root of the script anymore.

Code: Select all

local metaitem = game.forces.player.recipes["mi-meta"].ingredients
Either you set it up in on_init or on_mod_configuration_changed and put it into global, or you just get it locally when you need.
User avatar
oLaudix
Filter Inserter
Filter Inserter
Posts: 285
Joined: Sun Jun 14, 2015 3:24 pm
Contact:

Re: Version 0.12.11

Post by oLaudix »

Choumiko wrote: Let me know over there if you run into any issues.
I was thinking about putting in in on_init but I was just trying to understand why is it not working. Neverthless what I like about this update is that i can finally listen to ambience music without hearing all those AMs making noise while doing nothing :S And that on_load is not running on save (I'm looking at you Foreman).
Image
orzelek
Smart Inserter
Smart Inserter
Posts: 3924
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Version 0.12.11

Post by orzelek »

Was something changed with locales in this update?

I noticed that some of bob's mods lost locale entries completely after updating game to 0.12.11. I didn't find anything relevant in release notes.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Version 0.12.11

Post by bobingabout »

Load game, updates detected.
Updated Scenario pack 0.12.10 to 0.12.11
no base game updates from 0.12.9.

I'm going to have to redownload the whole game.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
jeroon
Filter Inserter
Filter Inserter
Posts: 351
Joined: Sun Jan 26, 2014 10:18 am
Contact:

Re: Version 0.12.11

Post by jeroon »

Same here, got one install that went from 0.12.10 to .11 just fine.

A different install was still on 0.12.7 (I guess), and I got this update window:

Image

After this, the game updates to 0.12.9, and no new updates are available.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Version 0.12.11

Post by bobingabout »

Yeah, now that I've finally updated to 0.12.11, and fixed my clock mod... ALL locale entries added by my mod aren't being loaded.

All locale entry files are named "names.cfg" (was a pretty standardised naming convention dating right back to 0.9.8 when I first made my mods)

It apears (even though there arn't any changelog details listing it) that locale name entry files need to be the same name of ANY active mod (I tried base.cfg and boblogistics.cfg specifically in my logistics mod, and both worked)

I suppose this may not be a bug, but you should probably put this in the changelog if it is intended.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
jorgenRe
Filter Inserter
Filter Inserter
Posts: 535
Joined: Wed Apr 09, 2014 3:32 pm
Contact:

Re: Version 0.12.11

Post by jorgenRe »

Thanks for the update! No hard feelings for the broken mods! Because now i umm can actually crete som lua code again, and not have to do the 3D modeling and texturing i really should be doing :lol: !
Logo
Noticed the told change in FFF #111 so il continue to use my signature ^_^
Thanks for listening to our suggestions, devs :D!
I would jump of joy if we could specify which tiles spawned in a surfaces
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Version 0.12.11

Post by kovarex »

I don't know what changes with locale are there. Could you post a link to mod that worked before and doesn't work now, so I can understand what exactly is the issue?
Outsider
Fast Inserter
Fast Inserter
Posts: 115
Joined: Sat Jan 10, 2015 12:23 am
Contact:

Re: Version 0.12.11

Post by Outsider »

For some reason i'm not getting the automated update prompt, tried restarting several times and still doesn't show up, do we have to redownload for this release?
Advanced Logistics System - Provides a detailed view of your logistics network and the items within it
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Version 0.12.11

Post by kovarex »

I know there were some errors with the updater, and Cube said it will work properly from 0.12.11 again, so yes, it is possible that you might need to redownload manually.
Outsider
Fast Inserter
Fast Inserter
Posts: 115
Joined: Sat Jan 10, 2015 12:23 am
Contact:

Re: Version 0.12.11

Post by Outsider »

kovarex wrote:I know there were some errors with the updater, and Cube said it will work properly from 0.12.11 again, so yes, it is possible that you might need to redownload manually.
Thanks, not sure what's going on but i'm getting a 404 on the download link https://www.factorio.com/get-download/0 ... n64-manual

EDIT: nvm works now, was an authentication issue
Last edited by Outsider on Fri Oct 16, 2015 9:06 pm, edited 1 time in total.
Advanced Logistics System - Provides a detailed view of your logistics network and the items within it
Post Reply

Return to “Releases”