Turning pages of a notebook

OurJud
02 Dec 2014, 02:24
Quite early on in my game my player is given a notebook - this is an image I've created and is called with the usual commands (look, x, use, read). The two pages of the notebook are used up with names and locations, but as the game progresses, I'd like the player to add more names to the notebook, but because the one he already has is [effectively] full, I need to create another image (to act as the next page).

Considering the only logical call for the notebook would be "look/x/use/read notebook", how would I differentiate between the two and have the player call these different 'pages' in their notebook?

The only way I can see to do this is to always have the first notebook come up, with a 'turn page' link that calls the second notebook.

I've seen it done in The Lunastone, as a manual for a space craft, and in this version each new page overlayed the last, so that it really appeared as though the pages were being turned, rather that just having the game call up a new image. Each page had < and > arrows for moving between pages.

Heaven know how this was done.

HegemonKhan
02 Dec 2014, 07:05
there is this (though it's quite advanced, I'm still trying to get an understanding of it myself so I can code this type of thing myself with ease, same with equipment, and magic, and items, sighs... I too am frustrated with how slow I'm learning things, as well as not having much time to learn anymore too):

viewtopic.php?f=18&t=4057 (Pixie's Leveling Up Library)

enjoy... good luck with it, laughs :D

------

but ya, your method is a simple way to do it, just call on new images for each different page, along with some 'simple' scripting to do it.

jaynabonne
02 Dec 2014, 07:47
You could also have "next page" / "previous page" / "first page" / "second page" / "turn page" / "change page" / "page 1" / "page 2" commands, if you want typing too. (Not necessarily all of them - though it might not be a bad idea.)

OurJud
02 Dec 2014, 08:47
That's a nice idea, as I really don't like links. I think I would have to explain somehow - in an intro if not in the narrative - that such commands are available.

Yes, I like this idea.

Now, If you can think of an easy way to get the image of each 'new page' to overlay the image of the last, that would be swell :D

Marzipan
02 Dec 2014, 18:09
One idea is to have examining the notebook give you a list of topics. Something like:

You take out your notebook.

'pg1 - suspects
pg2 - clues
pg3 - something something
pg 4 - blah blah whatever

Read which page?

With more topics being added or more info added to individual pages as the player progresses the plot. (The pages themselves would have to be objects attached to the main notebook I think, but I can't test it out till I get home.)

OurJud
02 Dec 2014, 18:33
I'll probably only need two pages (or four, seeing that the image I use is an open notebook), so a clever way to just 'turn page' would suffice. Not that all the suggestions I've had aren't clever, of course.

Although thinking about it, I'd need a lot more than two images of the notebook. In fact, the mechanics of doing this would be a nightmare, as I'd have to create a separate image for the multitude of possible combinations, depending on what order the player gathers the information.

Silver
02 Dec 2014, 19:23
I'm thinking out loud here so no idea whether it would work. You could have the 'read book' command start a script which moves the player object to a room called 'reading book' where you disable the parser and use the text processor only. Like a minigame. Every entry will have a flag so in the If script you start with the notebook filled and whittle your way backwards to the flag with one entry. Each flag would lead to links for further pages as and when they're discovered. You'd also need to include a link to 'stop reading book' which would return the player back to the room they were in. I have no idea how to implement that last bit. With my limited knowledge I'd have to make the book stationary for it to work rather than an inventory object. I'm sure the coders could send you back to the right room though.

I'm experimenting with a book as a hint system. Basically every area in the game will apply a different flag to the book which will give a different entry based on the flag. So just reading the book will give information based on where the player is. And that is also discoverable not implicit.

OurJud
02 Dec 2014, 19:37
Yeah... I don't think it's going to be straight forward whatever way I do it. The basic idea is: Player talks to NPC1 and is given the name 'Tom' >> 'read notebook' >> Tom is listed. Player talks to NPC2 and is given the password '23773' >> 'read notebook' >> Tom and 23773 are listed, etc, etc, etc.

The problem is, as I say, the almost infinite number of combinations of which names/passwords are listed, when, and it what order, are determined by the order in which the player gathers the info.

It's not something I'm in a hurry to do, but that's just me and my chronic procrastination problems.

HegemonKhan
02 Dec 2014, 19:55
a simple method is to simply have layers of 'storage' Objects:

player
-> journal
->-> characters
->->-> PCs
->->-> NPCs
->-> monsters
->->-> normal monsters
->->-> boss monsters
->-> quests~missions~tasks
->-> towns
->-> etc etc etc

Object Name: journal_storage
Object Type (Inherited): container_closed
Object Parent: player
Object Alias: journal
Dropable: false
Inventory Verbs: Open; Close

Object Name: character_storage
Object Type (Inherited): container_closed
Object Parent: journal
Object Alias: Characters
Dropable: false
Inventory Verbs: Open; Close

Object Name: pc_storage
Object Type (Inherited): container_closed
Object Parent: journal
Object Alias: PCs
Dropable: false
Inventory Verbs: Open; Close

Object Name: npc_storage
Object Type (Inherited): container_closed
Object Parent: journal
Object Alias: NPCs
Dropable: false
Inventory Verbs: Open; Close

etc etc etc

as this way, you only got a single Object in your player's (direct ~ top layer) inventory (so not to clutter it up): the 'journal' Object

and once you click~open up the 'journal', then you get the sub storage layers, and then their sub storage layers.

--------------

as for the scripting for placing your journal entries into their proper 'storage' Object placement, you just give the journal entries, a String Attribute (or an Inherited Attribute: Object Type), and check for that:

for example, elemental spell storage:

Container Objects:

player
-> spell storage
->-> fire spell storage
->-> water spell storage
->-> earth spell storage
->-> air spell storage

the spell Objects:

fireball
-> <elemental>fire_elemental</elemental>

earthquake
-> <elemental>earth_elemental</elemental>

flood
-> <elemental>water_elemental</elemental>

tornado
-> <elemental>air_elemental</elemental>

the Scripting for their placement in your journal's sub layers:

if (this.elemental = "fire_elemental") {
-> this.parent = fire_spell_storage
} else if (this.elemental = "water_elemental") {
-> this.parent = water_spell_storage
} else if (this.elemental = "earth_elemental") {
-> this.parent = earth_spell_storage
} else if (this.elemental = "air_elemental") {
-> this.parent = air_spell_storage