alright, it's a bit different with quest's Text Adventure version than the GameBook version.
------
for the offline~desktop version of the Text Adventure version of quest, anyways
there's more ways of doing it:
1. via using the GUI~Editor's drop down menus, script choices, and etc.
2. as scripting (similiar to how I showed you for the Gamebook version on the 'ifanswers' site)
3. directly, via in code, via the 'creation tags', scripting, and etc.
---------
conceptual about:
The built-in special 'statusattributes' String Dictionary Attribute will display the Attributes in the status pane during game play, BUT ONLY for the special 'game' Game Object and the Player Objects (such as the default 'player' Player Object), meaning that both the 'statusattributes' String Dictionary Attribute and the Attributes, must be within~added_to either the 'game' Game Object or a Player Object, for the displayment within the status pane during game play to occur~work~happen.
Also, do note, the 'statusattributes' is just the DISPLAYMENT of Attributes, so do make sure that you actually created~added~have those Attributes, to be displayed by the 'statusattributes'. You can't display something that doesn't exist.
--------
so, here's an example guide using the GUI~Editor, to make a sample game for you:
*create a new quest Text Adventure game*
first, let's create our Attributes:
'game' Game Object -> 'Attributes' Tab -> Attributes -> Add -> (see below, repeat as needed)
(Object Name: game)
Attribute Name: strength
Attribute Type: int (integer)
Attribute Value: 100
(Object Name: game)
Attribute Name: current_life
Attribute Type: int (integer)
Attribute Value: 999
(Object Name: game)
Attribute Name: maximum_life
Attribute Type: int (integer)
Attribute Value: 999
(Object Name: game)
Attribute Name: life
Attribute Type: string
Attribute Value: 999/999
// these special 'changed' Script Attributes are for causing the updating of the status pane for when your Attributes' Values change:
(Object Name: game)
Attribute Name: changedcurrent_life
Attribute Type: script
Attribute Value: (see below)
add new script -> variables -> 'set a variable or attribute' Script -> set variable game.life = [expression] game.current_life + "/" + game.maximum_life
// these special 'changed' Script Attributes are for causing the updating of the status pane for when your Attributes' Values change:
(Object Name: game)
Attribute Name: changedmaximum_life
Attribute Type: script
Attribute Value: (see below)
add new script -> variables -> 'set a variable or attribute' Script -> set variable game.life = [expression] game.current_life + "/" + game.maximum_life
'player' Player Object -> 'Attributes' Tab -> Attributes -> Add -> (see below, repeat as needed)
(Object Name: player)
Attribute Name: strength
Attribute Type: int (integer)
Attribute Value: 100
(Object Name: player)
Attribute Name: current_life
Attribute Type: int (integer)
Attribute Value: 999
(Object Name: player)
Attribute Name: maximum_life
Attribute Type: int (integer)
Attribute Value: 999
(Object Name: player)
Attribute Name: life
Attribute Type: string
Attribute Value: 999/999
// these special 'changed' Script Attributes are for causing the updating of the status pane for when your Attributes' Values change:
(Object Name: player)
Attribute Name: changedcurrent_life
Attribute Type: script
Attribute Value: (see below)
add new script -> variables -> 'set a variable or attribute' Script -> set variable player.life = [expression] player.current_life + "/" + player.maximum_life
// these special 'changed' Script Attributes are for causing the updating of the status pane for when your Attributes' Values change:
(Object Name: player)
Attribute Name: changedmaximum_life
Attribute Type: script
Attribute Value: (see below)
add new script -> variables -> 'set a variable or attribute' Script -> set variable player.life = [expression] player.current_life + "/" + player.maximum_life
now, let's set up our 'statusattributes' String Dictionary Attributes:
'game' Game Object -> 'Attributes' Tab -> Status Attributes -> Add -> (see below, repeat as needed)
(Object Name: game)
Status Attribute's Inputs:
Attribute Name (Key): strength
Format String (Value): Game Strength: !
// initial output~display: Game Strength: 100
(Object Name: game)
Status Attribute's Inputs:
Attribute Name (Key): life
Format String (Value): Game Life: !
// initial output~display: Game Life: 999/999
'player' Player Object -> 'Attributes' Tab -> Status Attributes -> Add -> (see below, repeat as needed)
(Object Name: player)
Status Attribute's Inputs:
Attribute Name: strength
Format String: Player Strength: !
// initial output~display: Player Strength: 100
(Object Name: player)
Status Attribute's Inputs:
Attribute Name: life
Format String: Player Life: !
// initial output~display: Player Life: 999/999
and lastly, for testing of our status attributes for changing Attributes' Values:
'room' Room Object -> 'Objects' Tab -> Add -> (see below, repeat as needed)
Object Name: increase_game_strength
Object Name: decrease_game_strength
Object Name: increase_player_strength
Object Name: decrease_player_strength
Object Name: increase_game_current_life
Object Name: decrease_game_current_life
Object Name: increase_game_maximum_life
Object Name: decrease_game_maximum_life
Object Name: increase_player_current_life
Object Name: decrease_player_current_life
Object Name: increase_player_maximum_life
Object Name: decrease_player_maximum_life
'increase_game_strength' Object -> 'Verbs' Tab -> add -> Verb Name: increase -> (see below)
add new script -> variables -> 'set a variable or attribute' Script -> set variable game.strength = [expression] game.strength + 10
'decrease_game_strength' Object -> 'Verbs' Tab -> add -> Verb Name: decrease -> (see below)
add new script -> variables -> 'set a variable or attribute' Script -> set variable game.strength = [expression] game.strength - 10
'increase_player_strength' Object -> 'Verbs' Tab -> add -> Verb Name: increase -> (see below)
add new script -> variables -> 'set a variable or attribute' Script -> set variable player.strength = [expression] player.strength + 10
'decrease_player_strength' Object -> 'Verbs' Tab -> add -> Verb Name: decrease -> (see below)
add new script -> variables -> 'set a variable or attribute' Script -> set variable player.strength = [expression] player.strength - 10
'increase_game_current_life' Object -> 'Verbs' Tab -> add -> Verb Name: increase -> (see below)
add new script -> variables -> 'set a variable or attribute' Script -> set variable game.current_life = [expression] game.current_life + 100
'decrease_game_current_life' Object -> 'Verbs' Tab -> add -> Verb Name: decrease -> (see below)
add new script -> variables -> 'set a variable or attribute' Script -> set variable game.current_life = [expression] game.current_life - 100
'increase_game_maximum_life' Object -> 'Verbs' Tab -> add -> Verb Name: increase -> (see below)
add new script -> variables -> 'set a variable or attribute' Script -> set variable game.maximum_life = [expression] game.maximum_life + 100
'decrease_game_current_life' Object -> 'Verbs' Tab -> add -> Verb Name: decrease -> (see below)
add new script -> variables -> 'set a variable or attribute' Script -> set variable game.maximum_life = [expression] game.maximum_life - 100
'increase_player_current_life' Object -> 'Verbs' Tab -> add -> Verb Name: increase -> (see below)
add new script -> variables -> 'set a variable or attribute' Script -> set variable player.current_life = [expression] player.current_life + 100
'decrease_player_current_life' Object -> 'Verbs' Tab -> add -> Verb Name: decrease -> (see below)
add new script -> variables -> 'set a variable or attribute' Script -> set variable player.current_life = [expression] player.current_life - 100
'increase_player_maximum_life' Object -> 'Verbs' Tab -> add -> Verb Name: increase -> (see below)
add new script -> variables -> 'set a variable or attribute' Script -> set variable player.maximum_life = [expression] player.maximum_life + 100
'decrease_player_current_life' Object -> 'Verbs' Tab -> add -> Verb Name: decrease -> (see below)
add new script -> variables -> 'set a variable or attribute' Script -> set variable player.maximum_life = [expression] player.maximum_life - 100
and hopefully this all works for you! save your game file, and play~study~test it! (HK crosses fingers that he's got no mistakes, lol)
----------------
to do this as scriping (same similiar simple example like the one I did on 'ifanswers' site ~ not expanded like the directly above example sample game):
(example using the default 'player' Player Object, but you can also do this with the 'game' Game Object or other Player Objects too, just adjust accordingly, of course)
'game' Game Object -> 'Script' Tab -> 'Start' Script -> (see below)
The Attributes:
add new script -> variables -> 'set a variable or attribute' Script -> set variable player.strength = [expression] 0
The Displayment of those Attributes in the Status Pane during game play (via the built-in 'statusattributes' String Dictionary Attribute):
add new script -> variables -> 'set a variable or attribute' Script -> set variable player.statusattributes = [expression] NewStringDictionary () <----- these are parenthesis, it's not a zero, nor the letter 'O'.
(I don't have quest open at the moment, so this will be in code, but hopefully you can figure out how to do it via the GUI~Editor's Scripts):
dictionary add (player.statusattributes, "strength", "Strength: " + player.strength)
outputs~displayment:
Strength: 0
-----------------
and: in code, of the sample game at the top of the post:
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="xxx">
<gameid>xxx</gameid>
<version>1.0</version>
<firstpublished>2015</firstpublished>
<author>HegemonKhan</author>
<attr name="strength" type="int">100</attr>
<attr name="current_life" type="int">999</attr>
<attr name="maximum_life" type="int">999</attr>
<attr name="life" type="string">999/999</attr>
<attr name="changedcurrent_life" type="script">
game.life = game.current_life + "/" + game.maximum_life
</attr>
<attr name="changedmaximum_life" type="script">
game.life = game.current_life + "/" + game.maximum_life
</attr>
<statusattributes type="simplestringdictionary">strength = Game Strength: !; life = Game Life: !</statusattributes>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<attr name="strength" type="int">100</attr>
<attr name="current_life" type="int">999</attr>
<attr name="maximum_life" type="int">999</attr>
<attr name="life" type="string">999/999</attr>
<attr name="changedcurrent_life" type="script">
player.life = player.current_life + "/" + player.maximum_life
</attr>
<attr name="changedmaximum_life" type="script">
player.life = player.current_life + "/" + player.maximum_life
</attr>
<statusattributes type="simplestringdictionary">strength = Player Strength: !; life = Player Life: !</statusattributes>
</object>
<object name="increase_game_strength">
<attr name="increase" type="script">
game.strength = game.strength + 10
</attr>
<displayverbs type="simplestringlist">look;take;increase</diplayverbs>
<inventoryverbs type="simplestringlist">look;drop;increase</inventoryverbs>
</object>
<object name="decrease_game_strength">
<attr name="decrease" type="script">
game.strength = game.strength - 10
</attr>
<displayverbs type="simplestringlist">look;take;decrease</diplayverbs>
<inventoryverbs type="simplestringlist">look;drop;decrease</inventoryverbs>
</object>
<object name="increase_player_strength">
<attr name="increase" type="script">
player.strength = player.strength + 10
</attr>
<displayverbs type="simplestringlist">look;take;increase</diplayverbs>
<inventoryverbs type="simplestringlist">look;drop;increase</inventoryverbs>
</object>
<object name="decrease_player_strength">
<attr name="decrease" type="script">
player.strength = player.strength - 10
</attr>
<displayverbs type="simplestringlist">look;take;decrease</diplayverbs>
<inventoryverbs type="simplestringlist">look;drop;decrease</inventoryverbs>
</object>
<object name="increase_game_current_life">
<attr name="increase" type="script">
game.current_life = game.current_life + 100
</attr>
<displayverbs type="simplestringlist">look;take;increase</diplayverbs>
<inventoryverbs type="simplestringlist">look;drop;increase</inventoryverbs>
</object>
<object name="increase_game_maximum_life">
<attr name="increase" type="script">
game.maximum_life = game.maximum_life + 100
</attr>
<displayverbs type="simplestringlist">look;take;increase</diplayverbs>
<inventoryverbs type="simplestringlist">look;drop;increase</inventoryverbs>
</object>
<object name="decrease_game_current_life">
<attr name="increase" type="script">
game.current_life = game.current_life - 100
</attr>
<displayverbs type="simplestringlist">look;take;decrease</diplayverbs>
<inventoryverbs type="simplestringlist">look;drop;decrease</inventoryverbs>
</object>
<object name="decrease_game_maximum_life">
<attr name="increase" type="script">
game.maximum_life = game.maximum_life - 100
</attr>
<displayverbs type="simplestringlist">look;take;decrease</diplayverbs>
<inventoryverbs type="simplestringlist">look;drop;decrease</inventoryverbs>
</object>
<object name="increase_player_current_life">
<attr name="increase" type="script">
player.current_life = player.current_life + 100
</attr>
<displayverbs type="simplestringlist">look;take;increase</diplayverbs>
<inventoryverbs type="simplestringlist">look;drop;increase</inventoryverbs>
</object>
<object name="increase_player_maximum_life">
<attr name="increase" type="script">
player.maximum_life = player.maximum_life + 100
</attr>
<displayverbs type="simplestringlist">look;take;increase</diplayverbs>
<inventoryverbs type="simplestringlist">look;drop;increase</inventoryverbs>
</object>
<object name="decrease_player_current_life">
<attr name="increase" type="script">
player.current_life = player.current_life - 100
</attr>
<displayverbs type="simplestringlist">look;take;decrease</diplayverbs>
<inventoryverbs type="simplestringlist">look;drop;decrease</inventoryverbs>
</object>
<object name="decrease_player_maximum_life">
<attr name="increase" type="script">
player.maximum_life = player.maximum_life - 100
</attr>
<displayverbs type="simplestringlist">look;take;decrease</diplayverbs>
<inventoryverbs type="simplestringlist">look;drop;decrease</inventoryverbs>
</object>
</object>
<verb>
<property>increase</property>
<pattern>increase</property>
<defaultexpression>You can't increase that!</defaultexpression>
</verb>
<verb>
<property>decrease</property>
<pattern>decrease</property>
<defaultexpression>You can't decrease that!</defaultexpression>
</verb>
</asl>
this code may be wrong, as I'm not that familiar with all the code needed for Verbs and etc, compare it to the code from doing it via the GUI~Editor, to see where I've messed up here (assuming my GUI~Editor guide... works... lol)
-------------
since you know JS and Ruby, you're probably able to understand an explanation of the String Dictionary Attributes:
Lists and Dictionaries are similiar to Arrays (including being able to iterate through them, and select specific items via their index number):
Lists: item1, item2, item3
Dictionaries: item1A=item1B, item2A=item2B, item3A=item3B
conceptual of String Dictionary Attributes:
string1A (key) = string1B (value)
// string1A (key) -> string 1B (value)
input1A (key) = output1B (value)
// input1A (key) -> output1B (value)
for example:
<game name="xxx">
<attr name="birth_month_integer_stringlist" type="stringlist">
<value>1</value>
<value>2</value>
<value>3</value>
<value>4</value>
<value>5</value>
<value>6</value>
<value>7</value>
<value>8</value>
<value>9</value>
<value>10</value>
<value>11</value>
<value>12</value>
</attr>
<attr name="birth_month_stringdictionary" type="stringdictionary">
<item>
<key>1</key>
<value>january</value>
</item>
<item>
<key>2</key>
<value>february</value>
</item>
<item>
<key>3</key>
<value>march</value>
</item>
<item>
<key>4</key>
<value>april</value>
</item>
<item>
<key>5</key>
<value>may</value>
</item>
<item>
<key>6</key>
<value>june</value>
</item>
<item>
<key>7</key>
<value>july</value>
</item>
<item>
<key>8</key>
<value>august</value>
</item>
<item>
<key>9</key>
<value>september</value>
</item>
<item>
<key>10</key>
<value>october</value>
</item>
<item>
<key>11</key>
<value>november</value>
</item>
<item>
<key>12</key>
<value>december</value>
</item>
</attr>
<start type="script">
show menu ("Birth Month?", game.birth_month_integer_stringlist, false) {
player.birth_month_integer = ToInt (result)
player.birth_month_string = StringDictionaryItem (game.birth_month_stringdictionary, result)
msg ("Birth Month Integer: " + player.birth_month_integer)
msg ("Birth Month String: " + player.birth_month_string)
</start>
</game>
let's say I selected '9' from the popup menu window choices, which would set these Attributes as:
player.birth_month_integer = 9
player.birth_month_string = "september"
and output:
Birth Month Integer: 9
Birth Month String: september
--
conceptual only:
// game.birth_month_stringdictionary: 1=jan;2=feb;3=mar;etc etc etc
player.birth_month_string = StringDictionaryItem (game.birth_month_stringdictionary, result)
player.birth_month_string = output: StringDictionaryItem (game.birth_month_stringdictionary, result:input)
result = "9"
player.birth_month_string = output: StringDictionaryItem (game.birth_month_stringdictionary, result)
player.birth_month_string = output: StringDictionaryItem (game.birth_month_stringdictionary, 9)
player.birth_month_string = (9="september": so if input="9", then return~output: "september")
player.birth_month_string = "september"
result = "3"
player.birth_month_string = output: StringDictionaryItem (game.birth_month_stringdictionary, result)
player.birth_month_string = output: StringDictionaryItem (game.birth_month_stringdictionary, 3)
player.birth_month_string = (3="march": so if input="3", then return~output: "march")
player.birth_month_string = "march"
result = "12"
player.birth_month_string = output: StringDictionaryItem (game.birth_month_stringdictionary, result)
player.birth_month_string = output: StringDictionaryItem (game.birth_month_stringdictionary, 12)
player.birth_month_string = (12=december: so if input="12", then return~output: "december")
player.birth_month_string = "december"
----------------
P.S.
(1) the special 'changed' Script Attributes ....... are one way of causing the 'statusattributes' to be updated to the changed~new Attributes' values during game play, but there's two other ways as well:
(2) Turnscripts (global)
(3)
http://docs.textadventures.co.uk/quest/ ... ments.html (the 'UpdateStatusAttributes' Function)
---------------
P.S.S.
some helpful links for you:
http://docs.textadventures.co.uk/quest/http://docs.textadventures.co.uk/quest/tutorial/http://docs.textadventures.co.uk/quest/guides/viewforum.php?f=18 (more guides: Libraries and Code Samples)
http://docs.textadventures.co.uk/quest/ ... notes.htmlhttp://docs.textadventures.co.uk/quest/ ... ments.htmlhttp://docs.textadventures.co.uk/quest/ ... lists.htmlhttp://docs.textadventures.co.uk/quest/ ... aries.htmlhttp://docs.textadventures.co.uk/quest/scripts/for.htmlhttp://docs.textadventures.co.uk/quest/ ... reach.htmlhttp://docs.textadventures.co.uk/quest/functions/ (categorical order)
http://docs.textadventures.co.uk/quest/ ... tions.html (alphabetical order)
http://docs.textadventures.co.uk/quest/scripts/http://docs.textadventures.co.uk/quest/elements/ (Elements are the OBJECTS of quest's Object-Oriented Code Structure; Elements are the 'physical things' in quest. Elements: Objects, Exits, Functions, Commands, Verbs, Turnscripts, Timers, Object Types: Groups ~ Classes, and etc)
http://docs.textadventures.co.uk/quest/types/ (Attributes)