Poll

If you are reporting a bug, follow these steps to assist us in finding the cause of your bug

1. Delete the "gamelog.txt" file from your game folder to clear it.
2. Run the game as you normally would until it crashes.
3. Create a zip file with your savegame and your "gamelog.txt" files.
4. Post your bug report with details of how and when you get the crash.
5. Attach the zip file to your report.

Author Topic: Crazy and PP's mod bug thread  (Read 619530 times)

0 Members and 10 Guests are viewing this topic.

Offline aevojoey

  • Hero Member
  • *****
  • Posts: 1413
  • Thats ok, I'm used to disappointment.
Re: Crazy and PP's mod bug thread
« Reply #180 on: April 25, 2014, 04:01:20 PM »
I have only been playing with the source code for a few days and have only really done cleanup on it; fixing white space, learning the stats for jobs, finding out how the game handles files, etc.
So far I have only really changed the WorkPersonalBedWarmer.cpp file to correct the problem above.
I also condensed the if(HateLove) sections:
Code: [Select]
    if(girl->m_States&(1<<STATUS_SLAVE))
    {
             if(HateLove < -80)    message += "She hates you more then anything but you own her so she does what she is told.\n\n";
        else if(HateLove < -60)    message += "She hates you but knows she must listen.\n\n";
        else if(HateLove < -40)    message += "She doesn't like you but she is your slave and does what she is told.\n\n";
        else if(HateLove < -20)    message += "She finds you annoying but knows she must listen.\n\n";
        else if(HateLove <  0)    message += "She finds you to be annoying but you own her.\n\n";
        else if(HateLove < 20)    message += "She finds you be a decent master.\n\n";
        else if(HateLove < 40)    message += "She finds you be a good master.\n\n";
        else if(HateLove < 60)    message += "She finds you to be attractive.\n\n";
        else if(HateLove < 80)    message += "She has really strong feelings for you.\n\n";
        else                message += "She loves you more then anything.\n\n";
    }
    else
    {
             if(HateLove < -80)    {wages +=150;    message += "She can't stand the sight of you and demands way more money to lay with you at night.\n\n";}
        else if(HateLove < -60)    {wages +=100;    message += "She don't like you at all and wants more money to lay with you at night .\n\n";}
        else if(HateLove < -40)    {wages += 75;    message += "She doesn't like you so she wants extra for the job.\n\n";}
        else if(HateLove < -20)    {wages += 50;    message += "She finds you annoying so she wants extra for the job.\n\n";}
        else if(HateLove <   0)    {wages += 25;    message += "She finds you to be annoying so she wants extra for the job.\n\n";}
        else if(HateLove <  20)    {            message += "She finds you to be okay.\n\n";}
        else if(HateLove <  40)    {wages -= 20;    message += "She finds you to be nice so she gives you a discount.\n\n";}
        else if(HateLove <  60)    {wages -= 40;    message += "She finds you attractive so she gives you a discount.\n\n";}
        else if(HateLove <  80)    {wages -= 60;    message += "Shes has really strong feelings for you so she lays with you for less money.\n\n";}
        else                {wages -= 80;    message += "She is totally in love with you and doesn't want as much money.\n\n";}
    }


I also have found that in the WorkPersonalTraining.cpp file it also uses the same "roll" to figure both the skill and the gain that essentially makes the result:
Code: [Select]
if (roll <= 15)  SKILL_ORALSEX+5
else if (roll <= 20) SKILL_ORALSEX+4
else if (roll <= 35) SKILL_GROUP+4
else if (roll <= 40) SKILL_GROUP+3
else if (roll <= 55) SKILL_BDSM+3
else if (roll <= 60) SKILL_BDSM+2
else if (roll <= 80) SKILL_ANAL+2
else SKILL_NORMALSEX+2

Making 2 "rolls" would correct this.

In the WorkPersonalBedWarmer.cpp file, the same "roll" controls the DisobeyCheck as well as the {message += "She was horney and she likes you so she ";...} check.



