Combat is an unavoidable part of Factorio; even if you set the options to ‘Peaceful mode’ when you start a game you’ll still need those Alien Artefacts.
To this end you have three slots for hand held weapons at the bottom right of the screen (the other slot is for a mining tool and armour). Each slot has an associated ammo box. So you can use the different slots either for different types of weapon – submachine gun and rocket launcher perhaps – and/or to keep a second fully loaded weapon on standby. A newly crafted weapon will be added to the first free box if one is available.
That’s great… but how do you actually use them?
How To Shoot
There are two ways to fire your selected weapon in Factorio. Assuming you haven’t changed the default controls, pressing Space will shoot at the nearest enemy. This is useful for close up combat with aliens.
The other way to shoot is to press ‘C’ (for ‘cursor’). This will fire your current weapon at whatever object is selected and highlighted. This is very useful for targeting alien buildings such as Spawners – usually with a rocket! It can also be used to target terrain items such as rocks and destroy them with gunfire. Just be careful you don’t accidentally fire at your own factory – yes, I’ve done that 🙁
Having three weapons is great, but how do you switch between them? With the default key bindings this is done by pressing the ‘Q’ key.
Which is right next to the WASD keys used for movement. I kept finding that I’d tapped Q without realising it and was wielding the wrong weapon. To avoid this you can remap the key to something safer. In Options-Controls-Game set the ‘Next Weapon’ key. I like to use something right over on the other side of the keyboard such as ‘/’.
Note that the game will only toggle between weapons which have ammo available.