Modding tutorial
Posted: Wed Nov 30, 2011 02:57
With the advent (hah!) of the new Lua-based modding API, I think we should put some tutorials into the wiki. I'd like to hear your ideas about what they could be about. (Please don't suggest anything that would require significant changes on the C++ side, I expect such a tutorial to become out of date very quickly.)
Here's a start, but feel free to go in a completely different direction.
Note, I've often only thought about what concept the tutorial will be about, but still need to come up with a fun way to demonstrate it.
Mandatory
Every modder should read these.
Beginner
The beginner tutorials will explain one simple concept at a time, and don't go into much detail.
Intermediate
These tutorials could explain more difficult concepts or expand on the info in the beginner tutorials.
Advanced
These will explain, um, advanced concepts or show how to combine several simpler steps to make a great mod (for science!)
TBD.
I'm quite sure I have forgotten something! Also, if anyone has an idea to get the tutorials into a logical order, that would be neat.
Here's a start, but feel free to go in a completely different direction.
Note, I've often only thought about what concept the tutorial will be about, but still need to come up with a fun way to demonstrate it.
Mandatory
Every modder should read these.
- Getting started: This will give some basic information, show how a mod directory is set up, and define a new node type.
- Terminology: Gives an overview of the modding terminology, and some initial insights into the game engine.
Beginner
The beginner tutorials will explain one simple concept at a time, and don't go into much detail.
- Nodes: This will continue the "Getting started" tutorial and explore some of the simpler settings for nodes.
- Inventory: Explains itemstrings, and how to customize the give_initial_stuff mod.
- Crafting: This will show how to define new crafting recipes.
- Tools: This will show how to define new tools and their digging properties.
- Items: This tutorial demonstrates how to define a craftitem and explains the callbacks.
- Commands: This shows how to define a simple new server command. Not sure what this could be about. Maybe a /lightning command that damages all players? :O
- ...
Intermediate
These tutorials could explain more difficult concepts or expand on the info in the beginner tutorials.
- Engine details: Not directly a tutorial, but explains some of the engine details that don't fit into the "beginner" section, like active blocks and so on.
- ABMs: Shows a very simple ABM. Maybe one that converts cobble next to water to mossy cobble?
- Entities: This tutorial shows how Lua entities work. Again, what could it be about?
- Buckets: This will explain (in detail) how the existing bucket example works.
- Mapgen: How to run a callback each time a new mapblock has been generated, and do some fun stuff with it.
- Node parameters: Explains what nodes' param1 and param2 do. Maybe multiple parts, one for param1 = light value, one for param1 = facedir, another one for param2 things?
- Node metadata: Could show how to make a mob that vandalized all signs it finds. :D
- ...
Advanced
These will explain, um, advanced concepts or show how to combine several simpler steps to make a great mod (for science!)
TBD.
I'm quite sure I have forgotten something! Also, if anyone has an idea to get the tutorials into a logical order, that would be neat.