Some things I plan on doing:
Making a folder "Resources\Items" < Done
Moving the "config.xml" file to the root game directory and/or combining it with "ScreenMode.txt"
Consolidating the "Resources\Buttons" and "Resources\Images" folders and/or including the buttons/images in with the individual Interfaces.
Allow for subfolders in "Resources\Characters" for sorting of image types and allowing "girlsx" and "rgirlsx" files to be put into the girl's folder for easier sharing/sorting.
Make the game create the "Saves" folder if it does not exist.
« Last Edit: May 06, 2014, 07:18:32 PM by aevojoey »
Fixing the game is a better game than actually playing it.
Get the Current Version <|> Discuss the Game <|> Report a bug

Offline Zangril

  • Newbie
  • *
  • Posts: 6
Re: Crazy and PP's mod bug thread
« Reply #181 on: April 26, 2014, 10:59:17 PM »
This is the second time it has happened to me. I sent a few girls from the studio to my dungeon, where I sold them and when I click next week the game crashes. But, when I load it back the girls I sent to the dungeon and sold are still at the studio and more than half of the girls I had in the studio are missing.

Offline Uriel

  • Full Member
  • ***
  • Posts: 175
Re: Crazy and PP's mod bug thread
« Reply #182 on: April 27, 2014, 03:56:03 AM »
I think something is wrong between new locations and a dungeon. For example: i go to the clinic, girl management, slect a girl, open details and click "Send to dungeon". Now that girl is in clinic and in dungeon at the same time. If you release her from the dungeon, she will instead appear in your brothel, and will still be in the clinic.

Don't save a game after doing this, or you will end up with a borked save.
« Last Edit: April 27, 2014, 03:57:50 AM by Uriel »

Offline aevojoey

  • Hero Member
  • *****
  • Posts: 1413
  • Thats ok, I'm used to disappointment.
Re: Crazy and PP's mod bug thread
« Reply #183 on: April 27, 2014, 08:08:27 AM »
This is the second time it has happened to me. I sent a few girls from the studio to my dungeon, where I sold them and when I click next week the game crashes. But, when I load it back the girls I sent to the dungeon and sold are still at the studio and more than half of the girls I had in the studio are missing.


Apparently this has been a long time known bug in the game that does not correctly send girls to the dungeon so the following code had been added in cScreenGirlDetails.cpp
Code: [Select]
    if (selected_girl->m_InClinic || selected_girl->m_InMovieStudio || selected_girl->m_InHouse || selected_girl->m_InCentre || selected_girl->m_InArena)
    {
        DisableButton(senddungeon_id, true);
    }

The cause of your problem has to do with game loading.
When the game loads, it does not currently set where the girl is located (m_In...).

If you transfer a girl before you send her to the dungeon it will set where the girl is located thereby removing the "Send To Dungeon" button unless she is in a main brothel, preventing this problem.

Fixing the game is a better game than actually playing it.
Get the Current Version <|> Discuss the Game <|> Report a bug

Offline aevojoey

  • Hero Member
  • *****
  • Posts: 1413
  • Thats ok, I'm used to disappointment.
Re: Crazy and PP's mod bug thread
« Reply #184 on: April 29, 2014, 12:10:49 AM »
**Replying to a bug report made in "Complete Game Download" topic**

if u try to use the "next" and "prev" buttons in the studio, house, the arena or the clinic u end up getting the next girl in the brothel u have selected, not the location that u are actually looking at. is that something fixable?
This bug seems to have already been fixed in the source code but has not yet been compiled and released by Crazy.



