User script - how much are you worth + Wardrobe!

This was another feature I considered; then I realized the names would be disturbingly long if I added them there - plus, the user can add any relevant information they want in the name. Although, there is room on the outfit chooser; I could add the stats for each outfit after the name link. That would be pretty neat actually.

The complexity is funny - when it was simple, it was taking me a long time to debug and add features. Now that I’ve complexified it all up, new features tend to be a short function or two, and debugging is much faster. It’s still a bit scattered, but it has much better compartmentalization and functions are much more clear.

Hmm… I’m not sure how useful adding each outfit to the CSV would be; it might be more useful to add the maximum stat bonus possible for each stat. I suppose I could do it either way though. Or both ways. I really ought to get around to adding an options screen for things like this
:)
edited by TheDaveEBZ on 5/4/2012

Seems to work fine now - thanks!

That’s what I was suggesting, only I was being clear as mud…

Well, that’s how software development works. Trust me, I code for a living. The hard part is building a good structure. Once that is done, adding features and fixing bugs is very fast AS LONG AS you grok the structure.

[quote]Hmm… I’m not sure how useful adding each outfit to the CSV would be; it might be more useful to add the maximum stat bonus possible for each stat. I suppose I could do it either way though. Or both ways. I really ought to get around to adding an options screen for things like this
:)
edited by TheDaveEBZ on 5/4/2012[/quote]
I was thinking about outfit_name, +Dangerous, +Watchful, +Persuasive,… +Total, Hat_name,…constant_companion_name
One option that I think will save many people many bad experiences is the ability to ignore menace raising items on automatic outfits.

That’s what I was suggesting, only I was being clear as mud…[/quote]

All right, done. Except it looked cluttered to my eye; so I made it optional. Since you have shown you don’t mind poking around in the code, just look at the top - there will be an “Options” structure, it should be obvious what to do. I’ll eventually get around to adding user-selectable options… probably.

Edit: Oh, and you’ll need to re-create any saved outfits for the stats to show up on custom outfits. They will display automatically on the automatic outfits of course.

[quote=Vyrlokar]
Well, that’s how software development works. Trust me, I code for a living. The hard part is building a good structure. Once that is done, adding features and fixing bugs is very fast AS LONG AS you grok the structure. [/quote]

The hard part is that the structure you need is always so much clearer once you’ve coded the whole thing…

[quote=Vyrlokar]
I was thinking about outfit_name, +Dangerous, +Watchful, +Persuasive,… +Total, Hat_name,…constant_companion_name
One option that I think will save many people many bad experiences is the ability to ignore menace raising items on automatic outfits.[/quote]

That would be a very wide CSV. The trouble (well, one of the many troubles) with CSV is that it is supposed to be a constant width format. Meaning that every entry would need an empty column for every column in the outfit name.
edited by TheDaveEBZ on 5/4/2012

[quote=Dave ]All right, done. Except it looked cluttered to my eye; so I made it optional. Since you have shown you don’t mind poking around in the code, just look at the top - there will be an “Options” structure, it should be obvious what to do. I’ll eventually get around to adding user-selectable options… probably.

Edit: Oh, and you’ll need to re-create any saved outfits for the stats to show up on custom outfits. They will display automatically on the automatic outfits of course.[/quote]
Thanks! much better now. Better than having tooltips on the outfit chooser.

That’s a given. You won’t find the right way until you’ve tried all the wrong ways. The trick is how fast do you realize that you’re on a wrong way.

[quote]
That would be a very wide CSV. The trouble (well, one of the many troubles) with CSV is that it is supposed to be a constant width format. Meaning that every entry would need an empty column for every column in the outfit name.
edited by TheDaveEBZ on 5/4/2012[/quote]
Ok, I get the issue. Too bad.

Anyway, I’m +18/+29/+20/+21/+9/+6/+8/+52 (totals on the outfit picker) ;)

I’m partial to ternary operators because they’re the only way to say “otherwise”, as:

Going north on the highway? turn right. Otherwise: turn left.

But. When I first learned the clarinet in fourth grade, I started off playing the notes plain. Then we learned the trill. Once I discovered that brilliant skill, I trilled and trilled, and thrilled, until one day when the class was practicing a piece and there I was, in the back row, trilling every other note.

“Keep it down, there, Mozart,” said the music teacher.

Alas, I fear my soft spot for the ternary may be a repeat of my soft spot for the trill. I was explicitly instructed not to use the ternary operator in the last programming class I took ;)

It… ah… could be worse. Let’s just say two things about my last programming class. 1) It is possible to re-write the famous “Windows Starfield” screensaver that is the default on every computer in the school to occasionally… hit one of those stars. And drip blood. 2) I was cited as the reason my programming teacher left the teaching field. Her retirement speech started “I used to think that all children were, deep down, good at heart… but then I had a class with Dave.”

