Pink Petal Games
Game Discussion => General Discussion & Download => Topic started by: KyDekra 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.
-
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.
-
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.
-
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.
-
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
-
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" :)
-
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?
-
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 (https://code.google.com/p/crazys-wm-mod/source/checkout)
The code mentioned is in cGirls.cpp between lines 9700-9900.