Harvest – A highly customisable farming script

That seems like it would address the same needs, so consider me +1 on the BBS to work the same way as CCS! About the only addition I would request is storing the per-task equip settings in something like _har_current_familiar just to reduce code duplication if the BBS wants to use those se
 
You could, but it would make the script more sensitive to the internals of Harvest (thinking of things like the sugar sheets setting and such).
 
Are we talking about the same thing here? By "sugar sheets setting and such" do you mean the settings set using the relay script? If so why would you rather access a Mafia property than the original zlib variable? Sorry if I'm being slow, sleep deprived remember ;).
 
I mean that there are settings within Harvest that will affect the final computed set of equipment. This logic could be duplicated in a BBS but just shoving stuff in temp preference means that the final computed data is just available. Its really a minor thing though.
 
So you mean things like this snippet from equip_gear()?
PHP:
	switch (current_activity())
		{
		case "puttyfarm":
			outfit = PUTTYFARMING_OUTFIT;
			fam = PUTTYFARMING_FAM;
			fam_equip = PUTTYFARMING_FAMEQUIP;
			break;
		case "bountyhunt":
			outfit = BOUNTYHUNTING_OUTFIT;
			fam = BOUNTYHUNTING_FAM;
			fam_equip = BOUNTYHUNTING_FAMEQUIP;
			break;
		case "duckhunt":
			outfit = DUCKHUNTING_OUTFIT;
			fam = DUCKHUNTING_FAM;
			fam_equip = DUCKHUNTING_FAMEQUIP;
			break;
		case "farm":
			outfit = FARMING_OUTFIT;
			fam = FARMING_FAM;
			fam_equip = FARMING_FAMEQUIP;
			break;
		default:
			failure("No activity was specified");

Hmm. I see your point, but I don't like the idea of adding a dozen more Mafia properties (feels messy). I suppose you could import Harvest into the BBS, but that would add to the total runtime. I'll have a think about it and see if I can come up with a solution.
 
Here's an idea for you. Your BBS is essentially overriding Harvest's default behaviour for familiars and equipment. Regardless of what your BBS does Harvest will continue to equip items and familiars before passing control to the BBS which will then decide on the best item or fam to equip. But since Harvest will have already equipped the default item or familiar *before* your BBS runs, your BBS can simply remember what was equipped before it adjusted things and then reset to the default when appropriate. Make sense?
 
So basically I'm saying that the BBS should be responsible for adding Mafia properties, not Harvest :P I'll put it together, won't be very difficult, and I don't know if you'd really want to mess with the relay script anyway. I know I'm always nervous when I edit it! One day I'll rewrite it I swear. Actually, you might want to whip a patch up for yourself because I won't spin the update until I've added the latest bunch of feature requests and bug fixes, and because (episodes of House aside) I have a reasonably heavy workload at the moment it might be a little while. But it sounds like you've already got something working at the moment, so maybe you'd be happy to write a BBS in anticipation of the update and leave things as they are. Up to you.
 
Really? Well done! Tell me, is the relay script as bad as I think it is? Or has it, like a monster under a child's bed, grown more and more terrifying by feeding on my fears? Ever played that game Topple? Writing the relay script was a bit like that.

Oh and if you ever get your magical item-producing familiar rotation BBS working smoothly please post it here. If it's simple enough for code-averse people to get to work with Harvest I'll link to it in the first post.
 
It really wasn't that hard, the worst part was how the zebra striping on the rows is handled. That could definitely do with some poking. Also it wasn't totally obvious at the start that I had to add the new settings to the map file.
 
Oh yeah, the strips. When I originally did it it was just an experiment and I never went back and fixed it up. I was going to get rid of the map file, but in the end I decided to keep it because it removed a whole lot of clutter from the script and allowed me to fix up typos and improve descriptions without having to force people to update.
 
The map totally makes sense, it would just be nice if there were some comments documenting the process of adding new settings (though I'm guessing it wouldn't matter much, the number of people would would be editing it either way are minimal).
 
OK, I'll remember that when I go over it again. The biggest headache for me was getting the JS to work (I had to resolve one problem by storing a cookie in the browser – I forget exactly why – but it had the added bonus of remembering which tab the user was on when they last ran the script). I started out writing that script with essentially no knowledge of HTML, CSS or JS, so it was a bit of a challenge :).
 
Heh, as a web dev by trade, it wasn't anywhere near as bad as some of the code I have to work with. If you have web-y features you want added (better selector boxes for stuff like outfits and familiars?) just let me know and I can poke it.
 
Oooh. Sounds good. Before that though, is there a way to fix the alignment on the checkboxes in the webkit browsers? I tried fiddling, but no matter what I did they ended up left-alligned in either Firefox or Safari and Chrome (they're supposed to be centre-alligned). It's a tiny thing but it's been driving me nuts.

What were you thinking of in terms of selector boxes for outfits and familiars? I don't really want a massive dropdown listing every single familiar in the game (it'd be a better idea to write a validator function), but if you have a better idea I'm all ears.

And what about a way of editing the buffbot buffs and effects-to-avoid data files from the relay script? I still can't think of a neat way of doing that.

You might regret that offer, I'll have you working forever! :D

And hey, if you want to completely rewrite the script (or just make it neat and tidy) feel free. As long as it looks the same and has the same functionality when you're done I'd love to see how I should have done it :). Fun fact: I literally spent hours fine-tuning the animations.

EDIT: Oh and graphs... Shiny shiny graphs.
 
Chosen doesn't appear to work in Safari (my favourite), and automatic scrolling (i.e.: scrolling when you put your mouse at the top/bottom of the drop down) doesn't work in Chrome for Standard Select, but otherwise, yes, looks really nice. I especially like Multiple Select.
 
Using any build higher than 10245 of mafia, I get the following error message while eating/drinking:

yellow drunki-bear is not an alcoholic beverage.
FAIL: yellow drunki-bear lev:6 gain:4.0 adv:24.0 musc:0.0 myst:0.0 mox:220.0 meat:5300 own:1 value:1785
Pass 2: drink.
drink: At 15, consuming to 19 with 4520 meat.
Favorite rockin' wagon is too fattening (4.0)- removing from consideration.
Favorite rockin' wagon is too fattening (4.0)- removing from consideration.
Waiting to consume...
yellow drunki-bear lev:6 gain:4.0 adv:24.0 musc:0.0 myst:0.0 mox:220.0 meat:5300 own:1 value:1785
Countdown: 3 seconds...
Countdown: 2 seconds...
Countdown: 1 second...
Waiting completed.

Any ideas?

Randomlord
 
Back
Top