direct answer:
http://docs.textadventures.co.uk/quest/guides/character_creation.html
long answer (all of the below):
explanation and then at bottom, answer (in code, as the above link shows how to do it via the GUI~Editor)
As best as I understand Quest (I'm still a newb coder ~ so I don't know how the engine is actually structured+works), so take this bit of my explanation of its structure and terms, with a 'grain of salt', but it might help, even if not correct... lol
quest's terminology:
VARIABLES:
-> Variables: local~temporary: can only be used within its own script block, can't be used in any other script blocks anywhere in the game.
-> Attributes: global~'permanent' (so long as the Object that holds the Attribute, exists, of course): it is 'save-able', and thus 'load-able' (reference-able ~ call upon-able), can be used in any scripting anywhere in the game.
-> Parameters: these deal with Functions, Dictionaries, Commands, and etc. They're like Variables, except that they can transfer (and optionally re-label) between scriptings
ELEMENTS:
http://docs.textadventures.co.uk/quest/elements/
Elements are the OBJECTS of~for its Object-Oriented Structure, which not to be confused with the 'Object' Element (ya, it gets a bit befuddled).
my own terminology:
'scriptings' are the action code lines which set, re-set, and~or alter Attributes and~or do conditional (if) code lines and etc, which are able to be held by (done in) these Elements: Verbs ~ Object's Script Attributes, Commands, Functions, Turnscripts, Timers, and etc
Quest is Object-Oriented Programming structure, so:
in scripting code:
(look up how to write~syntax the Attribute Types: http://docs.textadventures.co.uk/quest/types/ )
Attribute VARIABLE:
Object_name.Attribute_name = Value_or_Expression
examples:
player.strength = 100
game.event_flag = 0
orc.dead = false
player.y = x
player.y = x + 5
player.strength = player.weight + player.energy
player.damage = player.sword.damage + player.sword.damage * player.strength / 100
Variable VARIABLE:
variable_string_name = Value_or_Expression
examples:
result = "blah"
handled = false
you_go_first = true
strength = 100
y = x
damage = player.sword.damage + player.sword.damage * player.strength / 100
y = x + 5
using the GUI~Editor (for initial creation~setting of Attribute VARIABLES):
(whatever, for example: player) Object -> Attributes Tab -> Add -> (see below example)
(Object Name: player)
Attribute Name: strength
Attribute Type: int (integer)
Attribute Value: 100
this is the same as, in scripting:
player.strength = 100
as this is the same as, in code tag blocks:
<object name="player">
<attr name="strength" type="int">100</attr>
</object>
as for the scriptings via using the GUI~Editor:
I'm not that familiar with it, as I do most of the stuff in code, but figure out its options, to get the same results as I do in code... someone else can maybe help you with it if you need help
anyways..... now to your question:
get input {
msg ("What is your name?")
// I type in: HK
// the quest engine automatically (hidden from you) sets the variable: result = your_typed_in_input
// conceptually: player.alias = result = "HK"
player.alias = result
msg ("Hello" + player.alias + ".")
// outputs: Hello HK.
}
the most challenging part is getting the syntax for the 'msg' Script's [EXPRESSION] correct
a trick to it, is to break it into two chunks:
1. " text~strings " (including spaces as text~string characters: space bar keyboard key)
2. + VARIABLE +
for example:
player.alias = "HK"
player.sex = "male"
player.race = "human"
player.class = "warrior"
HK is a male human warrior.
msg (player.alias + " is a " + player.sex + " " + player.race + " " + player.class + ".")
its chunks:
(8 of them)
1. player.alias +
2. " is a " ~~~~~~~~~~ " (space) is (space) a (space) "
3. + player.sex +
4. " " ~~~~~~~~~~~~~ " (space) "
5. + player.race +
6. " " ~~~~~~~~~~~~~ " (space) "
7. + player.class +
8. "." ~~~~~~~~~~~~~ " (dot~period) "
now, it's easy to write it correctly:
msg (player.alias + " is a " + player.sex + " " + player.race + " " + player.class + ".")
outputs: HK is a male human warrior.