Page 1 of 1

[Solved]How to change default strarter items?

Posted: Thu Mar 17, 2016 6:11 am
by zurisar
Hi guys, I meet another problem while I develop my mod Zorio, base mode has code
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 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

Code: Select all

data.raw["recipe"]["pistol"].enabled = "false"
but player anyway get it when start new game :(

Re: How to change default strarter items?

Posted: Thu Mar 17, 2016 6:59 am
by Koub
Hi,

Have you tried removing them after they havebeen added ? :).
https://wiki.factorio.com/index.php?tit ... ed_Methods

Re: How to change default strarter items?

Posted: Thu Mar 17, 2016 7:08 am
by zurisar
Koub wrote:Hi,

Have you tried removing them after they havebeen added ? :).
https://wiki.factorio.com/index.php?tit ... ed_Methods
Ah, thanks a lot, miss it :p