Hey all, i'm trying to mod new mental breaks into the game. Not entirely sure where to start though. The source folder in my game directory seems to be lacking stuff, is it just snippets for reference?
Yea, The source folder in the game folder isn't complete, you will need to get a decompiler like ILSpy and open the Assembly-CSharp.dll to see the rest. It is inside the rimworld(build number here) folder>manager. That will allow you to see everything you need, when you are ready to put your code on the tracks there are tutorials on the rimworld wiki on how to set up a project to make a dll mod
Okay i figured this out finally.
I had to override the thought tree xml that pawns use for mental breaks and such in order to add my new mental break to the tree, however. Is this the only way to do it or am i blind?
(http://imgur.com/BfR4rLj.png)
Quote from: twoski on August 09, 2016, 10:37:09 PMOkay i figured this out finally.
I had to override the thought tree xml that pawns use for mental breaks and such in order to add my new mental break to the tree, however. Is this the only way to do it or am i blind?
Would be better to show us the xml you are using rather than a meaningless screenshot. You told us it works so a screenshot isn't needed. What is needed is the xml so we can guide you.
btw, overriding the think tree is
BAD. There are insertion hooks so you can pre-empt the sub-trees at certain points. Unless this is what you meant.
https://ludeon.com/forums/index.php?topic=22096.msg239100#msg239100
There is a similar mod
A similar mod is not your mod.
Quote from: Fregrant on August 10, 2016, 06:11:34 AM
https://ludeon.com/forums/index.php?topic=22096.msg239100#msg239100
There is a similar mod
This mod does not add new breakdowns though.
I noticed that the human ThoughtTreeDefs had insertion hooks but there were none in the mental break trees.
I posted an early build of my mod here: https://ludeon.com/forums/index.php?topic=23275.0
If you want to do a absolutely new breakdown like for example a tree chopping berserk you will have to go to the C# coding and dll modding side of the force.
Yep, i've been starting on the easier ones first. The damaging buildings mental break was actually pretty easy to do once i understood how mental breaks are written.
Ok i noticed an insertion hook comment:
<ThinkTreeDef>
<defName>InsertHookTest</defName>
<insertTag>Humanlike_PostMentalState</insertTag>
<insertPriority>100</insertPriority>
<thinkRoot Class="JobGiver_Berserk" />
</ThinkTreeDef>
However there are no insert tags in the mental breaks tree. I guess i can insert my mental breaks AFTER the mental break trees are reached, but will this work?