News:

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

Former www.henthighschool.com

v0.3 Test Version (April 2025 Update)

Started by Goldo, Aug 25, 2024, 10:58 PM

Previous topic - Next topic

GoldoTopic starter

Quote from: neronero on Aug 26, 2024, 02:24 PMNot sure if it's accidental. I'll go with whatever's the intention on Goldo's part.

For context @Goldo , Trait King rebuilds the trait_dict so rigorously that afterwards, I want to refresh everything that involves traits: free girls, slaves, quests, effects. That now causes errors if it happens during the mod's init_label. (But that could also mean that these operations aren't needed? edit: After some testing, I'm pretty sure that I don't have to refresh these things anymore now)
We can head to the TK thread if that's a better place for this discussion.

---

A small graphical glitch: When visiting the city and hovering over a visitable district, the first un-visitable location also lights up.

The latter is an old Ren'py glitch that is messy to fix, but I know what to do and I'll get around to it eventually.

For TK, I strongly recommend taking advantage of the new 'register_trait()' and 'deregister_trait()' functions in BKtraits.ini. It should make adding traits much more straightforward (see here).
Maker of BK. Looking for the latest patch for BK 0.2? The link doesn't change, so bookmark it!

neronero

While being ripped off by Renza (this was before installing the latest patch)
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/BKmain.rpy", line 302, in script call
    $ renpy.call(selected_location.menu[1])
  File "game/BKevents.rpy", line 2724, in script
    $ it.transform(it.min_rank)
  File "game/BKevents.rpy", line 2724, in <module>
    $ it.transform(it.min_rank)
  File "game/BKitems.rpy", line 196, in __getattr__
    return getattr(self.parent, attr)
AttributeError: 'Item' object has no attribute 'transform'

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

Full traceback:
  File "game/BKmain.rpy", line 302, in script call
    $ renpy.call(selected_location.menu[1])
  File "game/BKevents.rpy", line 2724, in script
    $ it.transform(it.min_rank)
  File "F:\ilx\BK03T20240824\renpy\ast.py", line 823, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "F:\ilx\BK03T20240824\renpy\python.py", line 1178, in py_exec_bytecode
    exec(bytecode, globals, locals)
  File "game/BKevents.rpy", line 2724, in <module>
    $ it.transform(it.min_rank)
  File "game/BKitems.rpy", line 196, in __getattr__
    return getattr(self.parent, attr)
AttributeError: 'Item' object has no attribute 'transform'

Windows-10-10.0.19045 AMD64
Ren'Py 8.2.0.24012702
Bro King 0.3t v240825
Tue Aug 27 01:25:14 2024
My Girl Packs: [ link ] - Trait King mod: [ link ]

Jman

Hmm, is the Sill icon really not coming back? :'(



The new 'can_generate' function seems to allow up to two unique girls now? ???
And with strange aeons even death may die...

darksythe53

Quote from: neronero on Aug 27, 2024, 12:30 AMWhile being ripped off by Renza (this was before installing the latest patch)
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/BKmain.rpy", line 302, in script call
    $ renpy.call(selected_location.menu[1])
  File "game/BKevents.rpy", line 2724, in script
    $ it.transform(it.min_rank)
  File "game/BKevents.rpy", line 2724, in <module>
    $ it.transform(it.min_rank)
  File "game/BKitems.rpy", line 196, in __getattr__
    return getattr(self.parent, attr)
AttributeError: 'Item' object has no attribute 'transform'

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

Full traceback:
  File "game/BKmain.rpy", line 302, in script call
    $ renpy.call(selected_location.menu[1])
  File "game/BKevents.rpy", line 2724, in script
    $ it.transform(it.min_rank)
  File "F:\ilx\BK03T20240824\renpy\ast.py", line 823, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "F:\ilx\BK03T20240824\renpy\python.py", line 1178, in py_exec_bytecode
    exec(bytecode, globals, locals)
  File "game/BKevents.rpy", line 2724, in <module>
    $ it.transform(it.min_rank)
  File "game/BKitems.rpy", line 196, in __getattr__
    return getattr(self.parent, attr)
AttributeError: 'Item' object has no attribute 'transform'

Windows-10-10.0.19045 AMD64
Ren'Py 8.2.0.24012702
Bro King 0.3t v240825
Tue Aug 27 01:25:14 2024

