HentHighSchool Development Forum

Game Development => Brothel King => Topic started by: neronero on May 16, 2022, 08:26 PM

Title: [Resources] Trait King mod
Post by: neronero on May 16, 2022, 08:26 PM
The Trait King mod expands Brothel King's traits system to make each girl feel more unique. If you pluck a random girl off the street to work in your brothel, there's more uncertainty about her starting traits and how she might develop in the future.

[ Download ] (for BK 0.2) (https://www.mediafire.com/file/3hllctgq6aobg6t/TraitKing_v021.zip/file)

[ Download ] (for BK 0.3 Gameplay Test) (https://www.mediafire.com/file/8s992x2e5kr7658/Trait_King_v021%252Bfriends.zip/file)


Features:

Let me know if any problems occur. Balancing suggestions also very welcome.

To activate mods, in the main menu go to "Mods", select Trait King and press Activate Mod. Then start a new game.
Title: Re: [Resources] Trait King mod
Post by: Goldo on May 17, 2022, 01:23 PM
Would it be possible to create a thread listing mods and other useful resources, like we had on the old forum, so that I can only sticky one thread? I would rather not maintain it, hence why I don't create it directly.

Edit: Thank you neronero! Great avatar by the way ;)
Title: Re: [Resources] Trait King mod
Post by: EvilPenguin on May 18, 2022, 11:29 PM
1st time using this mod and I like it. Good work :D
But...
during ninja hunt, triggering that event:

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/BKmain.rpy", line 368, in script call
    call ninja_hunt(selected_location) from _call_ninja_hunt
  File "game/BKchapter2.rpy", line 5367, in script call
    call ninja_game(NPC_haruka) from _call_ninja_game_2
  File "game/BKminigame.rpy", line 222, in script
    call expression ("ninja_" + guest) from _call_expression_7
  File "game/BKminigame.rpy", line 222, in <module>
    call expression ("ninja_" + guest) from _call_expression_7
NameError: name 'guest' is not defined

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

Full traceback:
  File "game/BKmain.rpy", line 368, in script call
    call ninja_hunt(selected_location) from _call_ninja_hunt
  File "game/BKchapter2.rpy", line 5367, in script call
    call ninja_game(NPC_haruka) from _call_ninja_game_2
  File "game/BKminigame.rpy", line 222, in script
    call expression ("ninja_" + guest) from _call_expression_7
  File "renpy/ast.py", line 1488, in execute
    label = renpy.python.py_eval(label)
  File "renpy/python.py", line 2276, in py_eval
    return py_eval_bytecode(code, globals, locals)
  File "renpy/python.py", line 2269, in py_eval_bytecode
    return eval(bytecode, globals, locals)
  File "game/BKminigame.rpy", line 222, in <module>
    call expression ("ninja_" + guest) from _call_expression_7
NameError: name 'guest' is not defined

Windows-10-10.0.19041
Ren'Py 7.4.11.2266
Brothel King 0.2 v220511
Thu May 19 01:20:13 2022

would attach a save file, but:
"Your file is too large. The maximum attachment size allowed is 512 KB. 0.8 MB"
Title: Re: [Resources] Trait King mod
Post by: neronero on May 19, 2022, 05:20 AM
Thanks!

The error doesn't strike me as something Trait King might've caused, so I've reposted it on the bug reports (https://henthighschool.net/brothel-king/*bug-reports*/) thread. If someone there concludes that TK is at the root of the issue after all I'll pick it back up here, but otherwise keep an eye on that thread for updates.
Title: Re: [Resources] Trait King mod
Post by: Goldo on May 19, 2022, 08:50 AM
Fixed in today's patch.
Title: Re: [Resources] Trait King mod
Post by: j01ntr0l1a on Jun 02, 2022, 04:13 AM
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/BKstart.rpy", line 88, in script call
    call init_game() from _call_init_game
  File "game/BKstart.rpy", line 778, in script
    $ game.start_mods()
  File "game/BKstart.rpy", line 778, in <module>
    $ game.start_mods()
  File "game/BKclasses.rpy", line 193, in start_mods
    self.activate_mod(mod)
  File "game/BKclasses.rpy", line 249, in activate_mod
    renpy.call_in_new_context(mod.init_label) # Suggested fix by SometimesIsNotEnough
  File "game/Mods/Trait King/Trait King.rpy", line 371, in script call
    python:
  File "game/Mods/Trait King/Trait King.rpy", line 371, in script call
    python:
ScriptError: could not find label 'traitking_holidays'.

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

Full traceback:
  File "game/BKstart.rpy", line 88, in script call
    call init_game() from _call_init_game
  File "game/BKstart.rpy", line 778, in script
    $ game.start_mods()
  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/BKstart.rpy", line 778, in <module>
    $ game.start_mods()
  File "game/BKclasses.rpy", line 193, in start_mods
    self.activate_mod(mod)
  File "game/BKclasses.rpy", line 249, in activate_mod
    renpy.call_in_new_context(mod.init_label) # Suggested fix by SometimesIsNotEnough
  File "renpy/game.py", line 344, in call_in_new_context
    return renpy.execution.run_context(False)
  File "renpy/execution.py", line 922, in run_context
    context.run()
  File "game/Mods/Trait King/Trait King.rpy", line 371, in script call
    python:
  File "game/Mods/Trait King/Trait King.rpy", line 371, in script call
    python:
  File "renpy/script.py", line 918, in lookup
    raise ScriptError("could not find label '%s'." % str(original))
ScriptError: could not find label 'traitking_holidays'.

Windows-10-10.0.19041
Ren'Py 7.4.11.2266
Brothel King 0.2 v220519
Wed Jun  1 21:08:22 2022

when i tryto start a new game with mod on i get this error
Title: Re: [Resources] Trait King mod
Post by: neronero on Jun 02, 2022, 05:00 AM
Quote from: j01ntr0l1a on Jun 02, 2022, 04:13 AMwhen i tryto start a new game with mod on i get this error
It looks to me like Trait King might not be properly installed.
Besides the files inside the /Mods/ subdirectory, there's also supposed to be a file called "TKevents.rpy" inside Brothel King's /game/ folder.
Title: Re: [Resources] Trait King mod
Post by: j01ntr0l1a on Jun 03, 2022, 10:35 AM
ok thanks!! it works now!!!!!!!!!
Title: Re: [Resources] Trait King mod
Post by: neronero on Jun 14, 2022, 08:27 PM
Reposting this here so I don't forget  ;D
Quote from: j01ntr0l1a on Jun 14, 2022, 08:15 PMhey i dunno where to put this if this is a glitch or not or just a loop(same diff to me tho im not a tech wiz or anything im just saying something that isnt supposed to happen i believe)and its for Trait King not the main game but i noticed if someone is in High-Demand and you move them over to the farm they will stay in High-Demand indefinitely long as they stay there
Title: Re: [Resources] Trait King mod
Post by: EzNorlax26 on Jun 18, 2022, 04:18 AM
when i open the game, it shows this
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/Mods/Trait King/Trait King.rpy", line 248, in script
    init -1 python:
  File "game/Mods/Trait King/Trait King.rpy", line 265, in <module>
    update_label = "traitking_update"
TypeError: __init__() got an unexpected keyword argument 'update_label'

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

Full traceback:
  File "game/Mods/Trait King/Trait King.rpy", line 248, in script
    init -1 python:
  File "C:\Users\lucas\Desktop\a\as\Brothel_King-pc\renpy\ast.py", line 862, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "C:\Users\lucas\Desktop\a\as\Brothel_King-pc\renpy\python.py", line 1912, in py_exec_bytecode
    exec bytecode in globals, locals
  File "game/Mods/Trait King/Trait King.rpy", line 265, in <module>
    update_label = "traitking_update"
TypeError: __init__() got an unexpected keyword argument 'update_label'

Windows-8-6.2.9200
Ren'Py 7.0.0.196
 
Sat Jun 18 01:16:38 2022
Title: Re: [Resources] Trait King mod
Post by: neronero on Jun 18, 2022, 06:27 AM
It looks like you're missing the latest patch (https://www.mediafire.com/file/nnxnr2pkopkzv2y/game_patch_0.2.zip/file) for BK.
Title: Re: [Resources] Trait King mod
Post by: vadi92 on Jun 18, 2022, 09:08 AM
Not just the lastest patch but even the lastest build for the game. The version number for the Renpy engine should be: Ren'Py 7.4.11.2266 ::)
You can download both of them from here: https://henthighschool.net/brothel-king/release-brothel-king-v0-2-download-and-information/ (https://henthighschool.net/brothel-king/release-brothel-king-v0-2-download-and-information/)
Title: Re: [Resources] Trait King mod
Post by: EzNorlax26 on Jun 18, 2022, 12:47 PM
i'll try it, but i was shure i installed the last version🤔. Thank you very much!
Title: Re: [Resources] Trait King mod
Post by: Rewsrer on Jul 27, 2022, 10:36 AM
If you buy a girl for 900 (for example) in 1-2 weeks, increase her level and rank (on bk difficulty) when she receives the mark in demand, she will be worth about 30,000 for sale and this is in less than a month. If you raise her 2 ranks, she will be sold for 70000+. This is incredible cheating ;D  ;D
This is a very fun mod if you find the princess after the last perk is available. She is capable of making huge profits alone.
Title: Re: [Resources] Trait King mod
Post by: neronero on Jul 27, 2022, 01:02 PM
Quote from: Rewsrer on Jul 27, 2022, 10:36 AMIf you buy a girl for 900 (for example) in 1-2 weeks, increase her level and rank (on bk difficulty) when she receives the mark in demand, she will be worth about 30,000 for sale and this is in less than a month. If you raise her 2 ranks, she will be sold for 70000+. This is incredible cheating ;D  ;D
This is a very fun mod if you find the princess after the last perk is available. She is capable of making huge profits alone.
I'm glad someone is using this strategy ;D

I was hoping to make it extremely strong, but still difficult to rely on (you won't always find a princess, you can't predict when a girl will become in demand)

If it's a bit too strong now, which one of these nerfs would you prefer?

Title: Re: [Resources] Trait King mod
Post by: Rewsrer on Jul 27, 2022, 01:52 PM
Quote from: neronero on Jul 27, 2022, 01:02 PM
  • Nerf "In demand" by making it have a smaller effect on the girl price
  • Nerf "In demand" by making it occur less frequently
I don't know how "in demand" mechanic work, I can assume that the most popular girl (or 2 girls) is taken and this trait is hung on them. I used this mechanic only as a way to not go bankrupt. Or in order not to go bankrupt when moving to a new brothel. The guild girl is a very awkward mechanic to play.
Ideally, make 200% of the price, not 400%
In my understanding, it would be better for a girl to bring income steadily (several thousand per shift) than to get 70,000+ at a time and train a new (or several) girl/s.
And as far as I noticed in demand appears once a month or even less often. Already quite rare. And it can be used effectively only at the very beginning when money is scarce.
Quote from: neronero on Jul 27, 2022, 01:02 PM
  • Nerf "Princess" and "Noble" by making the valuation effect slowly reduce in strength as their rank increases
  • Nerf "Princess" and "Noble" girls by making them more of a pain in the ass to sell. Eg: They could have a small chance to write letters of protest to the slavers guild, causing them to temporarily become unsellable (in terms of game mechanics, they would temporarily become "free" girls in your employ)
These girls are not for the start of the game. At least some benefit from them will be starting from 4-5 chapters. Before that, even getting them to work is problematic.
For the game year (stably looking at the slave market) I saw the princess only 1 time. And what's the funniest thing she was with the trait "mind fucked"(is that how it should be? or am I lucky?) ;D  ;D
That is, by themselves, such girls are rare. And if they also have very negative other traits, it makes no sense to take them.
It is possible to make them generally unavailable for sale, as free girls. +1000 princess value and +500 noble value is too much in the long run. And if they also get "in demand", then there will be absolutely incredible selling price.
Title: Re: [Resources] Trait King mod
Post by: Calob on Jul 27, 2022, 06:25 PM
I concur that, if anything, the valuation on 'In Demand' is maybe a bit too high. I like it as a mechanic - it encourages cycling girls out, and doesn't have onerous demands like perfecting monthly contracts does - but the raw cash influx can be a bit silly.

Hitting it on a Princess is like winning the lotto, though, and I don't see a huge problem with that.
Title: Re: [Resources] Trait King mod
Post by: 高质量抱脸虫 on Oct 12, 2022, 12:58 PM
Abnormal problems occur
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 302, in execute
    if selected_girl in girls:
  File "game/BKscreens.rpy", line 303, in execute
    use girl_stats(selected_girl, context=context)
  File "game/BKscreens.rpy", line 1053, in execute
    screen girl_stats(girl, context = "girls"): # context can be girls, slavemarket, farm, free, postings, contracts, capture
  File "game/BKscreens.rpy", line 1053, in execute
    screen girl_stats(girl, context = "girls"): # context can be girls, slavemarket, farm, free, postings, contracts, capture
  File "game/BKscreens.rpy", line 1059, in execute
    frame:
  File "game/BKscreens.rpy", line 1075, in execute
    vbox:
  File "game/BKscreens.rpy", line 1520, in execute
    viewport:
  File "game/BKscreens.rpy", line 1529, in execute
    if context != "free" or girl.MC_relationship_level >= 3:
  File "game/BKscreens.rpy", line 1530, in execute
    hbox spacing 0 box_wrap True:
  File "game/BKscreens.rpy", line 1531, in execute
    for trait in girl.traits:
  File "game/BKscreens.rpy", line 1535, in execute
    textbutton trait_name_dict[trait.name]:
  File "game/BKscreens.rpy", line 1535, in <module>
    textbutton trait_name_dict[trait.name]:
KeyError: u'Ferocious'

-- 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 302, in execute
    if selected_girl in girls:
  File "game/BKscreens.rpy", line 303, in execute
    use girl_stats(selected_girl, context=context)
  File "game/BKscreens.rpy", line 1053, in execute
    screen girl_stats(girl, context = "girls"): # context can be girls, slavemarket, farm, free, postings, contracts, capture
  File "game/BKscreens.rpy", line 1053, in execute
    screen girl_stats(girl, context = "girls"): # context can be girls, slavemarket, farm, free, postings, contracts, capture
  File "game/BKscreens.rpy", line 1059, in execute
    frame:
  File "game/BKscreens.rpy", line 1075, in execute
    vbox:
  File "game/BKscreens.rpy", line 1520, in execute
    viewport:
  File "game/BKscreens.rpy", line 1529, in execute
    if context != "free" or girl.MC_relationship_level >= 3:
  File "game/BKscreens.rpy", line 1530, in execute
    hbox spacing 0 box_wrap True:
  File "game/BKscreens.rpy", line 1531, in execute
    for trait in girl.traits:
  File "game/BKscreens.rpy", line 1535, in execute
    textbutton trait_name_dict[trait.name]:
  File "game/BKscreens.rpy", line 1535, in <module>
    textbutton trait_name_dict[trait.name]:
KeyError: u'Ferocious'

Windows-10-10.0.19041
Ren'Py 7.4.11.2266
Brothel King 0.2 v220228
Wed Oct 12 20:53:04 2022
Title: Re: [Resources] Trait King mod
Post by: neronero on Oct 12, 2022, 01:25 PM
Quote from: 高质量抱脸虫 on Oct 12, 2022, 12:58 PMAbnormal problems occur
Brothel King 0.2 v220228
You're running an older version of Brothel King. Please download and install the latest game patch (https://www.mediafire.com/file/nnxnr2pkopkzv2y/game_patch_0.2.zip/file) and let me know if the abnormal problems still occur.
Title: Re: [Resources] Trait King mod
Post by: 高质量抱脸虫 on Oct 14, 2022, 09:59 AM
True enslavement Could you tell me how I should trigger it
Title: Re: [Resources] Trait King mod
Post by: neronero on Oct 14, 2022, 10:12 AM
Quote from: 高质量抱脸虫 on Oct 14, 2022, 09:59 AMTrue enslavement Could you tell me how I should trigger it

- She must be a free girl in your brothel
- She must be in a good mood
- She must trust the MC (negative fear)
- She must have a little bit of experience working in your brothel
- She must not have a "very dom" personality (rebel, schemer, princess, tsundere, yandere, stubborn)
- If all the above are true, 12% chance each week to trigger the event
Title: Re: [Resources] Trait King mod
Post by: Nether on Oct 16, 2022, 10:38 PM
Quote from: neronero on Oct 14, 2022, 10:12 AM
Quote from: 高质量抱脸虫 on Oct 14, 2022, 09:59 AMTrue enslavement Could you tell me how I should trigger it

- She must be a free girl in your brothel
- She must be in a good mood
- She must trust the MC (negative fear)
- She must have a little bit of experience working in your brothel
- She must not have a "very dom" personality (rebel, schemer, princess, tsundere, yandere, stubborn)
- If all the above are true, 12% chance each week to trigger the event

So even masochist type girls (with reversed fear part of mood) have to be in trust state?
Title: Re: [Resources] Trait King mod
Post by: neronero on Oct 17, 2022, 06:56 AM
Quote from: Nether on Oct 16, 2022, 10:38 PMSo even masochist type girls (with reversed fear part of mood) have to be in trust state?
Yes, that's true. Adding an alternate route for them might be a good idea, but I think I would spin that into a completely seperate event. Girls with high fear don't tend to make decisions to do/suggest things their Master hasn't explicitly asked for.
Title: Re: [Resources] Trait King mod
Post by: vadi92 on Oct 28, 2022, 08:02 AM
Ummmmmmm you should update the mod a bit. After a long while i got back to play with BK a bit.

The problem is when you get a new trait for a girl and send her to the slavers guild for a "week" it will be not week but 99 days.
Title: Re: [Resources] Trait King mod
Post by: neronero on Oct 28, 2022, 09:37 PM
Quote from: vadi92 on Oct 28, 2022, 08:02 AMUmmmmmmm you should update the mod a bit. After a long while i got back to play with BK a bit.

The problem is when you get a new trait for a girl and send her to the slavers guild for a "week" it will be not week but 99 days.
Can you share a save? I'm not sure how this could happen - the part of the code that controls that is a vanilla BK function and the TK instruction that sends you towards that function is extremely basic -> call take_leave(girl, 7)
Title: Re: [Resources] Trait King mod
Post by: vadi92 on Oct 29, 2022, 04:56 AM
Quote from: neronero on Oct 28, 2022, 09:37 PMCan you share a save? I'm not sure how this could happen - the part of the code that controls that is a vanilla BK function and the TK instruction that sends you towards that function is extremely basic -> call take_leave(girl, 7)

Sure. The girl in question is Suzuya with still 96 days left until she returns.
https://www.mediafire.com/file/jpr9f2b8tkdi9vp/2-1-LT1.save/file

Btw another oddity that you can have multiple training for the better negative traits on the same day ???  (Same girl)
I got 2 training in a row then at the next day another one. (Couldn't replicate it so far for another time)
Title: Re: [Resources] Trait King mod
Post by: neronero on Oct 29, 2022, 06:30 AM
Quote from: vadi92 on Oct 29, 2022, 04:56 AM
Quote from: neronero on Oct 28, 2022, 09:37 PMCan you share a save? I'm not sure how this could happen - the part of the code that controls that is a vanilla BK function and the TK instruction that sends you towards that function is extremely basic -> call take_leave(girl, 7)

Sure. The girl in question is Suzuya with still 96 days left until she returns.
https://www.mediafire.com/file/jpr9f2b8tkdi9vp/2-1-LT1.save/file
Are you sure your version of Trait King is up to date? 99 days is very close to [calendar.time + 7 days], and I seem to recall that this was a bug from an older version of TK. It has been fixed in the current release.

To fix your ongoing game, get the latest version of TK and type this in the console for that save:
daily_events[18].date = calendar.time + 1

Quote from: vadi92 on Oct 29, 2022, 04:56 AMBtw another oddity that you can have multiple training for the better negative traits on the same day ???  (Same girl)
I got 2 training in a row then at the next day another one. (Couldn't replicate it so far for another time)
Thanks, there was a bug for girls that had multiple negative traits. Should be fixed now.
Title: Re: [Resources] Trait King mod
Post by: vadi92 on Oct 29, 2022, 08:50 AM
Quote from: neronero on Oct 29, 2022, 06:30 AMAre you sure your version of Trait King is up to date? 99 days is very close to [calendar.time + 7 days], and I seem to recall that this was a bug from an older version of TK. It has been fixed in the current release.

It's seems i had the older version ::)
Title: Re: [Resources] Trait King mod
Post by: Deimos96 on Nov 01, 2022, 10:44 AM
Quote from: neronero on Jul 27, 2022, 01:02 PMIf it's a bit too strong now, which one of these nerfs would you prefer?

  • Nerf "In demand" by making it have a smaller effect on the girl price
  • Nerf "In demand" by making it occur less frequently
  • Nerf "Princess" and "Noble" by making the valuation effect slowly reduce in strength as their rank increases
  • Nerf "Princess" and "Noble" girls by making them more of a pain in the ass to sell. Eg: They could have a small chance to write letters of protest to the slavers guild, causing them to temporarily become unsellable (in terms of game mechanics, they would temporarily become "free" girls in your employ)

I would go for the first option. I love this mod because checking out the slave market every week is like opening gacha (traits actually matter and play a big role). You might find that rare virgin and try to uprank and flip her quickly. But when the "in demand" event does happen, although rare, it feels like you've just cheated your playthrough.

I don't know the math behind the code but I had a girl worth 2k-ish go for 10k because of this event. It's awesome but maybe tone it down. I think making her worth 3k-4k seems reasonable. So probably somewhere between 150%-200% from original price. At it's current state, selling the girl will always be a no-brainer. Toning it down and consider either selling her or not be a good investment would make for better gameplay imo. 
Title: Re: [Resources] Trait King mod
Post by: ihurgi1 on Nov 06, 2022, 05:15 AM
I'm sorry, but an uncaught exception occurred.

While running game code:
IOError: Couldn't find file 'mods/Trait King/title.webm'.

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

Full traceback:
  File "renpy/common/_layout/screen_main_menu.rpym", line 28, in script
    python hide:
  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 "renpy/common/_layout/screen_main_menu.rpym", line 28, in <module>
    python hide:
  File "renpy/common/_layout/screen_main_menu.rpym", line 35, in _execute_python_hide
    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 4025, in interact_core
    renpy.audio.audio.periodic()
  File "renpy/audio/audio.py", line 1162, in periodic
    raise_(exc[0], exc[1], exc[2])
  File "renpy/audio/audio.py", line 1140, in periodic_thread_main
    periodic_pass()
  File "renpy/audio/audio.py", line 1082, in periodic_pass
    c.periodic()
  File "renpy/audio/audio.py", line 518, in periodic
    topf = load(filename)
  File "renpy/audio/audio.py", line 69, in load
    rv = renpy.loader.load(fn)
  File "renpy/loader.py", line 798, in load
    raise IOError("Couldn't find file '%s'." % name)
IOError: Couldn't find file 'mods/Trait King/title.webm'.

Windows-10-10.0.19041
Ren'Py 7.4.11.2266
Brothel King 0.2 v220711
Sat Nov  5 23:13:51 2022

I played the mod for the first time, and when I hovered over the mod in the mod menu, this error showed up
Title: Re: [Resources] Trait King mod
Post by: neronero on Nov 06, 2022, 10:04 AM
Quote from: ihurgi1 on Nov 06, 2022, 05:15 AMI'm sorry, but an uncaught exception occurred.

While running game code:
IOError: Couldn't find file 'mods/Trait King/title.webm'.

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

Full traceback:
  File "renpy/common/_layout/screen_main_menu.rpym", line 28, in script
    python hide:
  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 "renpy/common/_layout/screen_main_menu.rpym", line 28, in <module>
    python hide:
  File "renpy/common/_layout/screen_main_menu.rpym", line 35, in _execute_python_hide
    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 4025, in interact_core
    renpy.audio.audio.periodic()
  File "renpy/audio/audio.py", line 1162, in periodic
    raise_(exc[0], exc[1], exc[2])
  File "renpy/audio/audio.py", line 1140, in periodic_thread_main
    periodic_pass()
  File "renpy/audio/audio.py", line 1082, in periodic_pass
    c.periodic()
  File "renpy/audio/audio.py", line 518, in periodic
    topf = load(filename)
  File "renpy/audio/audio.py", line 69, in load
    rv = renpy.loader.load(fn)
  File "renpy/loader.py", line 798, in load
    raise IOError("Couldn't find file '%s'." % name)
IOError: Couldn't find file 'mods/Trait King/title.webm'.

Windows-10-10.0.19041
Ren'Py 7.4.11.2266
Brothel King 0.2 v220711
Sat Nov  5 23:13:51 2022

I played the mod for the first time, and when I hovered over the mod in the mod menu, this error showed up
All the files in the .zip need to be extracted into the following places:

game/Mods/Trait King/Trait King.rpy
game/Mods/Trait King/title.webm
game/TKevents.rpy

Title: Re: [Resources] Trait King mod
Post by: ihurgi1 on Nov 06, 2022, 07:08 PM
Like this?
Title: Re: [Resources] Trait King mod
Post by: neronero on Nov 06, 2022, 07:36 PM
No, not like that  ;D

Your files are currently in these folders:

Brothel_King-pc/ game/Mods/ game/Mods/ Trait King/Trait King.rpy
Brothel_King-pc/ game/Mods/ game/Mods/ Trait King/title.webm
Brothel_King-pc/ game/Mods/ game/ TKevents.rpy

They should be over here:

Brothel_King-pc/ game/Mods/ Trait King/Trait King.rpy
Brothel_King-pc/ game/Mods/ Trait King/title.webm
Brothel_King-pc/ game/ TKevents.rpy
Title: Re: [Resources] Trait King mod
Post by: ihurgi1 on Nov 06, 2022, 11:21 PM
O SHIT THANK YOU SO MUCH
Title: Re: [Resources] Trait King mod
Post by: vadi92 on Jul 22, 2023, 06:50 AM
For the 0.3 version of the game you need to update this mod Nero. As it's just throwing errors for the event's.

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/BKintro.rpy", line 36, in script call
    call init_game() from _call_init_game_1
  File "game/BKstart.rpy", line 714, in script
    $ game.start_mods()
  File "game/BKstart.rpy", line 714, in <module>
    $ game.start_mods()
  File "game/BKclasses.rpy", line 195, in start_mods
    self.activate_mod(mod)
  File "game/BKclasses.rpy", line 250, in activate_mod
    renpy.call_in_new_context(mod.init_label) # Suggested fix by SometimesIsNotEnough
  File "game/Mods/Trait King/Trait King.rpy", line 371, in script call
    python:
  File "game/Mods/Trait King/Trait King.rpy", line 371, in script call
    python:
ScriptError: could not find label 'traitking_holidays'.

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

Full traceback:
  File "game/BKintro.rpy", line 36, in script call
    call init_game() from _call_init_game_1
  File "game/BKstart.rpy", line 714, in script
    $ game.start_mods()
  File "D:\Games\Brothel_King-pc\renpy\ast.py", line 1138, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "D:\Games\Brothel_King-pc\renpy\python.py", line 1122, in py_exec_bytecode
    exec(bytecode, globals, locals)
  File "game/BKstart.rpy", line 714, in <module>
    $ game.start_mods()
  File "game/BKclasses.rpy", line 195, in start_mods
    self.activate_mod(mod)
  File "game/BKclasses.rpy", line 250, in activate_mod
    renpy.call_in_new_context(mod.init_label) # Suggested fix by SometimesIsNotEnough
  File "D:\Games\Brothel_King-pc\renpy\game.py", line 353, in call_in_new_context
    return renpy.execution.run_context(False)
  File "D:\Games\Brothel_King-pc\renpy\execution.py", line 953, in run_context
    context.run()
  File "game/Mods/Trait King/Trait King.rpy", line 371, in script call
    python:
  File "game/Mods/Trait King/Trait King.rpy", line 371, in script call
    python:
  File "D:\Games\Brothel_King-pc\renpy\script.py", line 1013, in lookup
    raise ScriptError("could not find label '%s'." % str(original))
ScriptError: could not find label 'traitking_holidays'.

Windows-10-10.0.19045 AMD64
Ren'Py 8.1.1.23060707
Brothel King 0.3t v230721
Sat Jul 22 08:06:45 2023

Edit: Or not i was the stupid one. (Forgot to copy the events rpy.
Title: Re: [Resources] Trait King mod
Post by: vadi92 on Aug 05, 2023, 09:20 AM
I know it's not your fault but for both this and your Friends and Foes mod the background will not show up in 0.3.

https://imgur.com/a/AmTueSo (https://imgur.com/a/AmTueSo)
Title: Re: [Resources] Trait King mod
Post by: neronero on Aug 05, 2023, 11:56 AM
Here's a fixed version for BK0.3 + Friends & foes (https://www.mediafire.com/file/8s992x2e5kr7658/Trait_King_v021%252Bfriends.zip/file)

This also adds the new vanilla traits to Trait King (likely not compatible with BK 0.2)

I haven't done much BK0.3 testing with mods myself, but I'm relieved to see that it seems to be working fine for the most part.

I'm working towards a real update to Trait King with some new content, but it'll take a while.
Title: Re: [Resources] Trait King mod
Post by: 22ndgentlemen on Aug 06, 2023, 11:18 AM
Quote from: neronero on Aug 05, 2023, 11:56 AMHere's a fixed version for BK0.3 + Friends & foes (https://www.mediafire.com/file/8s992x2e5kr7658/Trait_King_v021%252Bfriends.zip/file)

This also adds the new vanilla traits to Trait King (likely not compatible with BK 0.2)

I haven't done much BK0.3 testing with mods myself, but I'm relieved to see that it seems to be working fine for the most part.

I'm working towards a real update to Trait King with some new content, but it'll take a while.

If it helps for testing Trait King, in the 0.3 Gameplay thread, I reported that the perk points were negative for a certain girl.  My post is on page 5.  Once Trait King was removed from the game, it started working correctly even if I started a new game.  IIRC, the girl had 4 traits when I purchased her, but higher powers help me if I can remember the exact traits in play unfortunately...
Title: Re: [Resources] Trait King mod
Post by: neronero on Aug 06, 2023, 12:32 PM
Quote from: 22ndgentlemen on Aug 06, 2023, 11:18 AMIf it helps for testing Trait King, in the 0.3 Gameplay thread, I reported that the perk points were negative for a certain girl.  My post is on page 5.  Once Trait King was removed from the game, it started working correctly even if I started a new game.  IIRC, the girl had 4 traits when I purchased her, but higher powers help me if I can remember the exact traits in play unfortunately...
This isn't something I can fix on TK's side, but I think this is how it happens:

Positive traits are connected to perk trees*. Spawning with a certain trait will automatically unlock a certain perk tree, and thereby take away 2 perk-points from the girl.**

If the girl has multiple traits that are tied to the same perk-tree, then for the traits following the first one it'll instead auto-unlock a branch in the already opened perk-tree and take away 1 perk-point from the girl.

Your girl started at level 2 (5 perk points to spend) and must've had a combination of traits tied to 3 different perk-trees, so she started with 3 perk-trees unlocked (-6 perk-points) and 5-6 = -1 perk-points "left" to spend because of that.

___


* I believe all positive traits are tied to a perk tree in vanilla BK. In TK there are some exceptions to that, plus some negative perks that can unlock a perk tree

** There is a "Does she have perk-points to spend?" sanity-check in the code, but it only checks if she has more than 0 points left, so if you only have 1 and spend 2 to unlock a tree, then you end up with -1.
Title: Re: [Resources] Trait King mod
Post by: 22ndgentlemen on Aug 06, 2023, 12:52 PM
Thanks for looking into that, it makes sense.  While it does not seem to be something that can easily be addressed right now, certainly not until the release of the full stable beta probably, I am confident it will be resolved in the future by one or both parties working together.  Until then, patience is the key.

Don't think I have said it before so, thanks for all your hard work on this mod.
Title: Re: [Resources] Trait King mod
Post by: DarkFire on Aug 08, 2023, 04:06 AM
There is an error when there is no girl:

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 2261, in script
    python:
  File "game/Mods/Friends and Foes/friends_and_foes.rpy", line 2317, in <module>
    if not girl.away:
AttributeError: 'bool' object has no attribute 'away'

-- 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 2261, 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 2317, in <module>
    if not girl.away:
AttributeError: 'bool' object has no attribute 'away'

Windows-10-10.0.19045 AMD64
Ren'Py 8.1.1.23060707
Brothel King 0.3t v230805
Tue Aug  8 06:02:47 2023
Title: Re: [Resources] Trait King mod
Post by: Smaug on Aug 12, 2023, 10:57 PM
Error with the friends module:
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 2261, in script
    python:
  File "game/Mods/Friends and Foes/friends_and_foes.rpy", line 2317, in <module>
    if not girl.away:
AttributeError: 'bool' object has no attribute 'away'

-- 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 2261, in script
    python:
  File "C:\Users\Smaug\Desktop\KORINTHOS\games\Brothel_King-3t\renpy\ast.py", line 1138, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "C:\Users\Smaug\Desktop\KORINTHOS\games\Brothel_King-3t\renpy\python.py", line 1122, in py_exec_bytecode
    exec(bytecode, globals, locals)
  File "game/Mods/Friends and Foes/friends_and_foes.rpy", line 2317, in <module>
    if not girl.away:
AttributeError: 'bool' object has no attribute 'away'

Windows-10-10.0.19044 AMD64
Ren'Py 8.1.1.23060707
Brothel King 0.3t v230805
Sun Aug 13 01:55:50 2023
Title: Re: [Resources] Trait King mod
Post by: neronero on Aug 13, 2023, 12:41 AM
Quote from: neronero on Aug 05, 2023, 11:56 AMHere's a fixed version for BK0.3 + Friends & foes (https://www.mediafire.com/file/8s992x2e5kr7658/Trait_King_v021%252Bfriends.zip/file)
File updated to patch the f&f error when you have no girls
Title: Re: [Resources] Trait King mod
Post by: Smaug on Aug 16, 2023, 01:28 AM
Nice  ;D
Title: Re: [Resources] Trait King mod
Post by: DarkFire on Aug 21, 2023, 02:20 AM
I 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
Title: Re: [Resources] Trait King mod
Post by: Goldo on Aug 31, 2023, 09:45 AM
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.
Title: Re: [Resources] Trait King mod
Post by: RobinScales on Dec 01, 2023, 07:30 PM
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
Title: Re: [Resources] Trait King mod
Post by: vadi92 on Dec 02, 2023, 06:54 AM
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
Title: Re: [Resources] Trait King mod
Post by: RobinScales on Dec 02, 2023, 01:55 PM
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?
Title: Re: [Resources] Trait King mod
Post by: neronero on Dec 02, 2023, 04:36 PM
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.
Title: Re: [Resources] Trait King mod
Post by: RobinScales on Dec 02, 2023, 05:12 PM
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.
Title: Re: [Resources] Trait King mod
Post by: a3660369 on Jan 17, 2024, 08:08 PM
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
这是啥问题为啥在奴隶市场选角色其中的就出这个我应该咋处理这个错误?
Title: Re: [Resources] Trait King mod
Post by: Goldo on Jan 18, 2024, 12:55 PM
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.
Title: Re: [Resources] Trait King mod
Post by: a3660369 on Jan 18, 2024, 07:18 PM
那我改如何处理呢 我就是用的这个猎头0.2因为我的游戏版本是O.2
Title: Re: [Resources] Trait King mod
Post by: Goldo on Jan 19, 2024, 09:28 AM
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.
Title: Re: [Resources] Trait King mod
Post by: neronero on Jan 21, 2024, 09:31 PM
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.
Title: Re: [Resources] Trait King mod
Post by: a3660369 on Jan 22, 2024, 09:42 PM
Quote from: neronero on Jan 21, 2024, 09:31 PM件。
你增加的特性文件能给我一分吗
Title: Re: [Resources] Trait King mod
Post by: neronero on Jan 23, 2024, 05:26 PM
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 (https://github.com/xyminxin/brothel-king-chinese-translate/) to ask for their advice, because even after adding translations for these new traits you might still run into more issues.