devolution

Author Topic: Possible Player daughter tracking fix.  (Read 7478 times)

0 Members and 1 Guest are viewing this topic.

Offline KyDekra

  • Newbie
  • *
  • Posts: 12
Possible Player daughter tracking fix.
« on: March 27, 2010, 12:40:49 AM »
Finally got myself set up to look at the code and noticed in cgirls c++ file the section

bool sGirl::calc_pregnancy(int chance, cPlayer *player)
{
    return g_GirlsPtr->CalcPregnancy(
        this,
        chance,
        GIRL_PREGPLAYERS,
        player->m_Stats,
        player->m_Skills
    );
}
sChild::sChild(bool is_players, Gender gender){    m_Unborn    = 1;    m_Age        = 0;    m_IsPlayers    = 0;    m_Sex        = gender;    m_Next        = m_Prev = 0;
    if(gender != None) {
return;
    }

Out of curiousity I switched the  'm_IsPlayers    = 0;' to a 'm_IsPlayers    =1;' and created a build with it.

So far it seems to flag the born girls with the 'Your daughter' and 'Incest' (if the mother was your daughter too) traits again. If I'm reading the code right it should only effect the players kids. However not able to fully test as the whoring jobs are not available in the current trunk code yet.

Offline myrikhan

  • Dev Team
  • *****
  • Posts: 23
Re: Possible Player daughter tracking fix.
« Reply #1 on: March 27, 2010, 01:58:19 AM »
Out of curiousity I switched the  'm_IsPlayers    = 0;' to a 'm_IsPlayers    =1;' and created a build with it.

I believe setting 'm_IsPlayer = 1' is the equivalent of 'm_IsPlayer = True' which has the side-effect
of marking a customer's child as the player's child too.  (Which in a way is pretty damn funny.  If you're
mean enough to run a brothel and keep slaves, why not claim their children too? For this reason, I
don't think your approach is wrong.)

I tried:

sChild::sChild(bool is_players, Gender gender)
{   
    m_Unborn = 1;   
    m_Age = 0;   
    m_IsPlayers = is_players;   
    m_Sex = gender;   
    m_Next = m_Prev = 0;

    if(gender != None)
        return;

    m_Sex = (g_Dice.is_girl() ? Girl : Boy);
}

With 100% impregnation chances and 1 turn gestation and grow-up times I was able to test
my change and received 'your daughter', 'your daughter & incest' and an unmarked child
(from a customer).

M.

Offline KyDekra

  • Newbie
  • *
  • Posts: 12
Re: Possible Player daughter tracking fix.
« Reply #2 on: March 27, 2010, 02:24:01 AM »
Actually used the first of your builds that was added as a branch to try that. But for some reason cant get the build with the working whoring job to build right atm so wasn't able to test myself. But thank you for checking it for me and letting me know. Honestly first time Ive tinkered with c++ and that just jumped out at me while glancing at the code.

Edit: finally got necno's recent trunk (with working brothel job) built w/ the code change mentioned earlier, and it does track the traits properly now. Customer kids have no trait. Your daughters have the Daughter trait, Incest if ya knock your daughter up, and the deformed + retarded traits apply at random if you keep up with the incest thing now.
« Last Edit: March 27, 2010, 11:33:35 AM by KyDekra »

Offline delta224

  • Dev Team
  • *****
  • Posts: 577
Re: Possible Player daughter tracking fix.
« Reply #3 on: March 27, 2010, 09:20:38 PM »
Damn, I should have caught that. This is why you should look over warnings every now and then because something like this would have shown up in the list.

Offline KyDekra

  • Newbie
  • *
  • Posts: 12
Re: Possible Player daughter tracking fix.
« Reply #4 on: March 28, 2010, 03:38:23 AM »
Damn, I should have caught that. This is why you should look over warnings every now and then because something like this would have shown up in the list.

Sometimes all it takes is an extra set of eyes or two from people who aren't as bogged down with everything at once. Besides, the daughter trait tracking was one of the things that had been bugging me for awhile. Used to like breeding super whores before the tracking got broken a couple releases ago. Have yet to have a daughter of my own without the 'Your Daughter' trait, or a customer daughter WITH the trait, so seems to be tracking 100% so far. Wanna say I tested it Saturday for about 40-50 female births. Test it out, and if you're satisfied with it, one of the tickets you were handling could be cleared up.  ;D
« Last Edit: March 28, 2010, 03:55:03 AM by KyDekra »

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: Possible Player daughter tracking fix.
« Reply #5 on: March 28, 2010, 03:57:49 PM »
Sometimes all it takes is an extra set of eyes or two from people who aren't as bogged down with everything at once. B

Heh. That's Linus' Law: "Given enough eyeballs, all bugs are shallow" :)

Offline john33759

  • Newbie
  • *
  • Posts: 3
Re: Possible Player daughter tracking fix.
« Reply #6 on: December 11, 2014, 04:45:09 AM »
I know this thread is dead, and I know it is bad form to revive a dead thread but I need to know where do I find this file to edit?

Offline aevojoey

  • Hero Member
  • *****
  • Posts: 1413
  • Thats ok, I'm used to disappointment.
Re: Possible Player daughter tracking fix.
« Reply #7 on: December 11, 2014, 01:04:48 PM »
I know this thread is dead, and I know it is bad form to revive a dead thread but I need to know where do I find this file to edit?
The source code for the game is here - https://code.google.com/p/crazys-wm-mod/source/checkout

The code mentioned is in cGirls.cpp between lines 9700-9900.
Fixing the game is a better game than actually playing it.
Get the Current Version <|> Discuss the Game <|> Report a bug