Author Topic: Whore Master Patch  (Read 191937 times)

0 Members and 2 Guests are viewing this topic.

Offline Aika

  • Full Member
  • ***
  • Posts: 138
Whore Master Patch
« on: April 04, 2012, 02:19:31 PM »
Small patch to fix bugs found or fixed after the release: http://www.mediafire.com/?hm800r6lur0cl2e (Patch 2.10)
 
Note: Patch is to be used with the full game download below. It will not work with any other version of whore master. It will not work with my previous mod version. You will need to download the full game linked below, and apply the patch above.

Bugs fixed:
-Security level is no longer reduced by 50 every time a girl does the security job, now only reduced once at the beginning of the day shift.
-Street whores will be able to find customers
-The matron putting the torturer to rest will no longer crash the game.
-Fame works properly now, the number of customers attracted by brothel fame should no longer jump seemingly at random.
-Fame works properly now, it will no longer jump straight up to the max and attract 25 customers in all areas.
-Bar waitresses have been scolded, and will now take customers as they should.
-Security job has been changed, girls will now use the better of their combat or magic, their agility, and their constitution to determine their security contribution. Now less random. Some traits will help more, some traits will hinder more.
-Random girls with the NewRandom="Yes" line in their .rgirlsx file will now correctly pick a profile picture and keep it.
-Bar and Casino staff hire and fire buttons removed
-Added .png support
-Bar Waitress now uses Intelligence instead of Confidence to determine the number of customers she handles.
-Changed versioning system
-Fixed Yukari (... no, this doesn't mean she's sterile now), she will now properly load and appear in the catacombs.

Starting with this patch, previous versions' saves will no longer work. I know it's inconvenient, and it's due to me mucking around with the versioning system. With the new versioning system in place, any saves in version 2.x will load correctly in future patches. If I need to change something that makes saves incompatible across versions, I can change the main version number to make previous saves refuse to load.
 



The new patch is (finally) ready to go.

Changes in the latest patch:
-Customers will choose areas of the brothel to visit based on fame
-New brothel stat: Reputation. This increases or decreases based on customer happiness.
-Fame change: This now increases or decreases based on reputation
-Rebelliousness changes: Capped at 50, has more effect on whether a girl obeys.
-Obedience now weighs heavier on counteracting rebelliousness
-Customer service job works last, after all other customer-serving jobs do their job.
-Group customers will appear less and pay more
-Bestiality image category and skill replaced with Oral
-Combat, Masturbation, Ecchi image categories added

Download links:
Full game - http://www.mediafire.com/?1fq4hk4x6xzj5m6 (Version 2.0)
Source code - http://www.mediafire.com/?3dwtifq8d2xy59t

If you get an error message regarding "msvcr100.dll" or similar, or for that matter any other error which prevents the game from starting, then you need to download and install the VC++2010 redistributable package. If you have further problems starting then you might possibly try this one, this one, and this one, though they probably aren't needed.

Since the game has had some pretty major changes, I'm not making a patch up from any previous versions of Whoremaster. Any future patches will be based on this version.


 
 



Old news:

This patch addresses a number of issues in the 1.30.4 release of the game, and updates the game to the SVN version r634.

-Bar jobs (Barmaid, Waitress, Stripper, Singer) all used the same function, which picks a random job (Barmaid, Waitress, Stripper, Whore) for the girl.
-Bar whores used the same function as brothel whores.
-Stripper job did not increase stats
-Masseuse job did not increase stats
-Customer Service used the same function as gambling hall jobs
-Gambling Hall Jobs (except whore) all used the same function
-Gambling Hall Whores used the same function as brothel whores
-Advertising girls did not get paid
-Advertising girls would still work when they just gave birth


This patch splits the bar into two types: Regular and Sleazy Bar. The regular bar serves drinks and has a singer for entertainment. The sleazy bar has everything you'd expect from a bar in a brothel: Barmaids and waitresses in lingerie or fetish costumes, and strippers and whores for the patrons' entertainment and pleasure. Currently there is no difference in function between regular and sleazy barmaids and waitresses, but this gives me a starting point to change things in a future release.

