PDA

View Full Version : Skill/CS planner



bordemstirs
01-11-2011, 09:36 AM
Planner: 2.9
Data: 20120306.1

This is an informational script very similar to BCC's profile snapshot, but with some critical differences.

All the information is stored locally, rather than online. The layout is a little different, and customizable to your liking.

It shows familiars, trophies, tattoos, and skills.

The skills come with a nice little Queue so that you can drag and drop them into place and sort them based on priority.

At the time of this writing the script is essentially finished, though I'm open to ideas.

Put relay_planner.ash in your Relay folder, and place planner.txt into Data, and enjoy!

Changelog:
2011.08.19: .7 make unavailable items data controlled, instead of hardcoded. add totals to count.
2011.11.09: .8 reclass skill name. final(?) SSPD form added. TODO: rearrange skills section, bookshelf exceeding space alotted.
I missed SSPD... I play EVERY day, and I missed it. :(
2012.01.02: .9 skills section redesigned to handle arbitrary number of books and fit better.

peter50216
01-11-2011, 01:57 PM
Cool Script!

icon315
01-11-2011, 03:30 PM
Here are some things i noticed

1).
Your script version checking is making a mistake, it says the current version is 1
To fix this just make this

int plannerVersion=1.1;
to


string plannerVersion="1.1";

2)
also change


void getskills(){
print("Collecting skill information");
remove opts["SKILL"];
string b=visit_url("showplayer.php?who="+my_id());
if b=substring(b,b.index_of("class=\"pskill\">"),b.index_of("Clan: <b>"));
matcher am;
piece this;
int v;
foreach sub,sort in allInfo["SKILL"]{
this=allInfo["SKILL",sub,sort];
v=0;
if (b.index_of(">"+this.name+" (P)")>0) v=1;
if (b.index_of(">"+this.name+" (<")>0) v=2;
if (b.index_of(">"+this.name+"</a> (P)")>0) v=1;
if (b.index_of(">"+this.name+"</a> (<")>0) v=2;
if ((v<2)&&(opts["SKILL",sub,sort].r==3))v=3;
this.r=v;
opts["SKILL",sub,sort]=this;
}
}
to


void getskills(){
print("Collecting skill information");
remove opts["SKILL"];
string b=visit_url("showplayer.php?who="+my_id());
if (contains_text ("class=\"pskill\">", b))
{
b=substring(b,b.index_of("class=\"pskill\">"),b.index_of("Clan: <b>"));
matcher am;
piece this;
int v;
foreach sub,sort in allInfo["SKILL"]{
this=allInfo["SKILL",sub,sort];
v=0;
if (b.index_of(">"+this.name+" (P)")>0) v=1;
if (b.index_of(">"+this.name+" (<")>0) v=2;
if (b.index_of(">"+this.name+"</a> (P)")>0) v=1;
if (b.index_of(">"+this.name+"</a> (<")>0) v=2;
if ((v<2)&&(opts["SKILL",sub,sort].r==3))v=3;
this.r=v;
opts["SKILL",sub,sort]=this;
}
}
else
print("No Skills");
}
That way it checks if you even have permanent skills.....or you could check http://127.0.0.1:60080/charsheet.php
3)
Your Script should check the inventory for familiar Hatchlings

4)
Your wiki linking doesn't seem to work....for the tattoos....Boozetefarian is spelled Boozetafarian
Nice Script By the way

heeheehee
01-11-2011, 04:29 PM
Alternatively, you could change the version variable's datatype to a float -- the error's arising because 1.1 isn't an int. What exactly are the JS/CSS issues that you're encountering?

BGcolors for permed skills aren't very useful, since the images themselves have a white BG. Perhaps a div overlay, but meh, too much work, IMO. Also, you'll probably run into errors if the player doesn't have a clan. Just a heads up.

bordemstirs
01-11-2011, 06:37 PM
BGcolors for permed skills aren't very useful, since the images themselves have a white BG. Perhaps a div overlay, but meh, too much work, IMO.

Thanks for pointing out everything guys! I'm in the process of fixing up all the current discrepancies... save this one.
I don't understand, the bgcolors for the permed skills work fine for me and are a great visual tool.

