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

4.60 star(s) 46 Votes

Ingvar77

Newbie
May 1, 2021
92
48
Just started a new game and get this
Code:
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/BKintro.rpy", line 108, in script call
    $ renpy.call("chapter", 0)
  File "game/BKevents.rpy", line 363, in script
    python:
  File "game/BKevents.rpy", line 365, in <module>
    game.set_max_girl_level()
  File "game/BKclasses.rpy", line 318, in set_max_girl_level
    self.max_girl_level = {1: 1, 2: 5, 3: 5, 4: 10, 5: 10, 6: 15, 7: 20}[self.chapter]
KeyError: 0

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

Full traceback:
  File "game/BKintro.rpy", line 108, in script call
    $ renpy.call("chapter", 0)
  File "game/BKevents.rpy", line 363, in script
    python:
  File "K:\Brothel king 0_2\renpy\ast.py", line 914, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "K:\Brothel king 0_2\renpy\python.py", line 2028, in py_exec_bytecode
    exec bytecode in globals, locals
  File "game/BKevents.rpy", line 365, in <module>
    game.set_max_girl_level()
  File "game/BKclasses.rpy", line 318, in set_max_girl_level
    self.max_girl_level = {1: 1, 2: 5, 3: 5, 4: 10, 5: 10, 6: 15, 7: 20}[self.chapter]
KeyError: 0

Windows-7-6.1.7601-SP1
Ren'Py 7.3.5.606
Brothel King 0.2 v210826
Thu Oct 07 03:01:01 2021
 
May 16, 2017
45
46
Ok, so I goofed and ran the game unpatched with no girl data (was used to girls being there by default). Added girls. Ran it. Still broken. Do some reading. Ok, the patch is important. Install patch. Still broken. More reading. Ok I gotta delete certain files? I guess I'll delete everything but the girls folder, unzip the game and then unzip the patch and update the files. That should do it.

The game is even more broken now. More errors in more places and I still can't start the game because it gives me a null girl by default.

Any insights?
 
  • Like
Reactions: Hryme

phupdup

Well-Known Member
Oct 24, 2019
1,391
1,102
See my post a couple of pages back.

Just started a new game and get this
Code:
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/BKintro.rpy", line 108, in script call
    $ renpy.call("chapter", 0)
  File "game/BKevents.rpy", line 363, in script
    python:
  File "game/BKevents.rpy", line 365, in <module>
    game.set_max_girl_level()
  File "game/BKclasses.rpy", line 318, in set_max_girl_level
    self.max_girl_level = {1: 1, 2: 5, 3: 5, 4: 10, 5: 10, 6: 15, 7: 20}[self.chapter]
KeyError: 0

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

Full traceback:
  File "game/BKintro.rpy", line 108, in script call
    $ renpy.call("chapter", 0)
  File "game/BKevents.rpy", line 363, in script
    python:
  File "K:\Brothel king 0_2\renpy\ast.py", line 914, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "K:\Brothel king 0_2\renpy\python.py", line 2028, in py_exec_bytecode
    exec bytecode in globals, locals
  File "game/BKevents.rpy", line 365, in <module>
    game.set_max_girl_level()
  File "game/BKclasses.rpy", line 318, in set_max_girl_level
    self.max_girl_level = {1: 1, 2: 5, 3: 5, 4: 10, 5: 10, 6: 15, 7: 20}[self.chapter]
KeyError: 0

Windows-7-6.1.7601-SP1
Ren'Py 7.3.5.606
Brothel King 0.2 v210826
Thu Oct 07 03:01:01 2021
 
  • Like
Reactions: Ingvar77
May 16, 2017
45
46
Pretty nifty, but sadly, zero changes on my end. Still start with an error, if I try to pack update the girls, another error, and still 0 girls to pick from at the intro. I tried putting your files in the /game folder, but that broke the game so hard as to be unable to run in its entirety so I moved them to the main folder and I'm not seeing any changes.

Gonna double check stuff. Maybe I have things in the wrong places.

