Character Info Toolbox

In my world untinkering a dictionary is definitely necessary to finish my run, but I guess many people won't bother :)
 
The florist brick is definitely not ready for prime time, but I'm playing around with it. It's also still buggy. Sometimes it won't add a plant. Perhaps some UI work is still warranted as well.

Anyway, I decided it was interesting enough to add to Chit in r29 in case anyone else wants to play with it or offer criticism to bordemstirs.

I recommend adding florist to chit.stats.layout
 
What does the KoL Quest brick do that the Tracker does not do?
I have a short list, but I am always looking to add to it.
You know, I hadn't thought about that. Is it your idea that one would use your trackers exclusively rather than the built in quest tracker?

Next time I ascend, I'll be sure to take notes.

First suggestion: Once we're done with Nemesis Quest, is it still useful to display pirate insult count?
 
Why do we care after the F'c'le is unlocked, regardless of Nemesis results? If we're testing a stop point, as soon as the fledges are available, we know the insults don't matter anymore...
 
I'm fine with that too. I just picked the end of the quest as a convenient reference point, but the end of the f'c'le section is fine too.
 
I recommend adding florist to chit.stats.layout

Did you mean chit.walls.layout? It's doing nothing for me in chit.stats.layout (I even added a print_html() line that doesn't run with it there). It's also possible that my confusion is due to one of the changes I've made to the script somewhere, but I don't want to go chasing that down unless it actually is working there for others.
 
Did you mean chit.walls.layout? It's doing nothing for me in chit.stats.layout (I even added a print_html() line that doesn't run with it there). It's also possible that my confusion is due to one of the changes I've made to the script somewhere, but I don't want to go chasing that down unless it actually is working there for others.

I'm going to assume that is what he meant, as I didn't code it for the stats brick. I love the stat brick for its inherent density (lot of info in a small spot) and would love to add the florist to it, but I can't think of a good way to do so that wouldn't be too large or disfigure the images too severely. Sad.

As for the bugs, I'm going to have to guess it has to do with some of the names or something being off, since the code is the same for all plants, I can't see any reason why it would work for some plants but not others. I'll go through the data and make sure nothing is off.
 
With a small modification to the florist block, I have the script telling me whenever the current location parses to $location[none] so I can update mafia accordingly.
 
That's great!

bordemstirs, I'm very interested to see what you've done to the brick lately, even if it is just to include the florist command and remove the page load to the mainpane.
 
I haven't had much time to work on this. As is I don't think digging works (or it only works when already at the florist... not sure)
Not sure if there's been much else changed.
Code:
string toPlant(int i) {
 foreach s in plantData if (i == plantData[s].no) return s;
 return "";
}

void pickerFlorist(string[int] planted){
	int plantsPlanted;
	string terrain = last_location.environment;
	boolean marked = false;
	foreach i,s in planted {
		if (s!="") plantsPlanted+=1;
		if (plantData[s].territorial) marked = true;
	}
	string plantsUsed = get_property("_floristPlantsUsed");
	boolean[int] plantable;
	foreach s in plantData if ((plantData[s].terrain == terrain) && (!plantsUsed.contains_text(s)) && (s != ""))
		plantable[plantData[s].no]= ((planted[0] != s) && (planted[1] != s) && (planted[2] != s));
	buffer picker;
	picker.append('<div id="chit_pickerflorist" class="chit_skeleton" style="display:none">');
	picker.append('<table class="chit_picker">');
	string color;
	if (plantsPlanted == 3) {
		picker.append('<tr><th colspan="2">Pull a Plant</th></tr>');
		foreach i,s in planted {
			color = (plantsUsed.contains_text(s)?(plantData[s].territorial?'lightyellow':'lightgray'):(plantData[s].territorial?'lightgreen':'lightblue'));
			picker.append('<tr style="background-color:' + color + '"><td><img src="http://images.kingdomofloathing.com/itemimages/shovel.gif"></td>');
			picker.append('<td><a href="/KoLmafia/sideCommand?pwd=' + my_hash() + '&cmd=text+' + url_encode('choice.php?option=2&whichchoice=720&pwd=' + my_hash() + '&plnti=' + i) +'">'+ s +'<br>(' + plantData[s].desc + ')</a></td></tr>');
		}
		if (count(plantable)>0) {
			picker.append('<tr><th colspan="2">Remaining Plants</th></tr>');
			foreach i in plantable {
				if (!plantable[i]) continue;
				color = (plantable[i]?(plantData[i.toPlant()].territorial?(marked?"lightyellow":"lightgreen"):"lightblue"):"lightgray");
				picker.append('<tr style="background-color:' + color + '"><td><img width="21" height="40" src="http://images.kingdomofloathing.com/otherimages/friarplants/plant' + i + '.gif" title="' + i.toPlant() + ' (' + plantData[i.toPlant()].desc + ')"></td>');
				picker.append('<td>' + i.toPlant() + '<br>(' + plantData[i.toPlant()].desc + ')</td></tr>');
			}
		} else picker.append('<tr><th colspan="2">No plants in stock for this area.</th></tr>');
	} else {
		picker.append('<tr><th colspan="2">Plant an ' + terrain + ' Herb</th></tr>');
		if (count(plantable)>0) foreach i in plantable {
			color = (plantable[i]?(plantData[i.toPlant()].territorial?(marked?"lightyellow":"lightgreen"):"lightblue"):"lightgray");
			picker.append('<tr style="background-color:' + color + '"><td><img width="21" height="40" src="http://images.kingdomofloathing.com/otherimages/friarplants/plant' + i + '.gif" title="' + i.toPlant() + ' (' + plantData[i.toPlant()].desc + ')"></td>');
			picker.append('<td><a href="/KoLmafia/sideCommand?cmd=florist+plant+' + url_encode(i.toPlant()) + '&pwd=' + my_hash() + '">' + i.toPlant() + '<br>(' + plantData[i.toPlant()].desc + ')</a></td></tr>');
		} else picker.append('<tr><td colspan="2">No more plants available to plant here</td></tr>');
	}
	picker.append('</table></div>');
	chitPickers["florist"] = picker;
}

