How to do Thought degrees corresponding to Spectrum traits?

Started by XeoNovaDan, February 07, 2017, 12:50:42 PM

Previous topic - Next topic

XeoNovaDan

I'm trying to modify Anaesthetic so that it produces a thought for the high that one typically gets from anaesthetic. I've got the standard thought working fine, but the brick wall is where I'm trying to create varying thought degrees for various levels of drug desire: with teetotaler, chemical interest, and chemical fascination receiving +2, +11, and +14 thoughts respectively (or at least that's the idea).

However, regardless of level of chemical interest; any one of these spectrum traits will get the +11 thought - whether they're a teetotaler, chemical interest, or chemical fascination.

Here's what the XML file looks like:


I tried implementing 'degree' values, but it comes up with errors and also has no inherent affect. Also tried three seperate thoughts for each degree, but with the same results.

Any help would be much appreciated, thanks!

Thirite

I would make a custom ThoughtWorker class extended from ThoughtWorker_Hediff which checks the pawn's traits and changes the stage of the anesthetic high thought dependant on it.

XeoNovaDan

Ah. My C# knowledge currently doesn't extend beyond the 'Hello World' function (I did touch on it a tiny bit recently), so it appears I'll have to do it in its basic form for now. Thanks though :)

Probably something to look into in the future

RawCode

Quote from: XeoNovaDan on February 07, 2017, 05:24:40 PM
Ah. My C# knowledge currently doesn't extend beyond the 'Hello World' function (I did touch on it a tiny bit recently), so it appears I'll have to do it in its basic form for now. Thanks though :)

Probably something to look into in the future

just start, it is a lot easier then you think.

Thirite

By the way, I threw this together to help you get started.
http://pastebin.com/MsEYMaD7

(You'll want to paste that into MonoDevelop rather than read it in browser since the word-wrap makes it look like a complete mess- at least for my tiny monitor)

XeoNovaDan