Well, I had things in the wrong spots got them in the right spots, but still unplayable.
 
Last edited:

phlore101

Member
Jun 28, 2017
338
144
I'm getting this error. Sorry if it has be spoken about before. Wasn't sure what to search for.

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

While running game code:
  File "game/BKendday.rpy", line 935, in script
    python:
  File "game/BKendday.rpy", line 941, in <module>
    calendar.newday()
  File "game/BKclasses.rpy", line 2661, in newday
    self.updates()
  File "game/BKclasses.rpy", line 2666, in updates
    weekly_updates(new_district)
  File "game/BKfunctions.rpy", line 2422, in weekly_updates
    update_slaves()
  File "game/BKfunctions.rpy", line 471, in update_slaves
    slavemarket.girls = get_girls(nb)
  File "game/BKfunctions.rpy", line 322, in get_girls
    girl.randomize(free=free, p_traits=p_traits, n_trait=n_trait, perks=perks, level=lvl)
  File "game/BKgirlclass.rpy", line 202, in randomize
    self.generate_stats()
  File "game/BKgirlclass.rpy", line 504, in generate_stats
    self.stats.append(Stat(stat, "main", self, weight=self.init_dict["base skills/" + stat]))
  File "game/BKclasses.rpy", line 3103, in __init__
    self.init_value(weight)
  File "game/BKclasses.rpy", line 3142, in init_value
    _min = weight_dict[weight-1][0] + self.parent.level * weight_dict[weight-1][1]
KeyError: 7

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

Full traceback:
  File "game/BKendday.rpy", line 935, in script
    python:
  File "E:\MiscGames\Brothel_King-0.2_test2\renpy\ast.py", line 914, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "E:\MiscGames\Brothel_King-0.2_test2\renpy\python.py", line 2028, in py_exec_bytecode
    exec bytecode in globals, locals
  File "game/BKendday.rpy", line 941, in <module>
    calendar.newday()
  File "game/BKclasses.rpy", line 2661, in newday
    self.updates()
  File "game/BKclasses.rpy", line 2666, in updates
    weekly_updates(new_district)
  File "game/BKfunctions.rpy", line 2422, in weekly_updates
    update_slaves()
  File "game/BKfunctions.rpy", line 471, in update_slaves
    slavemarket.girls = get_girls(nb)
  File "game/BKfunctions.rpy", line 322, in get_girls
    girl.randomize(free=free, p_traits=p_traits, n_trait=n_trait, perks=perks, level=lvl)
  File "game/BKgirlclass.rpy", line 202, in randomize
    self.generate_stats()
  File "game/BKgirlclass.rpy", line 504, in generate_stats
    self.stats.append(Stat(stat, "main", self, weight=self.init_dict["base skills/" + stat]))
  File "game/BKclasses.rpy", line 3103, in __init__
    self.init_value(weight)
  File "game/BKclasses.rpy", line 3142, in init_value
    _min = weight_dict[weight-1][0] + self.parent.level * weight_dict[weight-1][1]
KeyError: 7

Windows-8-6.2.9200
Ren'Py 7.3.5.606
Brothel King 0.2 v210826
Thu Oct 07 14:14:48 2021
 

vadi9203

Member
Aug 2, 2019
324
192
Just started a new game and get this
Code:
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/BKintro.rpy", line 108, in script call
    $ renpy.call("chapter", 0)
  File "game/BKevents.rpy", line 363, in script
    python:
  File "game/BKevents.rpy", line 365, in <module>
    game.set_max_girl_level()
  File "game/BKclasses.rpy", line 318, in set_max_girl_level
    self.max_girl_level = {1: 1, 2: 5, 3: 5, 4: 10, 5: 10, 6: 15, 7: 20}[self.chapter]
KeyError: 0

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

