Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

Help with item switching for my save menu
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
bis_senchi




Joined: 08 Jun 2004
Posts: 460
Location: Reims, France

PostPosted: Thu Mar 31, 2011 1:42 am    Post subject: Help with item switching for my save menu Reply with quote

Hello!

I'm now working on the save menu of my saiyuki game. The menu is like a diary and when I save I give a page and the name of the chapter in which the player is actually

E.g Page 2 Chapter 3

There's 4 save slots

so you see

page
chapter
BLANK
page
chapter
BLANK
page
chapter
BLANK
page
chapter

To make things easier for the player I've included blank item

My problem is the following : when the menu is opened the player has to press the down arrow for nothing (as it on an invisible space)

I would like to make blank items skipped. Could somoene help me to do that?

I think it would be a good idea to create a bitset which can make skipped automatically unused items.

The blank invisible items can be used to improve menu presentation.

If the solution involves plotscpriting : what commands should I use?

As always thanks for your help!
_________________
It's time to make games!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
mswguest
Guest






PostPosted: Mon Apr 04, 2011 7:24 am    Post subject: Reply with quote

Hi Bis! I'm pretty sure the request to have the cursor skip certain spots on menues is already on Bugzilla, and I KNOW I've asked James about it before, and he agreed that it'd be a worthwhile addition. This is probably possible right now using a VERY advanced scripted system, but I would say it isn't worth it (like, hundreds of lines of code and having to draw possible text in the menu as NPCs). For right now, I'd recommend putting a dash or something in place of the blank spot, so at least the player can see that their cursor is on that spot instead of having it look like the cursor disappears.
Back to top
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Mon Apr 04, 2011 7:48 am    Post subject: Reply with quote

The lack of an "unselectable" bit jumped out at me the first time I tried the menu system. Ever since then it's driven me crazy! I don't know why James or I still haven't fixed it (well... it was pretty awkward to add, for some reason I forget). It's about time! I'll add it.

Quote:
This is probably possible right now using a VERY advanced scripted system, but I would say it isn't worth it (like, hundreds of lines of code and having to draw possible text in the menu as NPCs).


