News:

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

Former www.henthighschool.com

[Resources] Writing events for BK

Started by Goldo, May 19, 2022, 09:17 AM

Previous topic - Next topic

AlolanNinetales

Would definitely only be for original girls, and I was thinking just whoever would have the custom trait for the sailor scout, the trait would work. So if if whoever was using Leortha's packs or another user wanted to use their own pack; then they could just down the the custom_trait and whatever other .rpy file i would make/edit and it would work. I could very well be in over my head though.

Jman

#121
You'd still have the problem of counting two Usagis with that approach, if e.g. someone adds the trait to Leortha's version while also using yours. And if they all share the same trait, it's impossible to tell if it's two Usagis, or Ami and Minako, etc.

I was thinking about using girl flags to indicate who is or isn't a specific scout, set in the init function. Although that also has the issue of allowing several copies of the same scout... but you can just count them all as one, I suppose.

But the bigger issue is communicating this to the player. A scaling trait would do it on its own, sorta. A complex trait switcheroo, not so much.
And with strange aeons even death may die...

GoldoTopic starter

There are various way to go about this but all of them involve code changes. custom_scale would be awkward as it is for linear kinds of behaviors, not on/off.

If I'm going to implement hooks for this, it would be worth spending some time to think on how it would best be done so that other user-made projects may benefit.
Maker of BK. Looking for the latest patch for BK v0.3? The link doesn't change, so bookmark it!

Jman

#123
For me, the most straightforward way seems to be modifying Effect.scales_with or adding a similar Effect property that actually changes the effect's value and which can be given a function or a label that does the changing. Perhaps some auto-translation for the interface, camelcase/snake case to lowercase or similar, so one can sorta read what it does if the author uses reasonably named functions.
And with strange aeons even death may die...

GoldoTopic starter

Quote from: Jman on Nov 22, 2024, 02:09 PMFor me, the most straightforward way seems to be modifying Effect.scales_with or adding a similar Effect property that actually changes the effect's value and which can be given a function or a label that does the changing. Perhaps some auto-translation for the interface, camelcase/snake case to lowercase or similar, so one can sorta read what it does if the author uses reasonably named functions.

Yeah that's what makes the most sense. It's going to require enough coding knowledge from the pack maker though.
Maker of BK. Looking for the latest patch for BK v0.3? The link doesn't change, so bookmark it!

Jman

I don't think A9T is going to get away without at least a little coding, needing to count only-original Sailors and whatnot.
And with strange aeons even death may die...

vadi92

Well this is pretty much a wacky mod. When you try to "spy" on a girl it's just outright crash your game.

Jman

#127
Didn't get that, but got softlocks, images hidden under other screen elements and general clunkiness. So, yeah, without testers and some solid updating, Vaan's mod isn't currently very playable indeed.
And with strange aeons even death may die...

vadi92

I get the hidden images under other screens too. But the game just outright crash for me on both 0.2 and 0.3 with this error.

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/Mods/Vaan/Vaan_Guild.rpy", line 253, in script
    call screen guild
ScriptError: could not find label 'spy_bathhouse'.

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

Full traceback:
  File "E:\Games\Brothel_King-pc\Brothel_King-pc\renpy\bootstrap.py", line 359, in bootstrap
    renpy.main.main()
  File "E:\Games\Brothel_King-pc\Brothel_King-pc\renpy\main.py", line 635, in main
    run(restart)
  File "E:\Games\Brothel_King-pc\Brothel_King-pc\renpy\main.py", line 145, in run
    renpy.execution.run_context(True)
  File "E:\Games\Brothel_King-pc\Brothel_King-pc\renpy\execution.py", line 955, in run_context
    context.run()
  File "game/Mods/Vaan/Vaan_Guild.rpy", line 253, in script
    call screen guild
  File "E:\Games\Brothel_King-pc\Brothel_King-pc\renpy\script.py", line 1103, in lookup
    raise ScriptError("could not find label '%s'." % str(original))
ScriptError: could not find label 'spy_bathhouse'.

