Showing posts with label Macro-Hauling. Show all posts
Showing posts with label Macro-Hauling. Show all posts

Saturday, June 6, 2009

The Macro Hauler experiment continues...

I’m using autopilot to move between systems. I know, it’s not really efficient but it is effective. Today or soon (haven’t decided which) I’m going to implement the “sniff a bunch of points” concept and once I do I should be able to set a destination, and then intelligently warp to zero all the way there. That will significantly increase the speed of my agent.

But speed doesn’t matter yet; I’m still in the “Prove this will work” phase. After adding some more code so that I don’t deny courier missions (any of them, this time) the agent seems to be working like a champ.

I need a task list.
* Create a Warp To Zero function, and put it in your master class, which will replace your autopilot code
* Test the Hauler Agent on level 2 courier missions
* Eventually you’re going to have to test a missions not only for “Is it a courier mission” but also “Does it go through low-sec.” Don’t forget this – it could be embarrassing!
Yeah, there’s probably more I’m missing but I’m tired and I’ve been staring at the computer for too long.

I’m up to about 500 million ISK now, a new high-water mark for me. The courier missions have slowed my income a lot…I make a pittance on them, and for ISK they’re a real waste of time. At least, the level 1’s are.

Friday, June 5, 2009

Hauler works for a while, then breaks...

So I ran my Hauler Agent last night and got about 40 missions done before it crashed out. Well, it didn’t technically crash out; technically it right clicked in the wrong place and then crapped out. I’m beginning to think that the “sniff a single point and then react” process isn’t the ideal solution for EVE and perhaps a “sniff a bunch of points, and wherever it equals X, that’s the point you want” process will work better. The location of data is, generally, always in the same place with EVE, but it’s often a few pixels different between one iteration and another. This is because a mission’s title is two or three lines long, instead of one. Or a system’s name is so long it causes the click point to wrap around three lines instead of two like you coded for.

So I think I’m going to write a function that has an upper left bound, a lower right bound, and a “test color” variable. Then I can basically say “If you see this color inside this rectangle, then give me the point that equals that color.” Easy as EVE!

So how much corporation faction did I gain after 40 missions? I lost about .2! Why? Because of a glitch, which only occurred on missions whose names are longer than two lines long. The extra line caused my test points to be pushed too far down, and so the agent didn’t recognize it as a courier mission. Still, I managed to get 2 empire faction missions and after I completed them I gained about .2 empire faction. Slow, I know, but it’s the beginning. Things are always slow in the beginning!

Thursday, June 4, 2009

I'm not really a coder, I'm just a quirky MMO player...

I ran into several technical difficulties last night while I was debugging my Hauler Agent. I know that most people think that EVE’s an easy game to write programs for, but it really isn’t. There’s a million different ways the developers twist up the user interface to prevent it from looking the same way over and over again. You don’t notice it as a player, but when you start NEEDING the interface to be consistent it becomes an issue. For instance, it took me three different if/then statements just to determine if I had just been offered a courier mission. And then, for some odd reason, sometimes an agent will leave up the missions window and you can just read it without having to reopen it. Then, other times, they close the window and you have to click “View Mission” every time you dock. Why? Probably just to give me a headache.

So these difficulties have slowed down my development. I can complete a courier mission, start to finish, right now if all the stars align (puns make me smile) but that’s pretty rare. The agent usually breaks about halfway through, either deleting a bookmark (instead of warping) or failing to warp to the correct location.

But it’s not a total loss so far. This was the first time I’ve written a new agent from scratch and I was able to make huge structural improvements to the program. Instead of having all the code in one long function, I created several small functions. This made it a lot cleaner and easier to write, and has lead me to think that I should create a sort of “master” class. But that’s an issue for another day.