Mod-making Tutorials on the Wiki

Started by Tynan, April 23, 2014, 06:09:31 PM

Previous topic - Next topic

Tynan

Mod-making info is available here on the wiki:

http://rimworldwiki.com/wiki/Modding

Another good source: Roxxploxx RimWorld Guide

If you have a question, post it in this forum. If you want my input, PM me and point me to the public thread. That way, your question and my response will be visible by all, and all can benefit. Please do not PM me questions - it's not sustainable for me to help everyone one-on-one.

If you're willing to help write more modding tutorials, that would be awesome as well! I also encourage people to transfer what they've learned from the forum to the wiki. The forum is ephemeral, the wiki is a permanent knowledge repository which I hope can just grow and grow until it is supremely useful.
Tynan Sylvester - @TynanSylvester - Tynan's Blog


jpwrunyan

I've written a tutorial for implementing a smelter to melt slag into metal. This should cover the basics of custom work bench design.

http://rimworldwiki.com/Modding_Tutorials/Smelter

Note that I am still ignorant of a lot of game concepts so much of the text in the files looks like boilerplate to me. But I try to point out where and what to write in order to implement a bare-bones interactive building/work table.

I would appreciate if others can double-check my work and add their own insights. Some questions not addressed in my tutorial:

What do Ingredients, Filter, ParentIngredientFilter, and DefaultIngredientFilter do specifically? Are they each mandatory?

How does the value of PriorityInType work in the WorkGiverDef? Is a higher value more important or a lower value?

Thanks.

Tynan

#3
First off, thanks for the tutorial.

Quote from: jpwrunyan on April 29, 2014, 08:36:16 PM
What do Ingredients, Filter, ParentIngredientFilter, and DefaultIngredientFilter do specifically? Are they each mandatory?

How does the value of PriorityInType work in the WorkGiverDef? Is a higher value more important or a lower value?

-Ingredients - the things a recipe needs to be enacted. Will be consumed. Can be defined in general categories (e.g. any meat, any food, etc).

For the next two, take a look at the bill interface and note that there is a way to select what ingredients your colonists are allowed to use to do a recipe. For example, the cooking recipe bills default to disallow the use of human meat.

-ParentIngredientFilter - This is a hard filter on the ingredients which the recipe can accept. Items not passing this filter are not displayed at all in the bill interface's ingredient selection interface. Not mandatory. If not defined, accepts anything.

-DefaultIngredientFilter - This is the default ingredient filter configured on new bills. For example, meals default to not be made with human meat. The player can reconfigure this. Not mandatory. If not defined, accepts anything by default.

For the WorkGiverDef, priorityInType determines which order the workgivers will be checked within the specific work type. Higher is first. So, for example, the construction worktype has givers for creating frames from blueprints, for bringing resources to unfilled frames, and for working on filled frames to make them buildings. The last one I mentioned has highest priority (think about what would happen if it were the other way around).

It may be worth copying this info onto the wiki.
Tynan Sylvester - @TynanSylvester - Tynan's Blog

jpwrunyan

I removed ParentIngredientFilter and DefaultIngredientFilter from the tutorial and started a new page for RecipeDef that (ideally) should explain the structure and use of these elements in the future. For now I posted your above response as a quick-and-dirty entry.

Again I appeal to some of the more experienced modders to double check the source code in the tutorial. In my games that use the component I based the tutorial on, I still get some odd random behavior (like not being able to interact with the building as though WorkGiverDef didn't exist). So I worry that someone else may follow the tutorial, have the same random failure despite using the code verbatim and give up in frustration...

Compozitor


Tynan

Tynan Sylvester - @TynanSylvester - Tynan's Blog

jacob814

Is the wiki up-to-date? I am having some trouble with it and I would like to know if the wiki is still accurate for modding alpha 8. Also is their a better place to learn how to mod.
My Mods:
Glass&Lights

MonkeyBlasterino

I'm also having issues with the tutorials on the wiki. Following the 'simple block' tutorial (at http://rimworldwiki.com/wiki/Modding_Tutorials/Getting_Started) has resulted in 12 lines of error messages in the debug log. I originally typed the code out by hand to aid my understanding which resulted in error messages, so I cleared the XML file and copied and pasted the text directly from the tutorial. Unfortunately this was to no avail, as the same error messages showed :(

Should I post the contents of the output log to show the errors I am having, or are the tutorials are no longer compatible with alpha 8? Thanks!

Tynan

Quote from: MonkeyBlasterino on December 31, 2014, 12:14:30 PM
Should I post the contents of the output log to show the errors I am having, or are the tutorials are no longer compatible with alpha 8? Thanks!

It's almost certain that the tutorials are out of date.
Tynan Sylvester - @TynanSylvester - Tynan's Blog

Rock5

Ever consider implementing Visual Editor? It would make updating the wiki more accessible to more users.
Rock5 [B18] Mods
- Butchers Can Count Meat
- Sun Lamp Planner
- JTZoneButtons
- RimSearch
- JTExport

longbyte1

Quote from: Rock5 on February 21, 2015, 06:27:04 AM
Ever consider implementing Visual Editor? It would make updating the wiki more accessible to more users.
I think the proposal has already been brought up but rejected because VE is "too buggy" for general use.  :-\

Dave-In-Texas

Quote from: Tynan on December 31, 2014, 01:01:17 PM
Quote from: MonkeyBlasterino on December 31, 2014, 12:14:30 PM
Should I post the contents of the output log to show the errors I am having, or are the tutorials are no longer compatible with alpha 8? Thanks!

It's almost certain that the tutorials are out of date.

It only took me a few hours, lol.

its also built from stuff rather than just metal.

[attachment deleted due to age]

longbyte1

Quote from: Dave-In-Texas on April 29, 2015, 12:59:04 AM
Quote from: Tynan on December 31, 2014, 01:01:17 PM
Quote from: MonkeyBlasterino on December 31, 2014, 12:14:30 PM
Should I post the contents of the output log to show the errors I am having, or are the tutorials are no longer compatible with alpha 8? Thanks!

It's almost certain that the tutorials are out of date.

It only took me a few hours, lol.

its also built from stuff rather than just metal.

Updated the Git repo. Thanks for taking many hours for all of us.

Mr.Cross

#14
Hello, I'm wondering, as i'm unsure if the tutorials are out of date (i read that they were), on how one would go about making a faction/pawn type?

Also, I was wondering. How would one make a basic faction. I've been trying to figure things out for a bit now. I've been looking between the wiki's (maybe out dated wiki's) and some of the Zombie Apocalypse mod that and am thinking on how best to do this. I am not sure how to go about this, some help would be appreciated.

Also how exactly would one start? Just looking at the defs. I'm seeing a faction and a pawn. Advice would be Greatly Appreciated

*Note: The reason why i'm trying to look off of the Zombie Apocalypse mod is because I hope to have my faction acting similar, and before you ask No it's not going to be a rip off of that mod. It's going to be "hopefully" something new.
Claims to know most things.