Feature Maximize char

Bale

Minion
The new PvP system would make it helpful to have a char keyword to maximize for equipment with most characters in its name.

Should add a maximizer keyword that returns the equipment with the longest name (including spaces) for each slot. I might get to this, but I've been super busy recently.

Here someone take this and make the modifier name less terrible also maybe not make it a float modifier? idk it currently works but I don't like that if check. Also I'm not sure if it handles items with html character codes in the name (or how kol handles those)

http://dl.dropbox.com/u/220774/Modifiers.java.patch

It might be an extra feature request, but another use for this is if you could maximize for equipment with a specific character length, for instance if you wanted to get "Dances with Tweedles" from the Tea Party for +40% Meat bonus, then you would like to check maximize("hat char=22", false) and if it returns true then you know you can get the buff.

Anyway, the second feature would be a nice bonus, but merely maximizing for char would be helpful.
 
I don't think that max delimits valid results. It merely allows the maximizer to reduce processing time by thinking that the result is good enough so it stops trying to find other options. Am I mistaken?
 
Well, it would make it eliminate results with less than 22 characters as failures and not consider more characters as positive after. But you're right, it won't stop it from going higher... which might be a new FReq. Something like hardmax or maxcap or... which sets a maximizer failure if it's more than that number.
 
Ah. Well, if "cap" was added as well as "char" (or "characters" or something similar), then we'd be able to aim for an exact character or the longest possible, whichever we needed. Spiffy.
 
Since you "bumped" it... there's been a PvP evolution since then. Now, if this request was worked on, you would also want to maximize for a specific letter. It would be kinda cool to be able to weight it by the value of a given letter vs minimal length. I think that "char" should be used for choosing a specific character to prefer while length should be used for total name length.

maximize 1.2 char a, -0.8 length
 
Among other things, that would require reverse engineering which character entities are treated like the special character they display as, and which are treated like the individual characters used to make those instead. name_length doesn't currently match the PvP booth for some items, with the bugged baio back item being a notable example.
 
Among other things, that would require reverse engineering which character entities are treated like the special character they display as, and which are treated like the individual characters used to make those instead. name_length doesn't currently match the PvP booth for some items, with the bugged baio back item being a notable example.

I'm hoping that I can just use some HTMLDecode library function to do that. Or an HTML parser or what have you. We'll see.

The baio may need a hardcoded exception, that wouldn't surprise me.
 
Mafia already uses CharacterEntities.java for that, starting from
Code:
String displayName = StringUtilities.getDisplayName( name );
in ItemDatabase.java. The issue comes from KoL not treating all of those as things in need of converting. I think ™ is a common one that KoL counts as 7 characters.
 
Well looking at CharacterEntities.escape() it looks pretty simple to make an overloaded version that just "skips" the entities that KoL doesn't know how to decode.

However I hate hate hate working around KoL bugs like that because doing so guarantees that it'll break a year down the line when KoL finally gets around to fixing it. I assume all this has been spaded and reported?
 
Started a thread over at kolspading. Could have done one of those GD-threads-which-is-really-a-bug-report but I'd hate myself afterwards.
 
Back
Top