Search found 165 matches

by MaydohMaydoh
Fri Apr 17, 2020 4:53 pm
Forum: Ren'Py Questions and Announcements
Topic: How to make the main menu textbuttons disappear when "Preferences" is pressed
Replies: 6
Views: 561

Re: How to make the main menu textbuttons disappear when "Preferences" is pressed

Make sure both screens have tag menu in them

Code: Select all

screen main_menu():
    tag menu

screen preferences():
    tag menu
by MaydohMaydoh
Fri Apr 17, 2020 4:47 pm
Forum: Ren'Py Questions and Announcements
Topic: Adding persistent data to images [SOLVED]
Replies: 11
Views: 1178

Re: Adding persistent data to images [HELP]

Could you not just create a persistent dict with all the variables? default persistent.dDress = { "skin" : 1, "glasses" : 2, "dress" : 2, "hair" : 2 } init python: def draw_girl(st, at): return LiveComposite( (0, 0), (0, 0), im.FactorScale('base.png', 1.5, 1.5...
by MaydohMaydoh
Wed Apr 15, 2020 2:31 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Music List loop question
Replies: 2
Views: 425

Re: Music List question

So the second song is the same as the first only without the intro? If so you can use the loop tag to specify the position from which to start playing the song the second and later playthroughs. Meaning you only need one song instead of two. https://www.renpy.org/doc/html/audio.html#partial-playback...
by MaydohMaydoh
Tue Apr 14, 2020 12:18 am
Forum: Ren'Py Questions and Announcements
Topic: Custom Positioning System - Position Help?
Replies: 4
Views: 522

Re: Custom Positioning System - Position Help?

From what I can tell, you should remove the "contains" from the image definition. Contains blocks are wrapped inside a Fixed so that's probably what's messing with the positioning and you shouldn't need it here.
by MaydohMaydoh
Mon Apr 13, 2020 2:01 pm
Forum: Ren'Py Questions and Announcements
Topic: Best way to use imagemap for character creation screen?
Replies: 3
Views: 371

Re: Best way to use imagemap for character creation screen?

I gave it a go using a function to get the button sensitive property, running a dict through a for loop to check if 2 options have been chosen. init python: def countAttr(list): count = 0 for v in list.values(): if v: count += 1 if count >= 2: return False else: return True This makes the button ins...
by MaydohMaydoh
Mon Apr 13, 2020 1:20 am
Forum: Ren'Py Questions and Announcements
Topic: Creating Layered Side Images? (SOLVED)
Replies: 2
Views: 315

Re: Creating Layered Side Images?

You need to proxy the layered image
https://www.renpy.org/doc/html/layeredi ... red-images

Code: Select all

image side DA = LayeredImageProxy("dani")
by MaydohMaydoh
Sun Apr 12, 2020 1:04 am
Forum: Ren'Py Questions and Announcements
Topic: Hyperlink not recognizing variables (solved)
Replies: 3
Views: 381

Re: Hyperlink not recognizing variables

There's probably a better way to do this but the only way I could get it to work was to use the old formatting method: init -1 python: def hyperlink_var_label(label_name): renpy.jump(label_name) config.hyperlink_handlers = { "var_label" : hyperlink_var_label } label tile_desc: button1 = &q...
by MaydohMaydoh
Sat Apr 11, 2020 12:13 am
Forum: Ren'Py Questions and Announcements
Topic: Displayable Prefix can't find image (SOLVED)
Replies: 4
Views: 416

Re: Displayable Prefix can't find image

That's because the example is using Transform rather than im.MatrixColor. I tested it out and Transform works fine like that, im.MatrixColor doesn't.
The error says "IOError: Couldn't find file 'him happy'." which implies it's looking for a file named "him happy".
by MaydohMaydoh
Sat Apr 11, 2020 12:03 am
Forum: Ren'Py Questions and Announcements
Topic: Displayable Prefix can't find image (SOLVED)
Replies: 4
Views: 416

Re: Displayable Prefix can't find image

It seems you have to give a file to im.MatrixColor rather than an image name.

Code: Select all

image him happy orange = "orange:him happy.png"
Should to work
by MaydohMaydoh
Thu Apr 09, 2020 9:03 pm
Forum: Ren'Py Questions and Announcements
Topic: (Help) After stories screen/music room
Replies: 2
Views: 626

Re: (Help) After stories screen/music room

Your side wants two children, but you've only gave it one
https://www.renpy.org/dev-doc/html/screens.html#side
"Children correspond to entries in the places list, so this must have the same number of children as there are entries in the places list."
by MaydohMaydoh
Thu Apr 09, 2020 4:21 am
Forum: Ren'Py Questions and Announcements
Topic: showing menu choices based on variables and which choice you choose first matters
Replies: 2
Views: 295

Re: showing menu choices based on variables

If I remember right, by putting an if statement with the choice:

Code: Select all

menu:
    "Talk to people?" if person_extro == 1:
        jump talk_to_people
Something like that.
by MaydohMaydoh
Wed Apr 08, 2020 8:14 pm
Forum: Ren'Py Questions and Announcements
Topic: Keyerror u'npc1' when generating multiple NPCS (solved)
Replies: 8
Views: 523

Re: Keyerror u'npc1' when generating multiple NPCS

I made quick mockup and tested it python: x = "one" y = "two" z = "three" class Test(): def __init__(self, x, y, z): self.x = x self.y = y self.z = z def GenerateDict(npc): npc_dict = {} for i in range(npc): npc_dict['npc{}'.format(i+1)] = Test(x, y, z) return npc_dict ...
by MaydohMaydoh
Wed Apr 08, 2020 7:35 pm
Forum: Ren'Py Questions and Announcements
Topic: Keyerror u'npc1' when generating multiple NPCS (solved)
Replies: 8
Views: 523

Re: Keyerror u'npc1' when generating multiple NPCS

Oh ops,

Code: Select all

npc_dict['npc {}'.format(x+1)] = NPCList(racelist, typelist, procaselist, 1)
I put a space between the npc and the {} so the names are npc 1 and not npc1. Remove the space and it should work.
by MaydohMaydoh
Wed Apr 08, 2020 6:17 pm
Forum: Ren'Py Questions and Announcements
Topic: Keyerror u'npc1' when generating multiple NPCS (solved)
Replies: 8
Views: 523

Re: Keyerror u'npc1' when generating multiple NPCS

You're getting the error because the local variable new_npc inside the function hasn't been defined before you try to put it into npclist . You can probably get rid of that and use a dictionary inside the function, dynamically naming them instead. https://www.w3schools.com/python/python_dictionaries...