Ren'Py Brothel King [v0.2] [Goldo]

4.60 star(s) 44 Votes

Kite80

Well-Known Member
Modder
May 30, 2017
1,049
1,038
Experimental patch update:

fixed an issue with punishments and hypno trainings which resulted in an error message saying "object free is not defined".
 
  • Like
Reactions: OhWee

Kite80

Well-Known Member
Modder
May 30, 2017
1,049
1,038
Hey guys, remember that now there's another thread for BK, containing all girl packs and mods updates. Just click on my signature banner and get all the packs and mods updates!
 

highphoenix

New Member
Dec 24, 2017
4
0
I'm sorry, but an uncaught exception occurred.

While loading <'ProportionalScale' <'Image' u'UI/heartfear.png'> 26.0 75 True>:
File "game/BKmain.rpy", line 49, in script
$ girl = ui.interact()
File "game/BKmain.rpy", line 49, in <module>
$ girl = ui.interact()
File "game/BKclasses.rpy", line 5192, in load
child = im.cache.get(self.image)
IOError: Couldn't find file 'UI/heartfear.png'.

Im getting this error. It happens when the week ends and I go to slave market and I had talked to some girls in some area.
I'm using all the addons (interface, patch, gameplay mod)

edit: well, i just copied heart.png icon and renamed it to heartfear, it works now.
I don't like that new mechanism where girls are removed from street and moved to slave market, since I just lose few days of progress on them. I'd like an option to remove that culling.
 
Last edited:

OhWee

Forum Fanatic
Modder
Game Developer
Jun 17, 2017
5,712
28,941
I'm sorry, but an uncaught exception occurred.

While loading <'ProportionalScale' <'Image' u'UI/heartfear.png'> 26.0 75 True>:
File "game/BKmain.rpy", line 49, in script
$ girl = ui.interact()
File "game/BKmain.rpy", line 49, in <module>
$ girl = ui.interact()
File "game/BKclasses.rpy", line 5192, in load
child = im.cache.get(self.image)
IOError: Couldn't find file 'UI/heartfear.png'.

Im getting this error. It happens when the week ends and I go to slave market and I had talked to some girls in some area.
I'm using all the addons (interface, patch, gameplay mod)

edit: well, i just copied heart.png icon and renamed it to heartfear, it works now.
I don't like that new mechanism where girls are removed from street and moved to slave market, since I just lose few days of progress on them. I'd like an option to remove that culling.
OK, that's my gameplay mod you are talking about. Everyone else, relax!

R.E. the heartfear.png, I meant to include it in my download, but obviously (looking at the folder now) I missed that. So I've attached one for you. Apologies! (my bad)

Now, r.e. the culling:
Before, girls would just stick around for 8 weeks before being automatically culled. Girls that you didn't talk to had a chance of being culled each week, but if you talked to her, yeah she was 'spared' from the culling.

My intention here was to encourage people to talk to their potential love interests regularly, and also introduce a bit of 'jeapordy', by maybe convincing you to save her from slavery if she had been culled (i.e. not let all of that hard work chatting her up go to waste). The chance (in my mod) of being culled is based on how many days it's been since you last talked to her, and starts at 2% (so that there's always a chance, so if it's been 3 days since you talked to her when the 'Monday cull' occurs, 4% chance that Monday). So a way to mitigate this might be to talk to her on Sundays, to minimize her chances of being culled.

I was also thinking ahead a bit and laying the groundwork, so that later on I could figure out how to 'switch' the dialogue up a bit here so that you'd have a differerent dialogue tree for 'rescued love interests' if you ended up 'rescuing' them from the slave market.


So there is a relatively 'easy' way for you to address this on your own, but I'd really like to hear your thoughts. What do you think is a reasonable 'safe period' before there's a chance of culling?