fronobulax
01-11-2011, 09:44 PM
Interesting. Thank you.

I don't think I am seeing what you intended for skills. They all have the same image, no name and the image URLs are all of the form http://kol.coldfront.net/thekolwiki/index.php/0C, http://kol.coldfront.net/thekolwiki/index.php/1 and so on. All of those lead to a page not found at the wiki. Same behavior for two different characters so it could be a common setting.

bordemstirs
01-12-2011, 04:40 AM
They all have the same image, no name and the image URLs are all of the form http://kol.coldfront.net/thekolwiki/index.php/0C, http://kol.coldfront.net/thekolwiki/index.php/1 and so on.

As far as I know, the only thing that might cause this is lack of skill names in the planner_username.txt file.

I am unable to reproduce this even wiping all my files and starting fresh with the zip file posted here (why doesn't this site allow .rar?)

Try reloading data (bottom of the page) and seeing if that helps...

EDIT: (thanks to clanmate Sentrion)

Make sure planner.txt is in the Data folder of mafia. If this is the problem though, then all parts of the script should fail (not just skills). Let me know either way.

AlbinoRhino
01-12-2011, 07:22 AM
I'm having the same problem. My softcore character has 111 ascensions and yet it reports he has 0 skills. planner_username.txt contains no info on skills but planner.txt does. Same issues with the links and images reported above. The rest of it appears to be working as intended. Also the queues on the right are half outside of the frame and when I move the scrollbar to the right, everything on the page moves except the queues, which remain half inside and half outside the frame.

bordemstirs
01-12-2011, 07:33 AM
I'm having the same problem. My softcore character has 111 ascensions and yet it reports he has 0 skills. planner_username.txt contains no info on skills but planner.txt does. Same issues with the links and images reported above. The rest of it appears to be working as intended. Also the queues on the right are half outside of the frame and when I move the scrollbar to the right, everything on the page moves except the queues, which remain half inside and half outside the frame.
EDIT: I know what the problem with the skills is and am currently working to remedy it.

As for the frame size not working, that is what I was referring to when I said I still had some CSS issues to clear up. My intention is for you to not ever have to scroll to the right, under any circumstances... unless you have a laughably narrow window, I suppose. For now, you'll just have to deal with the queue being half outside the window (shouldn't be a real problem unless you queue more skills than you can see without scrolling down [try scroll wheel on the mouse in that circumstance?]) or you can edit the script yourself... search for "queuediv" and change the width percent to something smaller.

AlbinoRhino
01-12-2011, 07:43 AM
No big deal ! I can resize the frame and see the queues and I can't queue my 0 skills ! :)

