Character Info Toolbox

Lilac

Member
It's a bitch of a thing. KoL's native handling for it isn't exactly what I personally want, either, which is for all expired effects to hang out for X adventures at (0) and then get auto-dismissed, with the option to dismiss them earlier. It's really cool that we got the feature at all, though!
 

Erich

Member
The new hidden city broke chit.

Bad location value: "hidden city (automatic)" (charpane.ash, line 945)
Bad location value: "hidden city (automatic)" (charpane.ash, line 989)

you don't need html for that, do you?
 

Dameoshi

New member
How? When I comment out the hidden city (automatic) lines, it still doesn't load

The first instance at line 945-ish can just be commented, for the other reference I deleted the entire 'case:' section for the Hidden City, and that seems to work. My charpane.ash at line 4081 now looks like:

Code:
switch(parse.group(2)) {
case "The Arid, Extra-Dry Desert":

I believe the segment for the hidden city was above the desert. Make a backup (silly hypocritical me, I didn't) and try that out if it makes sense. Good luck!
 

Fluxxdog

Active member
Huh. Just got this today. If I got it before, I didn't notice:
Code:
Changing "rogue windmill" to "The Rogue Windmill" would get rid of this message (charpane.ash, line 336)
Changing "mouldering mansion" to "The Mouldering Mansion" would get rid of this message (charpane.ash, line 337)
Changing "stately pleasure dome" to "The Stately Pleasure Dome" would get rid of this message (charpane.ash, line 338)
 

Bale

Minion
You never got it before because Mafia just updated those today. More fuzzy matching fixes. Sigh. svn update mafiachit
 
You never got it before because Mafia just updated those today. More fuzzy matching fixes. Sigh. svn update mafiachit

I did this and it did not change revision number (still 56) and I was still getting "Bad location value: "The Rogue Windmill" (charpane.ash, line 336)".
In case anyone else encounters this, I manually edited charpane to remove the "The" from the 3 wormwood zones and CHIT is working again.
 

lostcalpolydude

Developer
Staff member
I did this and it did not change revision number (still 56) and I was still getting "Bad location value: "The Rogue Windmill" (charpane.ash, line 336)".
In case anyone else encounters this, I manually edited charpane to remove the "The" from the 3 wormwood zones and CHIT is working again.

You got that error because you didn't update mafia.
 

Theraze

Active member
That's just to be able to use SVN, not to have it work. For it to fully work you should be using the latest daily build... more like 12515.

But if Bale had to update the OP every time a new location was added... that would be stupid.
 

jbouzanquet

Member
All the scripts delivered by SVN target the current daily build of mafia, because the location name changes and new content make it impossible to work without warnings, or even errors, on old and new versions. I download the current daily before every log-in.
 

RogerMexico

New member
All the scripts delivered by SVN target the current daily build of mafia, ...
I don't recall ever hearing of this before. Even though I am not happy about it, it is good to know.

Also, if this is true, the simple solution is to update the OP with that information. Which would need to be done once, not every time a new location is added.

Edit: And taken care of even as I am typing this. You are awesome Bale. Sorry if my initial post seemed snippy. It just seemed the answers being offered were incomplete. Since I didn't know what was missing I wasn't even sure what to ask.
 
Last edited:

Bale

Minion
I don't recall ever hearing of this before. Even though I am not happy about it, it is good to know.

The problem is that mafia is frequently making changes to established code lately, to switch KoLmafia over to the KoL approved names for all locations.

For reasons I don't exactly understand, KoLmafia often used names for locations that were different from the actual name KoL uses. When the Florist Friars was released, it was decided that in order to support it properly KoLmafia had to change that policy to using the exact same name as KoL, even if the only difference was the presence of "The " at the beginning of the location name. One by one, those differences are being identified and changed in KoLmafia. Then scripts need to be updated to use the correct names. It has been an awkward period of transition. The result is that if the version of someone's script is out of sync with the version of KoLmafia, things can something go awry. (Mostly the problem is if the script gets ahead of KoLmafia, not the reverse.)

That's why scripts on SVN (which have fast and easy updates) usually require an equally up to date version of KoLmafia these days. I expect things will become less tense now that most (possibly all?) locations have been fixed.
 

fronobulax

Developer
Staff member
Even though I am not happy about it, it is good to know.

Things are changing quickly enough that the reality is that people should be pleased if the old, "official release" versions of mafia support enough features to be useful "today". Script writers are targeting the daily builds, whether they articulate that or not. If it makes you happy, in that you have a version of mafia and a script that work for you, then you should consider turning off or otherwise not updating from SVN until something is broken and you have no alternative.

I've run Enterprise IT shops and I am well aware of the risks of updating just because something is new. But I am convinced that the benefits of using the latest version of KoLmafia and associated scripts exceeds the cost of the risks. In particular, since the dev team has (justifiably) shown no interest in branching the code to fix bugs in releases, the response to any bug report is going to be "Does it happen in the latest Daily Build?". So a user who wants responsive support pretty much needs to be on the Daily Build.

IMO. YMMV.
 

Darzil

Developer
Yup, and TPTB often change things. For example, earlier this week meatpasting and crafting in knoll sign changed, so current mafia will fail to make some items in knoll sign. I've written a patch, but until that's approved it'll not go into mafia. When mafia supports it, that'll then work. You can't do a new point release every time KoL changes, so daily build is the best way. A point release from weeks ago could never work. The mafia devs are great at quickly reacting to changes, though !
 

Bale

Minion
Sometime back in this thread was a slightly off-topic discussion about a relay override for game.php. I liked bordemstir's design, but there were a few issues such as using the correct chatpane. Later on I discovered that there was also a problem with menu height when you switch between different menu styles. Anyway, here is my current game.ash for the sake of anyone who cares. It solves those problems.

Code:
void reframe(buffer results) {
	// Remove menuset. This is unnecessary for icon style menu
	matcher menuset = create_matcher('(<[^>]*menuset[^\\d]*(\\d*)[^>]*>)', results);
	if(menuset.find()) {
		results.replace_string(menuset.group(1), "");
		results.replace_string("</frameset><frame name=chatpane", "<frame name=chatpane");
	
		// Move charpane out of frameset & change columns of rootset
		matcher charpane = create_matcher('(<[^>]*charpane[^/]*/frame>)', results);
		if(charpane.find()) {
			results.replace_string(charpane.group(1), "");
			results.replace_string('cols="4*,*">', 'cols="200,3*,*">'+charpane.group(1));
		}
		
		// Move menupane down to top of mainset above mainpane
		matcher menupane = create_matcher('(<[^>]*menupane[^/]*/frame>)', results);
		if(menupane.find()) {
			results.replace_string(menupane.group(1), "");
			results.replace_string('<frame name=mainpane', menupane.group(1)+'<frame name=mainpane');
		}
		
		// Change mainset cols to rows, copy menu height from menuset
		matcher mainset = create_matcher('(<[^>]*mainset[^>]*)cols([^>]*)200([^>]*>)', results);
		if(mainset.find())
			results.replace_string(mainset.group(0), mainset.group(1)+"rows"+mainset.group(2)+menuset.group(2)+mainset.group(3));
	
	}
}

void main() {
	buffer results = visit_url();
	results.reframe();
	// add doctype to escape quirks mode
	results.replace_string('<html>', '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n<html>');
	results.write();
}
 
Last edited:
Top