Windows-10-10.0.19045 AMD64
Ren'Py 8.2.0.24012702
Bro King 0.3t v250203
Mon Mar 24 10:53:18 2025

Jman

Well, I do seem to have a label called 'spy_bathhouse', line 7882 of 'Vaan_guild.rpy'. Perhaps there are different versions of the mod?
And with strange aeons even death may die...

vadi92

Quote from: Jman on Mar 24, 2025, 01:06 PMWell, I do seem to have a label called 'spy_bathhouse', line 7882 of 'Vaan_guild.rpy'. Perhaps there are different versions of the mod?

I downloaded it from the second link as the first one is dead. And i have those labels there too.

Jman

#131
Does 'call spy_bathhouse' work from the console?



Edit: Hmm, apparently the last version here has removed the 'spy_bathhouse' label, but not the call to it.

I can guess that 'textbutton "Female only pool" action [Hide("female_only_side"), Jump("spy_bathhouse")]' is supposed to actually reference 'spy_bathhouse_date'.
And with strange aeons even death may die...

vadi92

Other then showing me the call spy_bathouse line it dosn't do anything.

Jman

That's strange. I could either call it (which was kinda buggy due to lost context), or the other version outright errored.

Anyway, see my last edit.
And with strange aeons even death may die...

vadi92

Hmmmm. With changing the code to 'spy_bathhouse_date' i dont get errored out of game but get this error instead:

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/Mods/Vaan/Vaan_Date.rpy", line 1191, in script
    "You successfully see [date_girl.name] changing, she hasn't noticed you yet."
NameError: Name 'date_girl' is not defined.

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

Full traceback:
  File "game/Mods/Vaan/Vaan_Date.rpy", line 1191, in script
    "You successfully see [date_girl.name] changing, she hasn't noticed you yet."
  File "E:\Games\Brothel_King-pc\Brothel_King-pc\renpy\ast.py", line 2557, in execute
    Say.execute(self)
  File "E:\Games\Brothel_King-pc\Brothel_King-pc\renpy\ast.py", line 615, in execute
    renpy.exports.say(who, what, *args, **kwargs)
  File "E:\Games\Brothel_King-pc\Brothel_King-pc\renpy\exports.py", line 1493, in say
    who(what, *args, **kwargs)
  File "E:\Games\Brothel_King-pc\Brothel_King-pc\renpy\character.py", line 1376, in __call__
    what = self.prefix_suffix("what", self.what_prefix, what, self.what_suffix)
  File "E:\Games\Brothel_King-pc\Brothel_King-pc\renpy\character.py", line 1290, in prefix_suffix
    return (sub(prefix) + sub(body) + sub(suffix))
  File "E:\Games\Brothel_King-pc\Brothel_King-pc\renpy\character.py", line 1270, in sub
    return renpy.substitutions.substitute(s, scope=scope, force=force, translate=translate)[0]
  File "E:\Games\Brothel_King-pc\Brothel_King-pc\renpy\substitutions.py", line 368, in substitute
    s = interpolate(s, kwargs) # type: ignore
  File "E:\Games\Brothel_King-pc\Brothel_King-pc\renpy\substitutions.py", line 86, in interpolate
    raise e
  File "E:\Games\Brothel_King-pc\Brothel_King-pc\renpy\substitutions.py", line 78, in interpolate
    value = renpy.python.py_eval(code, {}, scope)
  File "E:\Games\Brothel_King-pc\Brothel_King-pc\renpy\python.py", line 1209, in py_eval
    return py_eval_bytecode(code, globals, locals)
  File "E:\Games\Brothel_King-pc\Brothel_King-pc\renpy\python.py", line 1202, in py_eval_bytecode
    return eval(bytecode, globals, locals)
  File "<none>", line 1, in <module>
  File "E:\Games\Brothel_King-pc\Brothel_King-pc\renpy\substitutions.py", line 310, in __getitem__
    raise NameError("Name '{}' is not defined.".format(key))
NameError: Name 'date_girl' is not defined.

Windows-10-10.0.19045 AMD64
Ren'Py 8.2.0.24012702
Bro King 0.3t v250203
Mon Mar 24 15:13:46 2025