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

GoldoTopic starter

I have had surprising success using https://novelai.net/ to help me write a couple of H event for Chapter 3 (I'm curious if you guys will be able to spot which ones when it is released, without hurting my feelings ;) ). Just feed it the beginning of your event written using Ren'py script patterns and it will adjust pretty well.

Quote from: GMWinters on Oct 12, 2023, 01:29 PMIs it possible to make trait effects vary depending on personality? Or would either the BK code or Renpy engine get angry if conditionals were included in a Trait?

If it matters, I was originally thinking of situations where a trait indicates action XYZ hurts and so applies some penalty to it, but it occurs to be that a Masochist girl might see that as a benefit not a downside and could instead get a bonus.

That then led me to wondering about something like a "living stereotype" trait or whatever where the girl isn't just a pervert/princess/bimbo, she's the pervert/princess/bimbo or whatnot with the specific effect varying by personality or some other variable. But I assume the code would have to be designed to handle that kind of input and probably isn't?

The best way to design something like that would be to create an alternate trait that has the same name, but different effects, and add a personality check to BKgirlclass.rpy in 'add_trait()' to replace the vanilla trait with the special one for specific personalities. I'm not 100% clear if the checks that are done by trait name (such as 'has_trait()' ) would all work but my gut feeling is they would.
Maker of BK. Looking for the latest patch for BK 0.2? The link doesn't change, so bookmark it!

Vaan

Hi guys,

Managed to create a mod and already have a few events in it, about 5 so far, nothing complex. Will post it here once i get to 10 or something. Anyway, i was wondering, and this might be a stupid question, is there a way to draw a specific group of girls from the brothel? I came up with an idea to do events in the four different rooms, but i'm struggling to do it. I'm trying to draw out the dancers only as it's an event in that group only, for the first one, but can't seem to figure out how? This is what i've tried
$ able_girls = [g for g in MC.girls if not (g.away or g.hurt or g.exhausted)]
$ girl = rand_choice(able_girls,  job = "dancer")


$ able_girls = [g for g in MC.girls if not (g.away or g.hurt or g.exhausted)]
$ girl = rand_choice(able_girls, if girl.job in ("dancer"))

$ able_girls = [g for g in MC.girls if not (g.away or g.hurt or g.exhausted)]
$ girl = girl_job("dancer"), (able_girls))

Played around with all combinations and whatever i could find in the game's scripts, but couldn't find anything that resembles what i'm trying to do and i have no idea how to write it on my own. Any help would be appreciated, so far i've only ever used this on all my events, but it's getting a bit boring to choose a random girl from them all and wanted to do something a bit more specific:

$ able_girls = [g for g in MC.girls if not (g.away or g.hurt or g.exhausted)]
$ girl = rand_choice(able_girls)

neronero

Quote from: Vaan on Nov 20, 2023, 08:02 PMManaged to create a mod and already have a few events in it, about 5 so far, nothing complex. Will post it here once i get to 10 or something. Anyway, i was wondering, and this might be a stupid question, is there a way to draw a specific group of girls from the brothel? I came up with an idea to do events in the four different rooms, but i'm struggling to do it.
Nice, someone's cooking! ;D 

The purpose of rand_choice is: give it a list of things and it'll give back one random item from the list. In most of your attempts you're trying add your extra filtering criteria within the rand_choice() function. It should be done before that point, when you're defining the list that you're going to give to rand_choice()

Here's how you could do the filtering in 2 steps, to make it easy to understand
# Make a list of girls that are present in the brothel and not injured or burned out
$ able_girls = [g for g in MC.girls if not (g.away or g.hurt or g.exhausted)]

# Take the list above and reduce it to a smaller list, leaving only girls with the "dancer" job
$ dancer_girls = [g for g in able_girls if g.job == "dancer"]

# Give dancer_girls to rand_choice, which will pick a random thing from any list you put inside its brackets
$ girl = rand_choice(dancer_girls)

But it doesn't have to be an extra step, you could also add the extra criteria to the able_girls line to instantly create the right list:
$ able_girls = [g for g in MC.girls if not (g.away or g.hurt or g.exhausted) and g.job == "dancer"]
$ girl = rand_choice(able_girls)
My Girl Packs: [ link ] - Trait King mod: [ link ]

GoldoTopic starter

Quote from: neronero on Nov 24, 2023, 08:02 PM
Quote from: Vaan on Nov 20, 2023, 08:02 PMManaged to create a mod and already have a few events in it, about 5 so far, nothing complex. Will post it here once i get to 10 or something. Anyway, i was wondering, and this might be a stupid question, is there a way to draw a specific group of girls from the brothel? I came up with an idea to do events in the four different rooms, but i'm struggling to do it.
Nice, someone's cooking! ;D 

The purpose of rand_choice is: give it a list of things and it'll give back one random item from the list. In most of your attempts you're trying add your extra filtering criteria within the rand_choice() function. It should be done before that point, when you're defining the list that you're going to give to rand_choice()

Here's how you could do the filtering in 2 steps, to make it easy to understand
# Make a list of girls that are present in the brothel and not injured or burned out
$ able_girls = [g for g in MC.girls if not (g.away or g.hurt or g.exhausted)]

# Take the list above and reduce it to a smaller list, leaving only girls with the "dancer" job
$ dancer_girls = [g for g in able_girls if g.job == "dancer"]

# Give dancer_girls to rand_choice, which will pick a random thing from any list you put inside its brackets
$ girl = rand_choice(dancer_girls)

But it doesn't have to be an extra step, you could also add the extra criteria to the able_girls line to instantly create the right list:
$ able_girls = [g for g in MC.girls if not (g.away or g.hurt or g.exhausted) and g.job == "dancer"]
$ girl = rand_choice(able_girls)

Just don't forget to add a check for what happens if no girl fits the criteria (rand_choice will return 'False'), or you're in for a crash.
Maker of BK. Looking for the latest patch for BK 0.2? The link doesn't change, so bookmark it!