Actually you would just write a script to change the selected menu item depending on user input. The horrendous and buggy function in the OHR source which does this for menus with unselectables is a lengthy 50 lines. (Incidently I actually ported this function in a python project the other day... and then threw it out and rewrote it. I'll backport my python code to the OHR.)
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
bis_senchi




Joined: 08 Jun 2004
Posts: 460
Location: Reims, France

PostPosted: Fri Apr 08, 2011 6:24 am    Post subject: At least the creation of a bitset have been asked Reply with quote

The creation of a bitset have been asked. That's a good thing to know.


TheMadCacti wrote:
you would just write a script to change the selected menu item depending on user input


I would do it alone if I couldn't but I can't yet. A script that can change the selected menu item depending on user input is just what I need!

Could you please help me to write it?

Thanks for your help!
_________________
It's time to make games!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
ShakeyAir




Joined: 27 Apr 2004
Posts: 93

PostPosted: Fri Apr 08, 2011 6:39 am    Post subject: Reply with quote

I would think if this is a longer project, the issue will be fixed by the time anyone besides a playtester plays it.

However, it seems like it would be better for:

Page 3
Chapter 7

to appear selected all at once, unless the options do different things?

This wouldn't be awfully difficult, depending on how you wanted to make it look, and would be worth scripting because I doubt "double high menu item" will become a feature anytime soon.
Back to top
View user's profile Send private message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Fri May 06, 2011 5:38 am    Post subject: Reply with quote

Oh I completely forgot about this. It isn't going to be in Zenzizenic, but hopefully I'll remember to add it in the next week or two.

Quote:
This wouldn't be awfully difficult, depending on how you wanted to make it look, and would be worth scripting because I doubt "double high menu item" will become a feature anytime soon.


(Actually, it will be. The text/text slice rewrite means menus need support for menu items which are different heights, and there's no reason not to allow newlines in menu item text. The python rewrite I mentioned supports this already)
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
bis_senchi




Joined: 08 Jun 2004
Posts: 460
Location: Reims, France

PostPosted: Sat Jul 02, 2011 11:48 pm    Post subject: What should I do with my save menu? Reply with quote

Hello again! I sill have some troubles with my save menu

My problem is the following,

I need to use two menu items

-> one for the page number
-> a second one for the chapter's name

The trouble starts when I implement save slots. I would like to have four of them

That would lead to 8 lines

page
chapter

page
chapter

page
chapter

page
chapter

If I don't let space it makes a ugly block of text, so I used blank item menus.

But when I test I need to press the down arrow even to go though the blank (and invisible) item menu. I also need to skip the line chapter sorry for not telling that earlier.

I think what would suit best would using the no player control bitest
and combining it with other plotscripting commands.

I'll use select menu item to move cursor through out plotscripting

select menu item(menu item handle) which allows the menu cursor to move with plotscripting.

But I would also need to command that returns the item menu selection so that I can store it (in a variable or a global variable) and move the cursor to a pre-registered location .

I've found "selected menu item(menu handle)" but I'm not sure if it the right one. I does not start by get and it doesn't seem to have enough argument for storing Could somoene confirm it the command I need?

The Mad Cacti wrote:
It isn't going to be in Zenzizenic, but hopefully I'll remember to add it in the next week or two


May I should wait for the version after Zenzizenic to be released but it may be in a long time!

Anyway as always thanks for your help and good luck making your game!
_________________
It's time to make games!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
bis_senchi




Joined: 08 Jun 2004
Posts: 460
Location: Reims, France

PostPosted: Mon Jul 04, 2011 11:47 pm    Post subject: Problems with menu items Reply with quote

I've made several tests and it appears that the problem is due to the fact that I don't manage to store a menu item ID in a variable.

What is the equivalent of find menu (ID) for item menu ?


Let's say that I would like to activate the bitset "hide if disabled" of the item menu nb1 of my menu 3. How am I supposed to do?

Code:

variable (handle, menuit1)
handle:= find menu ID (3) #I create a menu handle to use with other commands
menu it1:= find menu item (handle, 1) # What command does find  a menu item ID using number?


It's when I want to store the menu item ID in a variable that problem starts.

find menu item is not recognised. There is find item caption but the problem is that I've got several menu items with the same caption so I can't find the one I want using caption...

If the command have not been added yet in the .hsd file, could you please tell me what lines (and where) I should add them?

As always thanks for your help and concern.

Thanks for your help!
_________________
It's time to make games!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Tue Jul 05, 2011 9:41 am    Post subject: Reply with quote

I think the "menu item by slot" command will do what you want.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bis_senchi




Joined: 08 Jun 2004
Posts: 460
Location: Reims, France

PostPosted: Tue Jul 05, 2011 9:20 pm    Post subject: yes but... Reply with quote

Trying menu item by solt seems to be a good idea but how do I store the information in a variable?

I would like to change the bitset and to do that I need a variable in which is stored my menu item ref (just like I did for the menu)

Code:

variable (handle)
handle:= find menu ID (2)

menu item by slot (handle, 1)

set menu item bit(menu item handle, bit, value) #???


Thanks once more for answering so quickly! Good luck everybody!
_________________
It's time to make games!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Wed Jul 06, 2011 9:47 am    Post subject: Re: yes but... Reply with quote

There are two kinds of handles for menus. A menu handle is for the whole menu. A menu item handle is for just one menu item in a menu.

Code:

variable (handle)
handle:= find menu ID (2)

variable(menu item handle)
menu item handle := menu item by slot (handle, 1)

set menu item bit(menu item handle, bit, value)
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bis_senchi




Joined: 08 Jun 2004
Posts: 460
Location: Reims, France

PostPosted: Wed Jul 06, 2011 9:17 pm    Post subject: pb with item menu counting Reply with quote

I've tried to use to modify the script and to use what you've suggested it worked! The only thing is that the menu has to opened

I have another problem with menu items.

The new version of my save menu is made this way

Slot1
unused
*data info slot1
Slot2
unused
*data info slot2
Slot3
unused
*data info slot3
Slot4
unused
*data info slot4

I didn't want the player to see "place 0 hour 0 min" so I activated under custom the bitset "hide if disabled"

What I would like to do is the following : when a save have been made the tag is activated.

The menu opens and the line unused disappears. (The bitset hide is activated)

The line with the slot data appears : the bitset "hide is disabled" which was previously active became unactive.

Code:


open menu (2)

variable (handle)
handle:= find menu ID (2)


if (check tag (tag: save slot1 used) == on) then, begin

variable (menu item 1, menu item2)
menu item 1:= menu item by slot (handle, 1)
menu item 2:= menu item by slot (handle, 2)

set menu item bit (menu item 1, menu item bit:Hide when disabled, on) #item 1 used for slot1 became invisible
set menu item bit (menu item 2, menu item bit:Hide when disabled, off) #item 2 time and save infos for slot1 became visible
end, else, begin
wait (1)
end



My problem is the following : the first part of the script runs well : unused does not appear anylonger but the second one is not. I don't manage to make appear the line with the data slot

I think that may have to do with item slot counting when you have invisible items. How do I find the line I need?

The only invisible item of my menu are the data slot (I've put a star at the beginning in the description above) when the game starts. But as the game goes on it is modified and I can't understand how it impacts the item slot counting.

Could somoene help me and explain me how Custom counts slots in this kind of situation?
_________________
It's time to make games!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
bis_senchi




Joined: 08 Jun 2004
Posts: 460
Location: Reims, France

PostPosted: Mon Jul 18, 2011 7:37 am    Post subject: So? Could someone help me? Reply with quote

Any help is welcomed! Does somoene know the answer to the question?
_________________
It's time to make games!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
mswguest
Guest






PostPosted: Mon Jul 18, 2011 2:48 pm    Post subject: Reply with quote

I don't know how custom counts those slots, but I do know that the developers had been discussing the possibility that there is a bug with these things. My first recommendation would be to switch the order of your bitset changing. That way, you 'fix' slot 2 before getting rid of slot 1. I have no idea if this will solve the problem, though.
Back to top
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Mon Jul 18, 2011 3:34 pm    Post subject: Reply with quote

There are some menu-related bugs in Zenzizenzic that were only recently fixed in the nightly builds.

Also, tmc is working on some menu improvements that will allow skippable disabled menu items as a built-in feature
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group