Search found 7 matches

by mattie112
Sat May 07, 2022 8:51 am
Forum: Mods
Topic: on_player_died not working with other mods
Replies: 2
Views: 230

on_player_died not working with other mods

I have a small mod that write some evens to a file so that I can use it to post it to Discord (https://mods.factorio.com/mod/FactoriGOChatBot-companion) One of the things is player death messages: script.on_event( defines.events.on_player_died, function(event) local player_index = event.player_index...
by mattie112
Thu Feb 10, 2022 6:37 pm
Forum: Modding discussion
Topic: LUA IDE with typehint support
Replies: 6
Views: 729

Re: LUA IDE with typehint support

Ah great, support for IntelliJ (and most likely others from JetBrains). I will look into this the next time I change stuff for my plugin :)
by mattie112
Sun Jan 30, 2022 11:25 am
Forum: Modding discussion
Topic: LUA IDE with typehint support
Replies: 6
Views: 729

Re: LUA IDE with typehint support

Allright, I have it now setup with that plugin but for example this piece of code script.on_event(defines.events.on_built_entity, function (event) log_message(event.created_entity.name) end) The IDE still doesn't know the type of event (it is EventData) but I like to know the actual type (onBuiltEnt...
by mattie112
Sun Jan 30, 2022 11:05 am
Forum: Modding discussion
Topic: LUA IDE with typehint support
Replies: 6
Views: 729

Re: LUA IDE with typehint support

Yes that was my problem with the extension I already found a couple of thins not listed there (probably due to it's age). I will take a look at your suggestion Bilka, thanks!
by mattie112
Fri Jan 28, 2022 7:47 pm
Forum: Modding discussion
Topic: game.write_file not appending
Replies: 2
Views: 275

Re: game.write_file not appending

Guess it has been a long day... thanks!
by mattie112
Fri Jan 28, 2022 6:20 pm
Forum: Modding discussion
Topic: game.write_file not appending
Replies: 2
Views: 275

game.write_file not appending

https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.write_file write_file (filename, data, append, for_player) So I have this piece of code: local function log_message(msg) msg = game.tick .. " " .. msg game.write_file(baseFolder .. baseFile, "[FactorioChatBot]: "...
by mattie112
Fri Jan 28, 2022 3:48 pm
Forum: Modding discussion
Topic: LUA IDE with typehint support
Replies: 6
Views: 729

LUA IDE with typehint support

Hi, I'm a programmer (with no LUA experience) and I want to make a small mod for Factorio. One thing that I think makes life 100% better is using a good IDE with typing / autocomplete support. You don't want to spend tracing bugs and finding a typo like defines.events.on_research_fnished if your IDE...

Go to advanced search