u/AlexanderIdeally

▲ 1 r/RenPy

Custom screen changing a flag past a certain point.

Hello! I’ve been working on a game heavily relying on an inventory system for the past year or 2, and just when I thought I finally had everything in order, there’s one more glitch plaguing it. 

This glitch involves a flag called the AltArrow. Essentially, the AltArrow determines the behaviour of the inventory system’s cancel button. If you cancel with AltArrow off, the game just returns to where you were. If you cancel with AltArrow on, the game sends you to what I call The TimeRoom, where a bunch of flags determine where you should jump to next based on what other flags or variables are active. It's a situational flag, but it works for what I need it for.

screen hud():
    modal False


    imagebutton auto "bg_hud_thoughtinventory_%s.png":
        focus_mask True 
        hovered SetVariable("screen_tooltip", "Thought_Inventory")
        unhovered SetVariable("screen_tooltip", "")
        action Show("thought_inventory"), Hide("hud"), SetVariable("quick_menu", False)
           
screen thought_inventory():
    default hovered_thought = None
    add "bg_thoughtinventory":
        align (0.5, 1.0)
    modal True
    frame:
        #(This is just some debug stuff I have in here just in case)
        vbox:
            xalign 0.895 yalign 0.20
            xysize 0.06,0.05
            if AltArrow == True:
                text "AltArrow is On"
            else:
                text "AltArrow Is Off"
        vbox:
            xalign 0.895 yalign 0.40
            xysize 0.06,0.05
            if player.is_alone:
                text "You're Alone"
            else:
                text "Someone's Here"
        align (0.2, 0.6)
        xysize (800,700)
        viewport:
            scrollbars "vertical"
            mousewheel True
            draggable True
            side_yfill True
            vbox:
                for thought in thought_inventory.thoughts:
                    button:
                        text "[thought.name]\n" style "button_text"
                        if player.is_alone:
                            action Function(player.show_thought, thought) pos 0.1, 0.5
                            hovered SetScreenVariable("hovered_thought", thought)
                        else: 
                            action SetVariable("quick_menu", True), Function(player.show_thought, thought) pos 0.1, 0.5
                            hovered SetScreenVariable("hovered_thought", thought)
                        
    if hovered_thought:
        frame:
            align (0.845, 0.944)
            xysize (550, 535)
            text "{size=*0.80}[hovered_thought.description]{/size}"
            add hovered_thought.icon pos -0.0054, -0.5927
            
    imagebutton auto "thoughtinventoryscreen_return_%s.png":
        focus_mask True
        hovered SetVariable("screen_tooltip", "Return")
        unhovered SetVariable("screen_tooltip", "")
        #THIS IS WHERE THE PROBLEM ACTUALLY STARTS.
        if AltArrow == True:
            action SetVariable("quick_menu", True), Hide("thought_inventory"), Jump("TimeRoom"), Show("hud"), Return()
        else:
            action SetVariable("quick_menu", True), Hide("thought_inventory"), Show("hud")

Everything works out, except when you pass this point in the script:

label Mary_TalkSession1:
                $ AltArrow = True
                $ Session_Active = True
                show screen UnfinishedBar
                show screen hud
                show screen calender
                show mary neutral
                $ player.add_person(m_obj)
                if mm <= -30:
                    show mary sad
                menu:
                    "{i}{color=#2731c2}Ask Her A Question{/color}{/i}":
                        jump Mary_AskSession1
                    "{i}{color=#2731c2}Bring Up A Thought{/color}{/i}":
                        $ quick_menu = False
                        hide screen hud
                        call screen thought_inventory
                    "{i}{color=#2731c2}Think For A Bit{/color}{/i}":
                        jump Your_AskSession1
                    "{i}{color=#2731c2}End Session{/color}{/i}":
                        jump Mary_AreYouSure1