void bakeFlorist() {
	buffer result;

	if ((last_location.environment != "none") && florist_available()) {
		result.append('<table id="chit_florist" class="chit_brick nospace">');
		result.append('<tr><th><a class="visit" target="mainpane" href="forestvillage.php?action=floristfriar">Florist Friar</a></th></tr>');
		string[int] plants=get_florist_plants()[last_location];
		result.append('<tr><td><a class="chit_launcher" rel="chit_pickerflorist" href="#">');
		foreach i,s in plants if (plantData[s].no>0) result.append('<img style="vertical-align:middle" width="21" height="40" src="http://images.kingdomofloathing.com/otherimages/friarplants/plant'+plantData[s].no+'.gif" title="'+s+' ('+plantData[s].desc+')">');
		else {
			result.append('<img style="vertical-align:middle" width="21" height="40" src="http://images.kingdomofloathing.com/otherimages/friarplants/noplant.gif" title="No Plant">');
			break;
		}
		result.append('</a></td></tr></table>');
		pickerFlorist(plants);
	}
	
	chitBricks["florist"] = result;
}

EDIT to add: I also have some super old code from pre-Bale CHIT that I submitted and never got included. I'd have to refactor some of the code (all of it...) to work with the myriad of structural changes that you've implemented, and I was wondering if anybody would be interested in some of the ideas.
One is a severe reduction to the character brick by including only pertinent info as 2 lines in the stat brick. This may fail your inspection for intuition, but may not. I have no problems deciphering the info.
Another is inclusion of familiar (by species name or image) to the stat brick.
And, my favorite in its simplicity, the option to combine counters onto one line of effects instead of being spread out (currently only SR counters, but it could be adapted to work with any mafia "window"). Example would be "SR window 13-53" or, "Fortune cookie 52, 87, 91"

Pictures of any of this in action are available on request.

I was drawn to CHIT because it allowed me to fit more information into the narrow charpane without having to scroll as much to see it. As you can see, my own additions are all ways to reduce the amount of real estate any particular datum requires, in an attempt to maximize what information is available at-a-glance.
 
Last edited:
I haven't had much time to work on this. As is I don't think digging works (or it only works when already at the florist... not sure)
Not sure if there's been much else changed.

Thank you. I wanted to be sure I had your latest additions before I updated because I was refactoring a bit to add a small additional feature.

Now people can add "florist" to their chit.stats.layout to display it after their trail. It looks real nice in the stats block as trail,florist

svn update chit
zlib chit.stats.layout = muscle,myst,moxie|hp,mp,axel|mcd|trail,florist


EDIT to add: I also have some super old code from pre-Bale CHIT that I submitted and never got included. I'd have to refactor some of the code (all of it...) to work with the myriad of structural changes that you've implemented, and I was wondering if anybody would be interested in some of the ideas.
One is a severe reduction to the character brick by including only pertinent info as 2 lines in the stat brick. This may fail your inspection for intuition, but may not. I have no problems deciphering the info.
Another is inclusion of familiar (by species name or image) to the stat brick.
And, my favorite in its simplicity, the option to combine counters onto one line of effects instead of being spread out (currently only SR counters, but it could be adapted to work with any mafia "window"). Example would be "SR window 13-53" or, "Fortune cookie 52, 87, 91"

Pictures of any of this in action are available on request.

I am rather interested in seeing pictures of this. I'm not entirely sure that it would work because it would requite a large change to how counters are displayed in order to avoid confusion. A separate counter window perhaps?
 
it's crapped out for me, even after updating and refreshing.

Bad location value: "The Castle in the Clouds in the Sky (Top Floor)" (charpane.ash, line 526)

It refuses to load :(
 
You want full size images on the charpane.. that's cool, I guess. Means I won't be using it, because that's way too much space for too little info.
However, it makes the picker outright unusable. It pops up larger than the charpane, and the ability to close it is hidden off the top of the screen, and I can't scroll to it (in Firefox, at least.)

I'm gonna collect some screen shots of the other older features I mentioned. I'm not sure why it wouldn't work with counters, unless you've drastically changed them (when I made the features counters were pretty much indistinguishable from any other effect)
 
You want full size images on the charpane.. that's cool, I guess. Means I won't be using it, because that's way too much space for too little info.
However, it makes the picker outright unusable. It pops up larger than the charpane, and the ability to close it is hidden off the top of the screen, and I can't scroll to it (in Firefox, at least.)

I do not want full size images in the charpane. That would be a bug. I cannot replicate this bug in Firefox v21.0 on my computer. Do I have to upgrade it to see the problem? Please help me figure out why you have this problem.

Edited: Upgraded Firefox to v 22.0 and still see miniaturized florist images.
 
Last edited:
Here's what it looks like for me in Firefox 22.0. Note that I made the images in the picker just slightly larger than for the charpane images to make it prettier, but still compact:

Z5nKnnc.png
 
I just downloaded the... wait...
do you set the image size with CSS? I don't actually use your repo, so I've been downloading the ash file manually when you make changes. Let me grab the CSS/js and then see if it's pretty.

EDIT: That's a yep. Coolio, much better.

EDIT EDIT: Ooh, the bold is a nice touch as well, unfortunately the picker is now *just* too tall to close when all 10 plants are showing. :(
 
Last edited:
Back
Top