Note:
I'm not that knowledgeable with Gamebook, so I'm not sure if everything I post here applies for it.
To set up Attributes at the beginning of your Gamebook:
'Pages' -> Page1 -> 'Page' Tab -> Page Type: [script] or [text+script] -> (see below)
http://docs.textadventures.co.uk/quest/guides/character_creation.html (for the 'add new scripts' Scripting)
to (create~set, re-set, change-alter, etc) an Attribute:
add new script -> variables -> 'set a variable or attribute' Script -> (see below)
set variable Object-name.Attribute-name = [expression] Value-or-Expression
replace my 'Object-name' with either: 'game' or 'player', Gamebook version is limited to only these two Objects for your use.
replace my 'Attribute-name' with whatever you want to call~name your Attribute
replace my 'Value-or-Expression' with whatever you want, though it is based upon what Attribute Type (String, Integer~int, Boolean, etc) you want it to be and to do. Lastly, NO 'white-spaces' (spaces: the space bar keyboard key) should be used and there's some other symbols you can't use too. See below for examples of Values~Expressions
lastly, do note that there is (MUST BE) a 'dot' that is between the 'Object-name' and 'Attribute-name' (and again: NO spaces between the 'dot' and 'Object~Attribute-names'; aka, no spaces next to the 'dot' ), which connects~attaches the Attribute to the Object (if you were using the Text Adventure version and using its GUI~Editor, this coding, is the equivalent of 'adding an Attribute to a specific Object' )
examples:
Integer (int) Attributes:
set variable player.strength = [expression] 100
set variable game.strength = [expression] 100
set variable game.state = [expression] 0
set variable player.state = [expression] 0
set variable player.strength = [expression] player.strength + 5 // this will increase your 'strength' by 5
set variable player.damage = [expression] player.strength + player.endurance
set variable player.damage = [expression] player.damage + player.damage * (player.strength / 100) - (game.orc_defense + game.orc_defense * (game.orc_endurance / 100))
Double Attributes:
// these are just using decimal numbers, but I've never worked with them yet, laughs
String Attributes:
set variable player.alias = [expression] "HK"
set variable player.sex = [expression] "male"
set variable game.sex = [expression] "male"
set variable player.sex = [expression] "female"
set variable game.sex = [expression] "female"
set variable player.race = [expression] "human"
set variable player.race = [expression] "elf"
set variable game.race = [expression] "human"
set variable game.race = [expression] "elf"
set variable player.state = [expression] "0"
set variable game.state = [expression] "0"
set variable player.strength = [expression] "strong"
set variable game.strength = [expression] "strong"
set variable player.strength = [expression] "weak"
set variable game.strength = [expression] "weak"
set variable player.condition = [expression] "normal"
set variable player.condition = [expression] "poisoned"
set variable player.condition = [expression] "paralyzed"
set variable game.condition = [expression] "normal"
set variable game.static_greeting = [expression] "Welcome to this game, HK."
set variable game.dynamic_greeting = [expression] "Welcome to this game, " + player.alias + "."
set variable game.dynamic_greeting = [expression] "Welcome to this game, {player.alias}."
Boolean Attributes:
set variable game.dragon_dead = [expression] false
set variable game.dragon_dead = [expression] true
set variable player.dead = [expression] false
set variable player.dead = [expression] true
set variable player.flying = [expression] false
set variable player.flying = [expression] true
set variable player.poisoned = [expression] false
set variable player.poisoned = [expression] true
set variable game.poisoned = [expression] false
set variable game.poisoned = [expression] true
String List Attributes:
set variable player.race = [expression] split ("human; dwarf; elf", ";")
set variable game.greetings = [expression] split ("Hi, what is your name?; Hello, what is your name?; Howdy, what is your name?; Hola, como say llama?", ";")
now if you want the person playing the game to decide~select~choose their Attributes' Values ...
there's the 'get input' Script and the 'show menu' Script
(see the 'character creation' link above, but if you still need help, let me know)