label Mary_AreYouSure1:
                    n "{i}{color=#9c2cdd}(...I think I have nothing left to ask.){/color}{/i}"
                    Qm "You sure?"
                    menu:
                        "Yeah.":
                            jump Concluding_Session1
                        "On second thought...":
                            jump NotDoneSession1


                            label NotDoneSession1:
                                n "On second thought, there is something I should ask."
                                jump Mary_TalkSession1

This is the set-up for the conversation menu, where you can control what you bring up with characters.

When the game passes this point, the HUD changes. Whenever you click the hud button, AltArrow is switched on automatically no matter what, and you can’t exit the menu without transporting to the timeroom, which softlocks the game. 

There is no part of any screen code which controls when AltArrow is switched on and off. It only detects when AltArrow is flicked on by the script itself.

And everything works perfectly before that point. AltArrow is getting shut off and staying off no matter how many times I open the inventory. Hell, if I put a shortcut that skips this section entirely, the code still works!

For clarification, I did once try to have AltArrow’s flag be triggered by the menu buttons, but that code is long gone. I don't even remember the details. I’ve recomplied since then, and even if it was still somehow being read, I can’t figure out why it would only activate after that point. I have tried putting hashtags in front of each line at the beginning, and the glitch still stays. 

I have absolutely no idea what’s going on. I’m hoping somebody else might. I don't know if it will help, but here's some additional relevant inventory code if you need that context.

init python:
    class Thought_Inventory():
        def __init__(self, thoughts=None):
            self.thoughts = thoughts if thoughts else []
            self.no_of_thoughts = len(self.thoughts)


        def add_thought(self, thought):
            if thought not in self.thoughts:
                self.thoughts.append(thought)
                self.no_of_thoughts += 1


        def remove_thought(self, thought):
            if thought in self.thoughts:
                self.thoughts.remove(thought)
                self.no_of_thoughts -= 1


    class Thought():
        def __init__(self, name, description, icon):
            self.name = name
            self.description = description
            self.icon = icon 


        def __str__(self):
                return self.name


        def __eq__(self, other):
            if isinstance(other, Thought):
                return self.name == other.name
            else:
                return False

init python:
    class Actor:
        def __init__(self, name, character, thoughts=[]):
            self.name = name
            self.character = character
            self.thoughts = thoughts


        def __str__(self):
            return self.name


        def react_on_thought(self, thought_name):
            for thought in self.thoughts:
                if thought[0] == thought_name:
                    return [self.character, thought[1]]
    
    class Player():
        def __init__(self, name):
            self.name = name
            self.is_with_list = []
 
        def __str__(self):
            return self.name
 
        u/property
        def is_alone(self):
            return not self.is_with_list
 
        def add_person(self, person):
            if person not in self.is_with_list:
                self.is_with_list.append(person)
 
        def remove_person(self, person):
            if person in self.is_with_list:
                self.is_with_list.remove(person)


        def show_thought(self, thought_name, label=False):
            reactions = []
            for char in self.is_with_list:
                character_reaction = char.react_on_thought(thought_name)
                if character_reaction:
                    if renpy.has_label(character_reaction[1]):
                        renpy.call(character_reaction[1])
                    else:
                        reactions.append(character_reaction)
            if reactions:
                renpy.show_screen("reaction_screen", reactions)
reddit.com
u/AlexanderIdeally — 2 days ago

Alternative Titles: Your Lover Finds Out You’re A Werewolf…And Likes It | I Love All Of You | (You’re free to come up with your own if you like.)

Content Warnings: Swearing. Sex is never said outright but someone could easily interpret it happening offscreen.

Word Count: ~1750 (Not including audio directions)

Ok for monetization with credit. And if you plan on paywalling this, please send me a free version in any way you can. 

You’re allowed to edit this script however you like.

I take any criticism at all. If you have thoughts or notice a grammar mistake, PLEASE let me know.

Context (Listener): You’re a monster. A giant, hairy, furious monster every full moon. You don’t even remember what it’s done, but you know it has to be some kind of carnage. You’ve had to hide that side away from everyone, even lying to your lover so many times…You just need to contain it, no matter what. No one can know, or your life is over. 

