New to mods, toxic plants?

Started by Orthum, July 19, 2015, 08:25:47 AM

Previous topic - Next topic

Orthum

Hi everyone,
I'm going to start trying to mod and get into it. Yes my first big dive into anything because I really do enjoy this game and want to really add a bunch of stuff to it. 
Can toxic plants be added?
My thought is something that looks like a thistle and they have a longer then usual grow season, but when a colonist eats them it adds a few points of toxic build up to their system. So you might not starve but if you keep eating nothing but them, your going to have a lot more problems in a few days.

Alistaire

It'll require some C# code along with XML to implement that.
This means it'll be more work than modifying values in an XML file and I think it's certainly ambitious for a first mod but you'll be able to do
it eventually.

You'll want to take a look on the wiki's Modding Tutorials page for an introduction to XML and C#. The rest of the process isn't documented there,
but with the information on the page you might be able to figure it out yourself. Knowing how to decompile the base game's C# code is very
useful, because you'll have to create a class specifically for poisonous plants and I guess some stored variable for the amount of poison and
poison resistance a pawn has - which will be the hard part.

Don't forget you can post any problems you run into on the forums.

Orthum

Clearly I must pick what I think is easy as the hardest... I was thinking, of coding it in, as I notice the variables of it containing human meat, just does it contain whatever said toxic plants name is, if so add, % or point value of toxic to character (like the toxic world event I'm thinking I'll have to actually cheat and have it happen to see how that plays). 
I'm not going for a specific effect, but a more generic effect. But I'll start reading and such and seeing what trouble I can get into.