Doing something a little different ?

OurJud
01 Dec 2015, 12:07
I'm hoping to do something a little different with this game, and risk moving away from convention.

I will have an intro screen which explains all this, but in a nutshell the biggest change is that I will not be using compass points to navigate.

Instead of the normal: "You are in a clearing. To the east lies a cabin, while to the west a path. North will lead you into the valley." At which the player would type one of the three directions to get to their destination. I will be using: "You are in a clearing. A cabin lies nearby, and beyond this a path. In the far distance you can see a valley." For which the player will simply type 'cabin', 'path', 'valley'.

There will also be another command. 'Back', which allows players to retrace their steps.

All other usual commands will be preesnt, and the player will be encouraged to try and perform basic tasks if they think it appropriate for a given scenario... just like normal text adventures.

Two other difference to my game will be that there will be no response to a command that isn't understood. In other words, if the player gets no response to a command, they should take it from that, that it can't be done or wasn't understood.

The other is that I will not be using the possessive pronoun, 'You', and instead simply describing briefly, the location without referring to the player. I've already experimented with this type of narrative and it can get very tricky, especially when you need to describe the player performing a task.

The reason I've put this in this part of the forum, is because I do have a question. I know I could have just posted the question, but I wanted to share my idea. I'm selfish that way.

So, as for the decision to not have a response to a command that isn't understood or can't be performed, how would I go about preventing all these being returned?

XanMag
01 Dec 2015, 15:15
Is this what you mean?

    <object name="Living Room">
<inherit name="editor_room" />
<descprefix type="string"></descprefix>
<objectslistprefix>You can see</objectslistprefix>
<usedefaultprefix type="boolean">false</usedefaultprefix>
<prefix type="string"></prefix>
<suffix type="string"></suffix>
<description type="script"><![CDATA[
msg ("You are in a living room with an ugly dog named Jay Nabonne. =P<br/><br/>You can see a dining room across the way.")
]]></description>
<onexit type="script">
msg ("You walk out of the living room.")
</onexit>
<beforefirstenter type="script">
picture ("ugly dog.jpg")
wait {
msg ("You walk into a room and there is an ugly dog named Nabonne here - staring at you but eager to help.")
}
</beforefirstenter>
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<look>Handsome little devil.</look>
<takemsg>You can't take yourself, idiot!</takemsg>
<kick type="script">
msg ("You kick yourself in the shins. You don't know why, but you do.")
DecreaseHealth (10)
</kick>
</object>
<object name="TV">
<inherit name="editor_object" />
<inherit name="switchable" />
<look>Just an old, beat up TV.</look>
<feature_switchable />
<switchonmsg>The TV isn't working. Perhaps it's too old?</switchonmsg>
<switchoffmsg>You can't turn off what isn't on.</switchoffmsg>
<kick type="script">
msg ("You drop kick the TV and it falls off the stand.")
MoveObject (TV, INVENTORY ROOM)
MoveObject (busted old TV, Living Room)
</kick>
<attr name="feature_usegive" type="boolean">false</attr>
<watch>It's old. It doesn't work.</watch>
</object>
<object name="ugly dog">
<inherit name="editor_object" />
<look>It's a dog. It's name is Jay. Odd... you swear you've seen Jay's picture on the forum and he did not look like this!</look>
<speak type="script">
menulist = NewStringList()
list add (menulist, "Arf!")
list add (menulist, "Woof!")
list add (menulist, "Grrr!")
ShowMenu ("What shall you say?", menulist, true) {
if (result = "Arf!") {
msg ("\"Arf, Arf!\" responds the dog.")
}
else if (result = "Woof!") {
msg ("\"Woof! Woof!\" responds the dog.")
}
else if (result = "Grrr!") {
msg ("The dog growls back at you.")
}
}
</speak>
<pet>He snaps viciously at you.</pet>
</object>
<command name="go to dining cmd">
<pattern>dining; dining room</pattern>
<script>
MoveObject (player, Dining Room)
msg ("You move over to the dining room.")
</script>
</command>
<command name="x dining room">
<pattern>look at dining; look at dining room; x dining; x dining room</pattern>
<script>
msg ("You see a well lit dining area on the other side of the room.")
</script>
</command>
</object>
<verb>
<property>kick</property>
<pattern>kick</pattern>
<defaultexpression>"You can't kick " + object.article + "."</defaultexpression>
</verb>
<object name="INVENTORY ROOM">
<inherit name="editor_room" />
<object name="busted old TV">
<inherit name="editor_object" />
<look>This is the TV you drop kicked. It now has a hole in the front screen and is lying in several pieces on the ground.</look>
</object>
</object>
<object name="Dining Room">
<inherit name="editor_room" />
<description>The dining room empty except for atable. You can see a kitchen and a living room on opposite sides of this room.</description>
<command name="go to kitchen cmd">
<pattern>kitchen; kit; kitc; kitch</pattern>
<script>
msg ("You head over to check out the kitchen.")
MoveObject (player, kitchen)
</script>
</command>
<object name="table">
<inherit name="editor_object" />
<look>It is a large dining room table. Odd, there are no chairs however.</look>
<lick>You lick the table hoping to find a few food morsels. You only find dust.</lick>
</object>
<object name="dust">
<inherit name="editor_object" />
<scenery />
<look>It's dusty in here.</look>
<takemsg>The dust evades you.</takemsg>
</object>
<command name="x kitchen cmd">
<pattern>x kitchen; x kit; x kitch; look at kitchen; look at kit; look at kitch</pattern>
<script>
msg ("The kitchen over there looks boring.")
</script>
</command>
</object>
<object name="kitchen">
<inherit name="editor_room" />
<description>It's an empty kitchen. Back from where you came is the dining room.</description>
<command name="go to dining 2">
<pattern>dining; dining room; back</pattern>
</command>
<command name="x din cmd">
<pattern>x dining; look at dining; x din; look at dining room; x dining room; x din</pattern>
<script>
msg ("From here, it looks like the dining room is dusty.")
</script>
</command>
</object>
<verb>
<property>pet</property>
<pattern>pet</pattern>
<defaultexpression>"You can't pet " + object.article + "."</defaultexpression>
</verb>
<verb>
<property>watch</property>
<pattern>watch</pattern>
<defaultexpression>"You can't watch " + object.article + "."</defaultexpression>
</verb>
<command name="empty cmd3">
<pattern>#text#</pattern>
<script>
msg ("")
</script>
</command>