for some reason the game crashes sometimes when i try to adjust the money spent on promotion for my movie studio, mostly if it´s done the first turn after loading a game.
This bug stems from the game not saving/loading the movie studio settings propperly.
To fix it, I copy/pasted the following code from sBrothel::LoadBrothelXML to sMovieStudio::LoadMovieStudioXML
Code: [Select]
// load variables for sex restrictions
pBrothel->QueryValueAttribute<bool>("RestrictAnal", &m_RestrictAnal);
pBrothel->QueryValueAttribute<bool>("RestrictBDSM", &m_RestrictBDSM);
pBrothel->QueryValueAttribute<bool>("RestrictOral", &m_RestrictOral);
pBrothel->QueryValueAttribute<bool>("RestrictTitty", &m_RestrictTitty);
pBrothel->QueryValueAttribute<bool>("RestrictBeast", &m_RestrictBeast);
pBrothel->QueryValueAttribute<bool>("RestrictGroup", &m_RestrictGroup);
pBrothel->QueryValueAttribute<bool>("RestrictNormal", &m_RestrictNormal);
pBrothel->QueryValueAttribute<bool>("RestrictLesbian", &m_RestrictLesbian);
pBrothel->QueryValueAttribute<unsigned short>("AdvertisingBudget", &m_AdvertisingBudget);
and this from sBrothel::SaveBrothelXML to sMovieStudio::SaveMovieStudioXML
Code: [Select]
// save variables for sex restrictions
pBrothel->SetAttribute("RestrictAnal", m_RestrictAnal);
pBrothel->SetAttribute("RestrictBDSM", m_RestrictBDSM);
pBrothel->SetAttribute("RestrictOral", m_RestrictOral);
pBrothel->SetAttribute("RestrictTitty", m_RestrictTitty);
pBrothel->SetAttribute("RestrictBeast", m_RestrictBeast);
pBrothel->SetAttribute("RestrictGroup", m_RestrictGroup);
pBrothel->SetAttribute("RestrictNormal", m_RestrictNormal);
pBrothel->SetAttribute("RestrictLesbian", m_RestrictLesbian);
pBrothel->SetAttribute("AdvertisingBudget", m_AdvertisingBudget);
(Also need to copy them to arena/center/house/clinic if they use them)
Fixing the game is a better game than actually playing it.
Get the Current Version <|> Discuss the Game <|> Report a bug

Offline Otaku_Hanzo

  • Newbie
  • *
  • Posts: 17
Re: Crazy and PP's mod bug thread
« Reply #185 on: April 29, 2014, 06:54:34 PM »
I've encountered an interesting bug I thought I should share. I tried looking through the coding to see if I could fix it but to no avail. It's not game breaking anyway.


Basically when I set a promotional budget for the Studio it resets to 0 every week. Every place other than there holds it's budget from week to week.


Anyway, just thought I'd mention it.
"I may grow old but I will never grow up." ~Mark Twain

Offline crazy

  • Hero Member
  • *****
  • Posts: 733
Re: Crazy and PP's mod bug thread
« Reply #186 on: April 29, 2014, 10:51:56 PM »
This bug seems to have already been fixed in the source code but has not yet been compiled and released by Crazy.
Should have been in the last few release actually.
This bug stems from the game not saving/loading the movie studio settings propperly.
To fix it, I copy/pasted the following code from sBrothel::LoadBrothelXML to sMovieStudio::LoadMovieStudioXML
Code: [Select]
// load variables for sex restrictions
pBrothel->QueryValueAttribute<bool>("RestrictAnal", &m_RestrictAnal);
pBrothel->QueryValueAttribute<bool>("RestrictBDSM", &m_RestrictBDSM);
pBrothel->QueryValueAttribute<bool>("RestrictOral", &m_RestrictOral);
pBrothel->QueryValueAttribute<bool>("RestrictTitty", &m_RestrictTitty);
pBrothel->QueryValueAttribute<bool>("RestrictBeast", &m_RestrictBeast);
pBrothel->QueryValueAttribute<bool>("RestrictGroup", &m_RestrictGroup);
pBrothel->QueryValueAttribute<bool>("RestrictNormal", &m_RestrictNormal);
pBrothel->QueryValueAttribute<bool>("RestrictLesbian", &m_RestrictLesbian);
pBrothel->QueryValueAttribute<unsigned short>("AdvertisingBudget", &m_AdvertisingBudget);
and this from sBrothel::SaveBrothelXML to sMovieStudio::SaveMovieStudioXML
Code: [Select]
// save variables for sex restrictions
pBrothel->SetAttribute("RestrictAnal", m_RestrictAnal);
pBrothel->SetAttribute("RestrictBDSM", m_RestrictBDSM);
pBrothel->SetAttribute("RestrictOral", m_RestrictOral);
pBrothel->SetAttribute("RestrictTitty", m_RestrictTitty);
pBrothel->SetAttribute("RestrictBeast", m_RestrictBeast);
pBrothel->SetAttribute("RestrictGroup", m_RestrictGroup);
pBrothel->SetAttribute("RestrictNormal", m_RestrictNormal);
pBrothel->SetAttribute("RestrictLesbian", m_RestrictLesbian);
pBrothel->SetAttribute("AdvertisingBudget", m_AdvertisingBudget);
(Also need to copy them to arena/center/house/clinic if they use them)
Nice got this in and will be in the next patch.