Context (Speaker): You love your shy lover so much! They’re so cute and shy and sweet. It’s just a shame that it feels like they're hiding something from you. Something big. Something they’re ashamed of…But whatever. That’s not going to stop you from celebrating your anniversary. Nothing will. 

[Actions and sounds look like this.]

(Emotional directions look like this.)

SCRIPTBIN VERSION HERE

SCRIPT START:

[If you can, set up some tension here with pure sound design. A ticking clock. Ringing ears. A pounding heart. Anything to channel imminent dread.]

[Tonight’s the night. You feel it in your system. You’re going to become…it…again…]

[Knock knock knock.] (Note: The knocks should cut out any additional sounds.)

(Sing-Songy) Oh, Sweetness.

[Knock Knock.]

Sweetiepie…

[Knock Knock]

Sweetheart.

[Knock Knock.]

I’m running out of sweet-sounding nicknames, Sweet...um...cakes?

How about you just open the door?

[“I told you not to come!”]

Yes, you did tell me not to come tonight. And I told you there isn’t an army in the world that could hold me back from celebrating a year of dating my favourite person in the world.

[“We can celebrate it tomorrow.”]

Tomorrow isn’t our anniversary, silly.

Seriously, I’m not going to pretend I’m not concerned. Spending this special day going from hardware store to hardware store and constantly telling me I can’t see you. 

I just want an answer. That’s all. Now, can you give me one? 

[...]

Are you mad at me?

["No."]

Do you have a cold or something?

["...No."]

...Is there someone else in your bed?

["NO!"]

Then what is it? 

Maybe you could let me in, and we could chat all about it while enjoying the sweetness I bought for my sweetness! It’s a small cake, but it’s my favourite kind! And it has writing in your favourite colour! And I promise I had them write your actual name this time. 

[...]

(Mad)...Seriously, if you’re going to act like this, you could at least give me a hint or something!

I know we all need to have our secrets to keep, but if it’s getting to the point where you have to lock yourself in your own home on our anniversary, I’m going to step in, whether you want me to or not. 

I mean, you’ve always been quiet and secretive. And you know what? That’s fine! But this has to be an overreaction! What justifies treating someone you love like they’re dangerous? Are the nicknames just getting that bad? Do you need me to stop with them?

Just tell me anything! I'll take anything! I just want an actual reason, or my brain's going to go crazy about this all night!

[...You finally say something.]

(Confused) I’m…in danger?

From what!?

[...]

….You?

…That doesn’t…W-What are you saying? What are you going to do?

[“Just go!”]

No, I’m not going! Not without an answer! How are you a danger to me!

Alright, that’s it. You’re not well, and I’m not leaving. Not unless I know you’re safe. I’m coming in!

[Your doorknob turns.]

…Cute, you locked the door.

Good thing I know about the fake rock you made for your spare key…

[The door unlocks and opens.]

Alright, can you tell me what…(shocked)...the…HELL!?

What are you boarding your windows for!? 

[“...Um…”]

No, seriously, what is going on!? I expected to go through some big argument, not a zombie apocalypse! 

Is someone hunting you!?

[“...”]

(Stern)...Tell the truth. We both know you can’t lie to me. Not properly, at least.

[“...No…”]

Okay, then what is this for?

(Scared)...Is it for me?

[“NO! No, no, no…It’s for me…”]

Y-You? You’re barricading yourself in!? Why!?

[...]

Don’t look away from me. Not now. What’s going on?

[...]

(Mad)…I’m tired. I can’t keep up the grin. Not with all the hiding you’ve been doing for our entire relationship. You have that look in your eye, that there’s something you need to tell me. But you never do. I ask, and you shake your head. I want to spend a night with you, you make an excuse I never believe…

…And you know what? I was willing to ignore it. It didn’t seem sinister or disgusting. It was just my shy little sweetness being adorable, as always. I thought you were just embarrassed about something you did or wanted to pitch a risky idea to me….

