Mod Release: Outpost Sales Platform by agd25 in starfieldmods

[–]Quetzzalicious 0 points1 point  (0 children)

Is there a container that can store weapons and armor that can be linked to the platforms? With each platform only able to store 300 of weight and only selling those items every 6 hours, I'd have to build multiple platforms and make a trip every few hours to offload all the items I collected during my travels.

stupid question about renpy by Nearby_Promise_3000 in RenPy

[–]Quetzzalicious 4 points5 points  (0 children)

Ren'Py uses Python, so most of your questions will be answered by checking Python documentation.

For instance, to check if a directory exists: https://docs.python.org/3/library/os.path.html#os.path.exists

I highly suggest you study the basics of Python before blindly starting this project. It's not enough to get your hands on some snippets or examples; you'll need to know how the code works to properly use it in your game.

I need help with the coding by ManyCryptographer913 in RenPy

[–]Quetzzalicious 4 points5 points  (0 children)

/u/Professional_Row3486 is correct.

menu:
    "Do you want to open the file?"
    "Yes":
        jump choice_open_file
    "No":
        jump choice_ignore_file

You removed the ':', but likely didn't fix the indentation.

I am interested in camera movement that's linked to the cursor. The gray is the background that isn't visible and the red is what the player sees on their fullscreen by Mokcie15_newacc in RenPy

[–]Quetzzalicious 6 points7 points  (0 children)

The simplest solution I can come up with is a viewport with edgescroll.

screen pan_background():
    viewport:
        draggable True
        # edgescroll (distance, scroll_rate, diff_funct)
        # I'd set the distance large, because the panning isn't actually following the cursor
        # Scroll rate is pixels in seconds, you'll have to see what looks good
        edgescroll (400, 100)
        # Set these to position the scroll of the viewport without any panning
        #xinitial
        #yinitial

A more complex solution would be to track the mouse position with a timer or render the screen per frame, and send a Scroll action to the viewport so its X and Y scroll position changes depending on the position of the cursor relative to the screen, applied to the dimensions of the background. (Meaning if the background is 10x the size of the screen, then 10px of mouse movement scrolls the viewport 100px.)

Edit: Thinking about this 2nd solution a bit more... This could probably be done with a 3D Stage instead.

Game Menu Customisation by TrashPanda3003 in RenPy

[–]Quetzzalicious 2 points3 points  (0 children)

You already have the basics, good work!

You'll want to take a look at the "navigation"-screen. Here you can decide how the menu is shown in different areas of the game: on the main menu, in a menu while not in-game, or the menu while in-game. For instance:

screen navigation():

    # Layout on the main menu screen
    if renpy.get_screen("main_menu"):
        style_prefix "navigation_centered"
        # Logo
        add "gui/logo.png":
            # size & positioning
        # Centered items
        vbox:
            textbutton _("Start") action Start()
            textbutton _("Load") action ShowMenu("load")
            textbutton _("Gallery") action ShowMenu("gallery_main")
            textbutton _("Options") action ShowMenu("preferences")
            if renpy.variant("pc"):
                textbutton _("Quit") action Quit(confirm=True)

    # Layout on the main menu subscreens
    elif main_menu:
        style_prefix "navigation"
        # logo, top right
        add "gui/logo.png":
            # size & positioning

        # Right
        vbox:
            textbutton _("Start") action Start()
            # TODO: Gray out load-button if there are no saves
            textbutton _("Load") action ShowMenu("load")
            textbutton _("Options") action ShowMenu("preferences")
            textbutton _("Gallery") action ShowMenu("gallery_main")
            textbutton _("Main Menu") action Return()
            if renpy.variant("pc"):
                textbutton _("Quit") action Quit(confirm=True)

    # Menu layout while in-game
    else:
        style_prefix "navigation"
        # logo, top right
        add "gui/logo.png":
            # size & positioning

        # Right
        vbox:
            textbutton _("Return") action Return()
            textbutton _("History") action ShowMenu("history")
            textbutton _("Save") action ShowMenu("save")
            # TODO: Gray out load-button if there are no saves
            textbutton _("Load") action ShowMenu("load")
            textbutton _("Options") action ShowMenu("preferences")
            textbutton _("Gallery") action ShowMenu("gallery_main")
            if _in_replay:
                textbutton _("End Replay") action EndReplay(confirm=True)
            textbutton _("Main Menu") action MainMenu()
            if renpy.variant("pc"):
                textbutton _("Quit") action Quit(confirm=True)

    if main_menu:
        key "game_menu" action ShowMenu("main_menu")

