Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Hey all
Just wanted to know if there was a way to separate / disable certain yes/no prompts.
For example: i want to keep my 'quit' yes/no prompt, but remove my 'are you sure you want to save' yes/no prompt and remove my 'loading will lose unsaved progress are you sure you want to do this?' yes/no prompt.
I'm looking to either remove those or separate them in the code so i can alter the x and y positions for all 3 seperately, because right now all 3 of them use my custom confirm overlay in different sizes and locations for some reason.
Easiest thing is probably to create a separate screen with an additional parameter that tells the screen which layer to use, and then just call the screen.
You can store your xpos ypos in a dict or something and reference them in your screen then.
I also just noticed you have box_wrap = True in the hbox, not sure if that's what caused the alignment problems? I didn't see where the cloud icon is set (I'm guessing it's in the style confirm_prompt, in which case you should probably change it to the vbox or something)
frame.png is the cloud icon, confirm_frame.png is just a fullscreen transparent, tried ur code 10-25-50-100%, didnt help it tried the box wrap false too, didnt change anything, also with your coding i suddenly had a black screen with a massive cloud
GD - Game Developer, and owner of NK Productions,
the company currently making Ochiba - Falling Leaves (Visual Novel).
I just used my own confirm screen's code - you need to use yours to make it work, just look at the parts where I used the confirm_prompts variable and adopt that to your own code. Also I did disclaim untested because I was just focused on showing what I meant by making your own screen and using a dict for the x y pos
You're still using the confirm screen - which is stretching to different sizes based on what's inside. In the code I posted I suggested using your own screen so that the screen size won't change based on the message.
There're a few things i recommend you do:
- restore the confirm screen code to original, replace the png file for the original confirm frame - unless you want all your confirm screens to have a cloud bubble.
- create your own confirm screen (read my code again, I declared a screen call "my_confirm". Use that for your custom confirm screens. You can call it whatever you want.
- read up on the screen language and styling if you haven't already - give your custom confirm screen a different prefix (instead of confirm, use something else that's unique)
- restyle your custom confirm screen
- give your custom confirm frame an xsize and ysize - this will keep the size of the frame static. You can remove the label.
- give the xpos ypos to your frame instead of the textbuttons. They will move relative to your frame.
When you want to customise your UI, you really oughta to learn the screen language so that you can understand what's actually happening step by step. Start by just making a frame, and use xpos ypos to move it around. Use xsize ysize to adjust the size, then start putting things inside until you've got it where and how you want it.
I mean, i get that and ofcourse it makes sense, problem is the confirm screen (confirm.png) is just a full-screen 100% transparent overlay(the original confirm.png was transparent greyish) which is working as it should staying in the same place, and the frame screen (frame.png) is the actual cloud which is the one getting reshaped.
GD - Game Developer, and owner of NK Productions,
the company currently making Ochiba - Falling Leaves (Visual Novel).
That's not to be confused with a screen frame. A Frame() is a displayable that stretches and resizes automatically depending on what it's applied to: in this case your screen frame. You screen frame's size is determined by what's inside it. The reason it kept changing size is because the label's text _(message) varies depending on what the Confirm screen message is, so your cloud frame kept changing size.
To stop that - you set a size to the screen frame, so regardless of what messages are being sent to the screen, it won't change in size.
Managed to Macgyver fix it by altering my own code into this^ and then moving the frame.png cloud icon in photoshop to match the yes/no text location somehow it worked for all 3 screens.
GD - Game Developer, and owner of NK Productions,
the company currently making Ochiba - Falling Leaves (Visual Novel).
I'd strongly advise against that approach and actually learning the screen language to properly fix it. If you one day decide to change the layout, maybe add or remove a button, you'd have to go back to photoshop and redo your image if you keep to your solution. The whole point of a screen in renpy is that you can move it precisely where you need it - doing it that way defeats the point and can cause problems down the line.
Once again - commit to learning the renpy screen language a bit, try and understand what's going on, instead of ducktaping your code so that it works for one specific scenario only - it's a really bad way of developing!
In fact, I just had a thought: if your game is played on a tablet or mobile device, your fix will probably fail immediately. You may not want that in this moment in time, but you're limiting yourself by this one decision already...
I hear you, wont be releasing on anything other than PC, and no need to move the layout anymore now since it's finished, but ur advice is solid ofcourse, and thanks for the help.
GD - Game Developer, and owner of NK Productions,
the company currently making Ochiba - Falling Leaves (Visual Novel).