devolution

Author Topic: Making New Traits  (Read 5388 times)

0 Members and 1 Guest are viewing this topic.

Offline toradrow777

  • Jr. Member
  • **
  • Posts: 57
Making New Traits
« on: February 10, 2011, 04:11:25 PM »
I'm curious, has anyone ever made any custom traits for WM?  If so, then how?  Is there a program for it like with girls and items, or do I need an understanding of codes and what not?  I wanna know 'cause I'm thinking of making some traits.

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: Making New Traits
« Reply #1 on: February 10, 2011, 04:26:59 PM »
I'm curious, has anyone ever made any custom traits for WM?  If so, then how?  Is there a program for it like with girls and items, or do I need an understanding of codes and what not?  I wanna know 'cause I'm thinking of making some traits.

You can edit the core traits file. That should let you give your new traits to girls. They won't have any effect on the game, but they should appear in descriptions.

There are plans to expand on this quite substantially, but nothing's going to happen until the summer.

Offline toradrow777

  • Jr. Member
  • **
  • Posts: 57
Re: Making New Traits
« Reply #2 on: February 10, 2011, 05:08:14 PM »
In other words you need to be a serious code monkey if you wanna make traits that actually change attributes...okay...well, Summer's around the corner (in my part of the world at least), so I'll wait.

Offline FurryFanatic

  • Jr. Member
  • **
  • Posts: 53
Re: Making New Traits
« Reply #3 on: March 14, 2011, 06:24:29 PM »
Could someone point me in the right direction code-wise if I wanted to create a trait that would activate after a girl had so many children? Was looking at making a custom trait that would activate after around 10 children or so and would increase happiness and libido as long as she continued to get pregnant.  Just interested in possibly making some new traits and playing around with them.

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: Making New Traits
« Reply #4 on: March 16, 2011, 05:43:30 PM »
Could someone point me in the right direction code-wise if I wanted to create a trait that would activate after a girl had so many children? Was looking at making a custom trait that would activate after around 10 children or so and would increase happiness and libido as long as she continued to get pregnant.  Just interested in possibly making some new traits and playing around with them.

Well, the trait is simple enough. You add that to the core traits file as discussed earlier.

For the effect, you'd need to find where happiness was adjusted at the end of the turn, check to see if the girl had the trait, check to see how many entries there are in her childList (which I think refers to children and not a linked list of something else entirely - but check) and then if she has both trait and sufficient offspring, make the changes there.

There's a function called cGirls::updateHappyTraits that seems to do very similar things for traits like optimist or pessimist, so it's probably a good place to put your code.

Offline FurryFanatic

  • Jr. Member
  • **
  • Posts: 53
Re: Making New Traits
« Reply #5 on: March 17, 2011, 06:22:41 PM »
Thanks Doc.  Will get lookin around when I get home.