Search found 29 matches

by voluorem
Fri Mar 01, 2024 5:21 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] For loop range/pages issue
Replies: 21
Views: 1345

Re: [Solved] For loop range/pages issue

Ah, okay. I tried something like that but I got the indexing slightly wrong. Thank you!
by voluorem
Fri Mar 01, 2024 3:46 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] For loop range/pages issue
Replies: 21
Views: 1345

Re: For loop range/pages issue

What if you made a game update that changed the image of cake, for instance? You don't want that to have to change everyone's save data. You want game data like that defined somewhere concrete where it can be referenced as needed. That's a very good point that I didn't think about. I was just being...
by voluorem
Mon Feb 26, 2024 6:44 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] For loop range/pages issue
Replies: 21
Views: 1345

Re: For loop range/pages issue

I already tried that and it didn't work. I have a function called has_item that I tried and it didn't show anything either: class Container(store.object): def __init__(self): self.inventory = {} def has_item(self, item, amount=1): if item in self.inventory: return (self.inventory[item] >= amount) el...
by voluorem
Mon Feb 26, 2024 4:43 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] For loop range/pages issue
Replies: 21
Views: 1345

Re: For loop range/pages issue

That's what I have in my last reply (although I also have it check to make sure each item is in the inventory before it displays it). Also, item_id and the inventory are two separate dictionaries (I think it would've been way too convoluted and unnecessary to have a nested dictionary inside another ...
by voluorem
Mon Feb 26, 2024 2:29 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] For loop range/pages issue
Replies: 21
Views: 1345

Re: For loop range/pages issue

I put all the items in a dictionary (minus the definitions, I kept those as objects because I thought that would be a lot easier), but now it's not showing anything in the screen. Here's the new screen code: grid 4 2: xalign 0.5 yalign 0.5 xspacing -10 yspacing -10 for i, e in zip(range(8*page_numbe...
by voluorem
Sun Feb 25, 2024 8:57 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] For loop range/pages issue
Replies: 21
Views: 1345

Re: For loop range/pages issue

This isn't working either, unfortunately :( It's giving me the same KeyError as before. And for the normalization part, do you mean having the inventory screen loop through all of the items, check if each item is in the inventory, and then continue from there? That's a much better idea than what I'v...
by voluorem
Sun Feb 25, 2024 8:03 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] For loop range/pages issue
Replies: 21
Views: 1345

Re: For loop range/pages issue

The key is the object (containing all of the item data minus the amount) and the value is the amount. I'm trying to get it to display the value for each key. The i is the index of the dictionary.
by voluorem
Sun Feb 25, 2024 7:30 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] For loop range/pages issue
Replies: 21
Views: 1345

Re: For loop range/pages issue

That just does this:
Image
by voluorem
Sun Feb 25, 2024 7:12 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] For loop range/pages issue
Replies: 21
Views: 1345

Re: For loop range/pages issue

When I try to just use i, it gives me a KeyError: I'm sorry, but an uncaught exception occurred. While running game code: File "game/script.rpy", line 108, in script call call roomload File "game/technical.rpy", line 662, in script call $ renpy.pause(hard=True) File "game/te...
by voluorem
Sun Feb 25, 2024 6:54 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] For loop range/pages issue
Replies: 21
Views: 1345

[Solved] For loop range/pages issue

I made an inventory system with multiple pages that shows how many of each item you have, but I realized the amounts only correlate to the items on the first page and then just copies those amounts to the next pages. This is what I mean (ignore the placeholder pngs lol): Correct amounts (page 1): ht...
by voluorem
Wed Jan 17, 2024 4:40 pm
Forum: Ren'Py Questions and Announcements
Topic: Classes only partially saving?
Replies: 5
Views: 1236

Re: Classes only partially saving?

I didn't think it was relevant because it worked fine before and I didn't change anything, but: default flour = Material("flour", "Flour", "gui/button/rarity_1.png", 1, None, "gui/button/material_flour.png") default sugar = Material("sugar", "Su...
by voluorem
Wed Jan 17, 2024 12:25 am
Forum: Ren'Py Questions and Announcements
Topic: Classes only partially saving?
Replies: 5
Views: 1236

Re: Classes only partially saving?

I redid it based on this code, but I'm having an issue with the ingredients checklist. I'm not sure what I'm doing wrong (I think I'm just not understanding something but I don't know what). Here's the updated checklist code: vbox: for key in angestuff_recipes[i].ingredient_dictionary: ## this is ju...
by voluorem
Mon Jan 15, 2024 11:09 pm
Forum: Ren'Py Questions and Announcements
Topic: Classes only partially saving?
Replies: 5
Views: 1236

Classes only partially saving?

So I've been using the inventory system in this post: https://lemmasoft.renai.us/forums/viewtopic.php?t=44730 But now I'm having issues with saving and loading and I can't figure out how to fix it. I've read the documentation about saving/loading and I understand what's saved and what's not, but wha...
by voluorem
Thu Nov 02, 2023 5:58 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Variable transform name?
Replies: 2
Views: 1177

Re: [Solved] Variable transform name?

Thank you so much! I didn't think about adding an argument to the transform.
by voluorem
Thu Nov 02, 2023 3:08 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Variable transform name?
Replies: 2
Views: 1177

[Solved] Variable transform name?

I have a dropdown map menu that has a little cascading effect (each option uses a different transform and each transform pauses for +0.05 seconds as it goes down). I used to define every single dropdown option for each area, so I could just use a different transform for each option, but I simplified...