Here's how you can change the modifier for yourself, if you don't mind editing code (this one's easy).

Go to line 280 in BKfunctions.rpy in the /game folder (use notepad2 or a similar 'enhanced' text editor.)
You'll see this line:
Code:
                cullodds = int(calendar.time - girl.talked_to_date + 1)
Change the + 1 to some suitable negative number that agrees with you (so say - 7 if you want NO CHANCE of a girl being culled if you've talked to her in the last week, or - 28 if you want 4 weeks worth of 'safety').

Just remember to save the document as .rpy (not .txt) when you are done. Also, maybe make a backup first just in case.

If you aren't comfortable with editing, let me know and I can upload an edited version, with whatever 'safety margin' (in days/weeks) that you'd like to see.
 
Last edited:

Kite80

Well-Known Member
Modder
May 30, 2017
1,049
1,038
Warning! Incoming Cheats!

Well guys, I somewhat found a way to multiclass MC, if you're interested in an overpowered brothel owner here's what you have to do:
You don't have permission to view the spoiler content. Log in or register now.
Congrats, now you have a 25 level full powered MC! Be sure to have enough spirit and mana for actvating all that stuff...

Perhaps I will add it in the next version of my trainer if you guys may find it useful.
 
Last edited:

highphoenix

New Member
Dec 24, 2017
4
0
OK, that's my gameplay mod you are talking about. Everyone else, relax!

R.E. the heartfear.png, I meant to include it in my download, but obviously (looking at the folder now) I missed that. So I've attached one for you. Apologies! (my bad)

Now, r.e. the culling:
Before, girls would just stick around for 8 weeks before being automatically culled. Girls that you didn't talk to had a chance of being culled each week, but if you talked to her, yeah she was 'spared' from the culling.

My intention here was to encourage people to talk to their potential love interests regularly, and also introduce a bit of 'jeapordy', by maybe convincing you to save her from slavery if she had been culled (i.e. not let all of that hard work chatting her up go to waste). The chance (in my mod) of being culled is based on how many days it's been since you last talked to her, and starts at 2% (so that there's always a chance, so if it's been 3 days since you talked to her when the 'Monday cull' occurs, 4% chance that Monday). So a way to mitigate this might be to talk to her on Sundays, to minimize her chances of being culled.

I was also thinking ahead a bit and laying the groundwork, so that later on I could figure out how to 'switch' the dialogue up a bit here so that you'd have a differerent dialogue tree for 'rescued love interests' if you ended up 'rescuing' them from the slave market.


So there is a relatively 'easy' way for you to address this on your own, but I'd really like to hear your thoughts. What do you think is a reasonable 'safe period' before there's a chance of culling?

Here's how you can change the modifier for yourself, if you don't mind editing code (this one's easy).

Go to line 280 in BKfunctions.rpy in the /game folder (use notepad2 or a similar 'enhanced' text editor.)
You'll see this line:
Code:
                cullodds = int(calendar.time - girl.talked_to_date + 1)
Change the + 1 to some suitable negative number that agrees with you (so say - 7 if you want NO CHANCE of a girl being culled if you've talked to her in the last week, or - 28 if you want 4 weeks worth of 'safety').

Just remember to save the document as .rpy (not .txt) when you are done. Also, maybe make a backup first just in case.

If you aren't comfortable with editing, let me know and I can upload an edited version, with whatever 'safety margin' (in days/weeks) that you'd like to see.
Yesterday when I played, all the girls that I talked to for first few weeks of a new game got transfered to the slave market. I talked to everyone of them every day, didn't get to hire them in those 7 days, and on monday they got transferred. So I think there could be a bug with those 2% chance. I would be ok with the mechanism if it would be only 2% chance.
 

OhWee

Forum Fanatic
Modder
Game Developer
Jun 17, 2017
5,712
28,941
Hey guys, remember that now there's another thread for BK, containing all girl packs and mods updates. Just click on my signature banner and get all the packs and mods updates!
@Kite80

I reached out to two moderators yesterday, to see if we could get a link to your thread in the OP of this one. @muttdoggy @Pepé Le Pew

So far, I haven't heard back.
 

OhWee

Forum Fanatic
Modder
Game Developer
Jun 17, 2017
5,712
28,941
Yesterday when I played, all the girls that I talked to for first few weeks of a new game got transfered to the slave market. I talked to everyone of them every day, didn't get to hire them in those 7 days, and on monday they got transferred. So I think there could be a bug with those 2% chance. I would be ok with the mechanism if it would be only 2% chance.
Looking into this. I did spike the chance briefly in my playtesting (to make sure it was working), so I'm wondering if that may be in play here.

And, yep, there it is... thought I killed that!

Line 283 - should have been commented out completely. I fixed it (apologies!), try the attached BKfunctions.rpy.

I've also attached a new screens.rpy for my gameplay mod. The only change is that you should be able to click directly on the dialogue box again to advance the text now, and still access the scroll bar when it appears (let me know if you have issues, it's working fine for me). I'll be updating my interface mod separately later on, but the files will be nearly identical (except for my version text on the save screen).

And again, apologies. I feel really stupid about line 283 at the moment... (Doh!)
:alien:


I do have a new version of my gameplay mod in the works, that'll include the stuff I forgot to include in V1 (i.e. the heartfear.png), which is why I'm not just uploading a new version at the moment. I think I'm done testing my new tweaks for now, so I may upload it shortly. I do want try to add in the new perk trees at least though, so I need to make sure I know where all the code for those perks are before I do that. Autorest is a bit more involved, so I'm holding off until I can implement and test it properly.

The latest version of the experimental patch has a couple of minor issues, so I'm holding off on the newer stuff (i.e. master bedroom) until things get ironed out.
 
Last edited:

highphoenix

New Member
Dec 24, 2017
4
0
Code:
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/BKmain.rpy", line 1184, in script
    if girl.hurt > 0:
  File "game/BKmain.rpy", line 1190, in <module>
    elif girl.away:
AttributeError: 'Girl' object has no attribute 'away'

Windows-8-6.2.9200
Ren'Py 7.0.0.196
Brothel King 0.14
Tue Nov 27 22:48:56 2018
Thanks for the response above.

This next error happens when I first give a job to girl. Then I click ignore and it works.

edit: happened because I was using both new gameplay mod and experimental. deleted experimental files, works ok now.
 
Last edited:

OhWee

Forum Fanatic
Modder
Game Developer
Jun 17, 2017
5,712
28,941
Code:
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/BKmain.rpy", line 1184, in script
    if girl.hurt > 0:
  File "game/BKmain.rpy", line 1190, in <module>
    elif girl.away:
AttributeError: 'Girl' object has no attribute 'away'

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/BKmain.rpy", line 1184, in script
    if girl.hurt > 0:
  File "E:\Games\Democracy 3\Galleryy\bk\Brothel_King-pc\renpy\ast.py", line 1729, in execute
    if renpy.python.py_eval(condition):
  File "E:\Games\Democracy 3\Galleryy\bk\Brothel_King-pc\renpy\python.py", line 1943, in py_eval
    return py_eval_bytecode(code, globals, locals)
  File "E:\Games\Democracy 3\Galleryy\bk\Brothel_King-pc\renpy\python.py", line 1936, in py_eval_bytecode
    return eval(bytecode, globals, locals)
  File "game/BKmain.rpy", line 1190, in <module>
    elif girl.away:
AttributeError: 'Girl' object has no attribute 'away'

Windows-8-6.2.9200
Ren'Py 7.0.0.196
Brothel King 0.14
Tue Nov 27 22:48:56 2018
Thanks for the response above.

This next error happens when I first give a job to girl. Then I click ignore and it works.

I'm not even going to ask why Brothel King is in the Democracy 3 folder...
:p

Sounds like a variable isn't getting assigned in the init phase, but I don't really know. BTW, is this Vanilla BK, Experimental BK, or Modded BK?
 
Last edited:

Kite80

Well-Known Member
Modder
May 30, 2017
1,049
1,038
@highphoenix: first time I see such an error, have you installed any mods or the experimental patch?

And well, when you have a family using your pc, you must hide H games into very boring games folders :-D

@shohei : that error refers to a variable present in BKhelp.rpy but that should have been defined in BKinit_variables.rpy; for some reason that definition is under comment tag, so ren'py doesn't read it as a code line.

You can fix the error in this way:

open BKhelp.rpy with a text editor (editra would be best), find the right line containing this code:

Code:
$ stat = playerclass_spell_stat[MC.playerclass]
(you can use a 'find' tool if necessary)

and add '#' at the start of that line, so that you obtain this:

Code:
#    $ stat = playerclass_spell_stat[MC.playerclass]
Save and exit. Next time you open that help command, no more errors ;-)
 
Last edited:

danken

Newbie
Jul 1, 2017
65
44
There is a guide about story, but is there a guide about general game mechanics? My girls are getting sick, there is arson all the time, and I am running out of money. I rushed to chapter II with only 2 girls but it seems like it wasn't worth it, I probably should get more and better girls before that.
 

OhWee

Forum Fanatic
Modder
Game Developer
Jun 17, 2017
5,712
28,941
There is a guide about story, but is there a guide about general game mechanics? My girls are getting sick, there is arson all the time, and I am running out of money. I rushed to chapter II with only 2 girls but it seems like it wasn't worth it, I probably should get more and better girls before that.
I'm not sure if there is a guide, although there is the help (?) button which can give you tips here and there.

As to your specific issues, it sounds like you are having security issues.

From your home brothel screen, click on the 'Brothel' button, and this should take you to the page that has the security slider. You can spend money to increase security here (adjust the 'Security' bar to the right).​
You can then mouse over the word 'Security' and you should be able to see your current threat level in the upper right corner of the screen. Note that if you are using my gameplay mod, then the security level text will appear on top of the bar, so that you don't need to keep mousing over Security. Anyways, yeah shoot for Normal or better (Low or Very Low if you have cash to spare, Normal should work well enough in the meantime), to lessen the chances of having incidents, or getting better outcomes when they happen.​
Of course, being able to spend more on security is contingent on having a positive cash flow.​
While you are here, you can also boost advertising and Maintenance. Try to keep your dirt level low (say 10 or less, again mouse over Maintenance to see your current dirt level), and maybe hit the 'Clean Up' button if the fires have made a mess of things (i.e. high dirt level), assuming that you have some cash on hand for this.​
And yeah, you probably should have hired four girls before advancing. I've never tried advancing with just two girls before... but all may not be lost.

So, something you can do in the meantime to 'bail out' your situation is locate the three resources (Leather in the Stables (Warehouse) subdistrict, also Wood in the 'Shipyard' subdistrict and Dye in the 'Beach' subdistrict (both in the Docks district). Spend a few days accumulating these (if you haven't been already) and then go to the Market and pay the 'resources fee' to become a member. Then sell a bunch of resources (whatever you feel you can spare) to get an inflow of cash, enough to cover your security, maintenance, build more bedrooms, and hire more girls.

It sounds like your girls are 'out of commission' for a bit, so you can afford the action points to do this while they rest up.

That should help get your game back on track.

You can also boost upkeep to give the girls positive modifiers to their mood (up to +5). Mouse over the upkeep bar, and you should see your current upkeep bonus in the upper right corner. Or on the bar itself if using my mod. This is something you can do once you get your cashflow into positive territory.

One more note. If you don't have the carpenter wagon activated (this may be a requirement to activate resources), click on the ??? button on the Brothel maintenance/security page, then go explore the Gallows sub-district (I believe that's where Carpenter Girl hangs out).
 
Last edited:

Logos06

New Member
May 21, 2017
9
3
Error occurs whenever i end the day

Code:
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/BKendday.rpy", line 61, in script
    python:
  File "game/BKendday.rpy", line 273, in <module>
    for i in range(cust_nb):
TypeError: range() integer end argument expected, got float.

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/BKendday.rpy", line 61, in script
    python:
  File "D:\ztrace_maps.dll\Brothel_King-0.14\Brothel_King-pc\renpy\ast.py", line 862, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "D:\ztrace_maps.dll\Brothel_King-0.14\Brothel_King-pc\renpy\python.py", line 1912, in py_exec_bytecode
    exec bytecode in globals, locals
  File "game/BKendday.rpy", line 273, in <module>
    for i in range(cust_nb):
  File "D:\ztrace_maps.dll\Brothel_King-0.14\Brothel_King-pc\renpy\python.py", line 871, in revertable_range
    return RevertableList(range(*args))
TypeError: range() integer end argument expected, got float.

Windows-8-6.2.9200
Ren'Py 7.0.0.196
Brothel King 0.14
Thu Nov 29 23:35:57 2018
 

Kite80

Well-Known Member
Modder
May 30, 2017
1,049
1,038
@TChalla please tell us if you are using vanilla+patch or experimental patch or any other mod.

I'm adding some strategies to the walkthrough, hints and tips to get a good start and keep earning money once we move forward to the later chapters. Please refer to the link in the first post of this thread if you wish to see it.
 
Last edited:

OhWee

Forum Fanatic
Modder
Game Developer
Jun 17, 2017
5,712
28,941
@TChalla please tell us if you are using vanilla+patch or experimental patch or any other mod.

I'm adding some strategies to the walkthrough, hints and tips to get a good start and keep earning money once we move forward to the later chapters. Please refer to the link in the first post of this thread if you wish to see it.
I can tell you it's not my gameplay mod at least. The code references a line number in BKendday.rpy, which is about 50 lines further down in my gameplay mod (I added some code before that point, hence moving it down a bit further in the code).

My interface mod didn't touch BKendday.rpy, although in V3 I did include the 10/15/2018 patch, which has a BKendday.rpy file dated 9/15/2018. I suppose it's possible that an interaction elsewhere could be in play, but so far no one has reported an issue along these lines (i.e. that references the code in the error message).

More details would be nice.
 
Last edited:

OhWee

Forum Fanatic
Modder
Game Developer
Jun 17, 2017
5,712
28,941
So this just happened in my current playthrough. Renza had a horse for sale, so I go to check the resource(stock) market, and...

DarkHorse_TheStarsAlign.jpg

Note that I haven't tweaked any probabilities for the resource market, or do any other 'cheats' here, so the odds of all six resources (actually 7, note the diamonds) being 'in demand' just when I was looking to buy that handsome horse that I just saw in Renza's wares...

So I took it as a sign!

I ended up being able to buy said handsome horse, with 60+ of each resource (except diamonds) left over for later. I was collecting said resources the hard way (burning 6-7 AP a turn to collect them). And I didn't have to sell any of those rare diamonds!

So, this may not or may not be my best moment ever in BK (finding out that banging the treasure girl is an option occasionally ranks up there too, at least it made me chuckle the first time it happened), but yeah...

Anyways, just had to share!
 
Last edited:
  • Like
Reactions: Kite80

Logos06

New Member
May 21, 2017
9
3
@TChalla please tell us if you are using vanilla+patch or experimental patch or any other mod.

I'm adding some strategies to the walkthrough, hints and tips to get a good start and keep earning money once we move forward to the later chapters. Please refer to the link in the first post of this thread if you wish to see it.
Hey im just using the download listed in the OP.
No mods that i know of.
Is there a current patch or update thats not listed in the OP?

*EDiT*
Did some more testing, this happens immediately after i upgrade Charisma to level 6 and above
 
4.60 star(s) 44 Votes