TAB - thinBasic Adventure Builder

T.A.B. is an interactive fiction/text adventure program for Windows and made with thinBasic.
 
HomeFAQSearchUsergroupsRegisterLog in
Latest topics
» TAB Version 66 Available
Mon Sep 26, 2016 12:02 pm by catventure

» TAB Version 65 Available
Mon Feb 23, 2015 12:04 pm by catventure

» Incubation pt 1
Wed Apr 24, 2013 9:24 am by Kabrinski

» Charecter movements - doors
Wed Mar 20, 2013 2:55 pm by garethfx

» Member feedback on game planning
Sun Mar 03, 2013 1:47 pm by garethfx

» Still alive - just!
Thu Feb 28, 2013 11:34 am by catventure

» TAB 64 crashes ...
Mon Aug 20, 2012 11:31 am by acko

» Idea on addition to object being container
Sat Aug 18, 2012 3:49 pm by catventure

» sizex=y action ...
Thu Aug 09, 2012 11:29 am by catventure


Share | 
 

 Character/object inventories ...

View previous topic View next topic Go down 
AuthorMessage
acko
Novice Adventurer
avatar

Male
Number of posts : 19
Age : 46
Location : Perth, Western Australia
Humor : No one drinks XXXX or Fosters in Australia !!
Adventure Points : 8
Registration date : 2012-07-18

PostSubject: Character/object inventories ...   Thu Jul 26, 2012 3:50 am

Hi Phil,

Is there a way to list a characters inventory (or an objects contents) at the same time they are first displayed, for example:

You can see:
a green bottle. In the green bottle is: a great Aussie beer that isn't Fosters or XXXX.
Bob the barman. Bob the barman is carrying a bottle opener.

I can use charinvplus in script 2 but that lists the character/object for a second time when it describes the items they are carrying, i.e.

You can see:
a green bottle
Bob the barman
In the green bottle is: a great Aussie beer that isn't Fosters or XXXX.
Bob the barman is carrying a bottle opener.

Cheers

Mark
Back to top Go down
View user profile
garethfx
Experienced Adventurer


Male
Number of posts : 85
Age : 59
Location : Wales
Humor : Nothing like having a good laugh - oh and a pint!
Adventure Points : 53
Registration date : 2009-09-28

PostSubject: Re: Character/object inventories ...   Fri Jul 27, 2012 10:52 am

Hi Mark!
Oh and welcome to the team...........


Just read this one. Its a positive thought but will it casue you issues at some point in the game your building as the "command" will mean that any hidden item in a charactors inventory which you need the player to search for will be displayed so the examine "character name" to find the hidden puzzle is lost i.e. Bob may have the key hidden on his person for the cellar or the safe which will require that you examine him. The only way out of that issue is of course to set flags against bob so that flag x means he's carrying a key and the key is then placed in 0 (zero) or a storage location so that you'll need to build response to allow you to search a charactor which then has the action of listing the key as on the person. The later of course is the best option if a full display of inventory is required for every charactor

Gareth
Back to top Go down
View user profile
catventure
Admin Adventurer
avatar

Male
Number of posts : 376
Age : 64
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 52
Registration date : 2008-06-08

PostSubject: Re: Character/object inventories ...   Sat Jul 28, 2012 12:08 pm

acko wrote:

Is there a way to list a characters inventory (or an objects contents) at the same time they are first displayed, for example:

You can see:
a green bottle. In the green bottle is: a great Aussie beer that isn't Fosters or XXXX.
Bob the barman. Bob the barman is carrying a bottle opener.


Hi Mark,
Gareth has made some valid points worth considering. Now currently you are unable to do such a listing as that.... And it is not so easy to implement as I have found out.
However I can make a couple of new action commands like:

"showcontents" - if you wanted container objects to list the contents
"showcharinv" - for character worn/carried objects to be listed as well

Both would be optional and would turn on object and character listing very similar to what you wrote (but not quite exactly the same) when objects and characters were listed upon moving to a location or doing a location describe only...

However, these actions would only work correctly providing you have NOT used the "objlistoff" and/or "charlistoff" actions (which turn object/character listing off and enable sentence listing fashion instead)

However if you have not used those actions then this would be an example output listing:


You are in a room.

You can see:
a green bottle.
In the bottle is
...........a great Aussie beer that isn't Fosters or XXXX.
a book.
a cardboard box.
In the box is
............a newspaper.
............an axe.
............a long rope.
Bob the barman is here. Bob the barman is carrying a bottle opener. He is wearing a hat.
Joseph the farmer stands close by you. Joseph the farmer is carrying a spade and a sandwich.

At least I think I could get it to print out like that!

*Note I had to use dots to show indentation as tab key not working in forum posts *

If you think that would be alright for your purposes let me know and I will endeavour to implement the code.
As I said earlier it would only change the format of the location listing to the new style if triggered by one or both of the 2 new actions.

