Help Getting started

Started by cmcintosh, December 30, 2016, 12:14:37 AM

Previous topic - Next topic

cmcintosh

So like many others here I have an Idea for a mod I would like to build out, basically allowing for settlers to procreate.  The first version of this will be simple.

What I think I need to do is this:
1. Have a custom IncidentWorker DLL that will trigger a medical condition on a Female settler for X in-game time.
2. Then during that time have the possibility of Negative / Positive incidents until the end of that time.
3. At the end of the set time, then the IncidentWorker will trigger and spawn a new colonist and display a message.


So things im needing to learn how to do atm:
- How do I create a Letter (notification envelope) from inside my IncidentWorker.
- How do I spawn a new settler.

I am trying to do it base on how the IncidentWorkerWanderJoins works as it is the closest to what im looking to achieve.

The other thing I am thinking is that this IncidentWorker should only be triggered on Female settlers for now, and only after they have engaged in 'getting lovin' event with a male partner.

I understand that this may be non-pc atm, but I do have the idea to also work in the capability for insemination / clone vats / surrogate as well. In addition to that looking at adding a new task for teaching / childcare for the new settlers, but that would be version 2 or 3 of the mod.

So if anyone has tips / links for tutorials for creating the event letter, and for spawning a new colonist/settler that would be a good start I think, then I can work on expanding from that.

RawCode

dnspy, ilspy, dotnetpeek or any other decompiler.

all incidents are implemented in C# and cannot be modified in arbitrary way by XML only, you need to write your own incident.

cmcintosh

Yes I understand that much.  Specifically im talking about the C# Classes to be called in order to fire off a History/Letter/Notification item similar to what happens when you fire the IncidentWorkerWandererJoins incident.

Sorry if I was not clear on the original post.

RawCode

Find.LetterStack.ReceiveLetter(label, text, LetterType.Good, pawn, null);

cmcintosh

I very much appreciate it, is there some central place where things like this are documented better?
I have been scanning through the wiki, but have not seen anything like a api doc as of yet.

Thanks