I found this very useful and think advertising it a bit more makes sense:
viewtopic.php?f=69&t=23181 Factorio Standard Library Project
I hope it is still maintained, cause the thread looks orphaned.
Factorio Standard Library Project (link)
Factorio Standard Library Project (link)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: Factorio Standard Library Project (link)
It's still maintained to some extent and quite a lot of mods use StdLib or bits of code from it. One of it's best features, IMO, is the ability to represent tiles and chunks as single primitive values (rather than arrays or tables) - makes lookup tables and comparisons much faster. It also has methods to associate tiles, chunks and entities with custom metadata.
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.
Re: Factorio Standard Library Project (link)
Yes, it is absolutely still maintained. The thread location is not in a great place, so if you can think of a more appropriate location, please, go ahead and move it.ssilk wrote:I found this very useful and think advertising it a bit more makes sense:
viewtopic.php?f=69&t=23181 Factorio Standard Library Project
I hope it is still maintained, cause the thread looks orphaned.
Also, you may want to link to the lua-docs for the Factorio Standard Library Project, which is located here: http://afforess.github.io/Factorio-Stdlib/
Yea! Deterministic IDs are important, and often are *badly* re-implemented by many mods.aubergine18 wrote:It's still maintained to some extent and quite a lot of mods use StdLib or bits of code from it. One of it's best features, IMO, is the ability to represent tiles and chunks as single primitive values (rather than arrays or tables) - makes lookup tables and comparisons much faster. It also has methods to associate tiles, chunks and entities with custom metadata.
Re: Factorio Standard Library Project (link)
Hm. It's placed in the right board: Tools. There is currently no better place for that. If someone looks for this stuff he will find it.Afforess wrote: Yes, it is absolutely still maintained. The thread location is not in a great place, so if you can think of a more appropriate location, please, go ahead and move it.
That's why I posted this article in mods-help and made it sticky.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: Factorio Standard Library Project (link)
So, Im having a bit of difficulty figuring out the logger function. When its run, no file nor folder is made. My code is simply:
Not sure what Im doing wrong here.
Code: Select all
require 'stdlib/log/logger'
LOGGER = Logger.new('testy', 'test', true)
LOGGER.log("testytest")
Re: Factorio Standard Library Project (link)
In what file are you using it? data.lua or control.lua?
It won't work in data.lua (or other data stage files), since it relies on the game variable being available.
In control.lua (or any other file required via control.lua) it Logger.log() has to be called from within a function that get's triggered by a event (i think)
for data stage logging there's the Factorio version of log("testytest") which writes to factorio-current.log
Edit:
added an issue https://github.com/Afforess/Factorio-Stdlib/issues/81
It won't work in data.lua (or other data stage files), since it relies on the game variable being available.
In control.lua (or any other file required via control.lua) it Logger.log() has to be called from within a function that get's triggered by a event (i think)
for data stage logging there's the Factorio version of log("testytest") which writes to factorio-current.log
Edit:
added an issue https://github.com/Afforess/Factorio-Stdlib/issues/81
Re: Factorio Standard Library Project (link)
That was in control.lua that it failed in. I would love data.lua ability though. DOnt think data has the ability to write though
Re: Factorio Standard Library Project (link)
Until game is present (after init or load) all logs are queued up. New logs won't be printed out until the first logger event after game is available. (this is true regardless of the debug setting)
Re: Factorio Standard Library Project (link)
It does (albeit to factorio-current.log and not a custom location).OsmeOxys wrote:That was in control.lua that it failed in. I would love data.lua ability though. DOnt think data has the ability to write though
An enhancement to stdlib is actively being proposed to allow it to also log when loaded in data.lua.Nexela wrote:Until game is present (after init or load) all logs are queued up. New logs won't be printed out until the first logger event after game is available. (this is true regardless of the debug setting)