[Solved]How to change default strarter items?
Posted: Thu Mar 17, 2016 6:11 am
Hi guys, I meet another problem while I develop my mod Zorio, base mode has code
control.lua
I can copy this and add starter items for my mod, but also I need to remove pistol and basic-bullet-magazine, how I can do this?
I can disable craft this items via
but player anyway get it when start new game
control.lua
Code: Select all
script.on_event(defines.events.on_player_created, function(event)
local player = game.get_player(event.player_index)
player.insert{name="iron-plate", count=8}
player.insert{name="pistol", count=1}
player.insert{name="basic-bullet-magazine", count=10}
player.insert{name="burner-mining-drill", count = 1}
player.insert{name="stone-furnace", count = 1}
if (#game.players <= 1) then
game.show_message_dialog{text = {"msg-intro"}}
end
end)
I can disable craft this items via
Code: Select all
data.raw["recipe"]["pistol"].enabled = "false"