Full traceback:
  File "game/BKintro.rpy", line 108, in script call
    $ renpy.call("chapter", 0)
  File "game/BKevents.rpy", line 363, in script
    python:
  File "K:\Brothel king 0_2\renpy\ast.py", line 914, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "K:\Brothel king 0_2\renpy\python.py", line 2028, in py_exec_bytecode
    exec bytecode in globals, locals
  File "game/BKevents.rpy", line 365, in <module>
    game.set_max_girl_level()
  File "game/BKclasses.rpy", line 318, in set_max_girl_level
    self.max_girl_level = {1: 1, 2: 5, 3: 5, 4: 10, 5: 10, 6: 15, 7: 20}[self.chapter]
KeyError: 0

Windows-7-6.1.7601-SP1
Ren'Py 7.3.5.606
Brothel King 0.2 v210826
Thu Oct 07 03:01:01 2021
This should be fixed with the lastest patch.
 

vadi9203

Member
Aug 2, 2019
324
192
Pretty nifty, but sadly, zero changes on my end. Still start with an error, if I try to pack update the girls, another error, and still 0 girls to pick from at the intro. I tried putting your files in the /game folder, but that broke the game so hard as to be unable to run in its entirety so I moved them to the main folder and I'm not seeing any changes.

Gonna double check stuff. Maybe I have things in the wrong places.

Well, I had things in the wrong spots got them in the right spots, but still unplayable.
Did you apply the patch to 0.15b or what? For me the game just works fine. the game again. And copy/paste into the game folder. Put some girl pack into the girls folder and the game should work.
 

DuniX

Well-Known Member
Dec 20, 2016
1,232
822
I'm getting this error. Sorry if it has be spoken about before. Wasn't sure what to search for.

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

While running game code:
  File "game/BKendday.rpy", line 935, in script
    python:
  File "game/BKendday.rpy", line 941, in <module>
    calendar.newday()
  File "game/BKclasses.rpy", line 2661, in newday
    self.updates()
  File "game/BKclasses.rpy", line 2666, in updates
    weekly_updates(new_district)
  File "game/BKfunctions.rpy", line 2422, in weekly_updates
    update_slaves()
  File "game/BKfunctions.rpy", line 471, in update_slaves
    slavemarket.girls = get_girls(nb)
  File "game/BKfunctions.rpy", line 322, in get_girls
    girl.randomize(free=free, p_traits=p_traits, n_trait=n_trait, perks=perks, level=lvl)
  File "game/BKgirlclass.rpy", line 202, in randomize
    self.generate_stats()
  File "game/BKgirlclass.rpy", line 504, in generate_stats
    self.stats.append(Stat(stat, "main", self, weight=self.init_dict["base skills/" + stat]))
  File "game/BKclasses.rpy", line 3103, in __init__
    self.init_value(weight)
  File "game/BKclasses.rpy", line 3142, in init_value
    _min = weight_dict[weight-1][0] + self.parent.level * weight_dict[weight-1][1]
KeyError: 7

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

Full traceback:
  File "game/BKendday.rpy", line 935, in script
    python:
  File "E:\MiscGames\Brothel_King-0.2_test2\renpy\ast.py", line 914, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "E:\MiscGames\Brothel_King-0.2_test2\renpy\python.py", line 2028, in py_exec_bytecode
    exec bytecode in globals, locals
  File "game/BKendday.rpy", line 941, in <module>
    calendar.newday()
  File "game/BKclasses.rpy", line 2661, in newday
    self.updates()
  File "game/BKclasses.rpy", line 2666, in updates
    weekly_updates(new_district)
  File "game/BKfunctions.rpy", line 2422, in weekly_updates
    update_slaves()
  File "game/BKfunctions.rpy", line 471, in update_slaves
    slavemarket.girls = get_girls(nb)
  File "game/BKfunctions.rpy", line 322, in get_girls
    girl.randomize(free=free, p_traits=p_traits, n_trait=n_trait, perks=perks, level=lvl)
  File "game/BKgirlclass.rpy", line 202, in randomize
    self.generate_stats()
  File "game/BKgirlclass.rpy", line 504, in generate_stats
    self.stats.append(Stat(stat, "main", self, weight=self.init_dict["base skills/" + stat]))
  File "game/BKclasses.rpy", line 3103, in __init__
    self.init_value(weight)
  File "game/BKclasses.rpy", line 3142, in init_value
    _min = weight_dict[weight-1][0] + self.parent.level * weight_dict[weight-1][1]
