charpane.php override - Show turncount and various modifiers

lostcalpolydude

Developer
Staff member
This script shows your current turncount in the charpane. If you click on that line, several modifiers show up below that (your +items, +meat, and a few others). Any modifier that's 0 is not displayed. The script checks for whether or not you have a compact charpane.

I think that the script should eventually include more modifiers. However, I know that different people care about different stuff, so I feel that it should be configurable. What would be the best way to do that? I could have 30 or so boolean variables probably, but I'm wondering if there's a better way before I dive into it. (Actually, since I've defined everything inside of functions rather than top-level following that stickied thread's advice, I might have to solve some scope issues with that approach. Or maybe I shouldn't be worrying about that and just start defining stuff as top-level variables.)
 

Attachments

  • charpane.ash
    5.3 KB · Views: 87
Last edited:

icon315

Member
Yeah i had that problem with my scripts, i can't seem to find the best way to do it

EDIT: Your script seems to do the same thing as mine, all the info disappears once i open up chat.....i can't seem to figure out why though
 
Last edited:

StDoodle

Minion
If you want to save lots of user settings, I highly suggest calling a map load globally, then loading it, saving to it, and accessing it's variables wherever. But maybe that's just me.

Also, you could just pass appropriate values to said functions from such a map. Depends on how many functions need access to how much (I don't like passing entire maps back & forth to dozens of functions, but YMMV).
 

lostcalpolydude

Developer
Staff member
The script basically has one function calling X functions (one per value displayed), which all call a single function that takes care of common formatting. All X functions would need a single value from the map. Using a global map eliminates dealing with passing the map around while probably making some of my previous rearranging pointless (but possibly easier to read and maintain, I don't really know).

EDIT: Your script seems to do the same thing as mine, all the info disappears once i open up chat.....i can't seem to figure out why though

I don't know what you mean. I even opened up mafia chat just to see if it was something weird with that, but nothing disappeared.
 

icon315

Member
Every time i open up chat in the relay browser it seems to make everything in the charpane.ash script disappear
 

lostcalpolydude

Developer
Staff member
I updated the script in the first post. The most significant change is the ability to have it expanded by default (which is turned on since I just left my settings in there). The functions also look a lot less horrible now.
 
Top