customising the status pane

privateer
Hi,

May I ask for some help please?

I have discovered how to change the label for the compass, inventory, and places+objects panes, but the status pane doesn't seem to appear in Advanced/Templates as the other panes did. I would be very grateful if anyone could tell me how I can change the label for the status pane.

Also, I have found how to insert status attributes, but I would like to know how I can have the attributes labelled (for example if a make an attribute called "Money" and assign 500, the number appears but not the rubric ("Money")

And one final thing about status attributes: Having found I can add a status attribute via Game/Attributes/Status Attributes, I have embarrassingly forgotten the other way I must have found of doing it - as I have 2 status attributes that I added which are not shown on the Game/Attributes/Status Attributes box (I had been playing around with showing library elements, so I might have stumbled across a way of doing it there?)

Thanks very much for your advice...and Happy New Year :)

HegemonKhan
the built-in "statusattributes" is a special String Dictionary Attribute, which will display itself in the pane during game play. So, that means that this only works by having the "statusattributes" attached_to ~ within_the ~ added_to the "game" Game Object and~or the Player Objects (such as the default "player" Player Object).

String Dictionary:

String (Attribute's "Name" Attribute) = String (Value ~ Message)

---------------

"Form" One Displayment:

Object_1: game
Attribute_1 (Type: int ~ integer): hit_points=0
Attribute_2 (Type: stringdictionary): statusattributes: hit_points =

Displays~Outputs in the pane during game play:

hit_points: 0

------

"Form" Two Displayment:

Object_1: game
Attribute_1 (Type: int ~ integer): hit_points=0
Attribute_2 (Type: stringdictionary): statusattributes: hit_points = !

Displays~Outputs in the pane during game play:

0

-----

"Form" Three Displayment:

(this achieves what you're asking for in your post)

Object_1: game
Attribute_1 (Type: int ~ integer): hit_points=0
Attribute_2 (Type: stringdictionary): statusattributes: hit_points = HP: !

Displays~Outputs in the pane during game play:

HP: 0

... so, for you:

an individual "Money" amount (Attribute) for a specific Player Object:

Object_1: player (or whatever Player Object)
Attribute_1 (Type: int ~ integer): Money=500
Attribute_2 (Type: stringdictionary): statusattributes: Money = Money: !

Displays~Outputs in the pane during game play:

Money: 500

Object_1: Privateer (Player Object)
Attribute_1 (Type: int ~ integer): Money=1000
Attribute_2 (Type: stringdictionary): statusattributes: Money = Money: !

Displays~Outputs in the pane during game play:

Money: 1000

Object_1: HK (Player Object)
Attribute_1 (Type: int ~ integer): Money=17000000000000
Attribute_2 (Type: stringdictionary): statusattributes: Money = Money: !

Displays~Outputs in the pane during game play:

Money: 17000000000000

// (the U.S. debt of 17 trillion is a "%$^#$" LOT of money; I'm RICH, hehe!!!)

... or,

a "global" (shared) "Money" amount (Attribute) for anyone's or anything's use:

Object_1: game
Attribute_1 (Type: int ~ integer): Money=500
Attribute_2 (Type: stringdictionary): statusattributes: Money = Money: !

Displays~Outputs in the pane during game play:

Money: 500

------------

Examples of the Viable Objects:

Object_1: game
GUI~Editor Path: game (Game Object) -> Attributes (Tab) -> Attribute and Status Attribute -> Add ->
Attribute_1 (Type: int ~ integer): turns=0
Attribute_2 (Type: stringdictionary): statusattributes: turns = Turns: !

Object_2: player
GUI~Editor Path: player (the default Player Object) -> Attributes (Tab) -> Attribute and Status Attribute -> Add ->
Attribute_1 (Type: int ~ integer): hit_points=0
Attribute_2 (Type: stringdictionary): statusattributes: hit_points = HP: !

Displays~Outputs in the pane during game play:

Turns: 0
HP: 0


----------------

Examples of the Viable Objects:

Object_1: game
Attribute_1 (Type: int ~ integer): turns=0
Attribute_2 (Type: stringdictionary): statusattributes: turns = Turns: !

Object_2: HK (Player Object)
GUI~Editor Path: HK (a custom-self-made~added Player Object ~ make sure you set it's Object Type to: "player object") -> Attributes (Tab) -> Attribute and Status Attribute -> Add ->
Attribute_1 (Type: int ~ integer): hit_points=9999
Attribute_2 (Type: stringdictionary): statusattributes: hit_points = HP: !

Displays~Outputs in the pane during game play:

Turns: 0
HP: 9999


--------------------

"Form" Four (Advanced) Displayment:

and if you want even a more advanced display (such as two attribute values within one attribute and also its statusattribute display, and also how to update the attributes and their statusattribute display too):

Object_1: game
Attribute_1 (Type: int ~ integer): turns=0
Attribute_2 (Type: stringdictionary): statusattributes: turns = Turns: !

Object_2: HK (Player Object)
Attribute_1 (Type: string): hit_points="0/0"
Attribute_2 (Type: int): current_hit_points = 9999
Attribute_3 (Type: int): maximum_hit_points = 9999
Attribute_4 (Type: script ~ special "changed" script): changedcurrent_hit_points: HK.hit_points = "HP: " + HK.current_hit_points + " / " + HK.maximum_hit_points
Attribute_5 (Type: script ~ special "changed" script): changedmaximum_hit_points: HK.hit_points = "HP: " + HK.current_hit_points + " / " + HK.maximum_hit_points
Attribute_6 (Type: stringdictionary): statusattributes: hit_points = !

Displays~Outputs in the pane during game play:

Turns: 0
HP: 9999 / 9999


-----------------------------

here's some code examples of various things that can be done and how they're done (if they'll work in your quest version, as these are older quest versions, you can start them up in quest's GUI~Editor, to see what they look like in that mode, if you can't work with code yet):

<asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Testing Game Stuff">
<gameid>d83ba5bb-2e3c-4f31-80c9-3e88a2dc082c</gameid>
<version>1.0</version>
<firstpublished>2013</firstpublished>
<game_is_paused type="boolean">false</game_is_paused>
<game_turns type="int">0</game_turns>
<point_score type="int">0</point_score>
<statusattributes type="simplestringdictionary">game_turns =;game_is_paused =;point_score =</statusattributes>
<start type="script">
msg ("NOTE: Type in something in the command box and hit enter on each turn, to see the attributes being changed.")
msg ("")
</start>
</game>
<function name="show_attributes_function">
msg ("")
msg ("Player's Attributes:")
msg ("")
msg ("Flying: " + player.flying)
msg ("Player Turns: " + player.player_turns)
msg ("")
msg ("Game's Attributes:")
msg ("")
msg ("Game Is Paused: " + game.game_is_paused)
msg ("Game Turns: " + game.game_turns)
msg ("Point Score: " + game.point_score)
msg ("")
msg ("Global Data Object's Attributes:")
msg ("")
msg ("Dragon Slayer Sword Acquired: " + global_data_object.dragon_slayer_sword_acquired)
msg ("Dragon Killed: " + global_data_object.dragon_killed)
msg ("Princess Rescued: " + global_data_object.princess_rescued)
msg ("")
msg ("Turnscript's Scripting Steps's Changed Attributes' Results:")
msg ("")
</function>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<flying type="boolean">false</flying>
<player_turns type="int">0</player_turns>
<statusattributes type="simplestringdictionary">player_turns =;flying =</statusattributes>
</object>
</object>
<object name="global_data_object">
<inherit name="editor_object" />
<dragon_killed type="boolean">false</dragon_killed>
<princess_rescued type="boolean">false</princess_rescued>
<dragon_slayer_sword_acquired type="boolean">false</dragon_slayer_sword_acquired>
</object>
<turnscript name="global_events_turnscript">
<enabled />
<script>
show_attributes_function
if (player.flying=false) {
player.flying=true
} else if (player.flying=true) {
player.flying=false
}
if (game.game_is_paused=false) {
game.game_is_paused=true
} else if (game.game_is_paused=true) {
game.game_is_paused=false
}
if (global_data_object.dragon_slayer_sword_acquired=false) {
global_data_object.dragon_slayer_sword_acquired=true
game.point_score = game.point_score + 50
msg ("dragon_slayer_sword_acquired: " + global_data_object.dragon_slayer_sword_acquired)
msg ("Point Score: " + game.point_score)
if (global_data_object.princess_rescued=true) {
global_data_object.princess_rescued=false
msg ("Princess Rescued: " + global_data_object.princess_rescued)
}
}
if (global_data_object.dragon_slayer_sword_acquired=true) {
global_data_object.dragon_killed=true
game.point_score = game.point_score + 250
global_data_object.dragon_slayer_sword_acquired=false
msg ("Dragon Killed: " + global_data_object.dragon_killed)
msg ("Point Score: " + game.point_score)
msg ("dragon_slayer_sword_acquired: " + global_data_object.dragon_slayer_sword_acquired)
}
if (global_data_object.dragon_killed=true) {
global_data_object.princess_rescued=true
game.point_score = game.point_score + 400
global_data_object.dragon_killed=false
msg ("Princess Rescued: " + global_data_object.princess_rescued)
msg ("Point Score: " + game.point_score)
msg ("Dragon Killed: " + global_data_object.dragon_killed)
}
game.game_turns = game.game_turns + 1
player.player_turns = player.player_turns + 5
</script>
</turnscript>
</asl>


<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>
<turns type="int">0</turns>
<statusattributes type="simplestringdictionary">turns =</statusattributes>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<curhp type="int">250</curhp>
<maxhp type="int">500</maxhp>
<current_hit_points type="int">999</current_hit_points>
<maximum_hit_points type="int">999</maximum_hit_points>
<maxhp type="int">500</maxhp>
<hp type="string">0/0</hp>
<strength type="int">100</strength>
<endurance type="int">100</endurance>
<agility type="int">100</agility>
<hit_points type="string">0/0</hit_points>
<statusattributes type="simplestringdictionary">hp = ;hit_points =!;strength =;endurance = !;agility = Your agility is !</statusattributes>
</object>
</object>
<turnscript name="turns_turnscript">
<enabled />
<script>
player.hp = player.curhp + "/" + player.maxhp
player.hit_points = "HP: " + player.current_hit_points + "/" + player.maximum_hit_points
game.turns = game.turns + 1
</script>
</turnscript>
</asl>


<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 = 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 + " 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 = 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>


---------------------

a more advanced understanding of String Dictionaries:

conceptually: it's a "Conversion", ie: String (Attribute's "Name" Attribute) = (BECOMES NOW ~ IS REPLACED BY) --> String (Value ~ Message)

for example, if you want to use "opposed_elementals", for doing double or half damage with elemental spells, ie using a fire spell on a water monster (double damage to the monster) vs using a water spell on a water monster (half damage to the monster):

<elemental_string_dictionary type="simplestringdictionary">fire=water;water=fire</elemental_string_dictionary>

if (input "fire"), then output "water"
if (input "water"), then output "fire"

+ rest of coding needed

(see Pixie's Spell Library)

or another example:

<month_string_dictionary type="simplestringdictionary">january=1;1=january;february=2;2=february;march=3;3=march;etc etc etc</month_string_dictionary>

msg ("Type in the number of the month you were born")
get input {
-> // user types in "3"
-> player.month_of_birth_string = StringDictionaryItem (global_data_object.month_string_dictionary, result)
-> msg ("You were born in " + player.month_of_birth_string +".")
}

outputs: You were born in march.

or

show menu ("What month were you born?", global_data_object.month_string_list, false) {
-> user selects "march"
-> player.month_of_birth_integer = ToInt (StringDictionaryItem (global_data_object.month_string_dictionary, result))
-> msg (player.month_of_birth_integer)
}

outputs: 3


--------------------------

P.S.

you can also use the "Turnscripts", instead of the special "changed" scripting, to update the "statusattributes" to~of when your attributes change, ask and I can help you with this in detail.

As for changing the label of the pane... I'm sure I saw some threads~posts on this... try searching this forum board, the wiki pages, and~or the "libraries and code samples" board.

lastly, if you need help with doing any of this in the GUI~Editor, and~or any questions or confusions on anything that I said in this post, please let me know, and I'll help you on~with it.

-----------------------

P.S.S.

if the attribute isn't showing up in the statusattribute pane, then:

1. MAKE SURE you actually CREATED (ADDED) THE ATTRIBUTE (to the OBJECT) !!!
2. You MUST have both the Attribute and the StatusAttribute within~added_to~attached_to the SAME Object (which can ONLY BE: the Game Object or the Player Objects) !!!

Existence ("CREATION" ~ ADDING) of the Attribute:

"blah" (Object) -> Attributes (Tab) -> Attribute -> Add ->

Attribute's "Name" Attribute: (blah)
Attribute's "Type" Attribute: (string, int ~ integer, double, script, etc)
Attribute's "Value_or_Expression": (blah)

***********
the "statusattributes" can't "act upon or use for its actions" (action~scripting) the Attribute, if the attribute doesn't exist !!!, so make sure you CREATE (ADD) the Attribute too, and not just the Status Attributes !!!
***********

"Act Upon"~Applying~Using (ACTION) of the Attributes within~via the built-in and special "Status Attributes" String Dictionary function by added the attributes to it (the built-in and special "statusattributes" String Dictionary):

"blah" (Object) -> Attributes (Tab) -> Status Attribute -> Add ->
Attribute's "Name" Attribute: (blah)
Attribute's "Value_or_Expression": (blah)

jaynabonne
For the answer to your first question, try something like:

      request (SetInterfaceString, "StatusLabel=New Status Label")

privateer
Thank you both very much for your help. I am trying to get away with using the GUI, but it looks like I shall have to leave the safety of the shallow end soon :)

The Pixie
privateer wrote:I have discovered how to change the label for the compass, inventory, and places+objects panes, but the status pane doesn't seem to appear in Advanced/Templates as the other panes did. I would be very grateful if anyone could tell me how I can change the label for the status pane.

It is there for me, called "StatusLabel". I am using version 5.5 beta, but I would be very surprised if it was not there right from Quest 5.0.

Do you know how to filter names in the left panel? The text box called "search" under the toolbar. I just typed in "status", and clicked on the magnifying glass.

privateer
The Pixie wrote:

"privateer"

I have discovered how to change the label for the compass, inventory, and places+objects panes, but the status pane doesn't seem to appear in Advanced/Templates as the other panes did. I would be very grateful if anyone could tell me how I can change the label for the status pane.


It is there for me, called "StatusLabel". I am using version 5.5 beta, but I would be very surprised if it was not there right from Quest 5.0.

Do you know how to filter names in the left panel? The text box called "search" under the toolbar. I just typed in "status", and clicked on the magnifying glass.



I'm using version 5.4.1. I was surprised not to find StatusLabel by searching as you suggest as all the other Labels were easily findable (and changable) in that way.

MrFRZ
Hi, I know this post was made 2 years ago (lol) but I've been searching through the forum for a way to customize the side panel panes, and haven't really found much on what I'm specifically looking for. You said that you figured out how to change the labels of the compass etc. I am wondering how to do this and I'm wondering if it's possible to add/remove panels.

For example I'm trying to create a detailed zombie survival game.What I want is to have a panel that lists the names of the survivors in your group. If I could change the name of the "places and objects" panel I could simply create an object for each person and move them to the room you're in so they'd show up. This however is a workaround and Id rather create a new panel labeled "Crew" that will just show text so I can list names. I would then like to know how to remove the "compass" and the "places and objects" panels as these aren't needed in my game.

Also, I'd like to be able to change the color of the sidebar as well. I have a theme going of a black background and a dark picture of a horde in the background, which looks cool, but the theme is broken by the bright white sidebar that I cant really customize. Any help is appreciated!

The Pixie
This post describes some ways to change the user interface:
viewtopic.php?f=18&t=5111

For adding new panes, see here:
viewtopic.php?f=18&t=3789

Let us know how you get on.

MrFRZ
Awesome! Thank you so much, I was able to change the names of the panels with your tutorial and I went to a linked thread in your tutorial to get my black theme going for the side panel. The only thing I couldn't do was remove the compass pane, the second link told me how to add panes but not how to remove ones, if that's even possible. I dropped a comment on that thread to see if there's a way to easily remove it, if there isn't I can just leave it be. Thanks for your help though!

The Pixie
Put this in your start script (game object, Script tab):
JS.eval ("$('#compassLabel').css('display', 'none')")
JS.eval ("$('#compassAccordion').css('display', 'none')")

MrFRZ
Sweet! Working perfect, thanks!

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums