News:

Please request registration email again and then check your "Spam" folder

Former www.henthighschool.com

[Resources] Trait King mod

Started by neronero, May 16, 2022, 08:26 PM

Previous topic - Next topic

Goldo

Quote from: DarkFire on Aug 21, 2023, 02:20 AMI don't know how this triggered:

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/BKmain.rpy", line 896, in script call
    $ calendar.play_alarms() # Also triggers "day" conditional events
  File "game/BKevents.rpy", line 735, in script call
    $ ev.play()
  File "game/Mods/Friends and Foes/friends_and_foes.rpy", line 2260, in script
    python:
  File "game/Mods/Friends and Foes/friends_and_foes.rpy", line 2281, in <module>
    if not g.obedience_check() and dice(8) == 1 and grumble_escape_counter > cooldown_counter:
  File "game/BKgirlclass.rpy", line 4248, in obedience_check
    target = self.get_obedience_check_target(act, train=False)
  File "game/BKgirlclass.rpy", line 4235, in get_obedience_check_target
    if self.get_effect("special", "link obedience"):
  File "game/BKgirlclass.rpy", line 2717, in get_effect
    r += get_effect(brothel, type, target, change_cap=change_cap)
TypeError: can only concatenate tuple (not "int") to tuple

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

Full traceback:
  File "game/BKmain.rpy", line 896, in script call
    $ calendar.play_alarms() # Also triggers "day" conditional events
  File "game/BKevents.rpy", line 735, in script call
    $ ev.play()
  File "game/Mods/Friends and Foes/friends_and_foes.rpy", line 2260, in script
    python:
  File "C:\Users\Dani\Downloads\Brothel_King-0.3t\Brothel_King-pc\renpy\ast.py", line 1138, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "C:\Users\Dani\Downloads\Brothel_King-0.3t\Brothel_King-pc\renpy\python.py", line 1122, in py_exec_bytecode
    exec(bytecode, globals, locals)
  File "game/Mods/Friends and Foes/friends_and_foes.rpy", line 2281, in <module>
    if not g.obedience_check() and dice(8) == 1 and grumble_escape_counter > cooldown_counter:
  File "game/BKgirlclass.rpy", line 4248, in obedience_check
    target = self.get_obedience_check_target(act, train=False)
  File "game/BKgirlclass.rpy", line 4235, in get_obedience_check_target
    if self.get_effect("special", "link obedience"):
  File "game/BKgirlclass.rpy", line 2717, in get_effect
    r += get_effect(brothel, type, target, change_cap=change_cap)
TypeError: can only concatenate tuple (not "int") to tuple

Windows-10-10.0.19045 AMD64
Ren'Py 8.1.1.23060707
Brothel King 0.3t v230805
Mon Aug 21 04:16:55 2023


It is a bug in the vanilla test version, which I will fix.
Maker of BK. Looking for the latest patch for BK 0.2? The link doesn't change, so bookmark it!

RobinScales

So the features of negative trait removal and willing enslavement practically never activate for me, which is a shame, because it's why I primarily use the mod.
I'm about 6 months in the game, with a roster of about 20 girls.
Besides my first girl, I'm *only* using free girls, and their fear is all negative and love/mood is usually capped out for their rank. All but the newest girls have had their negative fixations removed.

Yet in all that time only a single girl has proposed a price tag on herself, and only one girl (the starting girl) has triggered the event that leads to trait removal enough to actually remove a single bad trait. 4-5 Other girls have triggered the event too occationally, once or twice but not enough to get an effect.

I feel like the further into the game I get, the rarer these events become, in spite of how much *more* girls should be eligible for both events.

I'm not running any other mods and I'm on 2.0

Not sure if this is a bug or by design. Maybe getting other daily/weekly events overrule these events? Idk, but if it IS design, I'd recommend increasing the trigger rate on these events by a *lot*.

Not really fun to spend over 6 months, trying to cure a girls anxiety or brattiness, even if it might be more realistic

vadi92