The customer service job has been implemented. This job makes it easier to take care of customers that either didn't get taken care of by a whore or didn't like any of your girls. After all the whores have had their turn taking care of customers, customer service will go through the remaining customers (or as many of them as they can) and give them a small happiness bonus. ("We're sorry you didn't find any of our services satisfactory. Have a drink on the house.", or something like that.) This won't be as effective as good service from a whore, but it will be better than the customer not getting service at all (which leaves the customer at 0 happiness at the end of the shift).

I've also implemented GonDra's bank patch for Withdraw All, and recreation's scripts for girl interactions.

This patch is compatible with all Whore Master girl and random girl files compatible with game version r593 or later. It is NOT compatible with Whore Master EX girl and random girl files. Yet.
« Last Edit: June 12, 2012, 04:20:59 PM by Aika »

Offline Xipomus

  • Full Member
  • ***
  • Posts: 153
Re: Whore Master Mod
« Reply #1 on: April 04, 2012, 04:08:47 PM »
Always good to see somebody with a different view. Indeed the orginal is too easy and Ex is sometimes buggy, but overal a fun experience.

But more mods are always welcome. I would sugest though to make your mod compatible with the EX girls. Because you have more options for pictures ect.

Good luck with figuring out the code. Lost my own code during a crash. But it was just testing what I could do with the engine.

Can't wait to see what you come up with.

Xipomus

Offline Aika

  • Full Member
  • ***
  • Posts: 138
Re: Whore Master Mod
« Reply #2 on: April 04, 2012, 07:38:34 PM »
Since I've been studying the code and figuring out how things work, I've come up with a prioritized list of things to do.

Overall status: Ready to release!

Status update: Bugs squashed and files are being uploaded as I type this.

1:Fix Bar and Gambling Hall jobs + Add Sleazy Bar Jobs
Any bar job chosen will give a girl a random job from the bar. This MUST be fixed.

Edit: Upon closer inspection of the code, it's not just the bar. Bar has a random generator which chooses between waitress, barmaid, stripper, and whore, and choosing whore seems to jump to using the same file as the Brothel's whore. Gambling Hall whore does the same thing, and the other gambling hall jobs just use the same generic file which covers all of them. I've GOT to fix this, top priority.

Edit: This part just keeps getting bigger and bigger. Once I figured out how to do #2, it became necessary to also add the Sleazy Bar Jobs.
  - Done. Vanilla, but done. I'll work on making it less vanilla in #5.

2: Split bar jobs into regular and sleazy versions
I plan on having a regular bar with barmaids, waitresses, and singers, and a sleazy bar with its own set of barmaids and waitresses, and the addition of strippers and whores instead of singers. This might be doable in tandem with step 1
- Done, this was easier than I thought it would be once I figured out how.

3a: Take customer service out of the gambling hall and put in as a general job
Customer service doesn't just take care of gamblers. It's important for the whole brothel.
- Done, while I was at it on #2

Or:

3b: Put a separate customer service job in each area
This might be harder than it's worth to pull off. Might scrap this idea and go with 3a
- Idea officially scrapped.

4: Fix Bugs:
Whore job does not affect enjoyment - Upon further inspection, this is working.
Stripper job does not increase stats - Fixed
Masseuse job does not increase stats - Fixed
Group sex increases all skills by 0-3 - Fixed
More than one girl advertising seems to have no additional effect - After further study of the code, this is working as normal.
Customer Service job unimplemented - Fixed, but revealed one additional bug and caused another.
Advertising job girls don't get paid - Fixed
Whores don't get paid - Fixed


5: Check every job to make sure that it conforms to this standard:
a: Assigns a customer (or more than one) to each girl if possible.
b: Has a chance to increase the girl's enjoyment of the job
c: Has a chance to increase the customer's happiness if the girl did a good job
d: Pays for the job
e: Gives the girl some experience and skill

Once I have the major bugs ironed out, it'll be time to take another look at the various jobs. I've already noticed that some jobs don't do all of these steps, but for the most part they all do a and d. It's when b, c, and/or e that are missing that I'll be ripping code apart and putting it back together better.
- I decided that anything I do here will make huge changes to the game as is. I've already fixed the bugs in the jobs, doing anything more would change the way the game plays. My objective to this point is not to change the gameplay, but to fix bugs and release a patch. This will go in later.

