Character Info Toolbox

eegee

Member
This is what my fullness counter looks like.. Am I doing anything wrong?
If you are referring to the numbers looking a little wacky, maybe you can try widen the frame (the vertical gray line) more to the right and see if that helps?
 

rlbond86

Member
Ok, I've looked at your settings and it seems that Character Info Toolbox might not have intended for the last adventure to be added to the stats pane. I could be mistaken though.

I have a suggestion for two of your settings that will prevent the stats window from being distorted. Type the following into your CLI and let me know what you think:
Code:
zlib chit.roof.layout = character,stats,trail,familiar,modifiers
zlib chit.stats.layout = hp,mp,axel|muscle,myst,moxie|stomach,liver,spleen|mcd

This certainly fixes the problem, but of course I don't like the full trail there like that.
 

Chez

Member
This certainly fixes the problem, but of course I don't like the full trail there like that.
A couple of things you can try:

1) On line 2270 of charpane.ash, remove the style="display:block;". So it should become:
Code:
result.append('<td class="info" colspan="2"><a class="visit" target="mainpane" href="' + group(target, 1) + '">' + group(target, 2) + '</a></td>');

2) Change line 184 of chit.css from
Code:
white-space:nowrap;
to
Code:
white-space:default;
(or delete the line completely)

This should allow the text to wrap if it can't fit into a single line.
 

Erich

Member
Tell me why you think that is wrong and I'll try to help. Personally I have it in chit.toolbar.layout so it doesn't look quite like that for me. Your picture is [way] too cropped for me to figure out where you put it so I'm really lacking helpful details.

I suppose the thing for you to note is that this script is very configurable as to what your charpane can look like.

If you are referring to the numbers looking a little wacky, maybe you can try widen the frame (the vertical gray line) more to the right and see if that helps?

Sorry for the delayed reaction. My issue is that it looks like this:

10
/
30

instead of this:

10/30

I tried widening the frame, but that didn't work either. Is there an older version I can check out? that way I can see what may or may not be causing my organs box to be that big. I think it may be the .css, honestly.

All the best,
~E
 

Bale

Minion
OH! I have that also, but it didn't bother me since it was a pop-up on the toolbar at the bottom. Now that I know what you're talking about it is bothering me also. I definitely want to fix that.

I don't have time right now, but I'll tend to it soon. Unless someone shows me a good fix first.


Edit: I was wrong about not having the time. I found a good way to fix it. I'll spin a release later after I've had time to properly test it.
 
Last edited:

Bale

Minion
Updated to 0.6.5.1
  • Fixed a few styling issues
  • Changes to stylesheet

Once again, both charpane.ash and chit.css need to be updated, so I updated the zip file. I also attached the two files separately to save people the trouble of unzipping them.
 

lazy_fire

New member
Effects with parentheses in the name like "Educated (Kinda)" show up incorrectly in the list. The text in parentheses shows as the turns remaining instead of the actual number.
It also throws an error in the cli: "The string "Kinda" is not an integer; returning 0 (charpane.ash, line 784)"

Effects.jpg
 

Bale

Minion
That is not as easy to debug as you might think. I'd give it a serious try if it was more convenient to get an effect with parenthesis in the title, but I cannot find any that don't require me to adventure in the Hobo Marketplace. Maybe if you copy/pasted the HTML for your charpane I could find the problem.

Obviously the problem is in here:

PHP:
	} else {
		pattern = create_matcher("\\((<a .*?</a\>)\\)", column2);
		if (find(pattern)) {
			turns = group(pattern, 1);
		} else {
			pattern = create_matcher("\\((.*?)\\)", column2);
			if (find(pattern)) {
				turns = group(pattern, 1);
			}
		}
	}
	
	canShrug = false;
	if (isIntrinsic) {
		myBuff.effectTurns = 0;
	} else {
		pattern = create_matcher("\>(.*?)<", turns);
		if (find(pattern)) {
			myBuff.effectTurns = to_int(group(pattern, 1));

However it already seems to be accounting for the issue of incidental parenthesis by checking to see if the parenthesis include a mafia included link to debuff the effect.
 

lazy_fire

New member
I randomly got the effect from the hookah, but if I remember next time I see it I'll grab the html source from the vanilla character pane. Since there are only two effects with parentheses which are not very common it could be a problem with mafia's relay and CHIT is just passing through the data as is, and no one's noticed it before. I did hover over the "Kinda" text and the debuff link appeared to be correct, but I didn't test it out.
 

eegee

Member
That's some funky use of regex, but maybe I'm missing something :). Here's my patch that should work for effects with brackets:
 

Attachments

  • charpane.ash
    110.8 KB · Views: 33

Bale

Minion
Wow. You rewrote the entirety of parseBuff()! Looks pretty nice. I'll include that in my release.

That's some funky use of regex

Chez's regex often looks like that. He has this technique of searching for a regex and if it fails, trying another regex instead of trying to come up with a regex that will include all possibilities. I don't favor that approach, but it does work so I'm not scouring the script to remove all instances of it.



Updated to 0.6.5.2
  • Fixed a bug with effects that contains parenthesis
 

Erich

Member
Edit: ok, few things.

1> It still has problems. You can test it with /timer 1 Mongolian (Clusterfuck)

1b> Want to really have fun, try /timer 1 Oh Fuck ( ).

2> I think it's a problem with mafia itself. In the regular relay browser, it would look like "Mongolian (Clusterfuck) (1)", but you shrug it by clicking Clusterfuck, as (1) is without a link.

Edit: is ChIT formatting the effect based on what it sees mafia using as the shrug link? If that's the case, what about doing a regex summat like this:

([\w\s()]+) \((\d+)\)

... where, if the effect were "Let me see you (1) (2) step (50)", it would return just the value of the remaining turns as the second array (/2), and that can be used as the shrug link.

3> If you're too full to eat something, CHIT disappears and is replaced by the default relay charpane. I don't know if that happens to everybody, but I tested it with the wedding cake to make sure. As well, as long as "You're too full to eat that." is displayed, [refresh]ing the charpane doesn't bring CHIT back.

edit: oh why not:

http://i57.photobucket.com/albums/g221/Erichwanh/Screenshot2012-04-27at111822AM.png
 
Last edited:

eegee

Member
There's always a way to break regex using custom input :)

Can you provide any motivation for wanting to use round brackets (like this and break KoLmafia) instead of square or angle brackets with timers? Otherwise, if it is actually breaking with a standard KoL effect please show me and I can fix it.
 

Theraze

Active member
If you did
([\w\s\(\)]+) \((\d+)\)
it shouldn't break mafia, since you've escaped out of considering it as a useful item and told it to consider it only as a single character...
 

lostcalpolydude

Developer
Staff member
Otherwise, if it is actually breaking with a standard KoL effect please show me and I can fix it.

Based on testing with the sample timer, I'm pretty sure mafia would improperly handle Educated (Kinda) regardless of a relay override being used. There's too much going on in that function for me to figure out how to have it look for the last ( and ) instead of the first ( and ).
 

Erich

Member
Ok, so, every now and again, all the zlib Chit vars seem to reset on me, and I have no idea why. I'm just going on and adventuring as normal, and out of nowhere, all the vars that I set for Chit get replaced by defaults. So, tonight it happened to me again, and here's what was going on in my G-Cli:

[437] F'c'le
Encounter: A Fledgling Pirate Is You!
You gain 3,000 Meat
You acquire an item: pirate fledges
Invalid line in data file: "chit.character.title true" (zlib.ash, line 244)
<script>function FavItFunc(){$.ajax({url: 'inventory.php?action=faveit&ajax=1&whichitem=3033&pwd=a79b81527b51078c938e8d1d2b289f6d',success: function(a){$("#res").html(a);}});;}</script><a id='ADDFAV' href=javascript:FavItFunc(); >[f]</a>

Is this my fault, or a product of different scripts colliding?
 

Bale

Minion
Based on testing with the sample timer, I'm pretty sure mafia would improperly handle Educated (Kinda) regardless of a relay override being used. There's too much going on in that function for me to figure out how to have it look for the last ( and ) instead of the first ( and ).

It seems that there is already a bug report about this problem. Read about it HERE.
 

chef noodleman

New member
This is strange. My 'effects' brick appears, but is empty, despite me having quite a few buffs running (according to mafia, and the compact charpane).

I've reinstalled the latest version of everything I can think of that would matter (zlib, chit, latest daily build) and I reset all my chit zlib vars to default. Chit isn't reporting any errors to the CLI either, verbosity = 10. Any ideas what could be causing this?

Edit: Multi's appear to be unaffected, so a perhaps a weird preference must have gotten screwed up somewhere?

Edit2: Nevermind, I just backed-up and then reinstalled mafia from scratch, and am selectively re-adding my scripts and preference data (huge pain) but this has fixed the issue. Still no idea what could have caused it though.
 
Last edited:
Top