ZLib variable editor (relay_zlib.ash)

heeheehee

Developer
Staff member
Okay, this script isn't endorsed by Zarqon or anything, but I thought I might as well share it anyway. (Plus, I think Zarqon mentioned somewhere that he should probably get around to making one, so this'll save him some time!)

Requires ZLib (duh) and HTMLform.

[Directions: download into your \relay folder, then view it via the relay script dropdown in the top frame in the relay browser. Then modify variables!]

5/5/2010: Added an option for deleting variables. Also labeled the columns, so hopefully people won't be be all like "Hey, a checkbox! I wonder what it does! *deletes random ZLib variable* ".

10/3/2010: Some months ago, a couple of spinoff scripts appeared that provide a more user-friendly interface:
Bale's version, and
That FN Ninja's version. Links provided.

3/3/2011: Zarqon's had his WOSSMAN out for some time, but apparently he's mostly given up on it. Semi-major update posted. Hijacks vars_documentation.txt, which was originally designed for use with WOSSMAN. Also provides a mostly-useless feature to add a ZLib variable.
 

Attachments

Last edited:
Thanks for the script! It is handy. I mostly change or view any zlib variables from the cli, but it is always delightful to have options!

Here's the alias I've been using to go with ashref & prefref if anyone is interested:

varref => ashq import<zlib.ash> foreach var, val in vars if(var.to_lower_case().contains_text($string[%%])) vprint("zlib " + var + " = " + val, 1)

I know you can type zlib vars and it will display your variables, but my list of variables is getting relatively lengthy! Filters are good.

Anways, I think line 7 in your script:

Code:
if (map[key] == $monster[none]) return "Invalid list of monsters ("+map[key]+" is not a monster)";
should be:

Code:
if (map[key].to_monster() == $monster[none]) return "Invalid list of monsters ("+map[key]+" is not a monster)";
Thanks again.
 
Oh, yeah, probably. My bad, I have no idea how that slipped through. Updated in first post.

Although I do wonder how FTF deals with monsters with one or more commas in their name (so far, the only puttiable monster that meets this condition is $monster[Loose Coalition of Yetis, Snowmen, and Goats]).
 
As much as I've found this script useful, my zlib variable list is too huge for me to find the right variable easily. So I made this collapsing version, completely without Heeheehee's awareness. (I suspect he will be more delighted than annoyed by my presumption.) Some of Heeheehee's work is still quite apparent in the code. Much of the CSS is copied from elsewhere on the interweb.

Zlib_Editor.png

It could still use a bit of formatting help. However, this is good enough for now.
 
Last edited:
Shiny! Part of the problem is that some ZLib scripts don't conform to particular standards for their preferences, but still, useful!
 
Part of the problem is that some ZLib scripts don't conform to particular standards for their preferences

Ironically, one script that ignores the standards is zlib, itself. :D

Well, non-standard preferences won't get folded, but this still helps things. I'm happy that you like it. Feel free to continue improving upon it if you like.
 
Probably my messed up configuration coming through, but your stuff reads zlib fine, but whenever I save it causes my browser to become temporarily unresponsive and it says the changes were saved when they really weren't.
 
PHP:
   if (write_button("save", "Save")) {
      if (map_to_file(vars,"vars_"+my_name()+".txt")) {
	map_to_file(vardoc, "vars_documentation.txt");
	writeln("<br /><br />ZLib variables set");
        ...
   }
That should be the only time it says that the changes are saved, as far as I can tell. Technically I do force it to do this on occasion, but that's only if you add a new variable or delete one.

Doubt it's browser-specific; would you mind uploading your vars file so I can see if the file's actually the case? (I'll probably rename it so it'll be loaded for one of my chars, then see if I can reproduce and track down bugs.)
 
Hmm. Chrome is usually good about these things. Seems to work just fine, as far as I can tell.

Is there any chance you have some extra copy of your vars file floating around in one of the other folders (data, scripts, ... )?
 
Well that doesn't really mean anything because they wouldn't be in the screenshot if I'd never used the script. I'm not big on automated quest solving so that wouldn't be unlikely.
 
I just been schooled by my brick guardian not to do what he does. Perhaps I should call him St "The Bus Driver" Doodle.
 
he^3's version, in the original post uses to_boolean( familiar ) and this no longer works in r10708. While I understand that there are alternatives that most people prefer, there was a simplicity to relay_zlib.ash that I preferred.

No expectation of a fix. Just a note for future readers.
 
Back
Top