Fortunately, outside of a school environment I did much better. My biggest complaint during code reviews on the job was to stop using British spellings of comments and variables. (I’m not British.)

The two major "don’t"s I still remember from programming classes, even though I have since disregarded them even as guidelines are:

[ul][li]Do not use gotos because they make your code harder to read (to be fair, she was a teacher who had to deal with dozens of fist time coder’s programs every class, so I can see why she might think it was an issue even though goto was and still often is the most efficient way to get to the piece of code that actually needs to run).[/li][li]Do not use breaks… and I have never gotten a decent excuse out of her for that one.[/li][/ul]As I mentioned, I have subsequently disregarded these particular pearls of “wisdom”.

Edit: I just changed my outfit without even leaving my story tab. That, even if no other feature were implemented, would have been worth a download. The only downside to doing this is that your wardrobe is not displayed on the story tab, so you don’t know with an absolute certainty that your wardrobe was equipped correctly. That can cause some issues if that one error I encountered earlier reoccurs though it still hasn’t yet.
edited by Abraham Bounty on 5/5/2012

[quote=Abraham Bounty]The two major "don’t"s I still remember from programming classes, even though I have since disregarded them even as guidelines are:

  • Do not use gotos because they make your code harder to read (to be fair, she was a teacher who had to deal with dozens of fist time coder’s programs every class, so I can see why she might think it was an issue even though goto was and still often is the most efficient way to get to the piece of code that actually needs to run).[/li][li]Do not use breaks… and I have never gotten a decent excuse out of her for that one.

When given similar advice, I replaced all my GOTOs with COMEFROMs. I’m beginning to see why my teacher retired.

[/li][/ul]I did get an excuse out of my instructor for that one, and it made some sense to me. It went along with a general idea of keeping functions as atomic as possible: single-entry, single-exit, and all that. Don’t return a value and also change a global variable value. Don’t use globals for that matter.

My instructor was named … Dave. Fortunately for all, not The Dave.

In Opera, the Wardrobe option doesn’t appear on “Myself” so you can’t save custom outfits, but you can do the pregenerated ones.

In Firefox 11, the custom outfits don’t use the lodgings options.
edited by an_ocelot on 5/9/2012

[quote=an_ocelot]In Opera, the Wardrobe option doesn’t appear on “Myself” so you can’t save custom outfits, but you can do the pregenerated ones.

In Firefox 11, the custom outfits don’t use the lodgings options.
edited by an_ocelot on 5/9/2012[/quote]

Fixed in Opera now.

Not sure about Firefox 11, looks like both my test machines are on 12. Since my usual development box is down (Microcenter where are my parts?!) I don’t have any virtual machines ready to play with older versions at this moment.

Thank you for the Opera fix!

Didn’t realize Firefox had gone to 12–I thought it was on autoupdate–so no worries there!

An unexpected dividend.

Some of you might have noticed (or possibly it was just me) that Google Docs went down last night. Of course, Echo Bazaar turns wait for no Google Service so I played anyway, meaning that my Doc became somewhat out of date.

This script made updating my sheet far smoother than it otherwise could have been.

On a related note, how exactly are you suppose to use the CSV? I see it, and copy it, but when I paste it to a Google doc, it does not divide itself up into cells nicely. Each line goes in the first cell of each row. Am I suppose to do a Find/Replace ‘,’ for ’ ’ in a text browser first?

Google docs can import CSV. It’s under “File” and then “Import.” I believe it can put the results in a new file, a new sheet, or a set of cells, as you request.

Ah, I see. I was trying to copy and paste it directly into an otherwise blank sheet.

It appears that the totals displayed for the various maximizing outfits only take into account the standard inventory. This doesn’t impair the actual maximization, as the appropriate items in the expanded inventory are also equipped, but it is misleading.

Not in Chrome with Tampermonkey…

EDIT: (In Chromium+Tampermonkey, what I’m using, all items show correctly in the wardrobe window). What browser are you using?
edited by Vyrlokar on 5/27/2012

I’m on Firefox. The only thing that’s incorrect for me is the displayed total.

Not in Chrome with Tampermonkey…

EDIT: (In Chromium+Tampermonkey, what I’m using, all items show correctly in the wardrobe window). What browser are you using?
edited by Vyrlokar on 5/27/2012[/quote]

[quote=Valerie Kaplan]I’m on Firefox. The only thing that’s incorrect for me is the displayed total.

Not in Chrome with Tampermonkey…

EDIT: (In Chromium+Tampermonkey, what I’m using, all items show correctly in the wardrobe window). What browser are you using?
edited by Vyrlokar on 5/27/2012[/quote][/quote]

I loaded up Firefox again to test this, and I’m not seeing this issue personally. The totals shown in Firefox match those shown in Chrome for me. Can you check again? Are you running any unusual plugins or ad-ons?