Search found 34 matches

by abysswatcher
Tue Aug 11, 2020 6:19 pm
Forum: Ren'Py Questions and Announcements
Topic: Is this code ineffecient?
Replies: 1
Views: 45

Is this code ineffecient?

I have been using this screen code so that I can use this screen in my other screens and easily have a working keypad to make things easier for the player. This screen as seen below uses a lot of if-elif statements and I am not sure if I'm right but doesn't that mean that for every frame it checks w...
by abysswatcher
Tue Aug 11, 2020 6:17 pm
Forum: Ren'Py Questions and Announcements
Topic: Is this code ineffecient?
Replies: 0
Views: 24

Is this code ineffecient?

I have been using this screen code so that I can use this screen in my other screens and easily have a working keypad to make things easier for the player. This screen as seen below uses a lot of if-elif statements and I am not sure if I'm right but doesn't that mean that for every frame it checks w...
by abysswatcher
Sun Jul 26, 2020 10:02 pm
Forum: Ren'Py Questions and Announcements
Topic: [solved]Error when trying to receive a key from value
Replies: 1
Views: 116

[solved]Error when trying to receive a key from value

I have been trying to get the max value from a dictionary and then getting the key for max value. Every method I try brings up the same issue: I'm sorry, but an uncaught exception occurred. While running game code: File "game/TO_LIVE_SCRIPT/ERA ONE/1937 DAY ONE[7-9-37]/_1937_sino_japanese_war_bookma...
by abysswatcher
Fri Jul 17, 2020 5:19 am
Forum: Ren'Py Cookbook
Topic: FancyText: Effects for Slow Text Display
Replies: 9
Views: 509

Re: FancyText: Effects for Slow Text Display

This is really cool! Thanks for the amazing code and effects!
by abysswatcher
Wed Jul 15, 2020 7:46 am
Forum: Ren'Py Questions and Announcements
Topic: Choice screen and custom object
Replies: 0
Views: 194

Choice screen and custom object

I wrote up this code for a "status message" system below: init python: import renpy.store as store class status(store.object): def __init__(self, name, image): self.name = name self.image = image define status_warning = status("Light Warning", "images/notify_icons/icon.5_02.png") screen status_show(...
by abysswatcher
Wed Jul 01, 2020 9:45 pm
Forum: Ren'Py Questions and Announcements
Topic: Menu buttons have individual styles
Replies: 3
Views: 299

Re: Menu buttons have individual styles

Per K Grok wrote:
Wed Jul 01, 2020 9:30 am
You could try this

Code: Select all

menu:
        "This is a question"
        "This is an answer":
            jump start
        "This is an other answer":
            jump start
        "{color=#F00}This is an answer of a different color{/color}":
            jump start
That's a good idea! Thanks for this :)
by abysswatcher
Wed Jul 01, 2020 8:08 am
Forum: Ren'Py Cookbook
Topic: Simple Choice logging system
Replies: 4
Views: 359

Re: Simple Choice logging system (don't need to define 1000 variables)

Unless I misunderstand, I think the problem being solved here is already supported by Ren'Py proper - check out the menu set functionality (link below). It's implementation (using a set rather than a list) also addresses some of the concerns raised by Human Bolt Diary . https://www.renpy.org/doc/ht...
by abysswatcher
Wed Jul 01, 2020 8:05 am
Forum: Ren'Py Cookbook
Topic: Simple Choice logging system
Replies: 4
Views: 359

Re: Simple Choice logging system (don't need to define 1000 variables)

I would advise not to use this. On a surface level, this implementation is just a wrapper over python's list. It does not add or modify any functionality, but anyone using it will be unable to benefit from all the python list tutorials available online. If you really want this sort of implementatio...
by abysswatcher
Tue Jun 30, 2020 9:56 pm
Forum: Ren'Py Cookbook
Topic: Simple Choice logging system
Replies: 4
Views: 359

Simple Choice logging system

[removed]
by abysswatcher
Tue Jun 30, 2020 9:47 pm
Forum: Ren'Py Questions and Announcements
Topic: Menu buttons have individual styles
Replies: 3
Views: 299

Menu buttons have individual styles

I was wondering for the choice many how can I make a button different? For example, if one of the choices was a "judgement" stat dice roll (to unlock a possible path) how would I be able to change the colour or button background by defining it as a special button?
by abysswatcher
Mon Jun 15, 2020 10:38 pm
Forum: Ren'Py Questions and Announcements
Topic: [solved]Character class relationship attribution error
Replies: 1
Views: 167

[solved]Character class relationship attribution error

This is my character class: class Char(object): def __init__(self, mood, impress, bond, pol, rel, traits): self.mood = mood self.impress = impress self.bond = bond self.pol = pol self.rel = rel self.traits = traits def bondp(self, amount): self.bond += amount def large_dec(self): temp_val = renpy.ra...
by abysswatcher
Sun Jun 14, 2020 7:05 am
Forum: Ren'Py Questions and Announcements
Topic: custom character class-check for element in list
Replies: 3
Views: 228

Re: custom character class-check for element in list

easy enough. use the `in` operator to check if an element exists in a list or iterables... default my_list = [1, 2, 3] label start: if 1 in my_list: "1 is in the list." in your case... default first your instance of the Char class, don't declare the fang inside init python since doing so will make ...
by abysswatcher
Sun Jun 14, 2020 1:05 am
Forum: Ren'Py Questions and Announcements
Topic: custom character class-check for element in list
Replies: 3
Views: 228

custom character class-check for element in list

I have this code: class Char(object): def __init__(self, mood, bond, pol, traits): self.mood = mood self.bond = bond self.pol = pol self.traits = traits def large_dec(self): temp_val = renpy.random.randint(4,7) self.bond -= temp_val msg.msg("Relationship decreased by [temp_val] points.") def med_dec...
by abysswatcher
Fri Jun 05, 2020 7:01 am
Forum: Ren'Py Questions and Announcements
Topic: [solved]Keep translated text on display in a for loop
Replies: 1
Views: 198

Re: [solved]Keep translated text on display in a for loop

I figured out that I shouldn't put it in string format. So I rearranged my translations to this: screen guo(): tag menu default vbox_button_is_hovered = False key "K_SPACE" action ShowMenu(main_menu) key "K_TAB" action ShowMenu(main_menu) key "K_ESCAPE" action Return() key "n" action ShowMenu('guo_m...
by abysswatcher
Thu Jun 04, 2020 11:10 pm
Forum: Ren'Py Questions and Announcements
Topic: [solved]Keep translated text on display in a for loop
Replies: 1
Views: 198

[solved]Keep translated text on display in a for loop

I have this screen to display country information: screen guo(): tag menu default vbox_button_is_hovered = False key "K_SPACE" action ShowMenu(main_menu) key "K_TAB" action ShowMenu(main_menu) key "K_ESCAPE" action Return() key "n" action ShowMenu('guo_map') key "1" action ShowMenu('guo_map') key "g...