TAB - thinBasic Adventure Builder
Would you like to react to this message? Create an account in a few clicks or log in to continue.

TAB - thinBasic Adventure Builder

T.A.B. is an interactive fiction/text adventure program for Windows and made with thinBasic.
 
HomeLatest imagesSearchRegisterLog in
Latest topics
» Happy New Year 2024!
Alternative Location Descriptions I_icon_minitimeSun Dec 31, 2023 4:04 pm by catventure

» TAB Version 71
Alternative Location Descriptions I_icon_minitimeMon Aug 21, 2023 12:17 pm by catventure

» TAB Version 70
Alternative Location Descriptions I_icon_minitimeSun Oct 02, 2022 1:49 pm by catventure

» TAB Version 70
Alternative Location Descriptions I_icon_minitimeFri Sep 30, 2022 10:23 pm by catventure

» TAB Version 70
Alternative Location Descriptions I_icon_minitimeMon May 23, 2022 4:08 pm by catventure

» TAB Version 70
Alternative Location Descriptions I_icon_minitimeSat Apr 30, 2022 11:15 am by catventure

» TAB Version 70
Alternative Location Descriptions I_icon_minitimeSat Apr 23, 2022 2:32 pm by catventure

» TAB Version 68 Update
Alternative Location Descriptions I_icon_minitimeTue Mar 15, 2022 4:18 pm by catventure

» TAB Version 68 Update
Alternative Location Descriptions I_icon_minitimeFri Mar 11, 2022 8:47 pm by catventure


Share | 
 

 Alternative Location Descriptions

View previous topic View next topic Go down 
AuthorMessage
catventure
Admin Adventurer
catventure

Male
Number of posts : 404
Age : 71
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 77
Registration date : 2008-06-08

Alternative Location Descriptions Empty
PostSubject: Alternative Location Descriptions   Alternative Location Descriptions I_icon_minitimeTue Dec 29, 2009 8:38 pm

Hi,

Other members have mentioned and I was thinking today that although we have cyclic and random location descriptions possible in TAB it would be great if it were possible to change the location description only at will and at certain points during a game via the coding editors eg: print out a slightly different location description as a result of some player action or particular event happening etc.

In other words the game designer would have more control as to just when an alternate room text was going to be shown to the player... (not just limited to random/cyclic output)

To implement this there would need to be a way of telling TAB to print out a *particular* alternate room description instead of the one it was currently printing. Not all rooms would need or require alternative room descriptions of course.

The way I have been able to figure out that this very useful feature *could* be accomplished is by taking advantage of the existing user FLAGS (1-600)

There would also by necessity need to be a means of indicating in the Location Editor main room description EditBox the different location texts for a particular room - so that TAB could grab out the chunk of the alternate text it needed to when required.

What I am thinking is this:

A location can have up to 100 alternate descriptions. (individual elements in a location text)

You pick any unused flag to be linked to the location that you wish to assign alternate room descriptions. Obviously this flag could not be used for any other purpose in the game.

This User Flag would then be loaded with a special numerical value to indicate to TAB that this location contained alternate location descriptions and that when doing a location describe to simply print out a particular numbered alternate description instead of the whole of the location text for that room (if such a text segment existed in the location text)

EXAMPLE
=======

Room 5 is required to contain ALTERNATE descriptions.
We will also use a spare flag say... flag 31

At the start of the game we decide that we want to print the FIRST alternate description of room 5 when the player arrives in it - until, that is, we decide otherwise...

Because it's room 5 we load flag 31 with 5000 + THE NUMBER OF THE ALTERNATE DESCRIPTION!

In this case it will thus be set with the value: 5001

The formula is:
Flag Value = (room number * 1000) + THE NUMBER OF THE ALTERNATE DESCRIPTION

So we go to Script1 or Script2 and put in an entry early on to put in an ACTION #flag31=5001# like so:

[start]turns=0[acts]flag31=5001[end]

(We need also to set there any further flags relating to OTHER alternate description rooms too that we might be using in a game so TAB "knows" what to do)

Now we go to the Location Editor to enter our room description(s) for Location 5. We have decided beforehand that there will be 4 alternate scenes for room 5. (although most will probably use only 1 or 2 usually to reflect little changes in the room atmosphere etc) We will use bracketed number tags to make plain to TAB the starting and ending points of each individual segment...

Location 5
==========
[1]This is the first room 5 description.[1]

[2]This is the second room 5 description.[2]

[3]This is the third room 5 description.[3]

[4]This is the fourth room 5 description.[4]

=========
You can use whitespace to space them out for clarity. The tags are important and *MUST* be present for correct textual output.

TAB will grab the chunk it needs from between the number indicators BEFORE it goes on to do the checks for cyclic/random formatting etc. - so it would be perfectly possible to include cyclic/random elements within each alternate room description too!


Little recap here:

If the location were 16 and the spare flag used 56 we'd need to set an action such as:
#flag56=16003#
which would cause TAB to only print alternate description 3 of room 16

If the location were 500 and the spare flag used was 1 an action such as:
#flag1=500002#
would always print the second alternate description of room number 500.

========

The only slight 'issue' is with the opening location (start room) of the game and this will only ever apply if you wish to have alternate room descriptions in the game START ROOM only. So best to think about that right at the start of planning your game...

Start room locations are printed before any script processing is done, so there is no way of telling TAB via a flag that a starting room location may contain alternate descriptions.

However there is a workaround for that. We can erase/delete the start location so it is blank and then re-insert the text and directions into another room... then we can go to Script 2 and set the relevant flag and do a "gotoX" action to show the new start room...

For example if the Start Room = 1, we delete location 1 and reinsert it to say an unused location, say 100. Let's imagine we are using a spare flag 22 and have 3 alternate descriptions for our room 100. (new opening start room)

Script 2
========
[start]room=1[acts]flag22=100003#goto100[end]

If in start room, set the flag 22 then describe the third alternate description of room 100.



I have coded this into TAB for next version and it is working beautifully!
I am sure you will think of times when it may be handy to use alternate descriptions after certain puzzles or changes in a game etc. Now it will be possible.
eg:

room description says "There is a closed cupboard" in the text.

Player opens the cupboard (if successful then use action to set "alternate room flag")

alternate room description now tells player somewhere in text "The cupboard door has been opened"

Regards,
catventure.
Back to top Go down
https://adventure.forumotion.com
 

Alternative Location Descriptions

View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
TAB - thinBasic Adventure Builder :: TAB FORUMS :: Suggest New Features-
Jump to: