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
» How was it done? Implementing in-game clocks
Character/object inventories ... I_icon_minitimeToday at 9:54 am by catventure

» How to engage in intelligent conversation with NPCs?
Character/object inventories ... I_icon_minitimeYesterday at 9:01 pm by catventure

» refine player-available gender/name options
Character/object inventories ... I_icon_minitimeMon Nov 18, 2024 6:04 pm by catventure

» Incubation pt 1
Character/object inventories ... I_icon_minitimeSun Nov 17, 2024 4:22 pm by catventure

» Happy New Year 2024!
Character/object inventories ... I_icon_minitimeSun Dec 31, 2023 4:04 pm by catventure

» TAB Version 71
Character/object inventories ... I_icon_minitimeMon Aug 21, 2023 12:17 pm by catventure

» TAB Version 70
Character/object inventories ... I_icon_minitimeSun Oct 02, 2022 1:49 pm by catventure

» TAB Version 70
Character/object inventories ... I_icon_minitimeFri Sep 30, 2022 10:23 pm by catventure

» TAB Version 70
Character/object inventories ... I_icon_minitimeMon May 23, 2022 4:08 pm by catventure


Share | 
 

 Character/object inventories ...

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

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

Character/object inventories ... Empty
PostSubject: Character/object inventories ...   Character/object inventories ... I_icon_minitimeThu 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
garethfx
Experienced Adventurer


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

Character/object inventories ... Empty
PostSubject: Re: Character/object inventories ...   Character/object inventories ... I_icon_minitimeFri 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
catventure
Admin Adventurer
catventure

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

Character/object inventories ... Empty
PostSubject: Re: Character/object inventories ...   Character/object inventories ... I_icon_minitimeSat 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.
Back to top Go down
https://adventure.forumotion.com
catventure
Admin Adventurer
catventure

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

Character/object inventories ... Empty
PostSubject: Re: Character/object inventories ...   Character/object inventories ... I_icon_minitimeSat 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.
Back to top Go down
https://adventure.forumotion.com
acko
Novice Adventurer
acko

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

Character/object inventories ... Empty
PostSubject: Re: Character/object inventories ...   Character/object inventories ... I_icon_minitimeMon 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
acko
Novice Adventurer
acko

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

Character/object inventories ... Empty
PostSubject: Re: Character/object inventories ...   Character/object inventories ... I_icon_minitimeFri 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
catventure
Admin Adventurer
catventure

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

Character/object inventories ... Empty
PostSubject: Re: Character/object inventories ...   Character/object inventories ... I_icon_minitimeFri 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.
Back to top Go down
https://adventure.forumotion.com
catventure
Admin Adventurer
catventure

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

Character/object inventories ... Empty
PostSubject: Re: Character/object inventories ...   Character/object inventories ... I_icon_minitimeFri 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.
Back to top Go down
https://adventure.forumotion.com
Sponsored content




Character/object inventories ... Empty
PostSubject: Re: Character/object inventories ...   Character/object inventories ... I_icon_minitime

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: