Custom Command Response

cybernetsurfer7
Hello! I've got what hopefully is a quick and easy problem to solve. Under normal circumstances in Quest, if you input a command you receive a line similar to this:

> look at ______
Run Script/Print Message

The part I would like to change is the ">" and how the verb gets capitalized or not. Where might I find the templates/functions to customize this?

Thanks so much!

Cheers!

jaynabonne
There is no template for that. It's in code - in HandleCommand, there is this line:

 OutputTextRaw ("> " + SafeXML(command))


It just prints a greater-than sign (the ">") and then echoes what the user typed. You would need to copy that entire function into your game and then modify it. Changing the ">" is not too hard. If you want to explicitly uppercase/capitalize the verbs, then you would have to somehow parse the command to determine which word(s) the verb is. Of course, if you assume the verb is always the first word, you could just cap the first character of the line...

If you'd like more info/help, it would be helpful to know exactly what you're going for besides "change is the ">"" and "how the verb gets capitalized or not." (I didn't know it was.)

cybernetsurfer7
Hey Jay, thanks for the response. Sorry for not providing more information. That's super helpful with the HandleCommand bit. I'll take a more specific look at it. In regards to the capitalization, actually what I want to do IS to capitalize the verb. The issue is that it seems to automatically lowercase it. I have yet decided if I want to get rid of the ">" or not. I might leave it but I'll bold the whole line also. But thanks to you I know how to do that now. If you have any ideas on the capitalization issue that would be extremely helpful. Thanks again so much!

Cheers!

jaynabonne
If you could give an example I can try myself of where the automatic loss of capitalization takes place, that would be helpful. If I go into any sample game I have and type:

LOOK at Apple

then it shows (after receiving the command):

> LOOK at Apple

It echoes back exactly what I type.

jaynabonne
If you're talking about what happens when you click on a verb in an object's menu, then sadly that is buried deep in the player javascript code. It may be possible to inject replacement functions for those, but I think you'd really want to have to do that.

cybernetsurfer7
Hey, sorry for taking so long to respond. And thank you for looking into this. As you have guessed, I'm not using the command bar, but rather link drop downs. If it's going to be a serious hassle to dig in and fix it, I probably don't need to deal with it. Just being able to bold that line is enough of the effect I was going for. You've been a huge help!

Cheers!

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

Support

Forums