With The Big 5 (sheesh, how many times have I increased this?) taken care of, I can begin to mod the game. Leaving it at this point would simply mean a more finished version of the game than the dev team left it at, and when (if) the developers ever return to developing the game they can have my mod files to review to decide if they want to implement them in their build.

That said, further to do:

6: Add new image categories: Oral, Ecchi, Masturbation, Combat; remove beast category
I don't get off on bestiality. I don't like the idea of having sex with an animal, and I'm not going to include such in my mod. That established, I'll be adding the Oral, Ecchi, Masturbation, and Combat image types introduced in EX. Expect also to see all bestiality and beast care jobs removed in this step. - Done, but this presents a new set of problems.

7: Edit traits, scripts, and items to increase Oral Sex instead of Bestiality skill
Bestiality is out, Oral Sex is in. But that means there are traits, items, and scripts that are no longer going to work right. Time to seek and destroy bugs and balance this.
- Traits and items are done, and I've done the best I can with the scritps, but scripts may still be bugged. I need a better script editor.

8: Modify areas customers will go to based on fame and customer happiness
As I said in my first post, I like this idea of THE FUTURE's, and I don't mind saying I'm going to steal the idea wholesale. If THE FUTURE doesn't like it, I'll refer him back to the GPL for the game he can find in his whoremaster base folder. On that note, I want to see THE FUTURE's source code which, under the GPL he is distributing with his mod, he has a responsibility to make available.
- Done.

9: Rebalance jobs and give them unique flavor text
 The jobs are all pretty vanilla. They all pretty much do the same thing, and only a few actually matter. I'll be working on changing this.

10: Add in difficulty changes
Like I said, I have a good number of ideas on how to make this game hold its difficulty. Some inspired by EX, some of my own invention. I'm not going the same direction as EX, though; EX seems to promote quantity of slaves over quality. I plan to set things up so you'll need smaller numbers of quality slaves to get ahead. You WILL want to buy more brothels, not just expand the one you start with.

11: More as I finish previous items
« Last Edit: April 22, 2012, 06:56:38 PM by Aika »

Offline enderbean123

  • Newbie
  • *
  • Posts: 7
Re: Whore Master Mod
« Reply #3 on: April 04, 2012, 11:27:02 PM »
 :D

Offline crazy

  • Hero Member
  • *****
  • Posts: 733
Re: Whore Master Mod
« Reply #4 on: April 05, 2012, 12:11:16 AM »
There are a few other mods out there that fixed some bugs and add things to the game that have source code posted u might want to look at working off them.

Offline Shilo

  • Jr. Member
  • **
  • Posts: 50
Re: Whore Master Mod
« Reply #5 on: April 05, 2012, 08:17:04 PM »
Good to see another guy making an approach on this. :)
You might want to incorporate the changes that Sentza applied to the latest repository version with the hospital and movie studio functionality, for healing girls and for getting an additional source of income by making certain movies but taking the girls off other duties for that time frame.

Also kudos for taking over the new image categories that EX introduced for the girls: Combat, Ecchi, Masturbate and Oral.
Maybe you can incorporate some of those categories to have a chance to occur for girls doing "normal" bar jobs as well, for instance by having a girl getting molested by a stranger (when security fails). Small random events that can trigger a sexy picture from time to time, so that you don't feel like "wasting" special girls on normal jobs and only get a tiny fracture of their actual image count.
Maybe leave Bestiality as category in there, though. Keep it optional, defaulting to another category like normal sex if none of such images is specified. Same as having the other new categories default to some of the old ones (Combat defaults to Death, Oral and Masturbate to Sex, Ecchi to Profile). That way could you maintain compatibility to girl packs from both, original WM as well as EX.


