Disable HELP command

DGNXFoxN
Hi there,

I would like to try and make a cyber-warfare (Hacking Simulator) Game. Therefor, I was hoping that someone could explain to me how to remove/disable the pre-made commands such as "go to, use, sit, etc...". Because the idea would be that everything displayed is what the "hacker" is getting displayed on his screen. There is no movement or anything.

Thanks in advance!

adammadam
you click on "filter" which is right at the bottom left corner, then click "show advanced" then in the search bar at the top left you can search for "help" then you can change what is displayed when someone types in help

adammadam
oh and obviously you can search for other things like go to, use etc in the same way. So you could just make it say "you cant go anywhere" or whatever if someone types that in

DGNXFoxN
Thank you for your response! This really helps.

I had another question though:

I would like to have the following option:
if the player types the command "connect" without anything following it, the game will then ask what host or ip to connect to.
The above I have been able to set up.
However, how do I go about working with "connect" followed immediately by a host or ip (ex: "connect google.com")
It would have to have the same outcome as if they typed connect, waited for question and then typed "google.com"
But can't seem to find how to set that up.

Thanks!

InfectedBehaviour
Not sure if this will help but I think you would need to create an object named google and name the alias "google.com". The way I see it is would then work out that the person would need to type "connect google.com".

Though if I'm wrong, someone else will help you.

adammadam
Well you could make a command for that I think, though personally I'm using verbs much more just because I found them easier to understand and use. What I'd do is make a verb "connect #object#" then I'd have Google, Yahoo etc all in the room as scenery objects.. then under the verbs tab of each "object" (so under google, yahoo etc) add the verb "connect" to it, then plan out what happens e.g.
qh1.png
qh2.png

adammadam
...
qh3.png
qh4.png

adammadam
so here we make a verb "connect to #object#" and we make a verb "search for #object#" then we make an object "google", under the google objects verb tab we add "connect to" then put whatever message we want in there. I put a command to search for cat pictures in the message which is displayed which the user can click on when it shows up. We have an object "cat pictures" which when a player clicks on that "search for cat pictures" command, or manually types in "search for cat pictures" (they do the same thing the command just gives a hyperlink to it) the message "you see some nice cat pictures" comes up. Then, you could change that to an if command instead of just a simple message "if player is on google" then you see some nice cat pictures, else you need to be on a search engine first before you can look up cat pictures..

This might be a really long way of doing it but it's how im making my own game atm haha.

Just try copying this and see how it works out!

HegemonKhan
you might have a parsing issue however:

'command' vs 'command #text#'

<command name="xxx1">
<pattern>connect</pattern>
<script>
function_1
</script>
</command

vs

<command name="xxx2">
<pattern>connect #text#</pattern>
<script>
function_1
</script>
</command>


as which Command will the engine activate ?

as they both begin with 'command', quest is equally justified to activate either Command, and thus you got either an ERROR, or it's going to give a popup asking for what Command you wanted to activate, or it's just always going to activate the 'connect' Command and never ever the 'connect #text#' Command...

-----

I suppose yo could do this... but I'm not sure... as this is a bit more advanced, and I'm maybe not quite at this level of coding...

<command name="xxx">
<pattern>connect;connect #text#</pattern>
<script>
// I'd need to know how the Command gets your input (too lazy to try to dive into the underlying coding on it, lol) ... to do the scripting for this...
// quasi pseudo scripting concept: if (input="connect") { function_1 } else if (input="connect " + xtextx) { function_1 }
</script>
</command>

HegemonKhan
actually... why don't you just use the 'get input' Script (such as within a GUI~Editor's Verb) instead of using Commands...

http://docs.textadventures.co.uk/quest/ ... input.html
http://docs.textadventures.co.uk/quest/ ... ation.html (a lot of extra stuff, but you can see the 'get input' Script in action)

msg ("prompt:")
get input {
if (result = "connect") {
function_1
} else {
string_variable = ToString (result)
if (StartsWith (string_variable, "connect")) {
if (Right (string_variable, "connect") = " 8.8.8.8") {
msg ("connecting to google...")
} else if (...etc...) { script }
}
}
}

adammadam
HegemonKhan wrote:you might have a parsing issue however:

'command' vs 'command #text#'



idk about two different commands, but if you have a command like "connect" which does something like say "where do you want to connect" then you have a verb which is "connect #object#" it prioritises the verb when the object can have that done to it, and the command when the verb isnt added to the object in question. I've found that quite useful.

DGNXFoxN
Thank you guys so much for your response!

HegemonKhan
I edited some of my previous posts, so you might want to refresh and re-look at them.

DGNXFoxN
HegemonKhan wrote:I edited some of my previous posts, so you might want to refresh and re-look at them.