fronobulax
01-12-2011, 02:40 PM
(why doesn't this site allow .rar?)
Because people like me who run mafia on a Windows box don't want to clutter it up any more than necessary by installing 7Zip or something similar. The native support for zip files has certainly made me less interested in content that uses a different archive and compression format. Of course that was a rhetorical question...

Somewhat related, I actually would prefer two plain text files with instructions about where to put them rather than a smart package that knows what directories they belong in. I have no idea why I feel that way. Must be the Luddite coming out.

I see that you have some ideas so I won't try and elaborate on my report, but I will add that there are no SKILL entries in the relavent planner_user.txt files.

Tangentially, mafia seems to have an implicit naming convention along the lines of user_tag.txt as in the prefs, mood and session files. Any particular reason why you chose to reverse it? Since I am running three characters out of the same directory I am pretty used to sorting by filename if I want to clean things up.

Fluxxdog
01-12-2011, 05:47 PM
Because people like me who run mafia on a Windows box don't want to clutter it up any more than necessary by installing 7Zip or something similar.<looks at quote, look at his copy of 7-zip, Firefox, OpenOffice, Skype, Trillian, Notepad++, iTunes> ... So what you're saying is I shouldn't get Diablo 3 since I already have Solitaire? Heh, this is coming from a guy who had crashes BECAUSE Explorer tried to open a zip file ^^

fronobulax
01-12-2011, 06:22 PM
Because people like me who run mafia on a Windows box don't want to clutter it up any more than necessary


<looks at quote, look at his copy of 7-zip, Firefox, OpenOffice, Skype, Trillian, Notepad++, iTunes> ... So what you're saying is I shouldn't get Diablo 3 since I already have Solitaire? Heh, this is coming from a guy who had crashes BECAUSE Explorer tried to open a zip file ^^

*snickers at examples of what must clearly be necessary clutter except maybe iTunes*

bordemstirs
01-12-2011, 07:25 PM
Because people like me who run mafia on a Windows box don't want to clutter it up any more than necessary by installing 7Zip or something similar.
This has got to be the worst line of reasoning I've ever heard. I think you might be the first person EVER that prefers Windows' native handling of zip over ANY OTHER archiving utility available. WinRar is better, period. (See also: Windows' native handling of ... EVERYTHING ELSE)


I see that you have some ideas so I won't try and elaborate on my report, but I will add that there are no SKILL entries in the relavent planner_user.txt files.
This should be fixed with the most recent version, try again and let me know.


Tangentially, mafia seems to have an implicit naming convention along the lines of user_tag.txt as in the prefs, mood and session files. Any particular reason why you chose to reverse it? Since I am running three characters out of the same directory I am pretty used to sorting by filename if I want to clean things up.
Convention? That would require me to be aware of said convention (which I guess I might have been and simply ignored), and it makes far more sense to me for the data files to be ordered by the script that generated them rather than the user.

edit to add:


readme.txt

The files in folder X go in folder X.

Winterbay
01-12-2011, 07:45 PM
*snickers at examples of what must clearly be necessary clutter except maybe iTunes*

iTunes should be avoided like the plague, unless you have an iProduct I guess. Horrible, horrible program.

StDoodle
01-12-2011, 09:17 PM
First, can we please leave the OS-wars to elsewhere everyone? I already have to ignore enough of that on other sites as it is. ;)

Also, while I would prefer the mafia convention for naming data files IF we could specify sub-directories to the map loading & saving functions, since we can't, I agree that it makes more sense for them to end up with the same prefix for each script.

Theraze
01-12-2011, 09:22 PM
That does appear to be the 'standard' for user scripts... AdventureAdvisor_Theraze.txt, custd_Theraze_commands, custd_Theraze_custom, custd_Theraze_settings, custd_Theraze_values, OCD_Theraze_Data, and vars_Theraze. Of the 4 scripts in data folder that store based on user name, all 4 are scriptprefix_UserName.

StDoodle
01-12-2011, 09:33 PM
Well to be fair, Theraze, using half data files by me as your examples isn't exactly independent verification. ;)

bordemstirs
01-12-2011, 09:45 PM
OCD_Theraze_Data

Fitting example considering the discussion, no?

Theraze
01-12-2011, 10:00 PM
Just saying that there's 4 scripts currently storing stuff in my data folder currently and all of them are doing script_name. While the other folders generally do name_specifics instead, the data folder doesn't have anything official with a character name.

If we want to make Veracity give an aggrieved huff, we could point to zlib using it as authoritative. :D

Fluxxdog
01-12-2011, 10:25 PM
iTunes should be avoided like the plague, unless you have an iProduct I guess. Horrible, horrible program.I guess I'm lucky, because I haven't had one problem with it. ... <knocks on wood>

fronobulax
01-12-2011, 10:26 PM
This has got to be the worst line of reasoning I've ever heard.... plus more that I have snipped out.

You and I are just not going to get along, are we? *sigh*

The skill images now appear. Thank you. The skills are color coded for two of three characters but if I am reading it right the script thinks my never ascended character has no skills.

I understand "red", "green", "blue", "black" and "cyan", but I need external information to know what colors #A0A0A0, #00C0E0, and #00FF00 represent. Since the Options section serves as a Legend as well, you might consider a limited, but more friendly way of specifying colors. Personally that is a level of customization that I would be comfortable editing a script to obtain.

I note that mafia observes the file naming convention I described but of all the data files I have, only my scripts also observe the convention. So, if majority usage creates convention I will adopt a script_player.txt naming convention for my futer revisions and efforts.

Bale
01-12-2011, 11:23 PM
OCD_Theraze_Data

I hate that one. It should really be OCDdata_Theraze. What the heck was I thinking? My OCD tenancies twitch every time I think about it. It's probably too late to change it now... :(

Veracity
01-12-2011, 11:32 PM
Look for OCDdata.
If you find it, cool.
If not, look for OCD_....
If you find it, write OCDdata.

Henceforth, you will use the new data file and the user can delete the old one.

Bale
01-13-2011, 03:03 AM
Y'know... That's pretty awesome idea.

This annoyance is the one thing that was keeping me from getting around to implementing some people's desire to specify their data file. I'll do the two things at the same time and let people optionally specify the <name> part of OCDdata_<name>.

I guess I'm gonna go upgrade OCD in the next day or two to fix that. Thanks Veracity.

StDoodle
01-13-2011, 03:39 AM
But the big question is, why aren't you running a case conversion on names? Doesn't that matter on some OS's, or does mafia override that behavior? (/me ducks)

bordemstirs
01-13-2011, 04:26 AM
You and I are just not going to get along, are we? *sigh*
I see no reason why we can't get along. My attack wasn't at you, necessarily, just at Windows .Zip management.

The skills are color coded for two of three characters but if I am reading it right the script thinks my never ascended character has no skills.
Aside from the small handful of skills that are automatically marked HP, isn't that true?

I understand "red", "green", "blue", "black" and "cyan", but I need external information to know what colors #A0A0A0, #00C0E0, and #00FF00 represent.
This was just to let you know that #rrggbb colors are also supported; should you choose to use named colors, you're welcome to do so. As for needing to know what those hex values are in the meantime, well... you should have some vague idea of which skills you've permed and can deduce them by looking at the small border around the image.

AlbinoRhino
01-13-2011, 05:06 AM
I think there might be some errors in the way the script is counting skills. My softcore character has 111 ascensions and the script reports 5 hardcore permanent skills and 106 softcore permanent. However, there are actually 111 softcore permanent skills and 5 hardcore permanent. The 5 hardcore are stickers, rainbow gravitation, candy hearts, olfaction & vent rage gland which were all obtained during various softcore runs when another skill was also made softcore permanent.

zarqon
01-13-2011, 05:13 AM
Chiming in: I prefer commonelement_specificelement as a file naming convention since it groups related data and makes it easier to find information. Digital photographers have long been doing this with filenames (http://theturninggate.net/tutorials/tutorial-file-name-conventions/).

Winterbay
01-13-2011, 05:20 AM
Aside from the small handful of skills that are automatically marked HP, isn't that true?

Well, permed certainly but they still have the skills bought which is a important thing in planning what to take (you can't take it if you haven't bought it).

bordemstirs
01-13-2011, 05:27 AM
you can't take it if you haven't bought it
Which mafia will surely point out before you ascend. You can plan many runs in advance with this script, from a pool of -all the skills- not just what you have. So showing which skills you currently have available to -use- seems, to me at least, an extra bit of data my eyes don't want see when planning future runs.

I suppose I could add support and default the color to match the Don't Have It color. Curse you.


I think there might be some errors in the way the script is counting skills
Darn. One more bug for me to stare at until its reasoning becomes obvious.

EDIT: Is there some subset of permable skills that my script merely doesn't contain? (That I know of, only obsoleted skills are in this category) Because the counting method is pretty straightforward, the only way to miscount really, would be if the script A) failed to register that you had the skill in the first place, or B) fails to recognize the skill at all.
EDIT2: Also highly likely is that I misspelled a skill. Which would cause A). I'd hate to ask you to look through 111 skills to see which didn't get marked though. Ew.

heeheehee
01-13-2011, 06:34 AM
ash skill[string, string, string]map; string[string, string, string]map2; file_to_map("Planner.txt",map); file_to_map("Planner.txt", map2); foreach i,j in map["SKILL"] if(map["SKILL",i,j] == $skill[none]) print(map2["SKILL",i,j]);
spits out the following:


Kung Fu Hustler
Crossbow_Fever
Summon "Tasteful" Gifts
Cannolloni Coccoon
Flavor of Magic
Jaba�ero Saucesphere
Jalape�o Saucesphere


Flavour has a u, "Cannelloni cocoon", jabanero/jalapeno are fine without any fancy lettering. Crossbow Fever should have a space, not an underscore, and Tasteful should be "Summon Tasteful Items". Kung Fu Hustler just isn't implemented yet.

bordemstirs
01-13-2011, 06:46 AM
"Summon Tasteful Items". Kung Fu Hustler just isn't implemented yet.

You are my hero.
EDIT: Kung Fu would still work as to_skill isn't ever used in my script. Facepalm.

As for Tasteful Items, I use skills.php to gather that info... does Tasteful have quotes in the drop down, does anyone know?

StDoodle
01-13-2011, 07:55 AM
... does Tasteful have quotes in the drop down, does anyone know?


<option disabled="disabled" value="8201">Summon Tasteful Items (5 MP)</option>

peacy
01-13-2011, 11:22 AM
Nice one. I am interested to see where it is going.

I found out that your background changing is not working in chrome.
If you change:


write(".skhcperm {color:");
writeln(getOpt("skillhc")+";}");
writeln(".skhcperm img {width:30px; height:30px; border-width:5px}");

to:


write(".skhcperm img {width:30px; height:30px; border:5px solid ");
writeln(getOpt("skillhc")+";}");

the problem seems to be fixed. Same for the other skills as well.

Also a cosmetic thing that does not currently probably do anything but you can drag already permed skills into the perm box.

fronobulax
01-13-2011, 12:44 PM
Aside from the small handful of skills that are automatically marked HP, isn't that true?

There may be an operator expectation error. My perfect tool would display three different categories of skills - skills that are HC perm'd, skills that are SC perm'd and skills that are currently possessed. The order is deliberate because of the subset relationship between them. Report the skill in the most restrictive subset. There are also skills that exist but are not possessed.

In other words I was expecting a skill to have one of four status values: Skill exists; Skill exists and is possessed; Skill exists and is SC perm'd; and Skill exists and is HC perm'd.

My bug report might be rephrased as saying that the skills I possess but are not perm'd either way are showing up with the same color as the skills I don't possess.

Given your response, it may very well be that the script deliberately does not make that distinction, in which case This Isn't The Script I Am Looking For. My problem, not yours and I will use it for some of my characters, just not all.


This was just to let you know that #rrggbb colors are also supported; should you choose to use named colors, you're welcome to do so. As for needing to know what those hex values are in the meantime, well... you should have some vague idea of which skills you've permed and can deduce them by looking at the small border around the image.

Since the default values were #rrggbb it was not clear that any other format was acceptable input. I infer from your response that named colors can be used and it is my sincere hope that when I go to try that out the display will continue to have the name I understand and not revert to #rrggbb.

Note my response above. The reason #rrggbb was a PITA for me was because the character I was using did not have enough skills color coded for me to infer what the colors mean.

Speaking of colors, when the script meets your satisfaction you might consider explaining why you have grouped things together with background colors. Some of the groupings make no sense to me and I presume that is because I lack some key KoL knowledge since my play is casual and sub-optimal.

AlbinoRhino
01-13-2011, 03:41 PM
It seems to be failing to detect that Cannelloni Cocoon is hardcore permed on another character. "Cocoon" is spelled "Coccoon" in the script.

It keeps getting better and better !

bordemstirs
01-13-2011, 10:51 PM
In other words I was expecting a skill to have one of four status values: Skill exists; Skill exists and is possessed; Skill exists and is SC perm'd; and Skill exists and is HC perm'd.

My bug report might be rephrased as saying that the skills I possess but are not perm'd either way are showing up with the same color as the skills I don't possess.

Given your response, it may very well be that the script deliberately does not make that distinction, in which case This Isn't The Script I Am Looking For.


I suppose I could add support and default the color to match the Don't Have It color. Curse you.


Changelog:
2010.01.12: v1.5 added skills currently available to planner. Defaults to match skills not permed. Adjust accordingly


it is my sincere hope that when I go to try that out the display will continue to have the name I understand and not revert to #rrggbb.
The script doesn't really do anything with what you put in the boxes but save it and insert it into the final HTML, so however you type it it will stay that way.

Speaking of colors, when the script meets your satisfaction you might consider explaining why you have grouped things together with background colors. Some of the groupings make no sense to me and I presume that is because I lack some key KoL knowledge since my play is casual and sub-optimal.
Some of the colors are designed to fit the skill sets they represent, however for a few of the more broad sets of skills, I couldn't think of a color that "fit" so I was really just sort of attempting to find a color that didn't clash horribly with the colors already present.
If anyone has a better idea for Traveling Trader, Hodg, AT Hobop, and Crimbo skill colors, let me know and I'll see how it looks. I'm not all that satisfied with the copious amount of pink either.
EDIT: So, upon re-reading I noticed you were questioning the groups themselves and not the colors chosen. In which case I could perhaps better answer if I knew which particular groups you were having trouble grasping. Most are pretty straightforward, and there's even the first column that contains the identifier of the primary information in a given row (some of which are links themselves, if you'd like to follow them for possible clarification.)

