HegemonKhan wrote:the GUI~Editor has a script (add a~new script) to increase counter (or something like this), but I think it's stuck at "By 1", or maybe it's not, and you can select what value, not sure as I don't use the GUI~Editor much, and am too lazy to check it right now.
--------------------------
if you can work with code, then it's easy:
Addition:
Object.Attribute = Object.Attribute + Value
example 1: HK.strength = HK.strength + 5
example 2: HK.strength = HK.strength + 100
Subtraction:
Object.Attribute = Object.Attribute - Value
example 1: HK.strength = HK.strength - 30
example 2: HK.strength = HK.strength - 2
Multiplication:
Object.Attribute = Object.Attribute * Value
example 1: HK.strength = HK.strength * 7
example 2: HK.strength = HK.strength * 100
Division:
Object.Attribute = Object.Attribute / Value
example 1: HK.strength = HK.strength / 9
example 2: HK.strength = HK.strength / 4
--------------------------------
conceptually:
Object.Attribute (new amount) <--- = <--- Object.Attribute (old amount) + Value
example:
old amount: HK.strength = 100
Value: 50
Operator: + (addition)
new amount: HK.strength = HK.strength + Value
new amount: HK.strength = 100 + 50
new amount: HK.strength = 150
--------------------------
Virtual Bartering~Exchanging:
(manipulating~changing Objects' Attributes, like a "cash~currency" Attribute, instead of using~moving actual Objects around, like "gold_coin" Objects, is A VERY GOOD THING!)
Buying:
(for example: "HK" buying a wooden_sword costing 100 from a "shop_owner")
HK.cash = HK.cash - 100
shop_owner.cash = shop_owner.cash + 100
from: wooden_sword.parent = shop_owner // do NOT code in this line! I show it here only for concept!
to: wooden_sword.parent = HK // DO code in this line!
Selling:
(for example: "HK" selling a wooden_sword for 100 to a "shop_owner")
HK.cash = HK.cash + 100
shop_owner.cash = shop_owner.cash - 100
from: wooden_sword.parent = HK // do NOT code in this line! I show it here only for concept!
to: wooden_sword.parent = shop_owner // DO code in this line!
<object name="player">
<inherit name="editor_player" />
<inherit name="editor_object" />
// blah coding
<cash type="int">500</cash> // you can change "cash" and "500" to whatever you want (again, the name has to match up)
// blah coding
</object><asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Testing Game Stuff">
<gameid>cd102f9d-370a-4bda-b6ea-ca42288f619c</gameid>
<version>1.0</version>
<start type="script">
msg ("What is your name?")
get input {
msg (" - " + result)
player.alias_x = result
show menu ("What is your gender?", split ("male;female" , ";"), false) {
player.gender_x = result
show menu ("What is your race?", split ("human;elf;dwarf" , ";"), false) {
player.race = result
show menu ("What is your class?", split ("warrior;cleric;mage;thief" , ";"), false) {
player.class = result
msg (player.alias_x + " is a " + " " + player.gender_x + " " + player.race + " " + player.class + ".")
}
}
}
}
</start>
<turns type="int">0</turns>
<statusattributes type="simplestringdictionary">turns = </statusattributes>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_player" />
<inherit name="editor_object" />
<alias_x type="string"></alias_x>
<gender_x type="string"></gender_x>
<strength type="int">0</strength>
<intelligence type="int">0</intelligence>
<agility type="int">0</agility>
<statusattributes type="simplestringdictionary">alias_x = Name: !;gender_x = Gender: !;strength = ;intelligence = ;agility = ;level = ;experience = ;cash = </statusattributes>
<level type="int">0</level>
<experience type="int">0</experience>
<cash type="int">0</cash>
</object>
<object name="potion100">
<inherit name="editor_object" />
<alias>potexp100</alias>
<take />
<displayverbs type="simplestringlist">Look at; Take; Drink</displayverbs>
<inventoryverbs type="simplestringlist">Look at; Use; Drop; Drink</inventoryverbs>
<drink type="script">
msg ("You drink the exp potion, receiving 100 experience.")
player.experience = player.experience + 100
</drink>
</object>
<object name="potion300">
<inherit name="editor_object" />
<alias>potexp300</alias>
<take />
<displayverbs type="simplestringlist">Look at; Take; Drink</displayverbs>
<inventoryverbs type="simplestringlist">Look at; Use; Drop; Drink</inventoryverbs>
<drink type="script">
msg ("You drink the exp potion, receiving 300 experience.")
player.experience = player.experience + 300
</drink>
</object>
</object>
<turnscript name="global_events_turnscript">
<enabled />
<script>
leveling_function
game.turns = game.turns + 1
</script>
</turnscript>
<function name="leveling_function"><![CDATA[
if (player.experience >= player.level * 100 + 100) {
player.experience = player.experience - (player.level * 100 + 100)
player.level = player.level + 1
switch (player.gender_x) {
case ("male") {
player.strength = player.strength + 1
}
case ("female") {
player.agility = player.agility + 1
}
}
switch (player.race) {
case ("dwarf") {
player.strength = player.strength + 2
}
case ("elf") {
player.agility = player.intelligence + 2
}
case ("human") {
player.strength = player.strength + 1
player.agility = player.agility + 1
}
}
switch (player.class) {
case ("warrior") {
player.strength = player.strength + 2
}
case ("cleric") {
player.intelligence = player.intelligence + 1
player.agility = player.agility + 1
}
case ("mage") {
player.intelligence = player.intelligence + 2
}
case ("thief") {
player.strength = player.strength + 1
player.agility = player.agility + 1
}
}
leveling_function
}
]]></function>
</asl>Custom attributes:
Note: The attributes editor is currently only available in the Windows desktop version of Quest.
Simple ModeWhen starting out with Quest, you may find it easier to run in "Simple Mode". This hides much of Quest's more advanced functionality, but still gives you access to the core features.
You can toggle Simple Mode on or off at any time:
on the Windows desktop version, you can toggle Simple Mode from the Tools menu.
on the web version, click the Settings button at the top right of the screen.