Page 1 of 1

I need help with creating a basic mod.

Posted: Tue Jan 09, 2024 10:37 pm
by Danny49210
Hello! I'm new to programming and I can't get the script right just yet.

I'm trying to create a basic mod where players can choose which "Ministry" to join, each "Ministry" providing the items at half the cost, for example one that reduces at half the cost of items under Logistics tab.

Can someone help me and guide me through a little bit?

Re: I need help with creating a basic mod.

Posted: Wed Jan 10, 2024 10:01 am
by DaveMcW
Cool idea, but this is not a basic mod.

Recipes cannot be edited while the game is running, and players on the same team cannot have different recipes.

These issues can be worked around with different hacks, but I would not recommend trying it as your first mod.

Re: I need help with creating a basic mod.

Posted: Wed Jan 10, 2024 10:23 am
by Danny49210
Then maybe can I modify their character based on their choice? I tried to give them 100 inserters based on that and is not working...

Re: I need help with creating a basic mod.

Posted: Wed Jan 10, 2024 10:24 am
by Danny49210
Here is what I have achieved by looking at other mods and with chatgpt

Re: I need help with creating a basic mod.

Posted: Mon Jan 15, 2024 10:30 pm
by BraveCaperCat
You proabably want to use Settings.lua and make a Per Player setting, a String Setting Type which defines some (Extra) starter items recieved in Control.lua. This makes it much easier. If you could acess the Per Player setting in Data.lua, you could make the recipes different. But you could also just make a recipe for each, all of which loaded, but then only one set of recipes are actually enabled, which CAN be done in Control.lua.