"Cocoon" is spelled "Coccoon" in the script.
I should just quit now... I had two typos in one skill, and only fixed half. Wow.

AlbinoRhino
01-14-2011, 10:13 AM
So close ! It's now reporting 5 hardcore and 110 softcore. Error is occurring at Disco Bandit, level 11.

From the Wiki:

On March 18, 2008, the skill was renamed from "Crossbow Fever" to "Disco Fever" and was applied to all ranged weapons. Previously, the bonus had applied only to crossbows.

fronobulax
01-14-2011, 12:15 PM
EDIT: So, upon re-reading I noticed you were questioning the groups themselves and not the colors chosen.

Rainbow gravitation. The sub-column beginning with the Ballad of Richie Thingfinder.

I recognize that the layout is a somewhat arbitrary preference so my question is whether you had some gameplay related reason for creating the groups that include the above skills. Thanks.

bordemstirs
01-14-2011, 10:03 PM
some gameplay related reason for creating the groups

Rainbow Gravitation is a skill you get from Rainbow's Gravity, which was originally available through the Traveling Trader. So it matches the group above it, which are all the Class Skills that were made available through other items released by him as well.

The sub-column starting with Ballad is Hobopolis-colored, because those items all drop from the bosses in Hobopolis, and their vertical alignment in the last column is because they are are Accordion Thief buffs.

