<object name="room_1">
<attr name="type_of_object_string_attribute" type="string">dungeon</attr>
</object>
<object name="room_2">
<attr name="type_of_object_string_attribute" type="string">world</attr>
</object>
<object name="room_3">
<attr name="type_of_object_string_attribute" type="string">dungeon</attr>
</object>
<object name="room_4">
<attr name="type_of_object_string_attribute" type="string">world</attr>
</object>
<function name="populate_verbs_function">
foreach (object_variable, AllObjects()) {
if (GetString (object_variable, "type_of_object_string_attribute") = "dungeon") {
// script to create/add your dungeon Verb to it, the 'set' Function/Script, and I assume that you can create/add a Script Attribute (which is what a Verb is) with it...
}
// optional extra condition checking for other types of objects:
else if (GetString (object_variable, "type_object_string_attribute") = "world") {
// script to create/add your world Verb to it, the 'set' Function/Script, and I assume that you can create/add a Script Attribute (which is what a Verb is) with it...
}
}
</function>
<game name="blah">
<attr name="start" type="script">
populate_verbs_function
</attr>
</game>
<verb>
<property>dungeon_verbs_property</property>
<pattern>dungeon_verbs_pattern</pattern>
<defaultexpression>dungeon_verbs_default_expression</defaultexpression>
</verb>
// optional extra Verbs:
<verb>
<property>world_verbs_property</property>
<pattern>world_verbs_pattern</pattern>
<defaultexpression>world_verbs_default_expression</defaultexpression>
</verb><object name="room_1">
<inherit name="dungeon_object_type" />
</object>
<object name="room_2">
<inherit name="world_object_type" />
</object>
<object name="room_3">
<inherit name="dungeon_object_type" />
</object>
<object name="room_4">
<inherit name="world_object_type" />
</object>
<type name="dungeon_object_type">
<attr name="YOUR_VERBS_NAME" type="script">
// your dungeon Verb's script(s)
</attr>
</type>
// optional extra object types:
<type name="world_object_type">
<attr name="YOUR_VERBS_NAME" type="script">
// your world Verb's script(s)
</attr>
</type>// this Command, upon typing in 'info' during game play, will only display your currently controlled character (Player Object):
<object name="player">
<attr name="alias" type="string">HK</attr>
<attr name="age_integer_attribute" type="int">18</attr> // I wish I was still 18, lol
<attr name="age_string_attribute" type="string">adult</attr>
<attr name="sex_string_attribute" type="string">male</attr>
<attr name="race_string_attribute" type="string">human</attr>
<attr name="class_string_attribute" type="string">warrior</attr>
</object>
<object name="player_2">
<feature_player /> // this is how you set/tell quest that this Object can be a Player Object (what it does through using the GUI~Editor's option), and I think this ('<feature_player>') is syntax shorthand for: <attr name="feature_player" type="boolean">true</attr>
<attr name="alias" type="string">Mike</attr>
<attr name="age_integer_attribute" type="int">25</attr>
<attr name="age_string_attribute" type="string">adult</attr>
<attr name="sex_string_attribute" type="string">male</attr>
<attr name="race_string_attribute" type="string">human</attr>
<attr name="class_string_attribute" type="string">wizard</attr>
</object>
<object name="monster_1">
<attr name="alias" type="string">orc</attr>
<attr name="age_integer_attribute" type="int">30</attr>
<attr name="age_string_attribute" type="string">adult</attr>
<attr name="sex_string_attribute" type="string">male</attr>
<attr name="race_string_attribute" type="string">orc</attr>
<attr name="class_string_attribute" type="string">berserker</attr>
</object>
<command name="static_character_information_screen_command">
<pattern>info</pattern>
<script>
ClearScreen
msg ("Name: " + game.pov.alias)
msg ("Age: " + game.pov.age_integer_attribute + " (" + game.pov.age_string_attribute + ")")
msg ("Sex: " + game.pov.sex_string_attribute)
msg ("Race: " + game.pov.race_string_attribute)
msg ("Class: " + game.pov.class_string_attribute)
wait {
ClearScreen
}
</script>
</command>
// Input:
info
// Output:
it'll either show the stats for 'player' or 'player_2' (due to using 'game.pov' only --- otherwise, this would be limited to a single specified Object only), depending on which is the game.pov (your currently controlled Player Object), but it will NOT show the stats for the 'monster_1'
VS
// this Command, upon typing in 'info (whatever object)' during game play, will display that inputted Object's information:
<command name="dynamic_character_information_screen_command">
// you're not limited to a single parameter, and there's two types of parameters: #text# / #textXXX# or #object# / #objectXXX#, as you can see, you parameter must start with '#text' or #object' and end of course with the '#'
<pattern>info #object_parameter#</pattern>
<script>
ClearScreen
msg ("Name: " + object_parameter.alias)
msg ("Age: " + object_parameter.age_integer_attribute + " (" + object_parameter.age_string_attribute + ")")
msg ("Sex: " + object_parameter.sex_string_attribute)
msg ("Race: " + object_parameter.race_string_attribute)
msg ("Class: " + object_parameter.class_string_attribute)
wait {
ClearScreen
}
</script>
</command>
// inputs:
since we're using the '#object#' parameter, it means that quest will look for an Object with the same 'name' ID String Attribute as the inputted name, and if it can't find an Object with that 'name' ID String Attribute, it'll then look for an Object with an 'alias' String Attribute of that inputted name, and if it still fails, then it returns 'null' (so: no error occurs if it can't find an Object, don't need to worry about coding to handle it not finding such an Object with the same 'name' ID String Attribute or 'alias' String Attribute)
info player
info HK
info player_2
info Mike
info monster_1
info orc
outputs:
it'll display (assuming the Object has those Attributes --- we should have coding to check if the Object has these Attributes too, but meh, this is just a quick example for you of using Commands) the stats of the inputted Object, so it can show the stats of any of the 3 Objects: 'player', 'player_2', or 'monster_1'.why a String (or Stringlist) is better than Booleans, example:
using Boolean Attributes:
// very cumbersome (BAD DESIGN!), but it does allow for easy/simple (coding-wise) use of having multiple (any combination of) effects at the same time:
player.poisoned = false // change to 'true' when poisoned
player.asleep = false // change to 'true' when put asleep
player.stunned = false // etc etc etc
player.paralyzed = false // etc etc etc
player.petrified = false // etc etc etc
player.silenced = false
player.confused = false
player.cursed = false
player.undead = false
player.dead = false
player.unconscious = false
etc etc etc Boolean Attributes (in this example of: conditions/effects/status_effects)