Adding vanilla/modded object via lua console

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
alduin235
Burner Inserter
Burner Inserter
Posts: 9
Joined: Fri May 29, 2015 12:14 pm
Contact:

Adding vanilla/modded object via lua console

Post 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?
User avatar
Alekthefirst
Fast Inserter
Fast Inserter
Posts: 104
Joined: Sat Feb 07, 2015 7:39 pm
Contact:

Re: Adding vanilla/modded object via lua console

Post by Alekthefirst »

"express-transport-belt-to-ground"

not all items has the simple put-some-dashes-into-it naming conventions.
Factorio is a game about automating everything. One day, i hope i can automate shitty signatures just like this one.
Peter34
Smart Inserter
Smart Inserter
Posts: 1100
Joined: Mon Nov 10, 2014 12:44 pm
Contact:

Re: Adding vanilla/modded object via lua console

Post 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...
Post Reply

Return to “Gameplay Help”