fronobulax
01-14-2011, 10:37 PM
Thank you.

AlbinoRhino
01-19-2011, 09:03 PM
Would it be possible to add an option to disable display of the queue ?

bordemstirs
01-20-2011, 04:59 AM
Would it be possible to add an option to disable display of the queue ?

Yes, yes it would.
Give me a day to see if the simplest solution doesn't cause JS issues, and you'll have it.

AlbinoRhino
01-20-2011, 11:42 PM
Wow. That was fast ! Thanks !

AlbinoRhino
01-22-2011, 05:53 AM
The 'hidden' setting appears to be forgotten each time you leave the script page and has to be reset each time you view the page ?

A. Nonyme
01-31-2011, 11:50 AM
Your version is not wokring with chrome. I attach a modified version that works on it. You might want to test it on IE though, because I do not have any IE available...

bordemstirs
02-03-2011, 02:46 AM
EDIT: compared version number in your fix to forum data (and that of my own), and you should see that the problem was already fixed in chrome (though not posted, because I'm a tard). Thanks anyway.

bordemstirs
08-20-2011, 07:26 AM
Okay. I made this a bit shinier, and added a link for those that aren't familiar with the colors (I also made all the default colors names, to minimize confusion).
I'm not... sold on how the totals look at the top, but I'm open to ideas if anybody doesn't like the way it's written as is.

AlbinoRhino
08-20-2011, 12:27 PM
Thanks for the update ! I think "Doppelshifter" is misspelled (at least in the hover text). The script doesn't seem to recognize that I have one.