Got a similar issue on the new patch
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/BKmain.rpy", line 202, in script call
    $ renpy.call(selected_location.menu[1])
  File "game/BKevents.rpy", line 2732, in script
    $ it.transform(it.min_rank)
  File "game/BKevents.rpy", line 2732, in <module>
    $ it.transform(it.min_rank)
  File "game/BKitems.rpy", line 196, in __getattr__
    return getattr(self.parent, attr)
AttributeError: 'Item' object has no attribute 'transform'

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

Full traceback:
  File "game/BKmain.rpy", line 202, in script call
    $ renpy.call(selected_location.menu[1])
  File "game/BKevents.rpy", line 2732, in script
    $ it.transform(it.min_rank)
  File "C:\Program Files\BK-0.2\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:\Program Files\BK-0.2\Brothel_King-pc\renpy\python.py", line 1178, in py_exec_bytecode
    exec(bytecode, globals, locals)
  File "game/BKevents.rpy", line 2732, in <module>
    $ it.transform(it.min_rank)
  File "game/BKitems.rpy", line 196, in __getattr__
    return getattr(self.parent, attr)
AttributeError: 'Item' object has no attribute 'transform'

Windows-10-10.0.22631 AMD64
Ren'Py 8.2.0.24012702
Bro King 0.3t v240827
Mon Aug 26 23:14:54 2024

EvilPenguin

#19
With the new patch, fire in the brothel:

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/BKmain.rpy", line 905, in script
    show expression room at top
Exception: Image 'bg strip club' does not accept attributes 'dusty'.

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