I'm not really up-to-speed with the coding part of this program.
So not entirely sure how to use your suggestion :(

HegemonKhan
I don't know the GUI~Editor's options, drop down boxes, and etc that well, unfortunately. So you can just ignore my code posts.

maybe you could do this (much more simple than the 'string scripting', but I'm not sure if this will work, and~or if its what you want):

<command name="xxx">
<pattern>connect #text#</pattern>
<script>
if (text = null) {
msg ("What host name or ip address?")
get input {
if (result = "8.8.8.8" or result = "google.com") {
// msg ("connecting to google") and blah scripting
} else if (result = "x.x.x.x" or result = "xxx.xxx") {
}
// etc 'else ifs' as needed
}
} else {
if (text = "8.8.8.8" or text = "google.com") {
// msg ("connecting to google") or blah scripting
} else if (result = "x.x.x.x" or result = "xxx.xxx") {
// msg ("connecting to xxx") and blah scripting
}
// etc 'else ifs' as needed
}
</script>
</command>


as for doing this stuff in the GUI~Editor...

You're going to have to try to find the options, drop down menus, and etc, to do this stuff... or if you're comfortable, you can do a hybrid method of partly using the GUI~Editor and then writing in the code needed by chooseing the [expression] drop down option, which let's you write in your code expressions directly.

for example, Attributes in GUI~Editor's scripting:

'strength_potion' Object -> 'Verbs' Tab -> Add -> Name: 'consume' -> (see below)

run as script -> add a~new script -> variables -> 'set a variable or attribute' Script -> (since I don't know the options, drop down menus, and etc, I'd do this: see below)

set attribute player.strength [expression] = player.strength + 1

whereas, you may know the GUI~Editor's options, drop down menus, and etc doing this instead (I hope this is right, lol):

'strength_potion' Object -> 'Verbs' Tab -> Add -> Name: 'consume' -> (see below)

run as script -> add a~new script -> objects -> 'set object counter' -> (see below)

~ set [object] player [attribute] strength

(XanMag can help you with this, as the above is probably wrong, lol. Too lazy to start up quest to correct this stuff)

DGNXFoxN
Thanks for the reply, I have indeed used the "object" solution and it seems to work pretty well.
I'm still looking into the "coding" part of the program as it seems that i'll be using it to create lists, which again I know nothing about, haha, but it's great learning.

HegemonKhan
Lists (String Lists and Object Lists) and especially Dictionaries (String Dictionaries, Object Dictionaries, and Script Dictionaries) are a step up in advanced thinking, just to warn you (if you don't understand Attributes, you're going to have a hard time with Lists and especially Dictionaries).

DGNXFoxN
Well I've managed to use a string list to get my achievement system working.
When certain tasks are done, I have them add a line to the string list, when the player requests the achievement list it will drop the total score (earned by getting an achievement) + it prints the achievement list as I was hoping it would.

Haven't played with Dictionaries though, as I'm not sure what to use them for yet.

HegemonKhan
wow, nicely done, understanding lists and doing stuff with them isn't easy!

Dictionaries...

viewtopic.php?f=18&t=5137 (scroll down to the 'about dictionaries' bottom half section of the post)

think of them as 'input~output' or 'conversion', see below:

fire=water // fire -> water
water=fire // water -> fire
air=earth // air -> earth
earth=air // earth -> air

let's say you select 'fire', then it:
outputs~returns: water

let's say you select 'water', then it:
outputs~returns: fire

let's say you select 'air', then it:
outputs~returns: earth

let's say you select 'earth', then it:
outputs~returns: air

other uses:

1=sunday
2=monday
3=tuesday
4=wednesday
5=thursday
6=friday
7=saturday

let's say, that you let them pick what day it is, via selecting: 1-7, which will then:
output~return: (the name of the day)

------

let's recap:

String Dictionary: string input -> output: string
Object Dictionary: string input -> output: object

--------

lastly, you got the Script Dictionaries:

string input -> output: script(s)

an example:

you select one of the string inputs: 'dragon', 'sword', wizard'

'dragon' -> outputs: msg ("The dragon has stolen my daughter, the princess! If you rescue her, you may marry her, and rule over this kingdom of mine, as the new king.")

'sword' -> outputs: msg ("Ah the legendary dragon slayer sword, only it can pierce the dragons armor-like scales.")

'wizard' -> outputs: msg ("The evil wizard long ago stolen the legendary dragon slayer sword... beware his dark magic.")

DGNXFoxN
@HegemonKhan

That's pretty interesting, might be usefull in the future. At this time I don't think I'll be needing dictonaries.

magano
So... Problem solved? Can you now disable (or change) the help and also the connect problem? The solution is quite simple for both by the way

DGNXFoxN
@magano
Yes, you can add the standard commands such as "help", "lookat", etc... to your game by using the filter option in the standalone version of QUEST.
Adding these commands and nullifying the outcome of these commands seemed to be the fastest and easiest solution.
The connect issue has also been resolved.

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

Support

Forums