Quote from: RobinScales on Dec 01, 2023, 07:30 PMSo the features of negative trait removal and willing enslavement practically never activate for me, which is a shame, because it's why I primarily use the mod.
I'm about 6 months in the game, with a roster of about 20 girls.
Besides my first girl, I'm *only* using free girls, and their fear is all negative and love/mood is usually capped out for their rank. All but the newest girls have had their negative fixations removed.

Yet in all that time only a single girl has proposed a price tag on herself, and only one girl (the starting girl) has triggered the event that leads to trait removal enough to actually remove a single bad trait. 4-5 Other girls have triggered the event too occationally, once or twice but not enough to get an effect.

I feel like the further into the game I get, the rarer these events become, in spite of how much *more* girls should be eligible for both events.

I'm not running any other mods and I'm on 2.0

Not sure if this is a bug or by design. Maybe getting other daily/weekly events overrule these events? Idk, but if it IS design, I'd recommend increasing the trigger rate on these events by a *lot*.

Not really fun to spend over 6 months, trying to cure a girls anxiety or brattiness, even if it might be more realistic

It's more of a design. But you can change it in the TK_events.rpy for something higher.
For the in demand trait: line 175 (you have 6% chance/day to trigger it.
Evolving neg trait: line 180
Free girl enslavement: line 88
Getting the unknown trait: line 99
For developing said unknown trait: line 208

RobinScales

Thanks!
Though still surprised at the numbers in the code. At least 8 of the girls have been fixation-free for at least 16 in game weeks or more, yet only the starting girl triggered the event enough times. Weird.

Not really a coder, can you explain line 187 for trait removal? Does it mean that the minimal time gap between trait-removal training is the sum of 4 rolled d6's?

neroneroTopic starter

#49
Quote from: RobinScales on Dec 01, 2023, 07:30 PMNot sure if this is a bug or by design. Maybe getting other daily/weekly events overrule these events? Idk, but if it IS design, I'd recommend increasing the trigger rate on these events by a *lot*.
It's a bit of both, TK used to have quicker progression, but it was toned down after reports that it got a bit too crazy in the lategame. it's tough to strike the right balance since your brothel can contain so many girls at that point, while you'll only have 1 or 2 for a long while in the earlygame (and difficulty settings can impact the grind/timescales a lot so YMMV)

I'm open to suggestions, but I think the best solution might be to poke around in the files and tweak a few values to your own liking.


Quote from: vadi92 on Dec 02, 2023, 06:54 AMyou have 6% chance/day to trigger it
* 6% per week, per girl. The label "traitking_day" in the code runs with random intervals of 3-11 days in between.
Changing this line could be one easy fix to speed up progression:
$ calendar.set_alarm(calendar.time + 2+dice(9), StoryEvent(label="traitking_day", type="day"))It tells the game when to repeat traitking_day. Calendar.time means today's date, and 2+dice(9) means 2+ a random number between 1 and 9. So insert a smaller number there and all progression will go faster.

Most triggers have all kinds of conditionals attached. Eg: A free girl will only offer to enslave herself if she's in a great mood, trusts you, has a decent amount of work experience and doesn't have a dominant personality. And then there's a 12% weekly chance that she does it. So there's more to it than just random chance of course.

edit:
                            # schedule evolution training
                            calendar.set_alarm(calendar.time + dice(4), StoryEvent(label="fix_neg_interact", call_args=[girl, trait], order = 0, type="morning"))
Is this the line you mean? calendar.set_alarm means: trigger an event at this date in the future. So this line says: Make the event where you interact with her to fix her negative trait happen somewhere in the next 4 days.
My Girl Packs: [ link ] - Trait King mod: [ link ]

RobinScales

Thanks, both of you!

I'll tinker with the numbers a bit.

Though if you are willing to hear feedback as the mod's dev, I'd recommend shorter time frames.
Like I said, I managed to make it to the final district, with a full roster, in 6 months, and only managing to cure *1* girl of a bad trait, and get a single offer of an enslavement contract in all that time.
And I am practically at the end of the game.

a3660369

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/BKmain.rpy", line 114, in script
    $ girl = ui.interact()
  File "game/BKmain.rpy", line 114, in <module>
    $ girl = ui.interact()
  File "game/BKscreens.rpy", line 283, in execute
    screen girls(girls, context = "girls"): # context can be girls, slavemarket, farm
  File "game/BKscreens.rpy", line 283, in execute
    screen girls(girls, context = "girls"): # context can be girls, slavemarket, farm
  File "game/BKscreens.rpy", line 297, in execute
    if selected_girl in girls:
  File "game/BKscreens.rpy", line 298, in execute
    use girl_stats(selected_girl, context=context)
  File "game/BKscreens.rpy", line 1052, in execute
    screen girl_stats(girl, context = "girls"): # context can be girls, slavemarket, farm, free, postings, contracts, capture
  File "game/BKscreens.rpy", line 1052, in execute
    screen girl_stats(girl, context = "girls"): # context can be girls, slavemarket, farm, free, postings, contracts, capture
  File "game/BKscreens.rpy", line 1058, in execute
    frame:
  File "game/BKscreens.rpy", line 1074, in execute
    vbox:
  File "game/BKscreens.rpy", line 1509, in execute
    viewport:
  File "game/BKscreens.rpy", line 1518, in execute
    if context != "free" or girl.MC_relationship_level >= 3:
  File "game/BKscreens.rpy", line 1519, in execute
    hbox spacing 0 box_wrap True:
  File "game/BKscreens.rpy", line 1520, in execute
    for trait in girl.traits:
  File "game/BKscreens.rpy", line 1524, in execute
    textbutton trait_name_dict[trait.name]:
  File "game/BKscreens.rpy", line 1524, in <module>
    textbutton trait_name_dict[trait.name]:
KeyError: u'Tight pussy'

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

Full traceback:
  File "game/BKmain.rpy", line 114, in script
    $ girl = ui.interact()
  File "renpy/ast.py", line 928, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "renpy/python.py", line 2245, in py_exec_bytecode
    exec(bytecode, globals, locals)
  File "game/BKmain.rpy", line 114, in <module>
    $ girl = ui.interact()
  File "renpy/ui.py", line 298, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "renpy/display/core.py", line 3325, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, pause=pause, pause_start=pause_start, **kwargs)
  File "renpy/display/core.py", line 3737, in interact_core
    root_widget.visit_all(lambda i : i.per_interact())
  File "renpy/display/core.py", line 568, in visit_all
    d.visit_all(callback, seen)
  File "renpy/display/core.py", line 568, in visit_all
    d.visit_all(callback, seen)
  File "renpy/display/core.py", line 568, in visit_all
    d.visit_all(callback, seen)
  File "renpy/display/screen.py", line 436, in visit_all
    callback(self)
  File "renpy/display/core.py", line 3737, in <lambda>
    root_widget.visit_all(lambda i : i.per_interact())
  File "renpy/display/screen.py", line 447, in per_interact
    self.update()
  File "renpy/display/screen.py", line 637, in update
    self.screen.function(**self.scope)
  File "game/BKscreens.rpy", line 283, in execute
    screen girls(girls, context = "girls"): # context can be girls, slavemarket, farm
  File "game/BKscreens.rpy", line 283, in execute
    screen girls(girls, context = "girls"): # context can be girls, slavemarket, farm
  File "game/BKscreens.rpy", line 297, in execute
    if selected_girl in girls:
  File "game/BKscreens.rpy", line 298, in execute
    use girl_stats(selected_girl, context=context)
  File "game/BKscreens.rpy", line 1052, in execute
    screen girl_stats(girl, context = "girls"): # context can be girls, slavemarket, farm, free, postings, contracts, capture
  File "game/BKscreens.rpy", line 1052, in execute
    screen girl_stats(girl, context = "girls"): # context can be girls, slavemarket, farm, free, postings, contracts, capture
  File "game/BKscreens.rpy", line 1058, in execute
    frame:
  File "game/BKscreens.rpy", line 1074, in execute
    vbox:
  File "game/BKscreens.rpy", line 1509, in execute
    viewport:
  File "game/BKscreens.rpy", line 1518, in execute
    if context != "free" or girl.MC_relationship_level >= 3:
  File "game/BKscreens.rpy", line 1519, in execute
    hbox spacing 0 box_wrap True:
  File "game/BKscreens.rpy", line 1520, in execute
    for trait in girl.traits:
  File "game/BKscreens.rpy", line 1524, in execute
    textbutton trait_name_dict[trait.name]:
  File "game/BKscreens.rpy", line 1524, in <module>
    textbutton trait_name_dict[trait.name]:
KeyError: u'Tight pussy'

Windows-10-10.0.22621
Ren'Py 7.4.11.2266
Brothel King 0.2 v220711 / CN v20230820
Thu Jan 18 03:55:59 2024
这是啥问题为啥在奴隶市场选角色其中的就出这个我应该咋处理这个错误?

Goldo

Quote from: a3660369 on Jan 17, 2024, 08:08 PMI'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/BKmain.rpy", line 114, in script
    $ girl = ui.interact()
  File "game/BKmain.rpy", line 114, in <module>
    $ girl = ui.interact()
  File "game/BKscreens.rpy", line 283, in execute
    screen girls(girls, context = "girls"): # context can be girls, slavemarket, farm
  File "game/BKscreens.rpy", line 283, in execute
    screen girls(girls, context = "girls"): # context can be girls, slavemarket, farm
  File "game/BKscreens.rpy", line 297, in execute
    if selected_girl in girls:
  File "game/BKscreens.rpy", line 298, in execute
    use girl_stats(selected_girl, context=context)
  File "game/BKscreens.rpy", line 1052, in execute
    screen girl_stats(girl, context = "girls"): # context can be girls, slavemarket, farm, free, postings, contracts, capture
  File "game/BKscreens.rpy", line 1052, in execute
    screen girl_stats(girl, context = "girls"): # context can be girls, slavemarket, farm, free, postings, contracts, capture
  File "game/BKscreens.rpy", line 1058, in execute
    frame:
  File "game/BKscreens.rpy", line 1074, in execute
    vbox:
  File "game/BKscreens.rpy", line 1509, in execute
    viewport:
  File "game/BKscreens.rpy", line 1518, in execute
    if context != "free" or girl.MC_relationship_level >= 3:
  File "game/BKscreens.rpy", line 1519, in execute
    hbox spacing 0 box_wrap True:
  File "game/BKscreens.rpy", line 1520, in execute
    for trait in girl.traits:
  File "game/BKscreens.rpy", line 1524, in execute
    textbutton trait_name_dict[trait.name]:
  File "game/BKscreens.rpy", line 1524, in <module>
    textbutton trait_name_dict[trait.name]:
