Changing default responses

Sam
I want to change the default "look at self" response to something other than "looking good"
I know this probably has a simple solution, but I cannot change it!!!

Mareus
Sam wrote:I want to change the default "look at self" response to something other than "looking good"
I know this probably has a simple solution, but I cannot change it!!!

Well, it seems I can help you with this, even though I am a noob myself when it comes to quest.

1. Click on player in the left part of the interface (the tree part)
2. Then click on Features tab
3. Then tick "player, player can become this object" (leave other stuff unticked)
4. Go to Player tab now.
5. Choose an alias you want to use and add other names you wish Quest to recognize.
6. In the part where it says "Look at" object description, choose "run script"
7. Click on the code view and add this code:
if (player.health=100) {
msg ("You look perfectly fine.")
}
else if (player.health>80) {
msg ("A few cuts and bruises cause you some discomfort, but it is nothing serious.")
}
else if (player.health>60) {
msg ("You have taken serious damage and blood is slowly trickling from your open wounds. The pain you feel is sharp, but endurable.")
}
else if (player.health>30) {
msg ("Your mobility is severly reduced as broken bones and wide open wounds inflict severe pain at your attempts to move.")
}
else if (player.health>0) {
msg ("You are barely alive and are having a hard time remaining conscious. You should heal yourself as soon as possible.")
}

8. Edit the messages and rules as you see fit.
9. You are welcome.

PS. This code also allows you to monitor health as you probably noticed. If you do not want that part, just ignore the code and type in whatever you want under print message command. I just thought its useful to have something like health monitor if you are already using look at yourself command.

Sam
Thanks Mareus, trying it now. :)

jaynabonne
Just emphasize the end of Mareus' post, if you only want to make the text something static, when you get to step 6, just put the text you want in the "Look at" field. (No need for the complication of scripts in that case!)

Silver
Mareus wrote:
1. Click on player in the left part of the interface (the tree part)
2. Then click on Features tab
3. Then tick "player, player can become this object" (leave other stuff unticked)


I'm going to need to tinker with this shortly so this thread is interesting and timely.

I'd like to query the above 3 points though (out of interest). Why is it important to select 'player can become this object' when the player already is that object? Is that important for setting new descriptions?

HegemonKhan
Object's Main Object Types:

1. Player (Objects that you can control; playable actors~characters): default Player Object: 'player'
2. Room
3. Object
4. Room+Object

a few versions ago, a feature was introduced for having multiple Player Objects, allowing you to switch (control) amongst them during game play.

http://docs.textadventures.co.uk/quest/ ... bject.html
http://docs.textadventures.co.uk/quest/ ... gepov.html

game.pov = player // or: HK // or: Silver

game.pov represents WHOEVER is currently your (controlled) Player Object

so be careful when using game.pov in scripting, as you probably won't want to mix your character stats (or the gains to stats) up amongst your characters. You don't want to give +5 strength bonus at level up to every~any character, when you only want it to be for a single specific character.

<game name="blah">
<pov type="object">player</pov>
<attr name="changepov_objectlist" type="simpleobjectlist">player;HK;Silver</attr>
</game>

<verb name="switchcharacter">
<property>switchcharacter</property>
<pattern>switchcharacter</pattern>
<defaultexpression>blah</defaultexpression>
</verb>

<object name="room">
<inherit name="editor_object" />
<inherit name="room_object" />
<object name="button">
<inherit name="editor_object" />
<take />
<switchcharacter type="script">
ChangePov (ObjectListItem (game.changepov, RandomInt (0,2)))
</switchcharacter
<attr name="displayverbs" type="listextend">switchcharacter</attr>
<attr name="inventoryverbs" type="listextend">switchcharacter</attr>
</object>
</object>

<object name ="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>

<object name ="HK">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>

<object name ="Silver">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>


---------------------------

a big confusion that happens:

when your Player Object is being used (controlled) by you: description_1: under the Player Object's 'option' tab (I think)

when your Player Object is *NOT* being used (noncontrolled) by you (it is acting as a normal Object Object): description_2: under the Player Object's 'general (first~leftmost, whatever it is called, lol)' tab

people will write in a description in the normal location, which is the description for when the Player Object is NOT being used (controlled) by you, and then when they click to 'look at self', all they see is the default response, as it is showing the other description location for when you're controlling the Player Object, which they never wrote into this other location description box.

----------------

Two examples of fun (but old) puzzle games that use character switching:

1. Maniac Mansion (NES) ~ quest can fully create this game's coding of puzzle scripting, except the animated sprite UI, obviously
2. Lost Vikings 1+2 (SNES) ~ ya Blizzard made it, and it's a fun game but never got the huge wel-knowness of the Warcraft and Diablo series.

hehe :D

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums