Factorio modding questions

Place to get help with not working mods / modding interface.
ProfoundDisputes
Inserter
Inserter
Posts: 22
Joined: Mon Jun 27, 2016 4:20 pm
Contact:

Factorio modding questions

Post by ProfoundDisputes »

I have a few question that I could not get the answer to through various searches. Sorry, if they are obvious but I am not familiar with modding games or programming them. I have mostly programming experience in C, C++ and Visual Basic. These questions pertain to things I keep running into while creating my mod:

1) Ran into issues with stuff such as "LuaEquipment API call when LuaEquipment was invalid" Also with LuaItemstacks. What does it mean for things to be invalid in the game? Figured out that it is a reference to an object that has been removed by the game engine.

2) What is a force? I can't tell if I understand it correctly. Is a force simply something that autonomy in the game? Like a bitters, players and such?

3) Entity is anything placed in the game world? So this means assemblers, player, inserters or items dropped on the ground?

4)The event calls are called after the action has been performed or before the action has been performed?

Those are just the ones I can remember now. Thank You in advance!
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Factorio modding questions

Post by darkfrei »

ProfoundDisputes wrote: Sat Dec 29, 2018 1:47 am 2) What is a force? I can't tell if I understand it correctly. Is a force simply something that autonomy in the game? Like a bitters, players and such?
Force is something as category for players, their buildings and researches.
ProfoundDisputes wrote: Sat Dec 29, 2018 1:47 am 3) Entity is anything placed in the game world? So this means assemblers, player, inserters or items dropped on the ground?
Yes, all what you can see are entities. But floor is tiles. Item-on-ground is also entity. The ghost is entity too. Items on belts are not entities I think. Some special case for item stack, but without stacking anymore.
ProfoundDisputes wrote: Sat Dec 29, 2018 1:47 am 4)The event calls are called after the action has been performed or before the action has been performed?
If the event has prefix "on_pre_" then it will be called before event.
Post Reply

Return to “Modding help”