KeyError: u'Tight pussy'

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

Full traceback:
  File "game/BKmain.rpy", line 114, in script
    $ girl = ui.interact()
  File "renpy/ast.py", line 928, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "renpy/python.py", line 2245, in py_exec_bytecode
    exec(bytecode, globals, locals)
  File "game/BKmain.rpy", line 114, in <module>
    $ girl = ui.interact()
  File "renpy/ui.py", line 298, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "renpy/display/core.py", line 3325, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, pause=pause, pause_start=pause_start, **kwargs)
  File "renpy/display/core.py", line 3737, in interact_core
    root_widget.visit_all(lambda i : i.per_interact())
  File "renpy/display/core.py", line 568, in visit_all
    d.visit_all(callback, seen)
  File "renpy/display/core.py", line 568, in visit_all
    d.visit_all(callback, seen)
  File "renpy/display/core.py", line 568, in visit_all
    d.visit_all(callback, seen)
  File "renpy/display/screen.py", line 436, in visit_all
    callback(self)
  File "renpy/display/core.py", line 3737, in <lambda>
    root_widget.visit_all(lambda i : i.per_interact())
  File "renpy/display/screen.py", line 447, in per_interact
    self.update()
  File "renpy/display/screen.py", line 637, in update
    self.screen.function(**self.scope)
  File "game/BKscreens.rpy", line 283, in execute
    screen girls(girls, context = "girls"): # context can be girls, slavemarket, farm
  File "game/BKscreens.rpy", line 283, in execute
    screen girls(girls, context = "girls"): # context can be girls, slavemarket, farm
  File "game/BKscreens.rpy", line 297, in execute
    if selected_girl in girls:
  File "game/BKscreens.rpy", line 298, in execute
    use girl_stats(selected_girl, context=context)
  File "game/BKscreens.rpy", line 1052, in execute
    screen girl_stats(girl, context = "girls"): # context can be girls, slavemarket, farm, free, postings, contracts, capture
  File "game/BKscreens.rpy", line 1052, in execute
    screen girl_stats(girl, context = "girls"): # context can be girls, slavemarket, farm, free, postings, contracts, capture
  File "game/BKscreens.rpy", line 1058, in execute
    frame:
  File "game/BKscreens.rpy", line 1074, in execute
    vbox:
  File "game/BKscreens.rpy", line 1509, in execute
    viewport:
  File "game/BKscreens.rpy", line 1518, in execute
    if context != "free" or girl.MC_relationship_level >= 3:
  File "game/BKscreens.rpy", line 1519, in execute
    hbox spacing 0 box_wrap True:
  File "game/BKscreens.rpy", line 1520, in execute
    for trait in girl.traits:
  File "game/BKscreens.rpy", line 1524, in execute
    textbutton trait_name_dict[trait.name]:
  File "game/BKscreens.rpy", line 1524, in <module>
    textbutton trait_name_dict[trait.name]:
