from another post of mine (and also thanks to Pixie for explaining the two forms of code languages in quest):
"
Quest uses its own unique language, but it's scripting code (the NON-tag code lines~blocks) syntax is similar to C++ and~or Java, and it's main code is very similar to XML (a web~browser language like HTML ~ it's all the ' <xxx>xxx</xxx> ' or ' <xxx /> ' stuff that I like to call the 'physical creation' tag code lines~blocks), and its coding features is similar to Python (usage of Lists and Dictionaries for example), as Quest~Alex is European and Python is much more popular in Europe than in the U.S.)
I'd recommend downloading notepad++ (
https://notepad-plus-plus.org/ ), it's a good free software, you can select the programming language you want (the menu bar at the top once you got it installed and open~running),
such as 'XML' for quest coding, or whatever language, for whatever else, like maybe writing JS (JavaScript) code for whatever, hehe.
"
---------------------
the "physical form, existence, manifestation, and~or instantiating of stuff~things (Elements) that is the" main code of quest is very similar to XML (a browser~web language, like HTML), which uses the "tags", as seen below:
Horizontal:
<xxx>xxx</xxx>
~ OR (for some things) ~
<xxx />
Vertical:
<xxx>
xxx
</xxx>
// -----------
<asl version="550">
// your entire mass of game code
</asl>
<game name="xxx">
// Attributes, such as:
<gameid>xxx</gameid>
<start type="script">
// scripting (action~event NON-tag code):
msg ("hi")
</start>
<attr name="turns" type="int">0</attr>
</game>
<object name="xxx">
// Attributes and~or other Objects
</object>
<function name="xxx">
// scripting (action~event NON-tag code):
msg ("hi")
</function>
<command name="xxx">
// Attributes
</command>
<turnscript name="xxx">
// Attributes
</turnscript>
<timer name="xxx">
// Attributes
</timer>
<type name="xxx">
// Attributes
</type>
// etc Elements
---------
and Scripting (action~event NON-tag code lines~blocks), some examples:
msg ("hi")
if (orc.dead) { /* scripts */ }
if (Got (potion) ) { /* scripts */ }
Set (player, "strength", 100)
game.roll = DiceRoll ("1d6")
msg ("What is your name?")
get input {
player.alias = result
}
if you can get this understood~memorized, you can do any scripting code in quest, Attribute Usage:
Object_name.Attribute_name = Value_or_Expression
<name of object>.<name of attribute> = <value or express>
AND the 'if' Script (+Attribute Usage):
if (Object_name.Attribute_name OPERATOR Value_or_Expression) { /* scripts */ }
for examples:
player.alias = "HK"
orc.dead = false
player.damage = player.katana.damage * 2
player.strength = 100
if (player.alias = "HK") { msg ("You're the most awesome person in the world! (lololol, riiiiiiight, sighs)") }
if (orc.dead) { msg ("The orc is dead") }
if (not orc.dead) { msg ("The orc is alive") }
if (student.grade > 90) { msg ("The student got an 'A' in class") }