• June 2017
    M T W T F S S
    « Feb    

A Tale in the Desert: A Geek’s Paradise

A Tale in the Desert is indeed a geek’s paradise. It’s an MMORPG that is different than most. MMO players might refer to it as “that crafting game”, but it really is a lot more than just that. Although I have played the game from its inception nearly 8 years ago, when asked what the game is about I still have a difficult time explaining it. ATITD is indeed a crafting game; there is no maiming and killing. It also has a lot of puzzles, and some extremely complicated game systems. The creator of the game, Andrew Tepper, is a mathematician. Part of the challenge of the game is to actually figure out how it works.

That description still doesn’t capture the true nature of the game, and why some people love it. In the following post I will attempt to capture just one of the major aspects of the game that attracts me: the ability to create third party macros to assist with the grinding aspects of the game. Yes, macroing is allowed in ATITD. However, unattended macroing is strictly forbidden, and getting caught will definitely result in a banned account. Also worth mentioning is that one of the most successful players in the game that I know of doesn’t macro at all; players can still be very competitive and not need to use macros in ATITD.

I’ve recently been preparing for the new “shard”, or server that is coming out this month. Unlike other MMO’s, A Tale in the Desert has a beginning, a middle, and an end. ATITD is on its 4th “telling”. A new idea however was introduced by an ATITD game master: sharding. The beginning of a Tale is often more fun for players, and players who start playing the game at the beginning of a tale are more likely to stay throughout its course. So, the idea of creating a second shard of Tale 4 has come into the works, and I intend to play on it.

I started going through my macros as preparation for the new shard, and realized that there were a few I was missing that I wanted to have at my disposal. I decided to start with a Barrel Vise macro. Barrel Vises are used to make barrels, which are used to store wine and beer, which if you drink enough of give your avatar permanent increases in the Perception stat. The most effective way of gaming this is to create lots of barrels so that you can fill them with lots of different kinds of wines. The process of making a barrel on a Barrel Vise is one of the many mini-games within ATITD. I’m not very good at it.

The “official” documentation from the player-maintained wiki is here, but I will quickly explain how this mini-game works. The Barrel Vise interface has four bars: Fuel, Flame, Heat, and Progress. The idea is to add wood as Fuel, which increases the Flame. If the Flame is higher than the Heat, the Heat will grow. If the Heat is above 50%, Progress will be made on the making of the barrel. Finally, if the Flame reaches max, the barrel incinerates, and all materials are lost. Here is a pic of my avatar after a few rounds of building the flame up.

Once the Heat gets up to 50%, it turns red, and Progress begins! It then becomes a game of adding more wood to keep the Flame and Heat high, without letting the Flame get maxed out.

Now for the fun part, the macro. The macro program that I use, and is very popular in the ATITD community is AuotHotKey. AHK also comes with AutoIt’s Window Spy, which is useful for getting screen coordinates for mouse clicks and colors.

I started by getting the blue color of the status bars. Window Spy made that part easy. Next, I found the coordinates of the Fuel bar. The Fuel bar should have two “ticks” or levels of wood if the Flame can jump another tick itself, and one wood if the Flame is already too high and you don’t want it to jump. I simply took an X coordinate reading of the Fuel bar when I added one wood, then again when I added two wood. The next part was the tricky part, measuring how far I wanted the Flame to go before adding two pieces of wood to the Fuel. I took a conservative eyeball measurement after going through a few runs and incinerating a few barrels. The point is almost all the way to the right side of the Flame bar (near where the Flame bar ends in the second screenshot above), but still leaves room for random spikes (Flame increases are a random measurement within a certain unknown range). I then added some code to see if the barrel is done by updating the UI for the Barrel Vise. For humans, determining if a barrel is done is easy; the Progress bar will go all the way to the right and the mini-game will stop. This was hard to measure by reading colors on the bars within AHK. So instead I wrote a couple of lines that look for the “Take” option which also appears when a Barrel Vise has successfully made a barrel. The macro then takes the completed barrel off of the Barrel Vise and into the avatar’s inventory, and starts making another barrel (remember, I want lots and lots!).

Here is the resulting AHK code:

; Barrel Vise macro by Daniels 02/01/2010
; Using 1280, 1024 game res

