Search found 164 matches

by RicharDann
Fri Feb 21, 2020 9:21 am
Forum: Ren'Py Questions and Announcements
Topic: Specifying variable image file in blur
Replies: 2
Views: 88

Re: Specifying variable image file in blur

im.Blur does require a specific path for the image, so using image statement will not work, however if you use the same convention for all of your backgrounds, you could try something like this: init python: # A function that receives a string and optional xrad and yrad parameters, and returns a blu...
by RicharDann
Tue Feb 18, 2020 12:10 pm
Forum: Ren'Py Questions and Announcements
Topic: Making Python take an argument or string as a variable name
Replies: 12
Views: 232

Re: Making Python take an argument or string as a variable name

Both of these give an AttributeError: 'unicode' object has no attribute 'objects' This might be because you're passing the c attribute, the name of the variable, as a string. You can just pass the object name directly. # Cell object definition default cell_A = Cell(objects=[], characters=[], exits=...
by RicharDann
Sun Feb 16, 2020 9:18 am
Forum: Ren'Py Questions and Announcements
Topic: Making Python take an argument or string as a variable name
Replies: 12
Views: 232

Re: Making Python take an argument or string as a variable name

I haven't used dictionaries in a long time but the code seems correct.

How and where are the player_locations variables defined? And how are you checking if they are being updated?
by RicharDann
Sun Feb 16, 2020 8:09 am
Forum: Ren'Py Questions and Announcements
Topic: Making Python take an argument or string as a variable name
Replies: 12
Views: 232

Re: Making Python take an argument or string as a variable name

You should definitely use classes for this, at least to define your cells, and classes do allow the use of lists or dictionaries as attributes. As for your original question, I still don't quite understand what are you trying to do or why python isn't doing what you want. You should at least show us...
by RicharDann
Fri Feb 14, 2020 2:50 pm
Forum: Creator Discussion
Topic: Gender and personality of the protagonist bias
Replies: 12
Views: 882

Re: Gender and personality of the protagonist bias

Generally I prefer male characters, mostly because the abundance of them in most VNs and games I've played have made me more familiar with their usual tropes. That doesn't mean I don't sometimes play games centered on female characters, however, though it heavily depends if the story or gameplay cat...
by RicharDann
Fri Feb 14, 2020 9:58 am
Forum: Ren'Py Questions and Announcements
Topic: Saving and Loading Information Stops Working?
Replies: 3
Views: 209

Re: Saving and Loading Information Stops Working?

The way it breaks is really strange. The map_point correctly prints out the current location name to the screen. However when I enter the map screen the map seems to no longer agree on the current location. It blacks out all the other areas and doesn't mark the current location. This cause you to b...
by RicharDann
Thu Feb 13, 2020 4:46 pm
Forum: Ren'Py Questions and Announcements
Topic: Saving and Loading Information Stops Working?
Replies: 3
Views: 209

Re: Saving and Loading Information Stops Working?

Most of the time (in my experience), save and loading problems have to do with the way you define your variables. It's very hard to know for sure just by looking at the code you posted. How did you define your map_point variable? For a system like this it probably should be initialized with default ...
by RicharDann
Tue Feb 11, 2020 3:23 pm
Forum: Ren'Py Questions and Announcements
Topic: ATLTransform on imagebutton hover not working
Replies: 4
Views: 212

Re: ATLTransform on imagebutton hover not working

This is only a guess but I think that the cropping process is somehow interfering with the method Ren'Py uses to detect if the button is being hovered. Maybe because it changes the visibility or position of the image at the same time as the program is trying to see if the mouse is over it or not. I ...
by RicharDann
Tue Feb 11, 2020 10:33 am
Forum: Ren'Py Questions and Announcements
Topic: ATLTransform on imagebutton hover not working
Replies: 4
Views: 212

Re: ATLTransform on imagebutton hover not working

According to the documentation here: https://renpy.org/dev-doc/html/screens.html#button says that the hovered property expects an action, or a list of actions, not an ATL transform, that could be the cause of the error. You could try adding a hover clause to your transform: transform choicehover(): ...
by RicharDann
Mon Feb 10, 2020 4:31 pm
Forum: Ren'Py Questions and Announcements
Topic: [help] inventory with images
Replies: 4
Views: 188

Re: [help] inventory with images

Add an image attribute to your Item class, then when you create your items, fill it with the corresponding image: class Item(object): def __init__(self, name, image, **kwargs): self.name = name self.image = image default rose = Item("Rose", "rose.png") Then you can show it in your inventory_screen w...
by RicharDann
Sun Feb 02, 2020 11:41 am
Forum: Ren'Py Questions and Announcements
Topic: Beginner can't figure out Inventory system error
Replies: 2
Views: 213

Re: Beginner can't figure out Inventory system error

In this line:

Code: Select all

$ inventory_list.append("burger")
You're appending the string "burger" to the inventory, which is the unicode object the error is talking about.
You need to append the burger object itself:

Code: Select all

$ inventory_list.append(burger)
by RicharDann
Wed Jan 22, 2020 11:37 am
Forum: Ren'Py Questions and Announcements
Topic: Re: Local variable referenced before assignment [SOLVED]
Replies: 4
Views: 262

Re: Local variable referenced before assignment

If you want different functions to affect the same variables, you'll want to make them global instead of local, by creating them with default statement. # initialize/create the variables default mix1 = None default mix2 = None default selected_item = None init python: def MixItems(): global mix1, mi...
by RicharDann
Thu Jan 16, 2020 12:09 pm
Forum: Ren'Py Questions and Announcements
Topic: For loops, list, and screens
Replies: 4
Views: 273

Re: For loops, list, and screens

In your code, you're passing your list name as a string object, hence the error. Instead, you need to pass the list or set name directly:

Code: Select all

textbutton "Apple" action AddToSet(my_list, "Apple")
by RicharDann
Wed Jan 15, 2020 3:26 pm
Forum: Ren'Py Questions and Announcements
Topic: Changing other variables inside a class
Replies: 4
Views: 548

Re: Changing other variables inside a class

Not to take away from what has been discussed, but thought I'd explain a possible reason why the "aLoc" variable isn't being updated inside the function. Python functions make use of local and global variables, locals being the ones defined "inside" a function, and globals being those defined outsid...
by RicharDann
Fri Jan 10, 2020 11:38 am
Forum: Ren'Py Questions and Announcements
Topic: Different coloured text boxes for normal and NVL (Solved)
Replies: 2
Views: 213

Re: Different coloured text boxes for normal and NVL

The background image of the NVL textbox is by default a png image, located on your game project folder, "gui/nvl.png", so you can just swap it for a black one (get it from another project with black ui, like the Tutorial, or a new project). You can change this in screens.rpy in the style for nvl_win...