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

neroneroTopic starter

Quote from: 22ndgentlemen on Sep 22, 2024, 09:02 PMGetting error when attempting to launch with Trait King v025_BK03t.  I am still able to launch v3 BK test version using the older version of Trait King v021 built for v2 BK.   

Running patch for v3 test that was release 30 minutes ago as of this post.
Sorry for the late response due to the forum dying  :'(
See the instruction below, one of the files has moved so if you're upgrading from an older version, make sure to delete the old file:

Quote from: neronero on Sep 11, 2024, 09:43 AMNow that we're back in this timeline, TKevents.rpy has once again moved to the mods folder. So remember to remove /game/TKevents.rpy and /game/TKevents.rpyc if you're upgrading from an earlier version.
My Girl Packs: [ link ] - Trait King mod: [ link ]

Smaug

The mod index says that Trait King is incompatible with the latest test version, is that still accurate info?

neroneroTopic starter

Quote from: Smaug on Oct 04, 2024, 06:36 PMThe mod index says that Trait King is incompatible with the latest test version, is that still accurate info?
Nice catch, fixed!
My Girl Packs: [ link ] - Trait King mod: [ link ]

22ndgentlemen

#108
Please ignore, after more testing Headhunter was to blame not Trait King.

Ford

Quote from: DarkFire on Sep 11, 2024, 01:37 AMGot this while starting a new run. Likely related to new girl challenge?

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/BKstart.rpy", line 84, in script call
    call advance_to_chapter(starting_chapter, start=True) from _call_advance_to_chapter_3
  File "game/BKevents.rpy", line 783, in script
    $ calendar.updates(change_district=not start) # change_district disables quest and resource market updates
  File "game/BKevents.rpy", line 783, in <module>
    $ calendar.updates(change_district=not start) # change_district disables quest and resource market updates
  File "game/BKclasses.rpy", line 3008, in updates
    weekly_updates(change_district)
  File "game/BKfunctions.rpy", line 2793, in weekly_updates
    update_slaves()
  File "game/BKfunctions.rpy", line 526, in update_slaves
    slavemarket.girls = get_girls(nb)
  File "game/BKfunctions.rpy", line 373, in get_girls
    girl.randomize(free=free, p_traits=p_traits, n_trait=n_trait, perks=perks, level=lvl, force_original=(prefer_original and girl.count_occurences("all", original=True, add_list=final_list) == 0), temp_list=final_list) # final_list is checked to avoid multiple original generation
  File "game/BKgirlclass.rpy", line 197, in randomize
    self.generate_traits(p_traits, n_trait)
  File "game/BKgirlclass.rpy", line 911, in generate_traits
    if d > traitking_t1_chance:              # very rare 1
NameError: name 'traitking_t1_chance' is not defined

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

Full traceback:
  File "game/BKstart.rpy", line 84, in script call
    call advance_to_chapter(starting_chapter, start=True) from _call_advance_to_chapter_3
  File "game/BKevents.rpy", line 783, in script
    $ calendar.updates(change_district=not start) # change_district disables quest and resource market updates
  File "C:\Users\Dani\Desktop\Juegos\Brothel_King-0.3t\Brothel_King-pc\renpy\ast.py", line 823, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "C:\Users\Dani\Desktop\Juegos\Brothel_King-0.3t\Brothel_King-pc\renpy\python.py", line 1178, in py_exec_bytecode
    exec(bytecode, globals, locals)
  File "game/BKevents.rpy", line 783, in <module>
    $ calendar.updates(change_district=not start) # change_district disables quest and resource market updates
  File "game/BKclasses.rpy", line 3008, in updates
    weekly_updates(change_district)
  File "game/BKfunctions.rpy", line 2793, in weekly_updates
    update_slaves()
  File "game/BKfunctions.rpy", line 526, in update_slaves
    slavemarket.girls = get_girls(nb)
  File "game/BKfunctions.rpy", line 373, in get_girls
    girl.randomize(free=free, p_traits=p_traits, n_trait=n_trait, perks=perks, level=lvl, force_original=(prefer_original and girl.count_occurences("all", original=True, add_list=final_list) == 0), temp_list=final_list) # final_list is checked to avoid multiple original generation
  File "game/BKgirlclass.rpy", line 197, in randomize
    self.generate_traits(p_traits, n_trait)
  File "game/BKgirlclass.rpy", line 911, in generate_traits
    if d > traitking_t1_chance:              # very rare 1
NameError: name 'traitking_t1_chance' is not defined

Windows-10-10.0.19045 AMD64
Ren'Py 8.2.0.24012702
Bro King 0.3t v240910
Wed Sep 11 03:30:47 2024