; The following should stop runaway macros
; ctrl-alt-p and ctrl-alt-r

; Barrel Vise - Pin window in upper left of screen.  Coordinates are for Guilded barrel vice.  Pin when it is completely empty.
; alt-shift-b to start the macro
IfWinExist eGenesis Client
	SetDefaultMouseSpeed, 0

;;;;;;;;;;;;;;;;;;;;;; COORD VARIABLES ;;;;;;;;;;;;;;;;;;;;;;
	winX := 95 			; Top of window X/Y Coords, used to select and update the pinned window
	winY := 50
	makeX := 95 		;Make button and also Take X/Y Coords
	makeY := 90
	takeAllX := makeX + 20 
	takeAllY := makeY + 5
	stokeX := 170		; Stoke Button X/Y Coords
	stokeY := 230

	barHighX := 194 ; right most edge of the bars
	barMaxFlameX := 175 ; Max Flame wanted, do not have 2 wood in Fuel passed this point.  May need to adjust.
	bar1WoodX := 78 	; Coord for determining if at least 1 wood is in Fuel
	bar2WoodX := 85 	; Coord for determining if at least 2 wood is in Fuel
	fuelBarY := 170  	; Y Coord for Fuel bar
	flameBarY := 185 	; Y Coord for Flame bar
	heatBarY := 200		; Y Coord for Heat bar
	progressBarY := 218 ; Y Coord for Progress bar
;;;;;;;;;;;;;;;;;;;;;; MAIN PROGRAM ;;;;;;;;;;;;;;;;;;;;;;

	Loop, 100 ; number of barrels to make
		; Click "Make a barrel"
		MouseClickCoords(winX, winY)
		MouseClickCoords(makeX, makeY)
		Loop, 10000 ; Maintain Heat
			curFuel1 := FindBlue(bar1WoodX, fuelBarY)
			curFuel2 := FindBlue(bar2WoodX, fuelBarY)
			curFlame := FindBlue(barMaxFlameX, flameBarY)

			if (curFlame > 0)
				if (curFuel1 > 0) ; Add 2 wood
					MouseClickCoords(stokeX, stokeY)							
					MouseClickCoords(stokeX, stokeY)
				else if (curFuel2 > 0) ; Add 1 wood
					MouseClickCoords(stokeX, stokeY)

			MouseClickCoords(winX, winY)
			ImageSearch, OutputX, OutputY, 15, 80, 60, 105, *50 Take.PNG
			if (ErrorLevel < 1)
		; Unload barrel
		MouseClickCoords(winX, winY)
		sleep 500
		MouseClickCoords(makeX, makeY)
		sleep 500
		MouseClickCoords(takeAllX, takeAllY)
		sleep 500

MouseClickCoords(X, Y)
	MouseMove, X, Y
	sleep 100
	sleep 100

FindBlue(TX, TY)
	PixelSearch, PX, PY, TX, TY, TX+1, TY+1, 0xFD0606, 55, Fast
	return ErrorLevel

I was very happy when this macro made 16 barrels in a row without incinerating even one of them! Now, I will definitely be prepared for mass production of barrels for lots of wine and beer on the new shard. Now if only I could macro making glass, growing vegetables, and probably a slew of other tedious tasks that I am forgetting about. I can now sit back and enjoy the parts of the game that I like without worrying about the prerequisite grinding!

As I mentioned before, one does not need to macro in ATITD in order to be competitive. In fact, one of the most productive and advanced players in the game (the only Sage, I believe, or someone who has passed a certain amount of hard-to-obtain Tests) plays on a Mac and doesn’t macro at all (hi Rob!). For those who would like to use this macro though, see the wiki page where it is hosted for the full macro and documentation on how to use it here. Note that you may have to alter the X and Y coordinates of the macro to suit your operating system and screen resolution.

A Windows SSH Client with Tabs

I’ve decided to upload my SSH client code, written in C# for Windows, to Sourceforge. This is very unfinished, buggy, and probably not well written. There is no installer yet. I need to update the telnet code since the library I am using (and had to hack to include some basic telnet negotiation code) has been updated. I am not sure how much of the telnet code I need to change, but the library looks like it has been improved quite a bit. The site manager portion of the code is also very unfinished, and I would like to finish that as well before making an installer for this program.

Here’s the code