Most used console commands?

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
Peter34
Smart Inserter
Smart Inserter
Posts: 1100
Joined: Mon Nov 10, 2014 12:44 pm
Contact:

Most used console commands?

Post by Peter34 »

I know I've asked this before, but I didn't archive the answers properly.

This time I promise I'll do that...

What is the console command to give an item, or a quantity of a particular item, to one self?

And what is the console command to disable or enable peaceful mode? And is there a console command to check what the mode is without altering it?

Also, are there any other highly useful, widely used console commands, that warrant inclusion into an Unofficial FAQ? I'm unhappy with the existing official one here on these forums, so I plan on writing, publishing and maintaining an unofficial one, but I don't want to include 20-30 different console commands. Only the very most useful.


Peter34
Smart Inserter
Smart Inserter
Posts: 1100
Joined: Mon Nov 10, 2014 12:44 pm
Contact:

Re: Most used console commands?

Post by Peter34 »

Thanks at lot, that article is much shorter than I expected! Packed with goodies!

It doesn't seem to contain a console command to inquire as to whether peaceful_mode is on or off.

FishSandwich
Smart Inserter
Smart Inserter
Posts: 1847
Joined: Sun Feb 23, 2014 3:37 pm
Contact:

Re: Most used console commands?

Post by FishSandwich »

Peter34 wrote:It doesn't seem to contain a console command to inquire as to whether peaceful_mode is on or off.

Code: Select all

/c game.player.print(game.peaceful_mode)
or something similar should do it.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3705
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Most used console commands?

Post by DaveMcW »

player.print() can't handle booleans, you need to convert it first.

Code: Select all

/c game.player.print(tostring(game.peaceful_mode))

Peter34
Smart Inserter
Smart Inserter
Posts: 1100
Joined: Mon Nov 10, 2014 12:44 pm
Contact:

Re: Most used console commands?

Post by Peter34 »

Thanks!

I remember the Factorio Wiki had an article containing all the console names for items, but I've been unable to re-find it. Sometimes the console name for items are what you'd assume they are, like iron-plate, but not in all cases, so that page was very useful. Anyone have a link?

Peter34
Smart Inserter
Smart Inserter
Posts: 1100
Joined: Mon Nov 10, 2014 12:44 pm
Contact:

Re: Most used console commands?

Post by Peter34 »

Peter34 wrote:Thanks!

I remember the Factorio Wiki had an article containing all the console names for items, but I've been unable to re-find it. Sometimes the console name for items are what you'd assume they are, like iron-plate, but not in all cases, so that page was very useful. Anyone have a link?
I found it: https://forums.factorio.com/wiki/inde ... e=Data.raw

Post Reply

Return to “Technical Help”