Remove default starting items.

Place to get help with not working mods / modding interface.
KTobias
Burner Inserter
Burner Inserter
Posts: 9
Joined: Fri Nov 27, 2015 5:03 am
Contact:

Remove default starting items.

Post by KTobias »

Ok, so when I start a new game it always gives the default items. Mining Drill, Stone Furnace, and Iron Plates.

I would like to change this in my mod so that these items are not given to the player and then give a default item that i have created to become the default Item. The default item would be a new tool.

I would also like to change it to where some of the default items that are already available will need to now be researched before being used.

I'm new to this forum thing so bear with me on this.

Thanks,
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Remove default starting items.

Post by prg »

KTobias wrote:Ok, so when I start a new game it always gives the default items. Mining Drill, Stone Furnace, and Iron Plates.

I would like to change this in my mod so that these items are not given to the player and then give a default item that i have created to become the default Item. The default item would be a new tool.
Those items are added by the freeplay scenario's control.lua. You can create your own scenario with a control.lua that doesn't add those items in the first place (might still want to count launched satellites though, that's also done in that file) or remove those items again in an on_player_created event handler in a mod wide control.lua that would run for every scenario that's played with that mod.
KTobias wrote:I would also like to change it to where some of the default items that are already available will need to now be researched before being used.

I'm new to this forum thing so bear with me on this.

Thanks,
Use data-updates.lua to add enabled=false to the recipies you want to be disabled, then add new technologies for those with data.lua. Have a look at the base mod technologies for how that should look like.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
KTobias
Burner Inserter
Burner Inserter
Posts: 9
Joined: Fri Nov 27, 2015 5:03 am
Contact:

Re: Remove default starting items.

Post by KTobias »

Thanks again prg,

I have the 1st part working correctly so no default Items are in the players inventory when a new game is started. Now to begin with the research part.
Post Reply

Return to “Modding help”