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.
But when you hover you get more detail about the area.
The thing is, the station starts off needing a lot of work to get it fully operational, so most of the systems are going to be offline or absent at the start. So I'd like to have the map update as the repair work progresses. But it isn't feasible to generate a hover image for every possible combination.
It would get a lot more manageable with imagebuttons, but then the buttons need to be precisely placed and I remember reading that imagebuttons can lose alignment when the screen is resized. That's less of a problem if I make the connectors part of the background image rather than in the hotspots I suppose, but even doing all the permutations for individual buttons is a lot of work.
So the question is, can I take a blank red hover map and blit the room descriptions onto the image? Or does imagemap need to take a filename? Or is there a better way to approach the problem?
Any suggestions gratefully received
- To create a rounded image: http://www.imagemagick.org/Usage/thumbnails/#rounded
- To add text to an image: http://www.imagemagick.org/Usage/text/
- Posts: 217
- Joined: Sat Jun 27, 2009 5:15 pm
- Completed: Ivy, Chocolate, Time, Clair Obscur
- Projects: Writing exercises, The House [Nano18]
- Tumblr: korova08
- itch: korova
- Location: Normandie, France
Code: Select all
screen info_scr(inf_pos, inf_txt): vbox: pos inf_pos for line in inf_txt: text line screen my_map(): textbutton "!!!" action [] hovered Show("info_scr", dissolve, inf_pos=(100,100), inf_txt=loc_1_info) unhovered Hide("info_scr", dissolve) pos (90, 110) label start: $ loc_1_info = ["Line 1", "Line 2"] "..." show screen my_map "... ..." $ loc_1_info.append("Line 3") "?"
- Lemma-Class Veteran
- Posts: 3041
- Joined: Mon Dec 14, 2015 5:05 am
- Location: Your monitor
That way you don't need to worry what possible combination players have unlocked, you just pass a variable on the individual tooltips (repaired, not repaired, etc) based on how a player 'repairs' these stations. Ren'Py will take care of the rest.
I wouldn't have thought of ImageMagick, but it would do the job nicely. Is there a pure Python implementation? I'm not sure what I'd have to do to bundle it.
Putting a screen over the hotspot works, but I still need several different images for each area.
Tooltips are an interesting possibility. I've been meaning to dig into how to make them work anyway. A pop-up info panel at the side could do the same thing as well.
Thanks for the ideas. Much appreciated
However, if you use dynamic images, which are tied to the variables, as file-names... It can update as desired, individually, without change to the image-buttons above/below. (Clicks and mouse-moves pass through images displayed over image-buttons. Seems that the area-sense is on the overlay layer, or higher.)
Use one whole image as your "we are broken" displays.
Then just SHOW the "fixed" images as they get fixed.
While the image-button is just a blank PNG for idle, and the INFO when hovered-over. (Then you can also click it to do something there, if that is how you want them to get to each area to fix.)
Users browsing this forum: No registered users