Jump to content

Creating A New Kerbal Experience Trait.


Recommended Posts

I was wondering how you make a new EFFECT in EXPERIENCE_TRAIT in Traits.cfg

I know how to make a new class / trait:


EXPERIENCE_TRAIT
{
name = Commander
title = Commanders
desc = Commanders are veteran pilots.


EFFECT
{
name = AutopilotSkill
}
EFFECT
{
name = RepairSkill
}

}

But how do I make a new effect? For that matter, are there other effects available we don't know about? Let's say I wanted to make a Miner or Geologist. (So that I could make a MM-patch for mining equipment to require a Miner or Geologist, just for sake of example.) Or anything else a plug-in, patch, or any other mod might hook into.

The closest answer I found on my own was: http://forum.kerbalspaceprogram.com/threads/103664-How-do-the-new-EFFECT-modules-work

But it never received any response. However, from the post I gather I need to code the effect in C#, compile it to a *.dll, and put it into GameData? (ie: I need to write a plug-in?) Where do I start? I'm not bad at reverse-engineering example code, documentation, etc. I just can't find any.

Any help, opinions, etc are more than welcome.

Thanks.

Link to comment
Share on other sites

  • 2 weeks later...

I believe you can find an example from taniwha's Extraplanetary Launchpads here :

The PartModule he made for his XP trait : https://github.com/taniwha-qf/Extraplanetary-Launchpads/blob/a38adaf4131ccc97d192403f5303e937b967e821/Source/Workshop/Workshop.cs

The Experience effect class : https://github.com/taniwha-qf/Extraplanetary-Launchpads/blob/a38adaf4131ccc97d192403f5303e937b967e821/Source/Workshop/ConstructionSkill.cs

By the way your mod idea seems really nice :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...