- 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.