Author Topic: Bug fix proposals and questions  (Read 1572 times)

0 Members and 1 Guest are viewing this topic.

Offline altereggo

  • Newbie
  • *
  • Posts: 14
Bug fix proposals and questions
« on: March 05, 2010, 04:57:24 AM »
A)
In at least some versions of the game, girls with "unknown" age turn 80 after a year (presumably due to turning 101, with the age cap of 80). Here is the code:

data += "Age: ";
    if(GetStat(girl, STAT_AGE) == 100)
    {
        data += "unknown";

Changing the above to" >=" would not solve this problem due to the age cap reducing their age to 80, but changing it to ">= 80" would work, with the drawback of making every 80 year old "age unknown."

B)
Most traits modify values by the reverse sign of their actual effect, with a few notable exceptions. Example:

else if(strcmp(tr->m_Name, "Strong Magic") == 0)
        {
            UpdateSkill(girl,SKILL_MAGIC,-20);
            UpdateStat(girl,STAT_MANA,-20);
but

else if(strcmp(tr->m_Name, "Sexy Air") == 0)
        {
            UpdateStat(girl,STAT_CHARISMA,5);
            UpdateStat(girl,STAT_BEAUTY,10);
            UpdateStat(girl,STAT_CONFIDENCE,2);

Is is a bug?

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: Bug fix proposals and questions
« Reply #1 on: March 05, 2010, 05:13:32 AM »
Changing the above to" >=" would not solve this problem due to the age cap reducing their age to 80, but changing it to ">= 80" would work, with the drawback of making every 80 year old "age unknown."

I suppose that after a girl gets to 80, it would probably be impolite to inqure too closely as to their age :)

The best way to do this would be to have an "Immortal" or "Ageless" trait, and check for that when displaying her age. But failing that, >= 80 is a good work around

B)
Most traits modify values by the reverse sign of their actual effect, with a few notable exceptions. Example:

else if(strcmp(tr->m_Name, "Strong Magic") == 0)
        {
            UpdateSkill(girl,SKILL_MAGIC,-20);
            UpdateStat(girl,STAT_MANA,-20);
but

else if(strcmp(tr->m_Name, "Sexy Air") == 0)
        {
            UpdateStat(girl,STAT_CHARISMA,5);
            UpdateStat(girl,STAT_BEAUTY,10);
            UpdateStat(girl,STAT_CONFIDENCE,2);

Is is a bug?


The first one looks like a bug. strcmp(a,b) returns zero if the two aguments are the same. It also returns <0 if a<b and >0 if a>b. That's a bit contrary to the way a lot of C functions works, but it does mean you can pass the function to sort routines and get sorted lists of strings.