devolution

Author Topic: patch: more end of turn effects  (Read 3098 times)

0 Members and 1 Guest are viewing this topic.

Offline polol

  • Newbie
  • *
  • Posts: 3
patch: more end of turn effects
« on: December 28, 2010, 02:20:28 PM »
Hi guys, long time lurker here,
 
 
I really enjoyed this game, but one thing that annoyed me was that equipable items were giving perma-stat boost to stats that are supposed to fluctuate (i.e. health, Tiredness, happiness, etc.), which makes a lot of item somewhat useless in the long run. I really wanted to replace those items with versions that would provide a constant +/- boost at the end of each shift. Unfortunately, the way item is currently used by the girls means that a noob programmer, like me, will probably break everything else in the most horrible ways possible if I tried…
 
anyways, I decided to add end-of-turns effects to a few of the girl's trait and status instead. It doesn't solve the problem completely, but it's a good compromise. Any suggestions are welcomed :)
 
 
 
Here's the diff against cGirls.cpp:
 
Quote
10103a10104,10177
>    // PL: Additional stat increases from traits and status
>    if (girl->m_States&(1<<GIRL_POISONED))
>       g_Girls.UpdateStat(girl, STAT_HEALTH, -5);
>    if (girl->m_States&(1<<GIRL_BPOISONED))
>       g_Girls.UpdateStat(girl, STAT_HEALTH, -10);
>
>    if (girl->m_States&(1<<GIRL_PREGNANT))
>       g_Girls.UpdateStat(girl, STAT_TIREDNESS, 5);
>
>    if (g_Girls.HasTrait(girl, "Viras Blood Addict"))
>       g_Girls.UpdateStat(girl, STAT_LIBIDO, 20);
>    if (g_Girls.HasTrait(girl, "MILF"))
>       g_Girls.UpdateStat(girl, STAT_LIBIDO, -5);
>
>    if (g_Girls.HasTrait(girl, "Strong Magic"))
>       g_Girls.UpdateStat(girl, STAT_MANA, 20);
>
>    if (g_Girls.HasTrait(girl, "Your Daughter"))
>       g_Girls.UpdateStat(girl, STAT_PCLOVE, 1);
>
>    if (g_Girls.HasTrait(girl, "Fairy Dust Addict"))
>       g_Girls.UpdateStat(girl, STAT_PCHATE, -10);
>    if (g_Girls.HasTrait(girl, "Dependant"))
>       g_Girls.UpdateStat(girl, STAT_PCHATE, -1);
>    if (g_Girls.HasTrait(girl, "Masochist"))
>       g_Girls.UpdateStat(girl, STAT_PCHATE, -1);
>
>    if (g_Girls.HasTrait(girl, "Shroud Addict"))
>       g_Girls.UpdateStat(girl, STAT_PCFEAR, 10);
>    if (g_Girls.HasTrait(girl, "Broken Will"))
>       g_Girls.UpdateStat(girl, STAT_PCFEAR, 1);
>    if (g_Girls.HasTrait(girl, "Meek"))
>       g_Girls.UpdateStat(girl, STAT_PCFEAR, 1);
>    if (g_Girls.HasTrait(girl, "Broken Will"))
>       g_Girls.UpdateStat(girl, STAT_PCFEAR, 1);
>    if (g_Girls.HasTrait(girl, "Sadistic"))
>       g_Girls.UpdateStat(girl, STAT_PCFEAR, -1);
>
>    if (g_Girls.HasTrait(girl, " Mind Fucked")) {
>       g_Girls.UpdateStat(girl, STAT_PCLOVE, -1);
>       g_Girls.UpdateStat(girl, STAT_PCHATE, -1);
>       g_Girls.UpdateStat(girl, STAT_PCFEAR, -1);
>    }
>
>    if (g_Girls.HasTrait(girl, "Tsundere") || g_Girls.HasTrait(girl, "Yandere")) {
>       int love = 0;
>       int hate = 0;
>       u_int mood = g_Dice%2;
>
>       if (g_Girls.GetStat(girl,STAT_HAPPINESS) > 50) {
>          if (mood = 0) {
>             love = 2;
>             hate = -1;
>          }
>          else {
>             hate = 1;
>          }
>       }
>       else {
>          if (mood = 0) {
>             love = 1;
>          }
>          else {
>             love = -1;
>             hate = 2;
>          }
>       }
>       if (g_Girls.HasTrait(girl, "Yandere")) {
>          love *= 2;
>          hate *= 2;
>       }
>       g_Girls.UpdateStat(girl, STAT_PCLOVE, love);
>       g_Girls.UpdateStat(girl, STAT_PCHATE, hate);
>    }             
Here's the Window binary:
http://www.mediafire.com/?7fk9c78yj5ejmx8




edit: I think it would be possible to create a user defined XML file for this function (except maybe for the complex tsundere/Yandere example above). I'm still digging into the source files to figure out how to do this.
« Last Edit: December 28, 2010, 02:31:41 PM by polol »

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: patch: more end of turn effects
« Reply #1 on: December 28, 2010, 05:39:09 PM »
edit: I think it would be possible to create a user defined XML file for this function (except maybe for the complex tsundere/Yandere example above). I'm still digging into the source files to figure out how to do this.

Hmmm... just about. The place where it comes to grief is the if/else and random numbers in the tsundere/yandere code. Nothing that can't be solved with a bit of lua, of course. This was in fact pretty much how I wanted to handle user defined traits. It's just a case of getting the right entry points in place.