Search found 17 matches

by Cazad0ra
Thu Jul 08, 2021 1:28 pm
Forum: Ren'Py Questions and Announcements
Topic: Can you change a full layered image with a variable?
Replies: 1
Views: 1050

Can you change a full layered image with a variable?

Hi! I've been toying a lot with layered images and adding attributes with variables, for example to add cosmetics like crowns, etc, but I was also wondering if it's possible to change the entire set. The idea would be to unlock different appereances and even taking other character's looks, but I'm n...
by Cazad0ra
Tue Jul 06, 2021 10:16 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved]Getting the number of the same item inside a list
Replies: 2
Views: 691

[Solved]Getting the number of the same item inside a list

Hi! I was wondering if I could get the number of repetitions of a variable inside of a list and turn it into a text. So, for example, if I have a list bag = [potion1, potion1, potion2, potion3], could I get a text saying "you have 2 potion1" ?
by Cazad0ra
Mon Jun 28, 2021 8:29 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved]Can you change attributes in a duplicated class object independently?
Replies: 2
Views: 619

Re: Can you change attributes in a duplicated class object independently?

Doing a deep copy worked indeed!!! Thanks so much!!
I found this very clear and simple explanation on how it works and how to use it, if anyone else is interested!
https://www.educative.io/edpresso/how-t ... -in-python
by Cazad0ra
Mon Jun 28, 2021 5:24 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved]Can you change attributes in a duplicated class object independently?
Replies: 2
Views: 619

[Solved]Can you change attributes in a duplicated class object independently?

Hello! I'm not sure if I'm going to far with this but it's always worth to ask! I'm working on a combat system and the last thing I need to polish the structure is the buff and debuffing system, for example, poison effects. So far it works neatly, except for the fact that if two characters got the s...
by Cazad0ra
Thu Jun 24, 2021 7:23 am
Forum: Ren'Py Questions and Announcements
Topic: Showing a class argument within another argument in a text
Replies: 5
Views: 666

Re: Showing a class argument within another argument in a text

Ahh I saw the issue, I had loaded an unmodified ability set ^^"
It works, thanks :D
by Cazad0ra
Wed Jun 23, 2021 7:18 pm
Forum: Ren'Py Questions and Announcements
Topic: Showing a class argument within another argument in a text
Replies: 5
Views: 666

Showing a class argument within another argument in a text

Hi! To explain myself better, I'm trying to show a text with an argument from a class: a description that includes another argument from that same class, in this case the value of damage done by an ability. This is the class set up and the ability class Ability: def __init__(self, img, name, desc, a...
by Cazad0ra
Tue Jun 15, 2021 3:47 am
Forum: Ren'Py Questions and Announcements
Topic: Changing an object's attribute on a specific list
Replies: 1
Views: 496

Changing an object's attribute on a specific list

Hi! I'm going to try to explain the situation as best as possible: I'm working on a storage system to go with an inventory system, so basically, I have those two different lists of game items. Transfering items is no big deal in general, my issue comes with a specific type of item that has an attrib...
by Cazad0ra
Wed Jun 09, 2021 6:08 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved]Recognizing a random quote
Replies: 4
Views: 651

Re: Recognizing a random quote

Actually, with these methods combined you solved three other doubts I had!!
Thanks a ton!
by Cazad0ra
Wed Jun 09, 2021 11:19 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved]Recognizing a random quote
Replies: 4
Views: 651

[Solved]Recognizing a random quote

Hi! I was looking the other day for a way to make a character say random quotes and I found this code, which works like a charm: menu: "What do you want to do?" "Talk to Nizara": show nizara talk $ quotes=random.choice(nizara_quotes) niz "[quotes]" jump intro default nizara_quotes = ["Example quote ...
by Cazad0ra
Mon Jun 07, 2021 4:38 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved]Aligning text in a frame
Replies: 2
Views: 516

Re: Aligning text in a frame

Thanks! It hadn't occured to me that the issue could be the frame itself! Setting the size as x and y minimum did the trick!

Code: Select all

style achievementframe:
    background "/quest/Ach_frame.png"
    xminimum 682
    yminimum 144
by Cazad0ra
Mon Jun 07, 2021 3:58 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved]Aligning text in a frame
Replies: 2
Views: 516

[Solved]Aligning text in a frame

Hi! I'm having trouble trying to align a text to the center of a frame. I thought it would have an easy answer, but so far I cannot find what's wrong. xpos and ypos do position the text, so does using area, but xalign 0.5 doesn't affect the text at all, leaving it at the top left corner of the frame...
by Cazad0ra
Fri May 21, 2021 1:44 pm
Forum: Ren'Py Questions and Announcements
Topic: Reversing a list in a vbox
Replies: 5
Views: 612

Re: Reversing a list in a vbox

Alex wrote:
Fri May 21, 2021 1:28 pm
The other way you could do it would be not to append quests to a list but to insert them at index 0

Code: Select all

 $ list_name.insert(0, "quest_name")
Nevermind, I made a typo, this worked like a charm, thanks!!
by Cazad0ra
Fri May 21, 2021 1:41 pm
Forum: Ren'Py Questions and Announcements
Topic: Reversing a list in a vbox
Replies: 5
Views: 612

Re: Reversing a list in a vbox

The other way you could do it would be not to append quests to a list but to insert them at index 0 $ list_name.insert(0, "quest_name") Thanks! I tried it, but it gave me an error I somehow don't get when appending: I'm sorry, but an uncaught exception occurred. While running game code: File "game/...