Full traceback:
  File "game/BKmain.rpy", line 905, in script
    show expression room at top
  File "E:\0 TEST play\Brothel_King-pc-0.3t 24ver\Brothel_King-pc\renpy\ast.py", line 1113, in execute
    show_imspec(self.imspec, atl=getattr(self, "atl", None))
  File "E:\0 TEST play\Brothel_King-pc-0.3t 24ver\Brothel_King-pc\renpy\ast.py", line 1076, in show_imspec
    renpy.config.show(name,
  File "E:\0 TEST play\Brothel_King-pc-0.3t 24ver\Brothel_King-pc\renpy\exports.py", line 749, in show
    img = i(child=img)
  File "E:\0 TEST play\Brothel_King-pc-0.3t 24ver\Brothel_King-pc\renpy\atl.py", line 623, in __call__
    child = child._duplicate(_args)
  File "E:\0 TEST play\Brothel_King-pc-0.3t 24ver\Brothel_King-pc\renpy\display\image.py", line 459, in _duplicate
    rv.find_target()
  File "E:\0 TEST play\Brothel_King-pc-0.3t 24ver\Brothel_King-pc\renpy\display\image.py", line 421, in find_target
    self.target = target._duplicate(a)
  File "E:\0 TEST play\Brothel_King-pc-0.3t 24ver\Brothel_King-pc\renpy\display\displayable.py", line 246, in _duplicate
    args.extraneous()
  File "E:\0 TEST play\Brothel_King-pc-0.3t 24ver\Brothel_King-pc\renpy\display\displayable.py", line 109, in extraneous
    raise Exception("Image '{}' does not accept attributes '{}'.".format(
Exception: Image 'bg strip club' does not accept attributes 'dusty'.

Windows-10-10.0.19045 AMD64
Ren'Py 8.2.0.24012702
Bro King 0.3t v240827
Tue Aug 27 11:10:01 2024


also loading and quick loading the game, for me loads a couple events back, not in the point where it was saved.
For example, I go to the city, do an action, go back to the brothel screen, save the game, load it and i'm loaded in the city.

GoldoTopic starter

Quote from: EvilPenguin on Aug 27, 2024, 09:12 AMWith the new patch, fire in the brothel:

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/BKmain.rpy", line 905, in script
    show expression room at top
Exception: Image 'bg strip club' does not accept attributes 'dusty'.

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

Full traceback:
  File "game/BKmain.rpy", line 905, in script
    show expression room at top
  File "E:\0 TEST play\Brothel_King-pc-0.3t 24ver\Brothel_King-pc\renpy\ast.py", line 1113, in execute
    show_imspec(self.imspec, atl=getattr(self, "atl", None))
  File "E:\0 TEST play\Brothel_King-pc-0.3t 24ver\Brothel_King-pc\renpy\ast.py", line 1076, in show_imspec
    renpy.config.show(name,
  File "E:\0 TEST play\Brothel_King-pc-0.3t 24ver\Brothel_King-pc\renpy\exports.py", line 749, in show
    img = i(child=img)
  File "E:\0 TEST play\Brothel_King-pc-0.3t 24ver\Brothel_King-pc\renpy\atl.py", line 623, in __call__
    child = child._duplicate(_args)
  File "E:\0 TEST play\Brothel_King-pc-0.3t 24ver\Brothel_King-pc\renpy\display\image.py", line 459, in _duplicate
    rv.find_target()
  File "E:\0 TEST play\Brothel_King-pc-0.3t 24ver\Brothel_King-pc\renpy\display\image.py", line 421, in find_target
    self.target = target._duplicate(a)
  File "E:\0 TEST play\Brothel_King-pc-0.3t 24ver\Brothel_King-pc\renpy\display\displayable.py", line 246, in _duplicate
    args.extraneous()
  File "E:\0 TEST play\Brothel_King-pc-0.3t 24ver\Brothel_King-pc\renpy\display\displayable.py", line 109, in extraneous
    raise Exception("Image '{}' does not accept attributes '{}'.".format(
Exception: Image 'bg strip club' does not accept attributes 'dusty'.

Windows-10-10.0.19045 AMD64
Ren'Py 8.2.0.24012702
Bro King 0.3t v240827
Tue Aug 27 11:10:01 2024


also loading and quick loading the game, for me loads a couple events back, not in the point where it was saved.
For example, I go to the city, do an action, go back to the brothel screen, save the game, load it and i'm loaded in the city.


I can't reproduce this. Did anything special happen before saving? Can you share steps to reproduce this on a new game?

My suspicions lie here.

Maybe try that line in the console on a botched game, save and see if it still happens?
Maker of BK. Looking for the latest patch for BK 0.2? The link doesn't change, so bookmark it!

GoldoTopic starter

Quote from: Jman on Aug 27, 2024, 02:18 AMHmm, is the Sill icon really not coming back? :'(



The new 'can_generate' function seems to allow up to two unique girls now? ???

Are you positive it's happening or does it just read like it does? Because that's how I fixed the _BK.ini 'unique' bug and it seemed to work in my tests.
Maker of BK. Looking for the latest patch for BK 0.2? The link doesn't change, so bookmark it!

Jman

#22
I wasn't positive, but tested right now and it seems it really does allow two uniques.

I took a unique, always-free girl, made sure she shows up somewhere in the city, and then asked the Headhunter for another copy. Have to specify the pack name, freeness and originality to get anything, but I get her.

But then, she never appears in the city, even in her original form, even if one copy has 'location' set, because the location itself doesn't get that girl assigned. So now I have two 'ghost' copies of her, who never actually cycle into use.

If I reverse to the code in this post, both of them cycle as normal. If I ask for another copy, no dice. If I lose both, I can get another, but not two.


So I really do think this is problematic as is.



I also encountered saving issues, although in my case it's usually a screen or a few back, not an entire action. 'renpy.retain_after_load()' seemed to help when called right before saving, although not sure if it's a 100% solution. And it doesn't appear to work on saves several steps into the future. Is Ren'Py doing saves with some new method now?


Can also confirm that 'transform' seems missing in the overhauled item-generation system.



Also, Sill? :(
And with strange aeons even death may die...

neronero

Quote from: Goldo on Aug 26, 2024, 11:38 PMFor TK, I strongly recommend taking advantage of the new 'register_trait()' and 'deregister_trait()' functions in BKtraits.ini. It should make adding traits much more straightforward (see here).
If I use register_trait() during init python it works like a charm, but I suspect something is going wrong if I use it during a mod's init function or while ingame, because then all 'old' traits turn purple.
My Girl Packs: [ link ] - Trait King mod: [ link ]

Jman

I don't think it's different from how TK or mod-specified traits work now? If you change an existing trait, all girls in play will still have their old traits-as-objects.
And with strange aeons even death may die...

neronero

Quote from: Jman on Aug 27, 2024, 12:20 PMI don't think it's different from how TK or mod-specified traits work now? If you change an existing trait, all girls in play will still have their old traits-as-objects.
True, it's much the same as it was. I'm just a bit confused since Goldo mentioned calling it while in-game here:

Quote from: Goldo on Jul 11, 2024, 04:59 PMBasically it will add a 'register_trait()' function that can be called at any time (init or in-game) and add or update a trait. And a new attribute will be added to the Trait class called 'public', which when set to True (by default) will mean that all girls can randomly get this trait, and if False, it will only be available through _BK.ini or hard-coding.

This should make adding new traits a lot easier for girlpack makers and modders. Cheers.

So I'm not sure if it's working as intended or not.
My Girl Packs: [ link ] - Trait King mod: [ link ]

Jman

#26
Well, Goldo was not explicitly promising an update to all traits-as-objects, just the trait itself (as a database/dictionary entry).

Although I suppose you could read it that way if you really wanted to. :)

A function for manually updating all traits on all girls shouldn't be too hard to make, and probably won't take too much time to run, either. Edit: although I remember fucking it up at some point with my 'repair_traits' function years ago. Most likely due to improper use of self-referential cycles. :-[ /edit



Now that I looked into this, I see that there are several places that assume fixed trait positions, like 'virgin' trait being in the second position and any negative trait being in the third. I don't think this plays well with TK and its extra trait mechanics.
And with strange aeons even death may die...

GoldoTopic starter

Quote from: neronero on Aug 27, 2024, 12:07 PM
Quote from: Goldo on Aug 26, 2024, 11:38 PMFor TK, I strongly recommend taking advantage of the new 'register_trait()' and 'deregister_trait()' functions in BKtraits.ini. It should make adding traits much more straightforward (see here).
If I use register_trait() during init python it works like a charm, but I suspect something is going wrong if I use it during a mod's init function or while ingame, because then all 'old' traits turn purple.

Can you describe the exact problem?

register_trait() should work as intended even after Traits have been initiated. However, if you mean to use it to declare in _BK.ini, it should done early, aka at init.

deregister_trait(), on the other hand, could cause problems if you call it after init. If a girl has already generated with that trait, it will be missing. My recommendation if you change existing traits is to register them again with their old definition (maybe call init_traits() again)?

But I may be misunderstanding your problem.
Maker of BK. Looking for the latest patch for BK 0.2? The link doesn't change, so bookmark it!

neronero

#28
Quote from: Goldo on Aug 27, 2024, 02:09 PMCan you describe the exact problem?
In terms of registering the trait it's working fine, but it seems to disassociate all other traits that were requested from the "original" trait_dict from their pos/neg/gold distinctions so all existing mentions of traits will turn purple.

Once new content is generated then traits appear with the appropriate colors again. So to solve this in TK I basically throw away anything that was generated with the old trait_dict and refresh/update free girls, slaves, quests, effects, enemy_general.

But for an ongoing game that would be too disruptive, so you're stuck with purple traits in some places.

Screenshots (without running any mods):



My Girl Packs: [ link ] - Trait King mod: [ link ]

GoldoTopic starter

#29
Quote from: neronero on Aug 27, 2024, 02:46 PM
Quote from: Goldo on Aug 27, 2024, 02:09 PMCan you describe the exact problem?
In terms of registering the trait it's working fine, but it seems to disassociate all other traits that were requested from the "original" trait_dict from their pos/neg/gold distinctions so all existing mentions of traits will turn purple.

Once new content is generated then traits appear with the appropriate colors again. So to solve this in TK I basically throw away anything that was generated with the old trait_dict and refresh/update free girls, slaves, quests, effects, enemy_general.

But for an ongoing game that would be too disruptive, so you're stuck with purple traits in some places.

I see. Something must be referring to the Trait object itself, not using its name as a handle. Calling init_trait again removes the og Trait object so it becomes broken, or something.

Quote from: Jman on Aug 27, 2024, 10:29 AMI wasn't positive, but tested right now and it seems it really does allow two uniques.

I took a unique, always-free girl, made sure she shows up somewhere in the city, and then asked the Headhunter for another copy. Have to specify the pack name, freeness and originality to get anything, but I get her.

But then, she never appears in the city, even in her original form, even if one copy has 'location' set, because the location itself doesn't get that girl assigned. So now I have two 'ghost' copies of her, who never actually cycle into use.

If I reverse to the code in this post, both of them cycle as normal. If I ask for another copy, no dice. If I lose both, I can get another, but not two.


So I really do think this is problematic as is.

Very weird. Reverting this line to > 0 in 'can_generate()' fixes the issue, but I don't understand why

Ignore that, it does not seem to be the root cause of the problem.
Maker of BK. Looking for the latest patch for BK 0.2? The link doesn't change, so bookmark it!