Search found 1151 matches

by Ocelot
Tue Jul 27, 2021 5:45 pm
Forum: Ren'Py Questions and Announcements
Topic: AttributeError: 'ADVCharacter' object has no attribute 'Tile'
Replies: 2
Views: 27

Re: AttributeError: 'ADVCharacter' object has no attribute 'Title'

Do you have any character variable called im in your script? It should not be called that.
by Ocelot
Mon Jul 26, 2021 7:14 pm
Forum: Ren'Py Questions and Announcements
Topic: Solved: Return isn't sending player to main menu
Replies: 4
Views: 60

Re: Return isn't sending player to main menu

No, label placement only matters if you "fall through" it without returning or jumping: in this case next label will be run: label death: "I am dead" $ renpy.full_restart() # does not matter where it is, because control will not leave it anyway label start: "start" # relative positioning of start an...
by Ocelot
Mon Jul 26, 2021 6:54 pm
Forum: Ren'Py Questions and Announcements
Topic: Solved: Return isn't sending player to main menu
Replies: 4
Views: 60

Re: Return isn't sending player to main menu

return returns to the place at the top of so-called call stack or to main menu if call stack is empty. Each time you call a label, you place line where you call from on top of the call stack. Any return will return to that place. For example: label death: "I am dead" return label start: "..." # if ...
by Ocelot
Mon Jul 26, 2021 3:30 pm
Forum: Ren'Py Questions and Announcements
Topic: Any way to have Renpy give the player a random question from a list, and then remove that question from the list?
Replies: 2
Views: 78

Re: Any way to have Renpy give the player a random question from a list, and then remove that question from the list?

Two approaches, one using labels, and the other storing all information in variables: default questions = ['q1', 'q2', 'q3', 'q4'] default score = 0 default questions_2 = [ [ ("What is the answer 1?", None), ('A1.', 0), ('A2.', 0), ('A3.', 1), ('A4.', 0), ], [ ("What is the answer 2?", None), ('A1....
by Ocelot
Mon Jul 26, 2021 9:48 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]AttributeError: type object 'LoveInterest' has no attribute 'affection'
Replies: 8
Views: 147

Re: AttributeError: type object 'LoveInterest' has no attribute 'affection'

selectedCharacter.affection tries to get value of affection of whatever is in selectedCharacter variable. When selectedCharacter is shin you have a problem: it does not have an affection field. You need to check if selectedCharacter has it before using it. Notice that your error changed. Was: File ...
by Ocelot
Sun Jul 25, 2021 1:54 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]AttributeError: type object 'LoveInterest' has no attribute 'affection'
Replies: 8
Views: 147

Re: AttributeError: type object 'LoveInterest' has no attribute 'affection'

text "Affection: [LoveInterest.affection]"
Should be

Code: Select all

if isinstance(selectedCharacter, LoveInterest):
    text "Affection: [selectedCharacter.affection]"
by Ocelot
Sun Jul 25, 2021 11:25 am
Forum: Ren'Py Questions and Announcements
Topic: Differentiating Left/Right Dialogue Windows Using Styles?
Replies: 2
Views: 121

Re: Differentiating Left/Right Dialogue Windows Using Styles?

https://www.renpy.org/doc/html/dialogue.html#defining-character-objects Styling Text and Windows. Keyword arguments beginning with who_, what_, and window_ have their prefix stripped, and are used to style the character name, the spoken text, and the window containing both, respectively. [...] The s...
by Ocelot
Sun Jul 25, 2021 3:22 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Can we use lists and variables inside of styles?
Replies: 2
Views: 153

Re: Can we use lists and variables inside of styles?

hell_oh_world wrote:
Sun Jul 25, 2021 2:10 am
even though you make it work, your styles won't be dynamic since styles are only called once during initialization.
You can change and rebuild styles during gameplay. Though simply not messing with style definitions and changing style based on some variable is still better.
by Ocelot
Sat Jul 24, 2021 3:34 am
Forum: Ren'Py Questions and Announcements
Topic: Help me convert XT9K's code to produce a vertical gradient text effect, instead of horizontal?
Replies: 1
Views: 182

Re: Help me convert XT9K's code to produce a vertical gradient text effect, instead of horizontal?

Well, you see, it isn't actually renders characters differently. It just inserts color tag around each letter in gradient. Each letter is still drawn using single color (you can see that by applying a gradient with great hue difference to just two letters). So, a vertical gradient is only possible i...
by Ocelot
Sat Jul 24, 2021 3:23 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Exception: Possible infinite loop
Replies: 4
Views: 250

Re: Exception: Possible infinite loop

How about forcing interaction instead of using pause with a timeout? Maybe with a jump back if there are buttons which do not jump in different parts of script?
by Ocelot
Fri Jul 23, 2021 4:38 pm
Forum: Ren'Py Questions and Announcements
Topic: HELP! Exception Python interpreter not found
Replies: 2
Views: 208

Re: HELP! Exception Python interpreter not found

You probably palced RenPy or your project in the directory with non-latin symbols in its path.
by Ocelot
Fri Jul 23, 2021 12:49 pm
Forum: Ren'Py Questions and Announcements
Topic: Question about making a fan game and if it’s ok
Replies: 1
Views: 276

Re: Question about making a fan game and if it’s ok

Legally: you have to ask the IP owner (Capcom in this case). The answer is almost universally "No". In reality: as long as whatever you doing is small, self-published and non-commercial, most companies wouldn't care (unless it's Nintendo. Or Disney). Worst that happens is harshly worded Cease and De...
by Ocelot
Thu Jul 22, 2021 1:45 pm
Forum: Ren'Py Questions and Announcements
Topic: Can I use def: for all variables
Replies: 5
Views: 355

Re: Can I use def: for all variables

For quick reference, here is the example of using this code: init -100 python: class CharacterData: def __init__(self, character_name, money=0, money_limit=5000, love=0, power=0): self.name = character_name self. money = money self.money_limit = money_limit self.love = love self.power = power defaul...