Any way to change default responses?

Is there any way you can change default responses such as: "You can't do that!"


some of the things (for example, the affixes: prefix/suffix) can be changed via the GUI/Editor's 'game' or 'whatever' Objects' various Tabs' options/controls

you can also change the 'templates' (global effect)

you can also change the individual Verbs via in code, for example:

<verb>

  <property>blah</property>
  <pattern>blah</pattern>

  <defaultexpression>You can't do that! (change this to whatever you want)</defaultexpression>

</verb>

or, to do the same via scripting (Verbs are actually just Script Attributes with some extra coding for its built-in verb functionality):

(replace my 'NAME_OF_OBJECT' with your/the name of the Object of the Verb)

for within the GUI/Editor:

NAME_OF_OBJECT.defaultexpression => {
  msg ("You can't do that! (change this to whatever you want)")
}

for directly in code:

<![CDATA[

  NAME_OF_OBJECT.defaultexpression => {
    msg ("You can't do that! (change this to whatever you want)")
  }

]]>

Can anyone please translate what mr. Khan is trying to say here, because I don't understand a word of what he just wrote?

For example, he writes: "you can also change the individual Verbs via in code:

<verb>

  <property>blah</property>
  <pattern>blah</pattern>

  <defaultexpression>You can't do that! (change this to whatever you want)</defaultexpression>

</verb>

But what does that mean? When I go to verbs, there is no place where you can add a script. Does he mean verbs that can be found inside every object? When I go there, all I can do is add new verbs. That's not what I want to do. I want to use the existing words. Does he mean changing verbs that can be found in attributes? Well, that would require you to change the default expression for every object manually, which I know how to do and which is exactly what I am trying to avoid. What I want to do is find that one place where "That doesn't work" is written and just change it to something like: "You could do that, but it wouldn't achieve anything.", so that this gets applied to every object out there.

Then he writes:
(replace my 'NAME_OF_OBJECT' with your/the name of the Object of the Verb)

for within the GUI/Editor:

NAME_OF_OBJECT.defaultexpression => {
  msg ("You can't do that! (change this to whatever you want)")
}

What? Where do I do that? GUI/Editor is a very wide explanation. There are around 1 million options in the GUI/Editor.

Then he writes further...
for directly in code:


  NAME_OF_OBJECT.defaultexpression => {
    msg ("You can't do that! (change this to whatever you want)")
  }

]]>

Does he mean in code view? Now, I would ask mr. Khan directly these questions, but I know he will again answer in the same manner. I have already tried to unravel his messages many times before, but each and every time that has just led me down the path of wasting dozens and dozens of hours of trying to figure out what he meant. I am grateful for help, but I really need someone to dumb this down for me a bit.

All I want is to find where that part: "That doesn't work" is written (it has to exist somewhere) and change it. That's it. This should be pretty simple to do, right?


in the GUI/Editor:


the 'tree of stuff' for the default new game:

Objects
-> game
->-> Verbs
->-> Commands
-> room
->-> player
Functions
Timers
Walkthrough
Advanced
-> Included Libraries
->-> English.aslx
->-> Core.aslx
-> Templates
-> Dynamic Templates
-> Object Types
-> JavaScript
.
.
.
.
.
.
.
.
Filter -> Show Library Objects (click on it to toggle/check it on/off)

changing the verb in this way is a global change:

(left side's 'tree of stuff') -> (lower left corner of screen) at the very bottom -> Filter -> Show Library Elements -> click on it (so it is toggled on): this displays all of the built-in stuff up in the "tree of stuff" as light grey text

find the desired Verb in the 'tree of stuff', click on it, so it is now highlighted, and then in the upper right, click on the 'copy' (this is required/forced, so you don't mess up the built-in stuff):

Default: [template]
to
Default: [text]

and then write in what you want it to say in the:

Text: _____________

and also, you probably/maybe want to change the 'Default Text' under the 'Multiple Objects' part as well


you can also change the templates instead if you'd rather... (though this is a global change: all verbs that use the template will be effected, as you're changing the template, and thus all those verbs that use the that template are changed as they use that template)

find your desired verb like above, and look at what the name of the Template that it uses:

Template: NAME_OF_TEMPLATE

now, find that 'NAME_OF_TEMPLATE' under the 'templates' or the 'Dynamic Templates' categories/sections, and then change it, just like how you did above with the verb (change what's in its 'Text: ______' box)


if you just want to change the verb for just a certain/specific Object (non-global change):

add the verb to the desired object like normal

then click on that same desired Object in the 'tree of stuff', so it is highlighted, then:

'WHATEVER' Object -> 'Attributes' Tab -> Attributes -> (see below)

look through the attribute bottom box' right side's list of Attributes for that Object, looking for the verb you added, and click on it, so it is highlighted, and then you can change it... ask if you need help on how to change it...


sorry, about my posts, I'm lazy...

if you want to try to understand more about quest and its coding, I got some detailed guides:

http://textadventures.co.uk/forum/general/topic/ljjm32av4e2t9ot49k478g/help#710be61e-eae1-4af1-8363-520cc718ba1c

this stuff is not easy though... it took me quite a while to get it all of this stuff... 6 years... lol

if you want to see me starting out and struggling with trying to learn quest's scripting for my first time:

https://textadventures.co.uk/forum/quest/topic/3348/noobie-hks-help-me-thread

(I found quest 6 years ago... knowing ZERO/NOTHING about programming/coding/scripting... and thanks to quest and the helpful members here and/or who were here at that time, I'm now taking programming classes at college)


Wow thanks, mate! That actually worked an it was incredibly simple! I found the response under templates once I opened up the hidden library almost immediately.


awesome, was worried my new post would confuse you more... lol

(I edited/added some stuff to my previous post, so you might want to refresh and just take a look at it)


I told you about the hidden library the other day 🙄


Log in to post a reply.

Support

Forums