Page 1 of 1

Adding vanilla/modded object via lua console

Posted: Sat Aug 29, 2015 2:18 am
by alduin235
Hello, I have troubles with adding some items via lua console.
I typed in the lua console this line for express underground belt
/c game.player.insert{name="express-underground-belt",count=100}
The game told me that item did not exist. I tried to do the same thing with modded object and got the same results.
Is there a way for me to know the correct format for an item to type in lua console?

Re: Adding vanilla/modded object via lua console

Posted: Sat Aug 29, 2015 6:27 am
by Alekthefirst
"express-transport-belt-to-ground"

not all items has the simple put-some-dashes-into-it naming conventions.

Re: Adding vanilla/modded object via lua console

Posted: Sun Aug 30, 2015 7:08 pm
by Peter34
Alekthefirst wrote:"express-transport-belt-to-ground"

not all items has the simple put-some-dashes-into-it naming conventions.
For vanilla items, you can find their exact console names here: https://forums.factorio.com/wiki/inde ... e=Data.raw

When it comes to items from mods, I've sometimes had to delve into the mod script and try to find out what the item is actually called, which is quite an arcane exercise...