Offline aevojoey

  • Hero Member
  • *****
  • Posts: 1413
  • Thats ok, I'm used to disappointment.
Re: Crazy and PP's mod bug thread
« Reply #187 on: May 06, 2014, 07:31:17 PM »
I have modified my code to move the items from ".\Resources\Data" to ".\Resources\Items"

InterfaceProcesses.cpp
Code: [Select]
void LoadGameInfoFiles()
{
    DirPath location = DirPath() << "Resources" << "Data";
    DirPath location_i = DirPath() << "Resources" << "Items"; // `J` moved items from Data to Items folder

    FileList fl(location, "*.traits");
    FileList fl_i(location_i, "*.itemsx"); // `J` moved items from Data to Items folder

    for(int i = 0; i < fl.size(); i++) {
        g_Traits.LoadTraits(fl[i].full());
    }
    load_items_temp(fl_i); // `J` moved items from Data to Items folder
}
Tested it a few times and had no problems so far.

The code could probably be simplified by separating the processing of the items from the traits and/or merging it with the load_items_temp function.
I may do that later but for now this change causes the least possibility of errors.



I also modified the damage/healing of constructs to be 10% instead of a max of +/-4
cGirls::UpdateStat
Code: [Select]
        if(HasTrait(girl, "Construct"))
        {
            /*
            if(amount < -4)
            amount = -4;
            else if(amount > 4)
            amount = 4;
            `J` Reworked construct damage/healing to 10% instead of maximum of 4 up or down
            */
            amount = (int)ceil(amount*0.1);
        }
Items should now heal constructs 10% of the items regular healing.
This should also help with healing using the repair shop in the hospital.

(the code for WorkRepairShop.cpp needs to be reworked and a job WorkMechanic.cpp needs to be created.)


I also did a complete rewrite of WorkPersonalTraining.cpp and attached it to this post if anyone wants to check it.
It now takes into account players disposition and if the girl is a virgin as well as trains any of the sex skills and displays how much she learns.
« Last Edit: May 07, 2014, 03:36:22 PM by aevojoey »
Fixing the game is a better game than actually playing it.
Get the Current Version <|> Discuss the Game <|> Report a bug

Offline crazy

  • Hero Member
  • *****
  • Posts: 733
Re: Crazy and PP's mod bug thread
« Reply #188 on: May 07, 2014, 08:51:30 PM »
I also did a complete rewrite of WorkPersonalTraining.cpp and attached it to this post if anyone wants to check it.
It now takes into account players disposition and if the girl is a virgin as well as trains any of the sex skills and displays how much she learns.
Interesting changes there.  I may have went with felling towards the player instead of disposition but what u did is nice.  Set it up to check the sex restrictions and it would be almost perfect.  That way if a person didn't want to train in group or beast or whatever they could just restrict it and it wouldn't do that type.

Offline aevojoey

  • Hero Member
  • *****
  • Posts: 1413
  • Thats ok, I'm used to disappointment.
Re: Crazy and PP's mod bug thread
« Reply #189 on: May 07, 2014, 09:25:47 PM »
I may have went with felling towards the player instead of disposition
At first I considered doing it with player love/hate/fear but it is set up to say "You decide to ..." so I figured player disposition would be more appropriate.
I could add l/h/f to the chance of accepting but that would really have little noticeable effect on it.


Set it up to check the sex restrictions and it would be almost perfect.  That way if a person didn't want to train in group or beast or whatever they could just restrict it and it wouldn't do that type.
I made the players disposition also take this into account for the most part, Benevolent players will almost never do beast or bdsm while evil players will do much more harsher stuff.
Also, unless you have added it, my sc does not have a brothel management page for the house. If you want the brothel management from the first brothel to control the house, I can do that.


I also considered making it check for a skill that is lower than the average for that girl but that would involve more programming than I am familiar with. So for now it only skips a skill if it is already at 100.
« Last Edit: May 07, 2014, 09:32:20 PM by aevojoey »
Fixing the game is a better game than actually playing it.
Get the Current Version <|> Discuss the Game <|> Report a bug

