[Solved]How to change default strarter items?

Place to get help with not working mods / modding interface.
zurisar
Burner Inserter
Burner Inserter
Posts: 13
Joined: Sun Mar 13, 2016 8:31 pm
Contact:

[Solved]How to change default strarter items?

Post 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 :(
Last edited by zurisar on Thu Mar 17, 2016 7:09 am, edited 1 time in total.

Koub
Global Moderator
Global Moderator
Posts: 7744
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: How to change default strarter items?

Post by Koub »

Hi,

Have you tried removing them after they havebeen added ? :).
https://wiki.factorio.com/index.php?tit ... ed_Methods
Koub - Please consider English is not my native language.

zurisar
Burner Inserter
Burner Inserter
Posts: 13
Joined: Sun Mar 13, 2016 8:31 pm
Contact:

Re: How to change default strarter items?

Post 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

Post Reply

Return to “Modding help”