Console command for Ammo types.

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
User avatar
Myaskol
Burner Inserter
Burner Inserter
Posts: 19
Joined: Mon Oct 20, 2014 8:20 pm
Contact:

Console command for Ammo types.

Post by Myaskol »

Heya guys,

I've lost my campaign progress and map 2 is kinda a pain ( those amounts are insane ) and i would like to cheat some ammo.
I've checked out the wiki: https://forums.factorio.com/wiki/inde ... s_magazine

but when i try:

Code: Select all

game.player.insert{name="piercing-rounds-magazine",count=100}
it doesnt work at all. Do you guys have any idea how to spawn those?

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

Re: Console command for Ammo types.

Post by FishSandwich »

Try:

Code: Select all

game.player.character.insert{name = "piercing-bullet-magazine", count = 100}

Boogieman14
Filter Inserter
Filter Inserter
Posts: 770
Joined: Sun Sep 07, 2014 12:59 pm
Contact:

Re: Console command for Ammo types.

Post by Boogieman14 »

Looks like the internal name is piercing-bullet-magazine, so try

Code: Select all

 game.player.insert{name="piercing-bullet-magazine",count=100}
*edit* Fish was faster....

To still add some extra info, I found this by looking at C:\Program Files\Factorio\data\base\prototypes\item\ammo.lua
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.

User avatar
Myaskol
Burner Inserter
Burner Inserter
Posts: 19
Joined: Mon Oct 20, 2014 8:20 pm
Contact:

Re: Console command for Ammo types.

Post by Myaskol »

thank you both!

Post Reply

Return to “Gameplay Help”