|
Bloodsong Termagant
Manic Artist
Join date: 22 Jan 2007
Posts: 615
|
03-05-2007 08:16
(next in the 'chronicles of narnia series'! okay... maybe not.)
im trying to build a user-friendly sub-menu dialog tree, utilizing notecard lists instead of having the user edit the script directly. i have the basics of it hashed out, but i'm not sure of the best way to organize and keep track of the data and pointers. plus some extraneous questions.
1: should the notecards be read in a setup phase instead of being called to build lists on the fly? it seems that is the norm, and i understand reading notecards takes a bit of delay. would there be any reason not to do a 'notecard dump' at startup? (ie: if there are a lot of items in the notecards, long lists, etc.)
2: i will be building dialog button lists from the notecards. the notecards may have more than 12 items in their list. what is a routine for doing next/back and keeping track of the place in the list along with that? (well, i mean to say that the main list will be used to build dialog button lists. obviously, the dialog button lists themselves wont have more than 12 entries.)
3: is there a way to change the number and hierarchy of lists at runtime? there isn't, is there? because there's no way to build a variable name by adding a number to a string. ;) but what i mean is, lets say user A wants these notecards: Main Menu Category 1 Category 2
and user B wants these notecards: Main Menu Category 1 SubCategory 1a Category 2 SubCategory 2a
in other words, i might not know how many sub categories the user might want to input. is there a way to keep this open, or do i have to set a particular level of sub-categories and stick to it?
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
03-05-2007 08:39
From: Bloodsong Termagant (next in the 'chronicles of narnia series'! okay... maybe not.)
im trying to build a user-friendly sub-menu dialog tree, utilizing notecard lists instead of having the user edit the script directly. i have the basics of it hashed out, but i'm not sure of the best way to organize and keep track of the data and pointers. plus some extraneous questions.
1: should the notecards be read in a setup phase instead of being called to build lists on the fly? it seems that is the norm, and i understand reading notecards takes a bit of delay. would there be any reason not to do a 'notecard dump' at startup? (ie: if there are a lot of items in the notecards, long lists, etc.) The reasoning behind building lists at start up / initialisation is two fold. Firstly it stops the system from delaying while the user is interacting with it and secondly it allows you to validate all the notecard data prior to use. From: Bloodsong Termagant 2: i will be building dialog button lists from the notecards. the notecards may have more than 12 items in their list. what is a routine for doing next/back and keeping track of the place in the list along with that? (well, i mean to say that the main list will be used to build dialog button lists. obviously, the dialog button lists themselves wont have more than 12 entries.) I just keep track of the first item on the current page and increment or decrement the value as they press forward or back. This is then used as an offset when building the menu. From: Bloodsong Termagant 3: is there a way to change the number and hierarchy of lists at runtime? there isn't, is there? because there's no way to build a variable name by adding a number to a string.  but what i mean is, lets say user A wants these notecards: Main Menu Category 1 Category 2 and user B wants these notecards: Main Menu Category 1 SubCategory 1a Category 2 SubCategory 2a in other words, i might not know how many sub categories the user might want to input. is there a way to keep this open, or do i have to set a particular level of sub-categories and stick to it? It would depend on exactly how you implemented your lists. Strided lists could be used to build category hierarchies but would eat memory rather quickly. You could define the maximum tree depth and program accordingly.
|
|
Bloodsong Termagant
Manic Artist
Join date: 22 Jan 2007
Posts: 615
|
03-05-2007 09:51
heyas;
thanks, newgate.
okay, running into more design problems, here. (im not at 2l writing code, im at work, scribbling flowcharts and outline stuff.)
i CANT read all the notecards at startup, because i dont know how many categories and sub-categories, and items there will be. :/ i can get the NAMES of the categories and find a notecard with that name, and i can read it into a 'category' list variable. but it will end up having to be reusable.
unless i go into making that huge mondo monster one big single list.
here's an example of what i'm looking at.
MAIN MENU: Category1 Category2 Category3
CATEGORY1: SubCat1 SubCat2 SubCat3
CATEGORY2: SubCat4 SubCat5 SubCat6 ...
SUBCAT1: List1 List2 List3 ...
LIST1: item item item ...
or, to put it in concrete terms:
MAIN MENU: Food Drink
FOOD MENU: Fish Chips
FISH MENU: Fried Sushi
FRIED MENU: cod haddock flounder bass ...
okay, now theoretically, the user could list almost any number of categories under the main menu, and any number of cats and subcats (even no sub cats, perhaps?).... so i wont know how many lists i'll need beforehand :/
is this idea going to break down and become unfeasible? or should i try loading lists while the user is in the dialogue? that's gonna be a mess, isn't it? :/
any ideas? if its to stock one huge mondo list... good lord, how would i keep track of it all? or find anything.... i suppose i could build it with line prefixes to define the different hierarchies? or build one mondo list for each 'step'?
like if i prefix everything with stage numbers?
MAIN MENU Food (1) Drink (2)
CATEGORY 1-Fish 1-Chips 2-Soda ...
SUBCAT: 1-1-Fried 1-2-Sushi 2-1-Diet ...
LIST: 1-1-1-cod 1-1-2-haddock 1-1-3-bass 1-2-1-calamari 1-2-2-sardines ...
??? can something like this work? or is it a huge mess? :/
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
03-06-2007 01:34
Take a look at the Fridge
|