If you are careful... I just put a universal command in for non-eventful player responses. I typed #text# as my command and added a blank print message script. In each room the player can go in to, I added a command with that room name. So, while in the living room, I put a command named dining cmd with a script that moved the player to the dining room. I also put a command for x dining; look at dining; x din; look at din that produced a wanted response. You could also (which is probably easier), create a scenery object called kitchen and add a look at script for it.

The #text# works for all non-built in Quest verbs. You still get the built-in response for verbs like 'jump', 'smell', 'eat', etc.

OurJud
01 Dec 2015, 22:29
That code is a lot to take for someone who was a noob to begin with, and who hasn't done anything with Quest for almost 12 months.

I'll put it another way.

Let's say the player is on a beach and wants to throw a pebble into the sea. Should they type that, the normal response would be something along the lines, 'You can't do that.' or "I don't understand that command.'

I want there to be no response to unknown commands.

In other words, I want to control ALL responses that are triggered by a command, regardless of what that command is.

I know that default responses can be controlled (although I've forgotten how you do it) because in my last game I changed 'I don;t understand that command' to 'Huh?'

I just don't know how many default commands there are and if my aim is feasible.

XanMag
01 Dec 2015, 23:26
That's what you can do with #text# the way it's set up. It will take anything the player types and return a blank response. I believe any thing else the player types that does have a scripted response will supersede #text#.

I think default commands are stored in the advanced section (in tree of stuff), but I've seen many warnings to be careful tampering with that stuff if you don't know exactly what you're doing as it could potentially crash the game if you mess up. Again, someone more smarter than me will probably correct this, but that's all I have! :)

OurJud
01 Dec 2015, 23:51
Thanks, Xan.

I did use the #text# trick for a couple of instances in my last game, where any command but the correct one returned the same response.

I just need to know if it's possible to override / disable all default responses.

XanMag
01 Dec 2015, 23:55
Yes. But I'm not brave enough or confident enough. Lol

OurJud
02 Dec 2015, 00:19
Test games, Xan. Test games.

XanMag
02 Dec 2015, 02:00
Haha. Yes. Very true.

Marzipan
05 Dec 2015, 20:53
You probably already know this, but to start out go to 'Filter' in the bottom left hand corner and click 'Show Library Elements' to get you access to all the default commands (you have to hit 'Copy' before you can edit them IIRC) but there's a lot to sift through. I'm sure you'll need some trickery to cover absolutely everything the player might try in a realistic way, but just for a generic catch all you want to do a search for 'UnrecognisedCommand' in the library. I have mine changed to 'What an odd thought.' for any random gibberish the player types.

OurJud
06 Dec 2015, 05:47
I've had a good sift through, Marz, and as you say it's tricky finding them all. In actual fact I don't recall doing a search for UnrecognisedCommand, so I certainly shall next time I work on it.