Can somebody teach me to make mods?
Can somebody teach me to make mods?
I want to make a mod that adds aluminium to the game, and adds a furnace that alloys copper and aluminium into bronze. But i dont know how to make mods at all, if someone can teach me the basics that would very much help me in my endavours. sincerly, rafatizer
- Deadlock989
- Smart Inserter
- Posts: 2528
- Joined: Fri Nov 06, 2015 7:41 pm
Re: Can somebody teach me to make mods?
Start here. If you get stuck, people are likely to answer questions.
Re: Can somebody teach me to make mods?
This would require someone sitting in a mumble server with you for several hours. But, I can give you some high level points:
* There are 4 'types' you really need to care about: Technologies (these are what science packs are for), recipes (how stuff gets made), items (things you see in your inventory), and entities (things that can be placed on the ground in the world).
A substation in your backpack is an item, and it becomes an entity when you place it on the ground. It goes back to being an item when you mine it back into your backpack (or a bot does this same process).
* If you want your new furnace to ONLY be usable for making aluminum then you need to use the Assembling Machine prototype (https://wiki.factorio.com/Prototype/AssemblingMachine) instead of the Furnace (https://wiki.factorio.com/Prototype/Furnace) prototype. Why? Because of the 'fixed_recipe" property of assembling machines; that is the only way to create a building that takes inputs, creates an output, and which cannot have its recipe changed by the player.
* If you want aluminum to be minable (like copper or iron are) I don't know how to do that. It may be helpful to download various resource mods, unzip them, and try to figure out what their LUA code is doing to create the resource. Also, you'll have to create a new map (probably) because I don't know if spawning in new resource patches to an existing game is supported. I know you can do it via console commands, but it isn't random when you do it that way.
This is, by no means, all you need to know. But it's some of the not-well-documented stuff that would probably take you a few hours to work out on your own.
* There are 4 'types' you really need to care about: Technologies (these are what science packs are for), recipes (how stuff gets made), items (things you see in your inventory), and entities (things that can be placed on the ground in the world).
A substation in your backpack is an item, and it becomes an entity when you place it on the ground. It goes back to being an item when you mine it back into your backpack (or a bot does this same process).
* If you want your new furnace to ONLY be usable for making aluminum then you need to use the Assembling Machine prototype (https://wiki.factorio.com/Prototype/AssemblingMachine) instead of the Furnace (https://wiki.factorio.com/Prototype/Furnace) prototype. Why? Because of the 'fixed_recipe" property of assembling machines; that is the only way to create a building that takes inputs, creates an output, and which cannot have its recipe changed by the player.
* If you want aluminum to be minable (like copper or iron are) I don't know how to do that. It may be helpful to download various resource mods, unzip them, and try to figure out what their LUA code is doing to create the resource. Also, you'll have to create a new map (probably) because I don't know if spawning in new resource patches to an existing game is supported. I know you can do it via console commands, but it isn't random when you do it that way.
This is, by no means, all you need to know. But it's some of the not-well-documented stuff that would probably take you a few hours to work out on your own.
Re: Can somebody teach me to make mods?
One of the best ways to learn, is start out by doing what Deadlock989 recommends. If I remember correctly, there are also a tutorial which walk a new developer through the process of developing mod, some suit of fire armor or such. The game itself ships with a test_mod in the ../tests/mods folder. Finally, download a few simple stand along modules, and take a look at what the mod developers did and how they did it.
Hiladdar
Hiladdar
Re: Can somebody teach me to make mods?
You must mean this.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Re: Can somebody teach me to make mods?
Yes!
Thank you Pi-C.
Hiladdar
Thank you Pi-C.
Hiladdar