I've been using quest to learn basic coding~programming from knowing nothing at all, so I know your situation well, and can hopefully be of help to you.
if you want to see my own beginning progress of learning, search for this thread (or just click the link to it, lol):
HK's Noobie Help Me thread (
viewtopic.php?f=10&t=3348&hilit=HK%27s+Noob+Help+Me+thread )
I was so overwhelmed just by the terms, trying to make sense of what was what, but looking back now, man was I stupid, laughs.
---------
understanding~getting the dynamic string expressions to work is one of the hardest things in the tutorial (or the "character creation" scripting), so don't feel bad at all, it's not easy to get it quickly.
here's a trick that I use:
break it up into 'chunks' and understand those chunks.
we're going to work backwards to understand this, so, say we've got this dynamic string expression:
output: HK is a 18 year old male human warrior.
(I wish I was 18, lol)
Scripting:
msg (player.alias + " is a " + player.age_integer + " year old " + player.gender_string + " " + player.race + " " + player.class + ".")
Tag Block: initial attribute creation settings:
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<alias>HK</alias>
<attr name="age_integer" type="int">18</attr>
<attr name="gender_string" type="string">male</attr>
<attr name="race" type="string">human</attr>
<attr name="class" type="string">warrior</attr>
</object>
a quick explanation of 'static' vs 'dynamic' strings:
static string = direct text = msg ("Hi, my name is HK.") ~OR~ msg ("Hi, my name is Kazekai.")
VS
dynamic string = algebraic substitution = use of variables~attributes:
msg ("Hi, my name is " + player.alias + ".")
if (player.alias = "HK"), then output: Hi, my name is HK.
if (player.alias = "Kazekai"), then output: Hi, my name is Kazekai.
see how we got a dynamic string expression by using the variable~attribute of 'player.alias', which returns an output differently depending on what we set it's value as being ("HK" vs "Kazekai").
also, this is important too:
a string~text, such as "HK", the quote characters~symbols as~within the code scripting itself, tell quest engine that this is a Type:String, and not a Type:Object, or nor a Type:int, or nor a Type:boolean.
player.toy_label = "ball" <---> String (text) Attribute Type; a String
player.toy = ball <---> Object Attribute Type; an Object
player.answers = "1" <---> String (text) Attribute Type; a String
player.eye_quantity = 2 <---> Integer (int) Attribute Type; an amount~quantity
player.answers = "true~false" <---> String (text) Attribute Type; a String
orc.dead = true~false <---> Boolean (Flag) Attribute Type; a Boolean~Flag
the 'NAME' Attribute is the unique 'ID' attribute for the quest engine, so you can't have two things with the same NAME attribute:
<attr name="strength" type="string">strong</attr>
<attr name="strength" type="int">100</attr>
ERROR !!!!!!
<object name="orc"></object>
<object name="orc"></object>
ERROR !!!!!
etc elements too (functions, verbs, commands, turnscripts, exits, timers, ect etc etc)
but, quest doesn't care about the 'ALIAS' Attribute:
<object name="monster_1">
<alias>orc</alias>
</object>
<object name="monster_2">
<alias>orc</alias>
</object>
NO error !
-----------------
anyways, back to the most important thing in writing dynamic string expressions:
the 2 chunks:
1. " text (which includes a SPACE, the space bar key, character~symbol too) "
2. + Object.Attribute +
so, for our example:
msg (player.alias + " is a " + player.age_integer + " year old " + player.gender_string + " " + player.race + " " + player.class + ".")
the chunks:
player.alias +
" is a "
+ player.age_integer +
" year old "
+ player.gender_string +
" (SPACE) "
+ player.race +
" (SPACE) "
+ player.class +
"."
the secret to writing quest's dynamic string expressions, hehe.
--------------
as Alex already explained, the commands for output'ing double~single quotes in your msg scripts:
double quotes: /"
single quotes: '
Now, I just need to remember now that the slash is to the left of the double quote symbol, lol. I always got confused... haha.
(Or, I just keep using the single quotes... much easier~simplier, lol)
so...
since quest already uses the double quotes for defining a string~text portion~bit within your scripting, Alex has to use something else, the backslash+doublequote, so it acts more like a command-switch for inputing characters, like how is done with your file names with spaces:
%20 (I think ~ going off of old memory ~ I haven't seen it used in awhile) = (SPACE)
HK Game File.ext
becomes
HK%20Game%20File.ext
or for the computer's terminal~command line~prompt:
$p -> prompt
$g -> ^
$p$g -> (to get back your prompt functionality in a computer's terminal ~ command line~prompt)
(or whatever the letter for the up carrot symbol, meh)