And I am all up for making the game harder. More random events, a higher threat from suspicious authority (from demanding higher amounts of bribe money, over inhibiting the activities of your gang, up to sending officers of the law to your establishments), a near infinite amount of gangs, so that this part of the game doesn't get rendered useless at some point and maybe some huge depths that your father made at the local mafia and now you need to pay high amounts of cash every time a set amount of time has passed, inhibiting your expansion regularly and making the game ultimately harder.

Offline Aika

  • Full Member
  • ***
  • Posts: 138
Re: Whore Master Mod
« Reply #6 on: April 05, 2012, 11:18:13 PM »
Apparently my post above was getting a little long for the forum to handle, so I've split it.

Progress Log:
--Splitting the bar jobs into separate functions seems very straightforward. Kudos to the development team, they made this part VERY easy. Setting up the functions for each job, I copied everything in WorkBar.cpp into WorkBarmaid.cpp and removed all randomization and whore function, then used that as a template for the remaining jobs. While checking the brothel stripper job function to see if I could use that for the bar stripper template, I discovered that the brothel stripper does not gain any kind of experience or stats. While looking through the brothel whore function to see if I could use that for the Bar Whore template, I discovered that the Bar Whore job does not affect a girl's enjoyment. Bugs noted for future fix. Bar job separation is complete, Gambling Hall job separation is next.

Spent some time trying to puzzle out the function that populates the job list. The job filters were easy enough to figure out, but I can't for the life of me figure out how it determines which job goes to which job filter. I'll spend some more time on this later, once I finish setting up the gambling hall jobs.

--I created a function in cgold.cpp and put its function header in cgold.h. I don't like the complicated way the development team has been using stringstreams to add strings containing int variables to messages, so the function I created will use stringstream to convert the int variable to a string which can be inserted into the message directly. This simplifies lines such as:
Code: [Select]
                ss.str("");
                ss << " Received a tip of " << tip << " gold";
                fuckMessage += ss.str();

Down to:
Code: [Select]
fuckMessage += (" received a tip of " + intstring(tip) + " gold");
Found a bug which causes a girl working as a whore in a group sex session to gain 0-2 points in all skills. Noted for a future fix.

--I had a breakthrough on figuring out how the game populates the job lists, so I went ahead and knocked out #2 and #3. This, of course, made #1 bigger.

Advertising job is bugged, I'll add that to my list of bugs to fix in #4. I also noticed a little problem with some jobs, so I've inserted a big #5 to do.

--Fixed gambling hall jobs and added sleazy bar jobs. Found Customer Service to be using the gambling hall generic job, so I unimplemented it for now. To be fixed later.

--Worked on my list of bugs to be fixed: Whore job at first glance didn't update a girl's enjoyment of the job, but when I finished tracing all the functions the whore job calls, I found that it does. Stripper job did not give a girl any kind of experience or skill, this has been fixed. Masseuse job did not give a girl any kind of experience or skill, this has been fixed. Group sex was giving girls a few points in every skill, including the combat ones. Fixed this so the girl has a chance of getting a few points of group sex skill for each customer in the group. The advertising job looked like it was not giving the correct bonus to the brothel's advertising. After further study, it looks like it is working as intended.

With that list of bugs worked out, I tackled the largest part of this thus far: Implementing a customer service job. Creating the job function from scratch was the real test here of if I know what I'm doing, and in the end I managed to create a function that does what I want it to. Then I had to tackle another problem, that of when this function processes. I want this job to take care of any customers that were not handled by the whores, but if this job is processed at the same time, it will take customers away from the whores. So I tried to create a function that processes customer service jobs after the other jobs. Finding no place to put this function that would also make sure the poor customer service job would also get paid (which is handled in the updategirls function) I instead tried to create a function that processes whore jobs before the other jobs. After combing out the problems caused by this (double messages, etc. caused by the function firing twice), I discovered that the whores were not getting paid. While trying to figure out why the advertising girls that are processing earlier are getting paid but the whores weren't, I came to an important discovery: the advertising girls AREN'T getting paid.

During the Updategirls function, the amount of money each girl makes is initialized to 0, and then the function processes the girl's job. The job function updates each girl's pay, then the updategirls function adds the girl's pay to the brothel's total earned for the turn, which is later added to the player's gold. Advertising girls' pay is updated BEFORE the Updategirls function initializes that amount to 0. The advertising girls aren't getting paid, but the function itself reports their pay. Since I created a function which processes the whores before the Updategirls function, I ended up making the whores make no money for the brothel, which led to the discovery of advertising girls making no money either. Clearly, this must be fixed, but the fix isn't going to be pretty. I'm going to have to sleep on this one.

Or not. This turned out to be VERY easy to fix. Just stop the Updategirls function from initializing the girl's pay to 0, then make sure the CalculatePay function will do the initialization in all cases. Since the CalculatePay function runs at the end up the Updategirls function, putting the pay initialization to 0 here will make sure all girls' pay variable is set to 0 before they begin their next shift.

--I did some thinking as I reviewed the current list of jobs, and decided that anything I do in #5 will affect gameplay. I'm trying to have as low an effect on gameplay as possible for the first phase. Adding the sleazy bar jobs has already done more to the gameplay than I intended. So #5 is scrapped, and this patch is ready to go.

--It's been bothering me how often we see group sex customers, when it says in the code it should only have a 5% chance of happening. It happens regularly enough that I delved into that part of the code to see if I could fix it. I did find the problem. There is only a 5% chance that a customer represents a group of customers, but that group may have any sex preference, and if it doesn't have group sex as a preference it acts as a normal customer. Furthermore, when the game generates the sex preference for any customer, including the single ones, it has a chance of being group sex. So the girl sometimes has other types of sex with groups of customers, and often has group sex with single customers? Doesn't make sense to me. So I fixed it so group customers will always have group sex as a preference, and single customers will never have group sex as a preference.

--Bestiality has been removed from the game. Currently adding the Oral sex type, and Oral, Ecchi, Masturbation, and Combat pics.

--I took a crack at the rebellion functions. It's been bothering me that rebelliousness didn't really seem to do anything, and so I took a look at the overly complicated DisobeyCheck function. I modified the calculations somewhat to be more simple and to ensure that low rebelliousness girls will disobey less, while high rebelliousness girls will disobey more. The calculations will assume that a 0 rebelliousness girl will, barring other factors, still disobey about 30% of the time (note: negative rebelliousness is possible), while a 50 rebelliousness girl will, barring other factors, disobey about 80% of the time. There's a reason those girls get sent to your dungeon, now. They don't do what they're told.

Since Spirit has such a big effect on rebelliousness, and some of the job changes I'm planning to make will make spirit more important, I've increased the effect of obedience on offsetting rebelliousness. I also capped rebelliousness at 50, not that it really seems to matter as I don't think it will go higher than that unless you're abusing a free girl.

Brothel customer happiness and fame are now hidden. There is a new visible stat, reputation. If your reputation is high, your fame will start to rise, but if your reputation is low, your fame will lower. Reputation will always move toward the customer happiness level each turn.

Customers will no longer just go to wherever there's staff. They now choose where they want to go. Your fame level dictates what areas customers are going to visit. Since fame now only increases if your customers are happy, better keep those customers smiling.

--I added a mod to make girls pick a picture and stick with it, but it's not working 100%. Some random girls will pick a picture and stick with it as they should. Some girls still randomly pick a picture every time they're clicked. I can't figure out why this is happening, so I'm leaving it like it is for now. Maybe someone else can poke at it and see what I did wrong.

Interaction sex will now show a picture of the act.

--FIXES TO THIS POINT ARE IN THE CURRENT RELEASE
« Last Edit: June 09, 2012, 02:39:41 PM by Aika »

Offline GonDra

  • Full Member
  • ***
  • Posts: 154
Re: Whore Master Mod
« Reply #7 on: April 06, 2012, 10:58:19 AM »
Quite some time ago I made a micro patch that added an Withdraw all button to the Bank.
If you want you can use the source and the ui stuff I did for that in your patch.

Offline Aika

  • Full Member
  • ***
  • Posts: 138
Re: Whore Master Mod
« Reply #8 on: April 06, 2012, 01:02:30 PM »
Thank you! I'll add that in.