KeyError: u'Tight pussy'

Windows-10-10.0.22621
Ren'Py 7.4.11.2266
Brothel King 0.2 v220711 / CN v20230820
Thu Jan 18 03:55:59 2024
这是啥问题为啥在奴隶市场选角色其中的就出这个我应该咋处理这个错误?

I don't speak Chinese, but I can tell you this error occurs because something is calling for the Trait "tight pussy", and that trait doesn't exist.

Since nothing in the game's code calls for that, your problem is most likely with a custom girlpack's _BK.ini file or a mod.
Maker of BK. Looking for the latest patch for BK 0.2? The link doesn't change, so bookmark it!

a3660369

那我改如何处理呢 我就是用的这个猎头0.2因为我的游戏版本是O.2

Goldo

Quote from: a3660369 on Jan 18, 2024, 07:18 PM那我改如何处理呢 我就是用的这个猎头0.2因为我的游戏版本是O.2

If you have a code or simple text editor, open the files in your mod with the '.rpy' extension and do a search for 'Tight pussy'. If you find nothing, then the mod is not to blame.

Next, girlpacks. You can do the same by opening the _BK.ini file in each girl pack to look for this. Or, if you have too many girl packs, take half of the girl packs out and see if the bugs happen again, then half of that, and so on, until you can narrow it down. Perhaps a simple Windows search on the content of the 'girls/' directory files would work, I am not sure about that.
Maker of BK. Looking for the latest patch for BK 0.2? The link doesn't change, so bookmark it!

neroneroTopic starter

The chinese translation works by looking for translations in a dictionary in BKsettings.rpy (in this case, in trait_name_dict)

Trait King adds new traits to the game, but the game throws an error because there are no translations for these new traits in the dictionary. In order to make Trait King work with the chinese translation, the BKsettings.rpy file of the chinese translation would need to be modified.
My Girl Packs: [ link ] - Trait King mod: [ link ]

a3660369


neroneroTopic starter

Quote from: a3660369 on Jan 22, 2024, 09:42 PM
Quote from: neronero on Jan 21, 2024, 09:31 PM件。
你增加的特性文件能给我一分吗
I'm not sure what you're asking for exactly. Do you need tips on how to add the translations? The new traits that Trait King adds can be found in /game/Mods/Trait King/Trait King.rpy (.rpy files can be opened with any text editor)
The new traits are listed under the lines # Trait King originals. There are about 80 in total. Translations for those would need to be added to ## 特质名称 ## / trait_name_dict in /game/BKsettings.rpy.

I would recommend contacting the authors of the chinese translation here to ask for their advice, because even after adding translations for these new traits you might still run into more issues.
My Girl Packs: [ link ] - Trait King mod: [ link ]