Thursday, May 7, 2009

Still Writing...

Last night I finished my rewrite of EVE Agent’s code. Well, mostly. There’s still one small bug in it that I can’t quite figure out, but I think one or two lines of extra coding will catch that exception.

My Agent used to warp out to an asteroid field, lock three targets and mine for about 6 minutes. It was all done on timer and if the agent's lock on an asteroid was broken it would not try to acquire a new target. And, as it turned out, the agent's targets were being broken a lot. Pirates would do it sometimes. Other times he’d be mining a rock when it would unlock because it had run out of ore. Well, the old agent would simply wait until it was time to warp home and do so, regardless of how full his holds were.

Not the new the agent! This guy has achieved what I call “Target Continuity”. He maintains three locks on asteroids (the three nearest ones) and whenever one of them fails he reacquires a lock. This agent can even tell when a mining laser is firing and so he can literally mine until his cargo hold is full. I’ve also got a trigger to tell me when the cargo hold is full so I know when to warp home and empty my load.

This last bit (the cargo hold trigger) is what failed last night, leaving me in space trying to mine with a full cargo hold for some amount of time. I’m thinking about putting a failsafe into the code so that it’s “when your cargo hold is full, or when 20 minutes have passed, whichever comes first.”

But, even with that bug I managed to make something like 30 million ISK last night, I think. I can’t recall if I left old ore sitting in my inventory and, if so, that’ll taint the average. I’m hoping to get more accurate numbers tonight.

No comments:

Post a Comment