Got the same problem:

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/BKendday.rpy", line 1430, in script
    python:
  File "game/BKendday.rpy", line 1436, in <module>
    calendar.newday()
  File "game/BKclasses.rpy", line 3016, in newday
    self.updates()
  File "game/BKclasses.rpy", line 3021, in updates
    weekly_updates(change_district)
  File "game/BKfunctions.rpy", line 2793, in weekly_updates
    update_slaves()
  File "game/BKfunctions.rpy", line 526, in update_slaves
    slavemarket.girls = get_girls(nb)
  File "game/BKfunctions.rpy", line 373, in get_girls
    girl.randomize(free=free, p_traits=p_traits, n_trait=n_trait, perks=perks, level=lvl, force_original=(prefer_original and girl.count_occurences("all", original=True, add_list=final_list) == 0), temp_list=final_list) # final_list is checked to avoid multiple original generation
  File "game/BKgirlclass.rpy", line 197, in randomize
    self.generate_traits(p_traits, n_trait)
  File "game/BKgirlclass.rpy", line 911, in generate_traits
    if d > traitking_t1_chance:              # very rare 1
NameError: name 'traitking_t1_chance' is not defined

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

Full traceback:
  File "game/BKendday.rpy", line 1430, in script
    python:
  File "E:\Downloads\.Game unpack\Brothel_King-pc\renpy\ast.py", line 823, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "E:\Downloads\.Game unpack\Brothel_King-pc\renpy\python.py", line 1178, in py_exec_bytecode
    exec(bytecode, globals, locals)
  File "game/BKendday.rpy", line 1436, in <module>
    calendar.newday()
  File "game/BKclasses.rpy", line 3016, in newday
    self.updates()
  File "game/BKclasses.rpy", line 3021, in updates
    weekly_updates(change_district)
  File "game/BKfunctions.rpy", line 2793, in weekly_updates
    update_slaves()
  File "game/BKfunctions.rpy", line 526, in update_slaves
    slavemarket.girls = get_girls(nb)
  File "game/BKfunctions.rpy", line 373, in get_girls
    girl.randomize(free=free, p_traits=p_traits, n_trait=n_trait, perks=perks, level=lvl, force_original=(prefer_original and girl.count_occurences("all", original=True, add_list=final_list) == 0), temp_list=final_list) # final_list is checked to avoid multiple original generation
  File "game/BKgirlclass.rpy", line 197, in randomize
    self.generate_traits(p_traits, n_trait)
  File "game/BKgirlclass.rpy", line 911, in generate_traits
    if d > traitking_t1_chance:              # very rare 1
NameError: name 'traitking_t1_chance' is not defined

Windows-10-10.0.22631 AMD64
Ren'Py 8.2.0.24012702
Bro King 0.3t v241006
Sat Oct 19 06:57:28 2024

Hooking issue?

Jman

Yeah. Make sure you use the latest Trait King, because girl generation parameters needed to be moved to the 'early' init phase. Older versions don't have that.
And with strange aeons even death may die...

Ford

I'm certain that I'm using the latest version (v025_BK03t) and the issue is still occurring. Upon inspection, at there are some unreachable code after line 371 in Trait King.rpy which include 'traitking_t1_chance'. Don't know how to fix it though...

Jman

Strange. It does seem to work for me, with 0.25 and BK v241006. Are you sure the mod is enabled? BK sometimes stealth disables your mods. You can try re-enabling it from the '?' menu, too.

The 'return' at line 371 doesn't make the code absolutely unreachable, it can and should still be executed when the 'traitking_early_init' label is run. Which is during mod enabling... and I've had trouble getting the regular 'init' to run at that time before. Perhaps that also affects the early label, and 're-enable' should also include the 'early' part?

Of course, it'd be better if Goldo fixed the issues with labels not running upon activation... :(
And with strange aeons even death may die...

Ford

Now you mention it, Trait king doesn't show up at '?' menu -> Mod despite it was enabled at the main menu. I also tried re-enable the mod at the main menu but it refused to work, still :/

Jman

That sounds... kinda bad. :o

Did you disable and then re-enable the mod? And still nothing in the '?' menu? Does the mod work with a new game?
And with strange aeons even death may die...

Ford

I did, nothing in the '?' menu (except for Mods option, in which it said there're no active mods). However, the mod did work on new game (yay!). I find it kind of strange that it doesn't work on my current game but oh well.

Jman

That sounds pretty strange. Can you share that save?

You can always try consoling 'call traitking_early_init', if there's nothing in the mods section of the '?' menu... although I don't know how that interacts with all the conditional code that relies on the 'TK activated' flag. You did get an error from such a code snippet to begin with, though. ???
And with strange aeons even death may die...

Ford

Woah, after calling traitking_early_init, the mod works now! No errors or anything. Thanks for helping me Jman  8)

Jman

I suppose the mod section of '?' might be empty because you don't have other mods with activation/deactivation toggles, and the current version of TK has moved all that stuff to a different label. Might be reasonable to bundle the two init labels there.
And with strange aeons even death may die...

Ford