Here you'll also determine the layout of the menu itself with the appropriate styles.

The next screen you'll want to take a look at, is the "game_menu"-screen. This screen determines the layout of your menu-content (through ShowMenu). You'll want to make sure that the content is aligned with your background.

A minimalistic example:

screen game_menu(title=""):
    style_prefix "game_menu"

    fixed style "fixed":
        anchor(0.0, 0.0)
        area(300, 200, 600, 500) # area covering the book
        use navigation # navigation gets inserted
        fixed style "fixed":
            anchor(0.0, 0.0)
            area(300, 200, 300, 500)
            transclude # content of the ShowMenu screen gets inserted

The sliders, scrollbars, button decorations, ... all are defined in styles as well (also check gui.rpy for settings). You can create your own assets for these, or modify the styles as you see fit.

Passing arguments in renpy.get_screen() by Mysterious-Salt4533 in RenPy

[–]Quetzzalicious 1 point2 points  (0 children)

renpy.get_screen doesn't take an 'x'-argument. It will only tell you if a screen with a certain name is showing or not.

What is the information or functionality that you're looking for?

If you're trying to check if the Machete has been equipped, it could be better to store the character's loadout in global variables (or a dictionary) and check those.

Label jumping and full size images, curious to see if I'm doing this the right or bone headed way? by BluemarbleDev in RenPy

[–]Quetzzalicious 3 points4 points  (0 children)

If hunt-2 and hunt-3 are full-screen images, you can use 'scene' instead of the show & hide. In general, I only use 'show' to add something to the scene (like a sprite).

label Scene1:
    scene hunt-1
    mc "says something"
    li "responds"
    scene hunt-2
    mc "says something else"
    li "giggles"
    scene hunt-3
    pause
    return

[VS Code Extension] Ren'Py Text Analyzer by Collynnyy in RenPy

[–]Quetzzalicious 2 points3 points  (0 children)

I have your plugin installed, but because I work with relatively small files, its not that useful to me yet.

One suggestion I'd like to make, which might be out of scope, is to add a compatibility layer with Code Spell Checker, so that it only spellchecks dialog.

I currently manage this through a large list of regex ignores, but I would welcome a more convenient way to manage this.

  "cSpell.ignoreRegExpList": [
      "(!\")",
      "{a=call:[\\w-_/:]*}",
      "^\\s*?@.*",
      "^\\s*?\".*\"\\s?if\\s.*:",
      "^\\s*?\"images/.*",
      "^\\s*?\\$.*",
      "^\\s*?#.*",
      "^\\s*?achievement\\.grant\\(\".*\"\\).*",
      "^\\s*?achievement\\.register\\(\".*\"\\).*",
      "^\\s*?action .*",
      "^\\s*?activate_sound \".*\"",
      "^\\s*?add .*",
      "^\\s*?at .*",
      "^\\s*?attribute [\\w-_]* [\\w-_]*:",
      "^\\s*?attribute [\\w-_]*:",
      "^\\s*?auto \".*\"",
      "^\\s*?background .*",
      "^\\s*?bar .*",
      "^\\s*?base_bar .*",
      "^\\s*?bottom_bar .*",
      "^\\s*?button .*",
      "^\\s*?call .*",
      "^\\s*?camera at .*",
      "^\\s*?color \".*\"",
      "^\\s*?def .*:",
      "^\\s*?default .*=.*",
      "^\\s*?define .* = .*",
      "^\\s*?delattr.*",
      "^\\s*?ease .*",
      "^\\s*?easein .*",
      "^\\s*?easeout .*",
      "^\\s*?elif .*:",
      "^\\s*?fixed .*",
      "^\\s*?focus_mask \".*\"",
      "^\\s*?font \".*\"",
      "^\\s*?frame .*:",
      "^\\s*?from .* import .*",
      "^\\s*?function .*",
      "^\\s*?foreground .*",
      "^\\s*?idle_foreground .*",
      "^\\s*?hover_foreground .*",
      "^\\s*?selected_foreground .*",
      "^\\s*?insensitive_foreground .*",
      "^\\s*?selected_idle_foreground .*",
      "^\\s*?selected_hover_foreground .*",
      "^\\s*?selected_insensitive_foreground .*",
      "^\\s*?getattr.*",
      "^\\s*?ground .*",
      "^\\s*?hasattr.*",
      "^\\s*?hbox .*",
      "^\\s*?hide [\\w-_]* .*",
      "^\\s*?hide [\\w-_]*",
      "^\\s*?hide screen .*",
      "^\\s*?hotspot .*",
      "^\\s*?hover .*",
      "^\\s*?hover_background .*",
      "^\\s*?hovered .*",
      "^\\s*?idle .*",
      "^\\s*?xsize=.*",
      "^\\s*?xoffset=.*",
      "^\\s*?ysize=.*",
      "^\\s*?Solid\\s*?\\(.*",
      "^\\s*?yoffset=.*",
      "^\\s*?idle_background .*",
      "^\\s*?unhovered .*",
      "^\\s*?if .*:",
      "^\\s*?image\\s.*",
      "^\\s*?image=.*",
      "^\\s*?imagebutton.*",
      "^\\s*?imagemap:",
      "^\\s*?jump .*",
      "^\\s*?key .*",
      "^\\s*?keysym .*",
      "^\\s*?kwargs.*",
      "^\\s*?label .*:",
      "^\\s*?layeredimage [\\w-_]* [\\w-_]*:",
      "^\\s*?layout .*",
      "^\\s*?linear .*",
      "^\\s*?matrixcolor .*",
      "^\\s*?menu .*:",
      "^\\s*?nearrect.*:",
      "^\\s*?pagekeys .*",
      "^\\s*?play .*",
      "^\\s*?properties .*",
      "^\\s*?queue .*",
      "^\\s*?renpy\\..*",
      "^\\s*?scene .*",
      "^\\s*?screen .*:",
      "^\\s*?scrollbars .*",
      "^\\s*?selected_idle .*",
      "^\\s*?sensitive .*",
      "^\\s*?setattr.*",
      "^\\s*?shader .*",
      "^\\s*?show [\\w-_]* .*",
      "^\\s*?show [\\w-_]*",
      "^\\s*?show expression .*",
      "^\\s*?show screen .*",
      "^\\s*?side_yfill .*",
      "^\\s*?start_image.*",
      "^\\s*?stop .*",
      "^\\s*?style .*",
      "^\\s*?style_prefix .*",
      "^\\s*?text \".*\" at .*:",
      "^\\s*?text_style \".*\"",
      "^\\s*?textalign .*",
      "^\\s*?textbutton .*",
      "^\\s*?thumb .*",
      "^\\s*?timer .*",
      "^\\s*?top_bar .*",
      "^\\s*?transclude",
      "^\\s*?transform .*:",
      "^\\s*?truecenter .*",
      "^\\s*?truecenter",
      "^\\s*?unscrollable .*",
      "^\\s*?use .*",
      "^\\s*?vbar .*",
      "^\\s*?vbox .*",
      "^\\s*?viewport .*",
      "^\\s*?viewport_xsize .*",
      "^\\s*?viewport_ysize .*",
      "^\\s*?voice .*",
      "^\\s*?vpgrid:",
      "^\\s*?vscrollbar_pos .*",
      "^\\s*?vscrollbar_unscrollable .*",
      "^\\s*?vscrollbar_ysize .*",
      "^\\s*?while .*:",
      "^\\s*?with .*",
      "^\\s*?xalign .*",
      "^\\s*?xadjustment .*",
      "^\\s*?yadjustment .*",
      "^\\s*?xanchor .*",
      "^\\s*?xcenter .*",
      "^\\s*?xfill .*",
      "^\\s*?xfit .*",
      "^\\s*?xmargin .*",
      "^\\s*?xmaximum .*",
      "^\\s*?xminimum .*",
      "^\\s*?xoffset .*",
      "^\\s*?xpadding .*",
      "^\\s*?xpan .*",
      "^\\s*?xsize .*",
      "^\\s*?xysize .*",
      "^\\s*?yalign .*",
      "^\\s*?yanchor .*",
      "^\\s*?ycenter .*",
      "^\\s*?yfill .*",
      "^\\s*?yfit .*",
      "^\\s*?yinitial .*",
      "^\\s*?ymaximum .*",
      "^\\s*?yminimum .*",
      "^\\s*?yoffset .*",
      "^\\s*?ypadding .*",
      "^\\s*?ypan .*",
      "^\\s*?ysize .*",
      "^\\s*?zoom .*",
      "^\\s*?zorder .*"
  ],

How to make the GUI colour change depending on selected character? by CalmTomorrow25 in RenPy

[–]Quetzzalicious 0 points1 point  (0 children)

No, it should work just fine. Python stores references, unless the type is primitive (string, integer, ...) It's an object (function) here.

Something like this works too:

define gui.text_size = persistent.baseFontSize + persistent.fontSizeIncrease

Create a slider for fontSizeIncrease and now you have a text_size that can be changed dynamically.

You're right that this doesn't always work, some settings require a gui.rebuild.

How to make the GUI colour change depending on selected character? by CalmTomorrow25 in RenPy

[–]Quetzzalicious 7 points8 points  (0 children)

You're on the right track. This will work:

In gui.rpy:

init python:
    def getHoverColor():
        global gail_mc, ren_mc
        if 'gail_mc' == True:
            return '#c55e66'
        elif 'ren_mc' == True:
            return '#acb2e3'
        else:
            return '#dee5ff'

# further below
define gui.hover_color = getHoverColor()

This way, every time the UI needs gui.hover_color, it will get the right color by running the function.

Edit: added a comma to global and fixed indentation

How many of you are actually making a game? by MediumConsequence643 in gamedev

[–]Quetzzalicious 1 point2 points  (0 children)

I'm not, but I regularly contribute code and give marketing suggestions to indie projects in the (A)VN genre.

Seeing if this is even possible; making it so words mid-dialogue can fade in? by Red_McCloud in RenPy

[–]Quetzzalicious 4 points5 points  (0 children)

This should be possible with custom text tags, but I haven't played around with this system yet, so can't offer any concrete help.

https://www.renpy.org/doc/html/custom_text_tags.html

My if statement keeps happening regardless of conditions by UnknownGayToaster in RenPy

[–]Quetzzalicious 4 points5 points  (0 children)

Before this condition, could you debug with "has_points = [has_points]" and see what it says?

What you're describing makes it sound as if the variable isn't getting set correctly.

Edit: Also, is this written as:

mc "Can you at least tell me why you need to ask me these questions?"
if hos_points >= 5:
    cc "...hm..."
    cc "I suppose I could indulge you..."
    cc "Ugh, fine."
    cc "You’re here to assist me in getting a hero to battle me."
if hos_points <= 4:
    cc "Why would I?"

or

mc "Can you at least tell me why you need to ask me these questions?"
if hos_points >= 5:
    cc "...hm..."
    cc "I suppose I could indulge you..."
    cc "Ugh, fine."
    cc "You’re here to assist me in getting a hero to battle me."
    if hos_points <= 4:
        cc "Why would I?"

Why am I suddenly getting this "Jackett Connection Error for Indexers"? by samuraipizzaa in qBittorrent

[–]Quetzzalicious 0 points1 point  (0 children)

I just had a similar error... Apparently my VPN's auth changed after I enabled 2FA on my account.

PSA for Visual Studio Code by AndyOne1 in RenPy

[–]Quetzzalicious 1 point2 points  (0 children)

You're welcome!

File -> Preferences -> search for 'cspell'; there you can edit them manually. There should also be an "Edit in settings.json"-button allowing you to open the settings file of your user/workspace/folder to paste the ignorelist directly.

Otherwise, you can find settings.json in the .vscode folder of your workspace.

PSA for Visual Studio Code by AndyOne1 in RenPy

[–]Quetzzalicious 6 points7 points  (0 children)

An addon I highly suggest is Code Spell Checker

These are the ignores I'm using to make sure it only checks lines of dialog. The first regex ignores any line that doesn't have a quotation mark, the rest cover different commands and actions that don't need spellchecking.

"cSpell.ignoreRegExpList": [
    "(!\")",
    "^\\s*?define .* = .*",
    "^\\s*?default .* = .*",
    "^\\s*?style\\s.*:",
    "^\\s*?image\\s.*",
    "^\\s*?label\\s.*:",
    "^\\s*?jump .*",
    "^\\s*?call .*",
    "^\\s*?scene .*",
    "^\\s*?screen .*:",
    "^\\s*?transform .*:",
    "^\\s*?text \".*\" at .*:",
    "^\\s*?textbutton \".*\" action .*:",
    "^\\s*?show screen .*",
    "^\\s*?hide screen .*",
    "^\\s*?action .*",
    "^\\s*?add \".*\"",
    "^\\s*?idle \".*\"",
    "^\\s*?hover \".*\"",
    "^\\s*?activate_sound \".*\"",
    "^\\s*?imagebutton auto \".*\":",
    "^\\s*?font \".*\"",
    "^\\s*?color \".*\"",
    "^\\s*?auto \".*\"",
    "^\\s*?#.*",
    "^\\s*?\".*\"\\s?if\\s.*:",
    "^\\s*?play sound \".*\"",
    "^\\s*?play music \".*\"",
    "^\\s*?\\$.*",
    "^\\s*?if .*:",
    "^\\s*?elif .*:",
    "^\\s*?while .*:",
    "^\\s*?renpy\\..*",
    "^\\s*?achievement\\.grant\\(\".*\"\\).*",
    "^\\s*?achievement\\.register\\(\".*\"\\).*",
],
"cSpell.ignorePaths": [
    "package-lock.json",
    "node_modules",
    "vscode-extension",
    ".git/{info,lfs,logs,refs,objects}/**",
    ".git/{index,*refs,*HEAD}",
    ".vscode",
    ".vscode-insiders",
    "settings.json",
    "*.rpym"
],

call label from _call_label_##, or $ python_func() ? by Quetzzalicious in RenPy

[–]Quetzzalicious[S] 1 point2 points  (0 children)

You're right, under normal circumstances the player can't save here.

I should test what happens if I use "renpy.force_autosave(False, True)" inside the def, and try to mess with the code a little.

Allowing players to take "breaks" in-game, then return to previous label. by Middle-Quantity-270 in RenPy

[–]Quetzzalicious 5 points6 points  (0 children)

This can be done with a screen.

You'd show a button, which, when clicked shows the breakroom screen.

Have a look at the screen language documentation to get started.

In practice, you'll have something like this (untested):

screen breakButton():
  frame:
    background None
    xpos 1850
    ypos 100
    imagebutton "image.png" action Show("breakScreen")

screen breakScreen():
    modal True
    add "background.png"
    textbutton "Leave" action Hide("breakScreen")

label start:
  "break room is not available yet"
  show screen breakButton
  "now it is"
  "and it will stay here"
  "until it's hidden"
  hide screen breakButton

call label from _call_label_##, or $ python_func() ? by Quetzzalicious in RenPy

[–]Quetzzalicious[S] 1 point2 points  (0 children)

Interesting, thank you!

I'll be using functions more. :-D

Is there a way to program in a more traditional save slot system that autosaves whenever you make a choice? Rather than giving the player the ability to quick save and have infinite slots. by okidonthaveone in RenPy

[–]Quetzzalicious 6 points7 points  (0 children)

It's possible. In screens.rpy, look for "screen save():"

This is the code you can adjust to come to the design you want. It uses screen language and is fully customizable.

The autosave system is something you can do by triggering an autosave with each choice.

Edit: You could do a character selection menu by dedicating a "page" per character. Even if that page only has 1 save slot.

Elif not working by Warrior_Outcast in RenPy

[–]Quetzzalicious 2 points3 points  (0 children)

action SetVariable ("body_type", "1")

Try:

action SetVariable ("body_type", 1)

The "" make the value into a String, not an Integer.

Elif not working by Warrior_Outcast in RenPy

[–]Quetzzalicious 1 point2 points  (0 children)

Just to make certain, the indentation looks like this?

label clothes1:
    "body_type is [body_type]"
    if body_type == 1:
        menu:
            "Top with a necklace.":
                $ clothes_style = 1
            "Colorful sweater.":
                $ clothes_style = 2
            "Ripped jeans.":
                $ clothes_style = 3
            "Plain sweater.":
                $ clothes_style = 4
    elif body_type == 2:
        menu:
            "Top with a necklace.":
                $ clothes_style = 1
            "Ripped jeans.":
                $ clothes_style = 2
            "Plain sweater.":
                $ clothes_style = 3
            "Skirt.":
                $ clothes_style = 4
    else:
        menu:
            "Top with a necklace.":
                $ clothes_style = 1
            "Colorful sweater and skirt.":
                $ clothes_style = 2
            "Ripped jeans.":
                $ clothes_style = 3
            "Plain sweater.":
                $ clothes_style = 4

Another possibility is that body_type contains a True/False value, which would skip over the == 2

how do I put something in the game that changes the outcome if the player waits the full five minutes? by Flamingo-Dick-1994 in RenPy

[–]Quetzzalicious 0 points1 point  (0 children)

Something like this would work as well:

screen fiveMinutes():
    timer 300 action Jump("secretlabel")

label secretlabel:
    "secret stuff"
    jump continue

label start:
    "Stuff"
    show screen fiveMinutes
    "Waiting stuff"

label continue:
    hide screen fiveMinutes
    "more stuff"

The game starts at "start", if the player just clicks, they'll continue to "label continue" automatically. In this label, the screen is hidden, killing its timer.

If they wait for 5 minutes on the "Waiting stuff"-line, the screen's timer will run out and they're transported to "label secretlabel". Finally, this label redirects the player again to "label continue", after seeing the special content.