KeyError: 7

Windows-8-6.2.9200
Ren'Py 7.3.5.606
Brothel King 0.2 v210826
Thu Oct 07 14:14:48 2021
Bad _BK.ini in a girlpack.
Search the files with regex: (beauty|body|charm|refinement|libido|obedience|constitution|sensitivity) = ([6-9]|\d{2,})
 
  • Like
Reactions: phlore101

doujinftw

Active Member
Nov 26, 2020
856
1,139
Pretty nifty, but sadly, zero changes on my end. Still start with an error, if I try to pack update the girls, another error, and still 0 girls to pick from at the intro. I tried putting your files in the /game folder, but that broke the game so hard as to be unable to run in its entirety so I moved them to the main folder and I'm not seeing any changes.

Gonna double check stuff. Maybe I have things in the wrong places.

Well, I had things in the wrong spots got them in the right spots, but still unplayable.
everyone should just go straight to the hhs site and get the file from there instead it shouldnt this much of a mess, wonder if the one on f95zone is different.
 
Last edited:

DuniX

Well-Known Member
Dec 20, 2016
1,232
822
Sometimes it's better to just nuke everything except the girl packs and reinstall.
 

phlore101

Member
Jun 28, 2017
338
144
Bad _BK.ini in a girlpack.
Search the files with regex: (beauty|body|charm|refinement|libido|obedience|constitution|sensitivity) = ([6-9]|\d{2,})
Thanks a lot. I found one that someone did that had scores above 5. Don't know why they did it that way when the comments above in the code say the scores should be between 1 and 5. I just edited it so I assume it'll be fine now.
 

vadi9203

Member
Aug 2, 2019
324
192
Thanks a lot. I found one that someone did that had scores above 5. Don't know why they did it that way when the comments above in the code say the scores should be between 1 and 5. I just edited it so I assume it'll be fine now.
Well if its still not work for you then here is a clean _Bk.ini you can edit it as you like. (Just rename it becuse F95zone dosnt let to share ini files)
 

vadi9203

Member
Aug 2, 2019
324
192
everyone should just go straight to the hhs site and get the file from there instead it shouldnt this much of a mess, wonder if the one on f95zone is different.
I dont think so. But its really a huge mess. For now i share the base game with the lastest patch over it. . Just put some girl pack into the girls folder.
 
Last edited:

phlore101

Member
Jun 28, 2017
338
144
Well if its still not work for you then here is a clean _Bk.ini you can edit it as you like. (Just rename it becuse F95zone dosnt let to share ini files)
I'm sure it'll be fine. I know what to look for now and have many that I can use instead. I'm pretty sure I was only getting the error when a new week was being generated and that girl was being used so I didn't get the error very often. When it did occur I could just reload and get past the error.
 

Kite80

Well-Known Member
Modder
May 30, 2017
1,079
1,068
The links in the OP refer to 0.2 version but not latest patch, for some reason I'm not aware of the file has been put on nopy and is not automatically updated by Goldo. Get the latest patch from this link only:
 

CapPingu

Newbie
Mar 5, 2018
41
28
got the error with Mizuki, fixed by going into the BKchapter2.rpy and changed H Mizuki into C2 mizuki, and it worked. The issue is in the achievement file they are keyed as C2 -kunochi name- while in the ch2 file, its trying to key them as H -kunochi(mizuki)- when there the achievement.rpy is looking for c2 -kunochi(mizuki)
That worked like a charm, thanks a lot.
 

shleefin

Newbie
Oct 6, 2018
44
87
The version in this post appears to be unplayably broken. Getting lots of errors, some fixable, some not. Using the manually patched 0.2 version from HHS is working much better.
 
  • Like
Reactions: wiznata
4.60 star(s) 46 Votes