A couple of provisos - if the container object in the listing was set to closed then the contents would not be shown... for instance a locked chest etc...

The inventories for characters moving to and from a location would also not be listed - only for those characters who were static at that time in the room....

eg:

Bob the barman is here. Bob the barman is carrying a bottle opener.

Joseph the farmer departs and goes north.

Erik the Viking enters...


Regards,
Phil.

_________________
http://tab.thinbasic.com ; Home of the TAB I.F. project.
Back to top Go down
View user profile http://adventure.rpgdynasty.com
catventure
Admin Adventurer
avatar

Male
Number of posts : 376
Age : 64
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 52
Registration date : 2008-06-08

PostSubject: Re: Character/object inventories ...   Sat Jul 28, 2012 9:01 pm

Ok. I have the "showcontents" and "showinv" actions made.

This is the best I've been able to come up with I'm afraid - but it is working just fine Smile

Example Location
=======

This room is very small and cramped.
Exits lead: north, south and west.
Visible objects are:
a box.
In the box is:
....a penknife. (looks like a small dagger)
....a key.
Joseph the friendly farmer is here.
Joseph the farmer owns:
....a brass lamp.
He is wearing:
....a hat.
Bill the policeman is here.
Roger your canine companion sits near you.
Robbie the robot patrols the area.

Whizzo the wizard arrives.

What now?


It uses existing system messages so no problem there. One thing though - if a character is carrying or wearing a container object that has something inside then the contents of that container will not be listed - it will just say something like:

Bill the policeman is carrying:
....a box.
He is wearing:
....a hat

It won't print what is in the box (only does that when box is in the ROOM or in the player's inventory if its available for you to "look in it" etc. and of course always assuming the box is set to have its contents viewable which all container objects are by default anyway...)

(The 4 dots represent an indent of 4 space characters)

If you're happy with that let me know please.

Regards,
Phil.

_________________
http://tab.thinbasic.com ; Home of the TAB I.F. project.
Back to top Go down
View user profile http://adventure.rpgdynasty.com
acko
Novice Adventurer
avatar

Male
Number of posts : 19
Age : 46
Location : Perth, Western Australia
Humor : No one drinks XXXX or Fosters in Australia !!
Adventure Points : 8
Registration date : 2012-07-18

PostSubject: Re: Character/object inventories ...   Mon Jul 30, 2012 6:01 am

That is great, Phil.

Just what I was after.

I don't intend to have any puzzles whereby you must examine a character in order to locate an essential object, those puzzles always annoyed me but maybe that was because I'd spent 83 hours searching for something that I could have found by examing one character!!

Nice one, mate ...

Cheers Very Happy for the welcome, Gareth!
Back to top Go down
View user profile
acko
Novice Adventurer
avatar

Male
Number of posts : 19
Age : 46
Location : Perth, Western Australia
Humor : No one drinks XXXX or Fosters in Australia !!
Adventure Points : 8
Registration date : 2012-07-18

PostSubject: Re: Character/object inventories ...   Fri Aug 03, 2012 6:43 am

Hi Phil,

I've just tried and I'm a bit confused as to how you switch 'showinv' on at the start of your game ... I've got it in script 1 but have had no luck.

ta

Mark
Back to top Go down
View user profile
catventure
Admin Adventurer
avatar

Male
Number of posts : 376
Age : 64
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 52
Registration date : 2008-06-08

PostSubject: Re: Character/object inventories ...   Fri Aug 03, 2012 8:15 am

acko wrote:
Hi Phil,

I've just tried and I'm a bit confused as to how you switch 'showinv' on at the start of your game ... I've got it in script 1 but have had no luck.

ta

Mark

Hi Mark,

I have it switched on in Script 1 also.

I used it as an action triggered by a SPARE FLAG like so:

[start]flag100=0[acts]flag100=1#showcontents#showinv[end]

(entry only done once)

Remember you only see this type of listing when a room description occurs.

Regards,
Phil.

_________________
http://tab.thinbasic.com ; Home of the TAB I.F. project.
Back to top Go down
View user profile http://adventure.rpgdynasty.com
catventure
Admin Adventurer
avatar

Male
Number of posts : 376
Age : 64
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 52
Registration date : 2008-06-08

PostSubject: Re: Character/object inventories ...   Fri Aug 03, 2012 3:56 pm

Hi Mark,

I made 2 new actions for next release:

"showcontentsoff"
"showinvoff"

These are the opposite of the newly created ones and simply turn back on the normal default object/character listing in room descriptions.

Regards,
Phil.

_________________
http://tab.thinbasic.com ; Home of the TAB I.F. project.
Back to top Go down
View user profile http://adventure.rpgdynasty.com
Sponsored content




PostSubject: Re: Character/object inventories ...   

Back to top Go down
 

Character/object inventories ...

View previous topic View next topic Back to top 

 Similar topics

+
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
TAB - thinBasic Adventure Builder :: TAB FORUMS :: General Forum-
Jump to: