Lemma Soft Forums

Supporting creators of visual novels and story-based games since 2003.


Visit our new games list, blog aggregator, IRC, and wiki.
Activation problem? Email [email protected]
It is currently Thu Jun 20, 2013 3:47 am

All times are UTC - 5 hours [ DST ]


Forum rules


Ask questions about one topic per thread, and use a descriptive subject. "NotImplemented error in script.rpy" is a good subject, "Tom's problems" is not. Remember to include all of traceback.txt or error.txt when reporting a problem, as well as the relevant lines of script. Use the [code] tag to format scripts.



Post new topic Reply to topic  [ 108 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 8  Next
Author Message
PostPosted: Fri Jun 24, 2011 12:23 pm 
Regular
User avatar

Joined: Fri Jun 17, 2011 9:06 am
Posts: 26
Completed: PQRS the Game
Projects: PQRS the Game
oh my goodness you're right. i had that open and i totally didn't notice. >< thanks...

_________________
Games: PQRS


Top
 Profile Send private message  
 
PostPosted: Sat Jun 25, 2011 12:50 pm 
Newbie

Joined: Tue Jun 14, 2011 11:49 am
Posts: 5
Projects: "La herencia del tio Roger"
Great Tutorial!
Thanks u very much!


Top
 Profile Send private message  
 
PostPosted: Tue Jun 28, 2011 2:43 pm 
Veteran
User avatar

Joined: Fri May 20, 2011 1:27 pm
Posts: 413
Completed: [KN] Saving Project: Blind? (Part One)
Hey I've just tried to change the preferences menu (only the buttons and the frame, not the actual prefs) and the buttons only stay on "navigation_ground.png" and won't let me click on them at all =.=
Attachment:
File comment: What it looks like...
problem.png
problem.png [ 311.08 KiB | Viewed 624 times ]

I have the separate 'maps' for each of them, so why isn't it working? >3<
My maps...
Attachment:
File comment: Ground...
navigation_ground.png
navigation_ground.png [ 45.33 KiB | Viewed 624 times ]
Attachment:
File comment: Idle...
navigation_idle.png
navigation_idle.png [ 52.94 KiB | Viewed 624 times ]
Attachment:
File comment: Selected...
navigation_selected.png
navigation_selected.png [ 52.83 KiB | Viewed 624 times ]
Attachment:
File comment: Selected idle...
navigation_selected_idle.png
navigation_selected_idle.png [ 58.25 KiB | Viewed 624 times ]
Attachment:
File comment: Selected hover...
navigation_selected_hover.png
navigation_selected_hover.png [ 58.38 KiB | Viewed 624 times ]

_________________
Projects:
WIP|[KN] Day Of Reckoning|
Completed|[KN] Saving Project Blind: Part One|[KN] Saving Project Blind: Part Two|[KN] Saving Project Blind: Final Part|
Is available to help with proof-reading (Grammar freak...) Maybe voice-acting in the near future x]


Top
 Profile Send private message  
 
PostPosted: Tue Jun 28, 2011 2:46 pm 
Lemma-Class Veteran
User avatar

Joined: Fri May 23, 2008 2:11 pm
Posts: 2545
Location: USA
Projects: RockRobin
Okay, I can help. Can you post your code? Your coordinates are probably the reason it's not changing.

_________________
I apologize in advance for being extremely opinionated.
[Tutorial] How to Customize the Textbox
[Tutorial] How to Customize Game Menus
Icon art by Mocha07734


Top
 Profile Send private message  
 
PostPosted: Tue Jun 28, 2011 2:52 pm 
Veteran
User avatar

Joined: Fri May 20, 2011 1:27 pm
Posts: 413
Completed: [KN] Saving Project: Blind? (Part One)
Code:
screen navigation:

    # The background of the game menu.
    window:
        style "gm_root"

    # The various buttons.
    imagemap:
           ground "navigation_ground.png"
           idle "navigation_idle.png"
           hover "navigation_selected.png"
           selected_idle "navigation_selected_idle.png"
           selected_hover "navigation_selected_hover.png"
       
           hotspot (10,55,119,34) action Return()
           hotspot (15,55,119,34) action ShowMenu("save")
           hotspot (20,55,119,34) action ShowMenu("load")
           hotspot (25,55,119,34) action ShowMenu("preferences")
           hotspot (30,55,119,34) action MainMenu()
           hotspot (35,55,119,34) action Quit()

init -2 python:
    style.pref_frame.background = Frame("frame.png",10,10)

That's all of it >3<

_________________
Projects:
WIP|[KN] Day Of Reckoning|
Completed|[KN] Saving Project Blind: Part One|[KN] Saving Project Blind: Part Two|[KN] Saving Project Blind: Final Part|
Is available to help with proof-reading (Grammar freak...) Maybe voice-acting in the near future x]


Top
 Profile Send private message  
 
PostPosted: Tue Jun 28, 2011 2:58 pm 
Lemma-Class Veteran
User avatar

Joined: Fri May 23, 2008 2:11 pm
Posts: 2545
Location: USA
Projects: RockRobin
Right now, your coordinates are not right. Right now, they are aligned to be at the top left of the screen (your buttons are the opposite of that). For example, the first one starts 10 px to the right and only 55 px down from the top.

How did you get your coordinates? Because you need to get them again. :) Tell me and I can see what you're doing wrong.

_________________
I apologize in advance for being extremely opinionated.
[Tutorial] How to Customize the Textbox
[Tutorial] How to Customize Game Menus
Icon art by Mocha07734


Top
 Profile Send private message  
 
PostPosted: Tue Jun 28, 2011 3:03 pm 
Veteran
User avatar

Joined: Fri May 20, 2011 1:27 pm
Posts: 413
Completed: [KN] Saving Project: Blind? (Part One)
Ahah...*hides in corner*
Thanks xD It works now :3 I should check everything over before I scream blue murder or something like that xD

EDIT: Ok. It was working. I found out the coordinates using the Image Location Picker and when I hit launch it worked but when I tried it again it won't appear anymore =.=
Code:
screen navigation:

    # The background of the game menu.
    window:
        style "gm_root"

    # The various buttons.
    imagemap:
           ground "navigation_ground.png"
           idle "navigation_idle.png"
           hover "navigation_selected.png"
           selected_idle "navigation_selected_idle.png"
           selected_hover "navigation_selected_hover.png"
       
           hotspot (258,554,79,38) action Return()
           hotspot (352,556,60,33) action ShowMenu("save")
           hotspot (426,555,62,35) action ShowMenu("load")
           hotspot (503,552,69,40) action ShowMenu("preferences")
           hotspot (582,555,126,33) action MainMenu()
           hotspot (721,555,57,35) action Quit()

init -2 python:
    style.pref_frame.background = Frame("frame.png",10,10)

_________________
Projects:
WIP|[KN] Day Of Reckoning|
Completed|[KN] Saving Project Blind: Part One|[KN] Saving Project Blind: Part Two|[KN] Saving Project Blind: Final Part|
Is available to help with proof-reading (Grammar freak...) Maybe voice-acting in the near future x]


Top
 Profile Send private message  
 
PostPosted: Sat Aug 06, 2011 3:21 am 
Regular

Joined: Tue Aug 03, 2010 9:38 am
Posts: 27
Another noob question. Found some talk about it, but didn't manage to find how to actually do it.

Got my imagemap working nicely, but still can't figure out how to make hotspots insensitive.

EDIT: and probably a more complex question:

The project I'm working on uses saturation to make backgrounds and characters go gradually from color to black and white as the story moves forward. Can the imagemaps be set in such a way as to also change with my saturation value?


Top
 Profile Send private message  
 
PostPosted: Sat Aug 06, 2011 3:26 am 
Lemma-Class Veteran
User avatar

Joined: Fri May 23, 2008 2:11 pm
Posts: 2545
Location: USA
Projects: RockRobin
What do you mean, always insensitive, or only insensitive conditionally (part of the time)? With screen language, you can easily add an "if" statement to your hotspots:
Code:
if can_shop:
    hotspot (0,0,0,0) action Jump("store")

I believe this works, and in SL only (not the old method of imagemaps).

As for your 2nd question ... It is difficult to apply a full screen filter like that right now, but you can for each individual displayable. You can make transitions to screens (aka your SL imagemap), but I'm not sure what your color transition entails. If it's just a color switch, you can probably apply the im.ColorMatrix (or whatever you're using to change colors) to the ground/hover images in the imagemap code?

_________________
I apologize in advance for being extremely opinionated.
[Tutorial] How to Customize the Textbox
[Tutorial] How to Customize Game Menus
Icon art by Mocha07734


Top
 Profile Send private message  
 
PostPosted: Sat Aug 06, 2011 3:30 am 
Regular

Joined: Tue Aug 03, 2010 9:38 am
Posts: 27
Part of the time. For example, if the player has not unlocked something, or some action cannot take place at that moment.

Ahh, if statements, so clever and straightforward. I shall try it.

EDIT: For the saturations, I'm using:
Code:
init python:
    saturation = 1.0
    def bwImage(st,at,path):
        return im.MatrixColor(Image(path),im.matrix.saturation(saturation)),None

And then:

image libro basico = DynamicDisplayable(bwImage,"img GN/Menu libro plain.png")


This has been working nicely so far. For reference's sake, my SL is (truncated):

Code:
    screen libro_menu_inicial:             
        imagemap:
            ground libro_menu_inicial_ground_jpg
            hover libro_menu_inicial_hover_jpg
            idle libro_menu_inicial_idle_jpg
           
            hotspot (160, 124, 175, 29) action Return(libro_GO_personajes) #Ver personajes
            hotspot (130, 171, 236, 31) action Return(libro_GO_save) #Guardar Juego . . .
            [. . . etc . . .]


Where the libro_menu_..._jpg is a variable with the full location of the files. (still optimizing variable name uses.) I'm currently redoing the menus, so going step by step slowly here.

EDIT 2: Switched some stuff around and the insensitive with the ifs work like a charm. I'm using the ground image with the insensitive images. Changed the sample above to reflect how it looks now.


Top
 Profile Send private message  
 
PostPosted: Wed Aug 10, 2011 10:48 pm 
Regular
User avatar

Joined: Sun Sep 06, 2009 6:54 am
Posts: 93
I tried having an outline effect for only selected menu options, but this results in the text moving slightly when the outline is active. I guess this is because when it renders the text it takes the outlines into account and adjusts accordingly. Is there a way to stop it from doing this? It's not really a serious problem but it...bugs me

_________________
-Gumaster
There is no n.
http://electrofishstudios.wordpress.com/


Top
 Profile Send private message  
 
PostPosted: Thu Aug 11, 2011 1:56 am 
Lemma-Class Veteran
User avatar

Joined: Fri May 23, 2008 2:11 pm
Posts: 2545
Location: USA
Projects: RockRobin
You can try changing the xanchor of the text to be in the middle? (0.5) If it's not already.

_________________
I apologize in advance for being extremely opinionated.
[Tutorial] How to Customize the Textbox
[Tutorial] How to Customize Game Menus
Icon art by Mocha07734


Top
 Profile Send private message  
 
PostPosted: Thu Aug 11, 2011 6:40 am 
Regular
User avatar

Joined: Sun Sep 06, 2009 6:54 am
Posts: 93
(I'm using it with textbuttons in the preferences screen, in case it matters)
It does fix the original problem, but it throws the positioning of all the text out (basically, it center aligns it, so changing style's xpos doesn't help, and I'm not sure if I can/how to change the xpos for each individual button)

_________________
-Gumaster
There is no n.
http://electrofishstudios.wordpress.com/


Top
 Profile Send private message  
 
PostPosted: Fri Sep 02, 2011 10:47 am 
Veteran
User avatar

Joined: Sun Mar 06, 2011 9:01 am
Posts: 433
Projects: Elements: The Academy
Organization: Mushroom Samba
First of all, thank you for the amazing tutorial! It's beyond helpful for me and exactly what I needed, given that my programming abilities are... non-existent! xD

Secondly, can I ask a very n00bish question?

I'm tinkering with bars now and used your code (without the x/ymaximum, because I actually dun know what to do with them ^^;). However, there's another problem. When I save and try to launch, here's what appears:

Code:
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


On line 351 of C:\Users\Ana\Desktop\The Academy\renpy-6.12.0\The Academy/game/screens.rpy: expected 'simple_expression' not found.
style.pref_slider.left_bar = "menus/bar_full.png"
     ^

Ren'Py Version: Ren'Py 6.12.0e


Here's lines 351-356:

Code:
       style.pref_slider.left_bar = "menus/bar_full.png"
       style.pref_slider.right_bar = "menus/bar_empty.png"
       style.pref_slider.hover_left_bar = "menus/bar_hover.png"
       #style.pref_slider.ymaximum
       #style.pref_slider.xmaximum
       style.pref_slider.thumb = None


I bet it's something really obvious, but I'm lost. Any suggestions?

Thanks again!

_________________
Image

Editor for Ribbon of Green by Kirroha


Top
 Profile Send private message  
 
PostPosted: Fri Sep 02, 2011 10:53 am 
Lemma-Class Veteran
User avatar

Joined: Fri May 23, 2008 2:11 pm
Posts: 2545
Location: USA
Projects: RockRobin
Where have you placed that code? Since the first line is erroring, that might matter. (I don't know what the error means, personally.)

As for x/ymaximum, they're important for bars because xfill is on by default, which means that it will fill the entire screen. Usually, you don't want your bars to be the entire screen length. This may be different for the preference screen, but if you made a bar somewhere else, it would blow up and possible break you interface. It's a nice way to control the size of the bar.

_________________
I apologize in advance for being extremely opinionated.
[Tutorial] How to Customize the Textbox
[Tutorial] How to Customize Game Menus
Icon art by Mocha07734


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 108 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 8  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Protected by Anti-Spam ACP
Powered by phpBB® Forum Software © phpBB Group