Can't place Bullets on the ground

Place to get help with not working mods / modding interface.
robby891
Manual Inserter
Manual Inserter
Posts: 3
Joined: Fri Aug 26, 2016 3:57 am
Contact:

Can't place Bullets on the ground

Post by robby891 »

I'm trying to have a stack of bullets spawn on the ground whenever the player kills an enemy unit.

Here's an example code:

Code: Select all

  game.surfaces['nauvis'].create_entity{name="item-on-ground",position={0,0},stack={name="basic-bullet-magazine", count=1}}
This doesn't work. Gives the error that the item stack doesn't have the name parameter. The strange this is that it works properly for "rocket" or "cannon-shell", just not "basic-bullet-magazine" or "piercing-bullet-magazine".

This works:

Code: Select all

  game.surfaces['nauvis'].create_entity{name="item-on-ground",position={0,0},stack={name="rocket", count=1}}
Running version 0.13.18
Supercheese
Filter Inserter
Filter Inserter
Posts: 841
Joined: Mon Sep 14, 2015 7:40 am
Contact:

Re: Can't place Bullets on the ground

Post by Supercheese »

The names were changed to "firearm-magazine" and "piercing-rounds-magazine".
https://forums.factorio.com/viewtopic.php?f=3&t=27101 wrote:Unified prototype names to be consistant with ingame names. (basic-transport-belt->transport-belt, *transport-belt-to-ground->*underground-belt, basic-splitter->splitter, basic-inserter->inserter, basic-mining-drill->electric-mining-drill, basic_beacon->beacon, basic-bullet-magazine->firearm-magazine, piercing-bullet-magazine->piercing-rounds-magazine, basic-grenade->grenade, basic-armor->light-armor, basic-modular-armor->modular-armor, basic-laser-defense-equipment->personal-laser-defense-equipment, basic-exoskeleton-equipment->exoskeleton-equipment)
robby891
Manual Inserter
Manual Inserter
Posts: 3
Joined: Fri Aug 26, 2016 3:57 am
Contact:

Re: Can't place Bullets on the ground

Post by robby891 »

Thank you! That fixed it.
Post Reply

Return to “Modding help”