Page 1 of 1

How to start with an empry inventory?

Posted: Wed Jan 24, 2018 5:35 pm
by ExDomino
Hello,

I wanted to know if there a way to start a fresh new game with an empty inventoy.

Thank in advance.

Re: How to start with an empry inventory?

Posted: Wed Jan 24, 2018 5:59 pm
by HurkWurk
the starting inventory is controlled by the file "control.lua" in factorio\data\base\scenarios\XXXXXXX\control.lua

XXXXXX = any of the scenario types, freeplay being the most common.

this script is what does the inserts:

script.on_event(defines.events.on_player_created, function(event)
local player = game.players[event.player_index]
player.insert{name="iron-plate", count=8}
player.insert{name="pistol", count=1}
player.insert{name="firearm-magazine", count=10}
player.insert{name="burner-mining-drill", count = 1}
player.insert{name="stone-furnace", count = 1}
player.force.chart(player.surface, {{player.position.x - 200, player.position.y - 200}, {player.position.x + 200, player.position.y + 200}})
if (#game.players <= 1) then
game.show_message_dialog{text = {"msg-intro"}}
else
player.print({"msg-intro"})
end
silo_script.on_player_created(event)
end)