Would this be possible?

Terrabull

Member
I've long been a fan of the Color KoL projects. And I've now seen two of them sadly fall off for various limiting factors(FF add-on, Greasemonkey script). So I was wondering if it would be possible to make a mafia version of this, because on mafia scripts live long after their creators leave the game.
http://forums.kingdomofloathing.com:8080/vb/showthread.php?t=181031
I've never written an ash script before, but I've programmed in C++ style languages before including php, so I am optimistic about being able to do this myself. I'm just not sure if mafia can do what I'd like it to do with this script.
If it's possible, can anyone point me to some sort of reference for writing relay scripts or a simple relay override script to study? (I have already found this http://wiki.kolmafia.us/index.php?title=Relay_Override_Scripting but since I am starting at square one, all the resources I can find are great.)
Any help is greatly appreciated.
 

Bale

Minion
The easiest way to do this would be to simply put your color images into the /images directory. If you do that, they will be used instead of loading an image from KoL.

Note that the "cache clear" command will delete those images, so make sure they are backed up elsewhere. Just in case.
 

Terrabull

Member
Perhaps. But I was thinking broader appeal. Like using the svn to automatically push new images, or allow users to submit their own. Maybe a page along the lines of the old familiar chooser page to select between normal or custom images. I know I'm not the only one who would want this, and I think it would be fun as well as helpful to make a script so people who aren't as savvy as us can have colors too.
 

Bale

Minion
You'll want to use a master relay override since it will override every page.

I've got a collection of pretty simple relay scripts HERE. Woods, Manor and Campground will be particularly helpful studies for you.
 
Last edited:

Theraze

Active member
Couldn't there be an svn version of the colour images simply available? Since the images folder is one which svn scripts can update, correct? Or is there a special folder which they can write to and not the main one? Due to the way the cache works, clearing the cache might require deleting the script and checking it out again from scratch, but that could just be written up in the OP.
 

Terrabull

Member
As always Bale, you are awesome.
Theraze: I'm also new to the svn, so I've got quite a bit of research to do, I'll make a note to look into your suggestion.
 

Terrabull

Member
The easiest way to do this would be to simply put your color images into the /images directory. If you do that, they will be used instead of loading an image from KoL.

Note that the "cache clear" command will delete those images, so make sure they are backed up elsewhere. Just in case.

Sorry for bumping the thread, but I was just trying out what you said about putting the images in that folder, but it doesn't seem to do anything. Along w/ the fact that the existing images are png and kol uses gif (and in the conversion I lose animations). I think I'm gonna have to work out a script.
 
Last edited:

Bale

Minion
The image name would have to be exact to work, including the extension. Yup, you'll need a script if you want to use png.
 

Terrabull

Member
I converted them all to gifs and tried to replace the forest images w/ the color ones as a test. I know they overwrote the existing ones because of the delete confirmation, so I know the filename is correct. I even tried restarting mafia, and clicking on and off the properties relating to images. (and restarting between each one.)
 
Top