Not anymore. It’s time to talk, like a proper couple. So here’s what’s going to happen…

I’m going to set this cake down for later.

[There’s a little plop on the counter.]

And I’m going to come over there and hold your hand. Then we’re going to walk under a beautiful dusk sky, and you’re going to tell me everything. And then I’m going to help you fix it and get these nails out of your walls. 

[“...Dusk?”]

(Confused) Yeah, it’s dusk. And getting darker by the second. I saw the moon coming up on the way in. It looks wonderful, so let’s just-

[You demand that they leave.]

(Mad) Don’t scream at me for trying to help-

[You clench your body in pain and scream for them to get out again.]

(Scared) O-OH NO!

Where does it hurt? What’s going on I-

[You try one more time.]

NO! I’m not leaving! Not when you’re in pain! I’m calling an ambulance, we have to get-

[It finally begins. You feel your body changing.]

(Shocked) Ah…Oh my god…

(Louder) OH MY GOD!

OH MY-

[The last thing you hear is a howl before everything fades to black.]

[...You wake up outside, under a tree, with the sun rising…You’re concerned. You’re terrified. It happened when they were right in front of you…Your ears start to ring…]

Mmmmm…

[It’s a groan. At first, it sounds like someone aching…Until it continues and sounds more like someone waking up.]

UUuuuuugh….Ooooof…

[You turn to see your lover on the grass, visibly messy and tired from a long night. And yet, they wake up with a smile.]

(Waking up, happy) Oh…hey…You’re back…

[Without hesitation, you get to the ground and ask if they’re okay.]

Yeah, yeah. I’m fine. All fine…Everything’s good. 

[...]

The bitemarks? Don’t worry about that. Those were consensual. Left some nasty hickies though. Anyway, could you be a dear and get us some coffee, or…

…Oh right, we’re in the middle of the woods. Forgot about that…

(Something clicks in their head, and they aren’t tired anymore)

WE’RE IN THE MIDDLE OF THE WOODS!

YOUR CLOTHES ARE ALL RIPPED UP!

I’M COVERED IN BITEMARKS AND HICKIES!

Oh shit, that was all real! HOLY…

 (Quieter) Wow…

(Exhausted, Sad Chuckle) I am so fucked up. 

[???]

Oh, I thought last night was a really weird fantasy dream. Felt like one anyway…

[“It…didn’t hurt you?”]

…Um, no, “It” didn’t hurt me at all. I mean, a little, but like…I’m fine. We don’t have to call a doctor or anything. 

[“Then what did it do!?”]

Well, if you’re wondering, “it” gave me an anniversary night to remember. 

[???] 

Yeah, I mean, it did start out scary. Really scary. You don’t just see a werewolf pop up in front of you and not have the instinct to run. 

But then I noticed that it looked confused about why someone was in this house. Sniffed me. And said I smelled good…

Then it demolished the cake in front of me. In hindsight, I'm really glad I didn’t go with chocolate. 

After that, it just seemed enamoured by the openned door, and really wanted to go outside. I didn’t want to leave it alone, so I followed it, and that just confused it even more. Then we started to actually have a little bit of a conversation, and one thing led to another, and…um…

(Embarrassed) Look, over the course of the night, I couldn’t help myself…

All the things it said, and…and its voice. Your voice…I…

[“It was tricking you! It-]

(Annoyed) It wasn’t tricking me. Because it’s not an “it.” It was you. 

[...]

I could see it in your eyes, you know. The way you looked at me. The way you tilted your head a little whenever you didn’t get something. Just the way you looked all around, like something was hunting you. It was you…It was all you…

[...]

Don’t look so ashamed. I’m just glad I finally got my answer.

[“Answer?”]

Yeah! My answer to why you’re…like that…

[???]

(Flustered) Not what I meant! Or…um…Maybe…How do I put this?

It felt like you were hiding something from me for a long time and hated it. 

Every time you couldn’t do something. Every time you were in a weird situation. Every time I asked you if something was going on. You had that guilty look.

And I found it cute…but it also left me anxious sometimes…

…But that isn’t all…I…

Sometimes I feel like you’re holding back. 

[???]

Now, I don’t want to be rude or anything because I love you! I love my shy little sweetheart who blushes easily, plays with their hair and would rather die than tell a waiter they got their order wrong. It’s adorable, and it’s who I fell in love with…

But at the same time, I felt like there was always more to you. Obviously, you were keeping something from me, but sometimes it also felt like you were trying to…keep yourself shy and small. Like you wanted to raise your voice for once, but you were scared of what was going to happen…

…Were you scared? 

[...]

Well, of yourself, yes. But…Were you scared I was going to…leave you?

[“...Of course I was.”]

…Oh, sweetie. 

You thought I’d hate that side of you? Did you think it would kill me?

…Did it ever actually hurt anyone?

[...]

I figured. We don’t have many wolf attacks around here. Just some reports of a big hairy thing in the forests…

Would you like to know what it actually wanted the whole time?

[???]

…A “pack.” 

It was very, very lonely…

(Chuckles)…I made you a very happy wolf last night, didn’t I? Come on. It was still you. I’m sure you have that memory somewhere in that skull.

[You say something.]

...A "feeling?"

(Proud)...I'll take that.

[“...So nothing changes?”]

Oh, no. A lot is going to change from here. Hell, everything is going to change…

…I think the biggest one…is that you’re no longer my Sweetheart. Or Sweetness. Or any sweet thing.

(Playful) You’re my Puppy!

[“NO! NO, NO NO!”]

Yes, yes, yes! Yes you are, yes you are! And I’m gonna take my Puppy for lots of walkies and get them treats and play with them and pet them every single day. 

And whenever the moon's full, you can call me. I’ll take good care of my big Wolf Pup.

[...You ask something stupid.]

Prefer it over you?

Again, it’s you. It’s just a different side to you. Don’t act like it’s a contest. 

I don’t hold onto things I don’t like. If I were tired of you being shy, I wouldn’t be dating you. But here we are. One year later. I don’t regret a second of it. 

(Serious) I just…I want you to be honest with me. I can deal with weirder sides of people, but I can’t stand liars. You get a pass because…I do kind of understand where you were coming from. This is a pretty big change…But I’m not leaving you over it. Not in a million years. 

I love all of you. Every part. So be who you are…

…Even if that includes a giant wolf…

Can you do that?

[“...Yes.”]

(Tauntingly) That’s a good puppy. 

[They kiss you.]

(Chuckles) The more it annoys you, the more I wanna keep doing it! 

And I imagine I’m going to be doing it a lot from here…

Well, we should probably get back and get some new clothes. From now on, let’s both agree to wear stuff we don’t care about on full moon days…(Under their breath) Or nothing. I’m fine with nothing. 

[???]

Huh? I didn’t say anything…

[You stumble a little…]

Oh. Winded from everything. Yeah, transforming does look pretty brutal.

Here, you know what. I’ll carry you. 

[“Really?”]

Yeah. Come on.

[You get picked up.]

Don't worry. It's payback for you doing the same.

[“I carried you?”]

Well…Yes, you did carry me…

[“Why weren’t you concerned?”]

I wasn’t concerned because I asked for it. There was some very soft fur on those muscles. You can’t blame me for that…

[“...What else did you ask me to do?”]

(Embarrassed) Oh…um…well…That’s a good question…What else, what else? Um…Hmmm…How do I put this…

Ear scratches and belly rubs…

[???]

Hey, your deepest, most primal instincts said yes, so who’s really the weird one here?

It’s me. You can trust me with your secret because I am never telling anyone about what happened here for both of our sakes. 

[The audio fades out as you walk away.]

_______________________________

Thank you for reading! 

MASTERLIST

BLUESKY

u/AlexanderIdeally — 4 months ago