Search found 91 matches

by swni
Thu Dec 20, 2018 8:06 pm
Forum: Modding help
Topic: Writing data to a file on a per-save basis
Replies: 2
Views: 1061

Re: Writing data to a file on a per-save basis

That sounds good, I had no idea that was possible. Is this using LuaGui in some way? I went looking around but the only thing relevant I could find was game.show_message_dialog(). I guess I could implement a command which is typed at the console for selecting a name. (But I think that would disable ...
by swni
Thu Dec 20, 2018 1:57 pm
Forum: Modding help
Topic: Writing data to a file on a per-save basis
Replies: 2
Views: 1061

Writing data to a file on a per-save basis

I wrote a mod which writes information in a file as the game runs. I would like information from different saves to be separate from each other so the files don't clobber each other. What I currently do is generate a random number from 0 to 2 ^ 30 in on_init, and use this to name a file in which the...
by swni
Mon May 14, 2018 5:09 pm
Forum: Not a bug
Topic: script.on_nth_tick crashes with nil; also documentation
Replies: 2
Views: 1332

Re: script.on_nth_tick crashes with nil; also documentation

You're right, I meant the script crashes not that the game crashes. (I forget that those are different things because the end result is I have to restart factorio either way.) Thanks for letting me know about the correct usage. Could that also be documented? There is nothing in the documentation say...
by swni
Sun May 13, 2018 5:15 pm
Forum: Not a bug
Topic: script.on_nth_tick crashes with nil; also documentation
Replies: 2
Views: 1332

script.on_nth_tick crashes with nil; also documentation

script.on_nth_tick(nil, nil) crashes, but the documentation says: Parameters tick :: uint or array of uint: The nth-tick(s) to invoke the handler on. Passing nil will unregister all nth-tick handlers. f :: function(NthTickEvent): The handler to run. Passing nil will unregister the handler for the pr...
by swni
Mon Feb 19, 2018 3:16 pm
Forum: Implemented mod requests
Topic: Resolve LocalisedString to string
Replies: 12
Views: 4832

Re: Resolve LocalisedString to string

Klonan wrote:

Code: Select all

local string = game.translate({item-name.iron-plate}, game.players[1].locale)
Something like that is exactly what I'd be hoping for. I'll keep my eyes peeled in case that happens! Thanks for the reply.
by swni
Mon Feb 19, 2018 3:12 pm
Forum: Implemented mod requests
Topic: Resolve LocalisedString to string
Replies: 12
Views: 4832

Re: Resolve LocalisedString to string

Using log() is clunky (since now I need to post-process the log) but I guess it works. Thanks for the tip!
by swni
Sun Feb 18, 2018 6:18 am
Forum: Implemented mod requests
Topic: Resolve LocalisedString to string
Replies: 12
Views: 4832

Resolve LocalisedString to string

Given a LocalisedString and a locale, I would like to be able to resolve them into an ordinary string. I would also like to be able to look up the locale that each player is using. (Both of those should be deterministic, I would imagine.) (Perhaps these could be combined into a single method, attach...
by swni
Sun Feb 18, 2018 3:59 am
Forum: Minor issues
Topic: Production Menu error
Replies: 1
Views: 1051

Re: Production Menu error

This bug has become an issue for a mod I am working on, my (duplicate) bug report can be found here: viewtopic.php?f=47&t=57937
by swni
Sat Feb 17, 2018 11:38 pm
Forum: Duplicates
Topic: [0.16.24] Production statistics issue with hand-crafting
Replies: 2
Views: 1022

Re: [0.16.24] Production statistics issue with hand-crafting

Didn't realize this was a duplicate. Maybe after two years with no comments it slipped through the cracks?
by swni
Sat Feb 17, 2018 10:52 pm
Forum: Duplicates
Topic: [0.16.24] Production statistics issue with hand-crafting
Replies: 2
Views: 1022

[0.16.24] Production statistics issue with hand-crafting

Hand-crafted recipes only count for production statistics, and do not contribute to consumption statistics. This can be seen in this screenshot: https://i.imgur.com/QROwmHI.png where 4.1k green science packs have been produced, but only 4.0k transport belts or inserters have been consumed, which is ...
by swni
Mon Jul 17, 2017 6:02 am
Forum: Mods
Topic: [MOD 0.14.x] Water maze
Replies: 82
Views: 40610

Re: [MOD 0.14.x] Water maze

Any chance this might be updated to work with 0.15? I am getting the following when I try to create a world with this scenario: ...Data/Roaming/Factorio/temp/currently-playing/control.lua:3: ...pData/Roaming/Factorio/temp/currently-playing/config.lua:1: module patterns/patterns not found; no such f...
by swni
Fri May 05, 2017 8:20 pm
Forum: Modding discussion
Topic: [0.15] Mod setting/config interface - give your input
Replies: 203
Views: 63582

Re: [0.15] Mod setting/config interface - give your input

No localized values for multiple choice combo, unfortunately. Also like orzelek and others I would like to have a way to put up just explanatory text. In my case I'm not using a mouseover box because I want to include a link to an image gallery. Instead I plan on using a string input with a single a...
by swni
Mon May 01, 2017 12:30 am
Forum: Modding help
Topic: Modify black background for icons?
Replies: 4
Views: 1129

Re: Modify black background for icons?

It's meant to be a challenge -- originally I only wanted objects on the ground to be invisible, but it turned out to be more of a challenge than planned. Invisible inventory is quite a pain but you get used to it somewhat. (There is also Fishorio mode, where all the icons are replaced by fish.) (I a...
by swni
Sun Apr 30, 2017 7:48 pm
Forum: Modding help
Topic: Modify black background for icons?
Replies: 4
Views: 1129

Re: Modify black background for icons?

Thanks for the response! Don't worry about visibility of the icons... I'm making them invisible too :)
by swni
Sun Apr 30, 2017 1:12 pm
Forum: Modding help
Topic: Modify black background for icons?
Replies: 4
Views: 1129

Modify black background for icons?

Is there any way to get rid of or modify the black background that appears behind icons on assembling machines, furnaces, containers, etc. when detailed view is on? I cannot find any sprite for it and am beginning to think it might be hardcoded.
by swni
Thu Apr 27, 2017 11:21 pm
Forum: Modding discussion
Topic: [0.15] Mod setting/config interface - give your input
Replies: 203
Views: 63582

Re: [0.15] Mod setting/config interface - give your input

Thanks much for the quick and clear answers. Yeah, I don't have the test mod either (linux). I'll edit my post so that I can use it as a reference for myself, in lieu of documentation existing elsewhere.
by swni
Thu Apr 27, 2017 10:57 pm
Forum: Modding discussion
Topic: [0.15] Mod setting/config interface - give your input
Replies: 203
Views: 63582

Re: [0.15] Mod setting/config interface - give your input

It's a core part of how the entire prototype system works in Factorio. If you don't know that it exists then you probably haven't been doing anything with modding in Factorio :P The only "documentation" that exists for Factorio prototypes is "copy the base game definitions". Sin...
by swni
Thu Apr 27, 2017 10:48 pm
Forum: Modding discussion
Topic: [0.15] Mod setting/config interface - give your input
Replies: 203
Views: 63582

Re: [0.15] Mod setting/config interface - give your input

Lack of documentation has been a problem but thankfully folk's work was enough to get me started, although I still have some questions. So far this is what I've figured out (partially from what other people have said and partially from experimentation): Settings are created by extending data.raw. Us...
by swni
Wed Apr 26, 2017 7:50 am
Forum: Modding discussion
Topic: [0.15] Mod setting/config interface - give your input
Replies: 203
Views: 63582

Re: [0.15] Mod setting/config interface - give your input

Really enjoying the new mod configuration options, all I need now is to figure out how to use it! Thanks to Rseding91 and folk for your explanations so far; I was able to get a simple mod with a runtime-per-user setting working by following folk's example mod, but am about to embark on something mor...
by swni
Mon Feb 06, 2017 2:21 am
Forum: Mods
Topic: [MOD 0.14.x] Water maze
Replies: 82
Views: 40610

Re: [MOD 0.14.x] Water maze

I stopped getting thread notifications again, so sorry I didn't respond to comments. sintri, thanks for pointing it out, that will be fixed in next release. system, not sure what you mean. Is the mod not working correctly for you? Some of the patterns got renamed recently so you might need to update...

Go to advanced search