Search found 5 matches

by dementedpeanut
Sun Feb 21, 2021 5:49 pm
Forum: Modding help
Topic: Require and subdirectories
Replies: 4
Views: 1283

Re: Require and subdirectories

Thanks! More out of curiosity than anything but is there a way to get it to load only once? If I have another file in the same directory as file1.lua it would not create another instance of some_module.lua and instead return the same value.
by dementedpeanut
Sun Feb 21, 2021 2:55 pm
Forum: Modding help
Topic: Require and subdirectories
Replies: 4
Views: 1283

Require and subdirectories

Consider this folder structure control.lua scripts/ some_module.lua file1.lua control.lua imports the module like so local module = require("scripts.some_module") and file1.lua imports like local module = require("some_module") The issue I am having is that both of these imports ...
by dementedpeanut
Sun Nov 29, 2020 8:39 pm
Forum: Modding discussion
Topic: data.raw Visualiser
Replies: 4
Views: 2091

Re: data.raw Visualiser

PFQNiet wrote: ↑
Sat Oct 24, 2020 9:46 am
Any chance this could be updated for 1.0?
Bit late but have updated to 1.1.1
by dementedpeanut
Wed Aug 05, 2020 5:52 pm
Forum: Modding discussion
Topic: data.raw Visualiser
Replies: 4
Views: 2091

data.raw Visualiser

I put this together for browsing data.raw, may be of some use to others. https://jackhugh.github.io/factorio-data-raw-visualiser/ I had to convert data.raw to a json file so there will be slight differences in how the data is structured. If you are interested in the raw json file that is here (6MB f...
by dementedpeanut
Mon Aug 03, 2020 2:00 am
Forum: Modding help
Topic: When to create player GUI
Replies: 1
Views: 568

When to create player GUI

I am pretty new to this and am struggling to find resources for GUI! From what I understand GUI needs to be created for each player after 'on_player_created' but not before the first game tick. My current solution is to index each player that needs the GUI creating in the globals variable and then i...

Go to advanced search