Offline crazy

  • Hero Member
  • *****
  • Posts: 733
Re: Crazy and PP's mod bug thread
« Reply #190 on: May 07, 2014, 09:36:31 PM »
At first I considered doing it with player love/hate/fear but it is set up to say "You decide to ..." so I figured player disposition would be more appropriate.
I could add l/h/f to the chance of accepting but that would really have little noticeable effect on it.
Ive always set it up with the lovehate type deal but this way may be better then that.  Takes the choice out of the girls and gives it more to the player on if she decides.
I made the players disposition also take this into account for the most part, Benevolent players will almost never do beast or bdsm while evil players will do much more harsher stuff.
Also, unless you have added it, my sc does not have a brothel management page for the house. If you want the brothel management from the first brothel to control the house, I can do that.
I thought house had a brothel management page...  I dont think its a whole seapreate thing its like arena and stuido its just kinda tacked on.  But maybe I forgot to do that part I do that sometimes lol.  If it dont then yeah off the brothel would work fine.
I also considered making it check for a skill that is lower than the average for that girl but that would involve more programming than I am familiar with. So for now it only skips a skill if it is already at 100.
I seen that part it should work well.  After looking that over I think ur probally much better coder then me so idk how to do that either but what u have done works fine i think.

Offline aevojoey

  • Hero Member
  • *****
  • Posts: 1413
  • Thats ok, I'm used to disappointment.
Re: Crazy and PP's mod bug thread
« Reply #191 on: May 07, 2014, 10:04:19 PM »
After looking that over I think ur probally much better coder then me
I have only been coding in c++ for 2 weeks now.
I can look at code and figure out how it works and how to use it but if I have no reference it takes me longer.
Fixing the game is a better game than actually playing it.
Get the Current Version <|> Discuss the Game <|> Report a bug

Offline crazy

  • Hero Member
  • *****
  • Posts: 733
Re: Crazy and PP's mod bug thread
« Reply #192 on: May 07, 2014, 10:12:05 PM »
I have only been coding in c++ for 2 weeks now.
I can look at code and figure out how it works and how to use it but if I have no reference it takes me longer.
Well that is me lol.  Ive been doing it for a few years on this game but its all I have ever tried and Im self taught so I can do somethings but others is beyond me.  So I do what I can to try and make the game better.  Sometimes it works sometimes it dont but atleast Im trying lol.

Offline torrentsearcher

  • Newbie
  • *
  • Posts: 47
Re: Crazy and PP's mod bug thread
« Reply #193 on: May 09, 2014, 09:27:51 AM »
and all I can do is play and try to find bugs...
lately i found that the game tends to crash when u are on the studio page during turn summary and press the "next" button. i asume it tries to change to a brothel that is not linked to the button in that case?
btw, will there be a whole updated client that has the bugs mentioned in this thread fixed? i am absolutely no good at inserting all these hotfixes into the gamecode... =(

Offline aevojoey

  • Hero Member
  • *****
  • Posts: 1413
  • Thats ok, I'm used to disappointment.
Re: Crazy and PP's mod bug thread
« Reply #194 on: May 09, 2014, 10:24:07 AM »
I am currently in the process of combining my code into crazy's.
I should have it done by this weekend and then push it to the svn.

Update: done and pushed
Crazy can then check it and compile it.
So hopefully you can have the new and improved version next week. :)


So far the only major changes that you will need to do when changing to the new version will be moving the items from  ".\Resources\Data" to ".\Resources\Items"

I tried to allow for uncorrected spelling changes from older ".girlsx" and ".rgirlsx" to be automatically corrected and ignored
ie. "Incorporial" will be  corrected to "Incorporeal" when the game loads the file.
The file itself will not be corrected and I have not yet added a file I will call "spellcheck_needed.txt" that will tell you where any errors in girl files are. This should complement the existing "gamelog.txt" by showing only things you can fix on your end not in the source code.
« Last Edit: May 09, 2014, 11:33:50 AM by aevojoey »
Fixing the game is a better game than actually playing it.
Get the Current Version <|> Discuss the Game <|> Report a bug