Veras wrote:http://i.imgur.com/dj1HPZS.webm
Basically I just wrote a program that simulates Crawl-relevant keypresses in a pattern. It reads absolutely 0 information from the game, so it's not an AI of any form, just a dumb macro. I know it's nothing revolutionary, but I like to watch it and silently root for it nonetheless!
Notes and restrictions:
-Has to be a mummy, since a food clock would be hard to manage when we're effectively mashing buttons. As for class, Fighter is the best to spam tab with (winning over Gl in my experience since the extra defensive-oriented stuff helps in packs) and axes are a no-brainer since our mummy knows nothing of corridor fighting.
-Will get stuck infinitely if an enemy is in view but unreachable (plants, glass walls, etc.)
-Tie-in with the previous note, will be unable to do anything if TAB becomes unusable, most notably through low-HP. I think there's a way to shut this warning though, and I never use tab normally, so I wouldn't mind doing that if I knew how to.
-Sometimes takes so long turn-wise that OOD monsters will spawn. Vampire Mosquitoes on D:1!
And for anyone interested, here's some pseudocode for the key pattern it follows:
//Explore Loop
{
tab x8 //fight
shift+5 (wait 80ms) //rest
o (wait 200ms) //explore
space //--more-- handling
s //Stat increase, arbitrarily is Str
} x84
Y //Y/N dialog handling
//Leave Floor Loop
{
X, >, Enter (wait 100ms) //Go to staircase
> //Go to next floor
tab x8 //Fight enemies on the way
} x12
//And repeat.
//The numbers are more or less arbitrary and subject to change, I just found they worked well.
I hope you all found this interesting!
If you wanted to make it more effective, you could use G> to always go downstairs (As long as you've found at least one)
You can also do 'eaebecedeeefegeheiejekel.....eZ' to feed yourself at periodic intervals if you wanted to make it not require you be a mummy.
You could use "dZctrl-F<battleaxe><enter>=ibZ=iab,db,wadb" (and similar) to upgrade weapons, presuming you were using a gladiator and not a fighter (You could probably remove the shield and then try to wear it again after wielding, that way if you were still using a one handed weapon, you'd re-wear the shield, but if you were using a two handed weapon, it'd just fail.)
control-F<something><enter> is probably a good way to have your "blind macro" guy get various things you might have found and want.
It's interesting to wonder how "smart" you could make it.
Oh, and I'd probably just alternate {o} and {tab}, since you can only autoexplore if there's no critters in sight, and you can only autofight something if there is a critter in sight, so hitting o/tab is "Fight or explore there's nothing to fight"
I'd probably also have the the macro turn on autopickup of tomahawks and javalins, at game start (That way your {tab} would attack at range where possible, reducing damage taken)
If you turn off travel delays and waiting delays in your init file, you probably won't have to stick the waits in your macros.