Jay has already answered most of your questions, but I'll comment anyways too, hehe.
0. the two most powerful~useful scripts, which will allow you to do almost anything and everything that you want to do:
in the GUI~Editor:
run as script -> add a script -> scripts -> if... -> [EXPRESSION] -> (type in whatever you want it to do ~ though you'll have to know how to write using quest code of course)
run as script -> add a script -> variables -> set a variable or an attribute -> (set it up)
in code:
if (Object.Attribute = Value_or_Expression) {
-> // script(s)
] else if (Object.Attribute = Value_or_Expression) {
-> // script(s)
} else {
-> // script(s)
}
if (orc.condition = "dead") {
-> msg ("The orc is dead")
}
~OR~
if (orc.condition = "dead") {
-> msg ("The orc is dead")
} else if (orc.condition = "alive") {
-> msg ("the orc kills you")
-> msg ("GAME OVER")
-> finish
}
~OR~
if (orc.condition = "dead") {
-> msg ("The orc is dead")
} else if (orc.condition = "alive") {
-> msg ("the orc kills you")
-> msg ("GAME OVER")
-> finish
} else if (orc.condition = "drunk") {
-> msg ("The orc is drunk")
} else {
-> msg ("The orc is asleep")
}
An Attribute ('savable and loadable' ~ can be used~referenced~called upon within any script in the game, so long as the object still exists of course):
Object.Attribute = Value_or_Expression
A Variable (can only be used~referenced~called upon within that same script it is in):
Attribute = Value_or_Expresion
------------------------
1. this is a bit of an annoyance, that I too (and many other people as well) was confused by, as it's not exactly made-known to people:
Your Player Objects can both be used as Player Objects and as Object Objects (like an npc~townsperson or a table), and thus you've got 2 descriptions and locations of those descriptions in the GUI~Editor (and as Jay mentioned, you may have to also set~check the box, for your Player Object first as 'Can be a Player Object' too). "You look good." is the default description for Object Objects. So, if you got your Player Object's player-object-description set up (typed in), but your Player Object isn't set (or isn't currently being used~controlled as a Player Object during game play), then you'll see the object-object-description of (if still as the default ~ you haven't typed in your own custom message for it) "You are looking good." shown~displayed during game play for your Player Object.
I believe it is the second tab from the left (can't remember what it is called... ?setup?) for an Object, that has the 'description' for your Object as an Object Object.
And, the 'Player' tab, has the player-object-description (you may have to check the box for 'can be a player' first, for you to see the player-object-description box, if your Player Object isn't already set as this), for when your Player Object is being controlled currently as a player object during game play.
2. Character Creation
this is a very good 'next step' after doing the tutorial, though it's quite a step up in difficulty, but that's okay, as it teaches you to understand quest and the coding world designs much better.
(you can see my own progress going from a total noob to quest and to coding, to where I am now, in the thread that I created called 'HK's noob help me thread" ~ do a search for it, hehe)
Objects hold Attributes, so this is your way of 'saving and loading' Attributes for then being able to use them within any script that you want (so long as the Object still exists, aka you don't 'remove' or 'destroy' the object, hehe).
in GUI~Editor:
(whatever) Object -> Attributes (tab) -> Attributes -> Add ->
Object: (whatever)
Attribute Name: (whatever)
Attribute Type: (you decide: string, integer~int~non decimal using number, double~decimal using number, boolean~flag, script~verb, string list, object list, string dictionary, object dictionary, script dictionary, or object)
Attribute Value: (depends upon your Attribute Type, and then it's 'whatever' you type in for it)
Object: player
Attribute Name: strength_integer
Attribute Type: int
Attribute Value: 100
you're 'attaching' the Attribute to the~an Object
in code, it looks like this:
as a creation 'tag':
<object name="whatever">
-> <inherit name="editor_object" />
-> <attr name="whatever" type="you decide">your_typed_in_value</attr>
</object>
(using my own labeling system, hehe)
<object name="player">
-> <inherit name="editor_object" />
-> <inherit name="editor_player" />
-> <alias>HK</alias> // this is a quest-auto done-code-shortened-form-for-Strings-only of: <attr name="alias" type="string">HK</attr>
-> <attr name="strength_integer" type="int">100</attr>
-> <attr name="favorite_color_string" type="string">black</attr> // I could have typed instead (as it's a String): <favorite_color_string>black</favorite_color_string>
-> <attr name="favorite_colors_string_list" type="simplestringlist">black;red</attr>
-> <attr name="flying_boolean" type="boolean">true</attr>
-> <attr name="damage_double" type="double">572.09</attr>
</attr>
as a script (which does both creation~setting up or changing~alterning~re-setting up):
Object.Attribute = Value_or_Expression
Object.Object.Attribute = Value_or_Expression
(the dot~period 'attaches' things, Object to Object and~or Attribute to Object, together)
player.alias = "HK"
player.strength_integer = 100
player.favorite_color_string = "black"
player.sword_weapon_object.damage_double = 537.29
player.flying_boolean = true
player.favorite_colors_string_list = split ("black;red", ";")
player.y = (x + 5) / 2 - 50
orc.fight_verb = (see below)
<object name="orc">
-> <inherit name="editor_object" />
-> <attr name="dead" type="boolean">false</attr>
-> // this below is what a Verb looks like in code:
-> <attr name="fight" type="script">
->-> if (orc.dead = true) {
->->-> msg ("The orc is already dead, silly.")
->-> } else if (orc.dead = false) {
->->-> orc.dead = true
->->-> msg ("You attack and kill the orc.")
->-> }
-> </attr>
-> // this below adds the 'fight' verb's button and hyperlink blue text to the game, during game play:
-> <attr name="displayverbs" type="listextend">Fight</attr>
</object>
--------------
you can also just do 'variables' too:
('Variables' are just Strings~Attributes that are NOT 'attached' to an Object, aka no dot~period)
(and because of this, you can only use them within the script they're within, you can't use them in some other outside script, as they're not 'saved', and thus can't be 'loaded' within that other outside script)
Variable = Value_or_Expression
result = "red"
result = 9
handled = false
value = 9
value = "red"
you_go_first = false
y = x
y = x + 5
---------------
so... for character creation:
game (Object) -> Scripts (Tab) -> Start Script -> Add ->
(the 'game' Game Object's 'start' Script Attribute is the very first thing that the game does, even before displaying the room description, so this is a common place to put your 'character creation' script~function block, but you can add your scripts~functions anywhere too: as~within Objects' Verbs, as~within Commands, as~within other Functions, as~within TurnScripts, as~within Timers, as~within other Scripts, and etc. For an example, using character creation, maybe I want a sci-fi tube machine Object that you discover halfway through game play within the game which will create more Player Objects, as you can switch between, aka control, multiple Player Objects, or even maybe creating non-player Objects, like for~as having team~party members, hehe)
(in code, as it's much quicker for me, lol)
msg ("what is your name?")
get input {
-> // quest's 'get input' function automatically (and hiddenly) sets: result = your_typed_in_input_during_game_play
-> // however, we want to set that to an Attribute (Object.Attribute), aka 'save' it, so that we can use ('load') it anywhere (same as 'calling a function', but we're 'creating and saving, for then calling~referencing~using' an Attribute later in some other script within our game, instead of a Function, hehe):
-> player.alias = result
-> show menu ("What is your gender?", split ("male;female", ";"), false) {
-> -> // quest's 'show menu' function automatically (and hiddenly) sets: result = your_choice from the pop up menu's selection of choices~options
->-> // I use 'gender_string' because I don't want to overwrite the already built-in Grammer 'gender = he, she, or it' Attribute and functionality of quest's core coding
->-> player.gender_string = result
->-> show menu ("What is your race?", split ("human;dwarf;elf", ";"), false) {
->->-> player.race = result
->->-> show menu ("What is your class?", split ("warrior;cleric;mage;thief", ";"), false) {
->->->-> player.class = result
->->->-> msg (player.alias + " is a " + player.gender_string + " " + player.race + " " + player.class + ".")
->->-> }
->-> }
-> }
}
<function name="level_up_function"><![CDATA[
-> if (player.level_up_points > 0) {
->-> if (player.gender_string = "male") {
->->-> player.strength = player.strength + 1
->-> } else if (player.gender_string = "female") {
->->-> player.agility = player.intelligence + 1
->-> }
->-> if (player.race = "human") {
->->-> player.strength = player.strength + 1
->->-> player.intelligence = player.intelligence + 1
->-> } else if (player.race = "dwarf") {
->->-> player.strength = player.strength + 2
->-> } else if (player.race = "elf") {
->->-> player.intelligence = player.intelligence + 2
->-> }
->-> if (player.class = "human") {
->->-> // you get the idea... etc etc etc... lol
->-> }
->-> player.level_up_points = player.level_up_points - 1
->-> level_up_function // (in the GUI~Editor, this is: 'call a function' Script)
-> }
]]></function>
<turnscript name="global_turnscript">
-> <enabled />
-> <script>
->-> level_up_function // (in the GUI~Editor, this is: 'call a function' Script)
->-> game.turns = game.turns + 1
-> </script>
</turnscript>
--------------------
the hardest part of character creation is getting the display (msg~print a message) to work:
in the GUI~Editor: run as script -> add a script -> output -> Print a message -> [EXPRESSION] -> (see below)
you need to break it down into 2 types of 'chunks' to understand how to type it correctly (correct syntax):
The 2 'Chunks':
1. " text "
2. + Object.Attribute +
thus the chunks for:
player.alias = "HK"
player.gender_string = "male"
player.race = "human"
player.class = "warrior"
msg (player.alias + " is a " + player.gender_string + " " + player.race + " " + player.class + ".")
// outputs~returns~displays~shows: HK is a male human warrior.
player.alias +
" is a "
+ player.gender_string +
" (space) "
+ player.race +
" (space) "
+ player.class +
"."
this will help you greatly type it out correctly without errors, but it'll still take a lot of practice and frustration, lol
this took me quite a while to be able to do this, and I still have trouble with it even now, though understanding the '2 chunks' concept really helps a lot.
----------
here's another example:
player.damage = 100
monster.alias = "orc"
monster.hp = 500
(pretend we got a damage script, doing the subtracting: monster.hp = monster.hp - player.damage: 500-100)
(remember that you *MUST* set the 'print a message' to [EXPRESSION], as this enables the use of your 'Object.Attribute' calls~references~loading of your Attributes in the message)
msg ("You do " + player.damage + " damage to the " + monster.alias + ", leaving it with only " + monster.hp + " HP left.")
outputs: You do 100 damage to the orc, leaving it with only 400 HP left.
can you break it down into the correct chunks?
answer:
"You do "
+ player.damage +
" damage to the "
+ monster.alias +
", leaving it with only "
+ monster.hp +
" HP left."
---------------------
"room" (object) -> Room Descriptions (or whatever it is called) (tab) -> Description -> run as script -> add a script -> output -> print a message -> [EXPRESSION] -> (see below, but in code though)
room.alias = "catacombs"
room.light_or_dark = "dark"
room.length = 44
friend.alias = "mike"
friend.condition = "dead"
monster.alias = "man-eating crocodile"
room.walls_conditiion = "blood"
player.condition = "sick"
friend.gender = "him"
msg ("The " + room.alias + " is a " + room.light_or_dark + " maze, that is " + room.length + " miles long, that your best friend, " + friend.alias + ", got lost in, and is now " + friend.condition + ". You hope to be able to find " + friend.gender + " soon, as you don't want to be eaten up by the " + monster.alias + ". The " + room.alias + "' walls are smeared with " + room.walls_condition + ", and you feel " + player.condition + " already. Yada Yada Yada")
outputs: The catacombs is a dark maze, that is 44 miles long, that your best friend, Mike, got lost in, and is now dead. You hope to be able to find him soon, as you don't want to be eaten up by the man-eating crocodile. The catacombs' walls are smeared with blood, and you feel sick already. Yada Yada yada
hehe, ...hopefully I didn't make any mistakes, lol