Search found 11 matches
- Tue Oct 11, 2016 6:25 pm
- Forum: Modding help
- Topic: Question about lua control flow
- Replies: 9
- Views: 3578
Re: Question about lua control flow
Thanks guys, now I understand what you meant with regards to printing. Adding a counter I indeed see the output as I expect it. This printing behavior can be very confusing, but I suppose there's a reason for it. Thanks for pointing me to the log function, I didn't find that on http://lua-api.factor...
- Tue Oct 11, 2016 3:57 pm
- Forum: Modding help
- Topic: Question about lua control flow
- Replies: 9
- Views: 3578
Re: Question about lua control flow
Chunk generation runs in background. I found this out by using beta of Creative Mode (beta version found in "WIP BETA TEST FOR 0.2.0" spoiler at bottom of OP) which has Modding > Events feature - tick the chunk generated event (and also change surface event, etc) and you'll get a running ...
- Tue Oct 11, 2016 9:36 am
- Forum: Modding help
- Topic: Question about lua control flow
- Replies: 9
- Views: 3578
Re: Question about lua control flow
Instead of game.print, try log and see what is printed in the log file. Factorio automatically skips printing stuff if it has been printed in the last x (1?) seconds. For example if you do /c for i = 1,100 do game.print("text") end you won't print 100x text, but only 1 time text. Thanks f...
- Tue Oct 11, 2016 8:37 am
- Forum: Modding help
- Topic: Question about lua control flow
- Replies: 9
- Views: 3578
Question about lua control flow
Hi, I'm new to lua and got confused by the behavior of this small piece of code while toying with surfaces: _G.script.on_event(defines.events.on_chunk_generated,function(e) game.print(e.surface.name); if (e.surface == surface) then for _,entity in pairs(surface.find_entities()) do game.print("D...
- Sat Oct 10, 2015 8:53 pm
- Forum: Ideas and Suggestions
- Topic: Suggestions to increase threat potential of late game biters
- Replies: 12
- Views: 14515
Re: Suggestions to increase threat potential of late game biters
I don't think the threat to a defended factory should be increased. It's part of the whole automation idea: You automate your defense so you can forget about it and focus on other things. That's a core mechanic of Factorio. The additional end-game challenge (which I agree is necessary) should instea...
- Thu Dec 04, 2014 7:48 pm
- Forum: Releases
- Topic: Version 0.11.4
- Replies: 23
- Views: 38128
Re: Version 0.11.4
Relax, it's already fixed for next release: https://forums.factorio.com/forum/vie ... =30&t=7075Anexgohan wrote:I can also confirm, having splitter selected and removing belts or other spliters causes game crash.
Major annoyance if you are trying to upgrade your base. Please fix.
- Thu Dec 04, 2014 7:01 pm
- Forum: Releases
- Topic: Version 0.11.4
- Replies: 23
- Views: 38128
Re: Version 0.11.4
Make sure both of you are running either the 32 or 64 bit version.daeos wrote:Thanks for the latest release!
My buddy and I are still seeing a desync with player damage. If either of us get damage from monsters or vehicles (other than a train) the game desyncs.
- Tue Dec 02, 2014 9:54 pm
- Forum: Modding help
- Topic: How to retrieve a recipe prototype by name
- Replies: 6
- Views: 2959
Re: How to retrieve a recipe prototype by name
From my understanding a recipe is not an entity though. It's not an item either, which are the two entity functions available on the game object.
- Tue Dec 02, 2014 9:47 pm
- Forum: Modding help
- Topic: How to retrieve a recipe prototype by name
- Replies: 6
- Views: 2959
Re: How to retrieve a recipe prototype by name
I thought you could get the prototype of trees from game.entityprototypes, but it seems that's not actually a Prototype/Entity but a Lua/EntityPrototype with only a few properties.
- Tue Dec 02, 2014 9:06 pm
- Forum: Modding help
- Topic: How to retrieve a recipe prototype by name
- Replies: 6
- Views: 2959
Re: How to retrieve a recipe prototype by name
Thanks for the reply. I know only these properties are available on the object, my hope was that I could get the prototype somehow. Oh well...
- Tue Dec 02, 2014 8:41 pm
- Forum: Modding help
- Topic: How to retrieve a recipe prototype by name
- Replies: 6
- Views: 2959
How to retrieve a recipe prototype by name
Hi!
I'm trying to find the ingredients of items in control.lua and can't figure out how to do that. I see that the game object allows me to get prototypes for items and entities, but what about recipes? I tried querying data.raw only to find out that data is a nil value at this point.
Thanks!
I'm trying to find the ingredients of items in control.lua and can't figure out how to do that. I see that the game object allows me to get prototypes for items and entities, but what about recipes? I tried querying data.raw only to find out that data is a nil value at this point.
Thanks!