If you're skilled at XML, I don't suppose you'd be willing to help me make some interface changes? I'd like to have the whole game in 1024x768 mode, and I have to admit that my talents lie elsewhere. I'm better at manipulating code than making visual changes.

Offline Aika

  • Full Member
  • ***
  • Posts: 138
Re: Whore Master Patch
« Reply #9 on: April 07, 2012, 02:52:09 PM »
The first patch is ready to go. See the first post for details.

Offline Popuri

  • Full Member
  • ***
  • Posts: 183
Re: Whore Master Patch
« Reply #10 on: April 08, 2012, 11:24:19 AM »
Been a while since I've posted here, but I'm more or less back.  Looks great so far Aika.  Let me know if there's anything I can do.

Also, a suggestion.  An options screen, with a few global variables.  You mention you're not into beast stuff, but I know some players didn't like that EX didn't include it.  Could do a 'Enable Bestiality' option in the option screen, and have the game check for that when it loads a job list.

Offline Aika

  • Full Member
  • ***
  • Posts: 138
Re: Whore Master Patch
« Reply #11 on: April 08, 2012, 12:33:57 PM »
Also, a suggestion.  An options screen, with a few global variables.  You mention you're not into beast stuff, but I know some players didn't like that EX didn't include it.  Could do a 'Enable Bestiality' option in the option screen, and have the game check for that when it loads a job list.

The real problem with allowing bestiality is this: I plan on making my game compatible with the EX packs, and EX had removed bestiality pics. If I do include allowing bestiality pics, all of the EX packs are going to be missing this category of picture.

Though after looking into what it would take to make my game 100% compatible with EX packs, I might scratch the idea and just include the new categories EX added. I have my own ideas for how I'm going to eventually be setting up girls' traits and such, and 100% compatibility with EX means I'll have to use all the same traits EX did.

So that decision is still up in the air. But I still don't get off on bestiality pics, and I don't like the idea of allowing them to be included in any finished project I release. I almost already took a sledgehammer to the bestiality functions in the game, the only reason I haven't yet is because I wanted this patch to have as little effect on core gameplay as possible.

Offline Popuri

  • Full Member
  • ***
  • Posts: 183
Re: Whore Master Patch
« Reply #12 on: April 08, 2012, 06:18:24 PM »
Totally understandable, Aika.  I'm neutral on Beasts myself.  Don't really get the appeal, but doesn't gross me out either.  Anyway, I'd love to hear more about what you've got planned, via PM or post.  I did some work on the code for EX, though very minor, as I couldn't convince FUTURE to share his source.  I'll poke around and see if I still have it lying around.  It dealt with modifying the script editor to include new commands.

Offline Aika

  • Full Member
  • ***
  • Posts: 138
Re: Whore Master Patch
« Reply #13 on: April 08, 2012, 07:17:54 PM »
I did some work on the code for EX, though very minor, as I couldn't convince FUTURE to share his source.

See, this irritates me. Per the GPL distributed with the original game, which FUTURE is also distributing with his mod and I am distributing with mine as well:

Quote from: GPL
  To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received.  You must make sure that they, too, receive
or can get the source code.
  And you must show them these terms so they
know their rights.

FUTURE should, by the terms of the GPL distributed with the original game, be making his source code freely available. The fact that he is also releasing his game under the same GPL only stresses the fact that his source code should be open source.

This is the last I'll say anything on that matter. No sense beating the topic to death when FUTURE isn't even around anymore.

Offline Popuri

  • Full Member
  • ***
  • Posts: 183
Re: Whore Master Patch
« Reply #14 on: April 08, 2012, 08:00:46 PM »
Agreed that he _should_ have shared the source, but a moot point now.  Anyway, if you're interested, these are the files I changed when I modified the script editor.  Fairly intuitive changes for the most part.  The .txt file goes into the Script Editor's folder.

http://www.mediafire.com/?g5wviwfh94jjvkw

Edit:

Almost forgot.  This code was written for EX, so it references using images for that type.  And...I forget who it was that modded the game to display images during interaction sex, but it uses that as well.  Commenting out the image references should fix that until/if you implement your own version.
« Last Edit: April 08, 2012, 08:53:32 PM by Popuri »