Page 1 of 1

[1.0.4] Auto-Advance/Attack Addon

Posted: Mon Jun 10, 2013 9:48 am
by Jack Trades
A small addon that adds an action that automatically walks PC towards the nearest enemy and attacks him.

It should be useful for melee characters that are tired of clearing rooms filled with low-level enemies like rats, since with this addon you can just mash X to clear the room.

You can change the shortcut in Key Configuration menu under Actions group.

I don't take any responsibility for any accidental deaths caused by recklessly using my addon. ;)

Download it here: http://te4.org/games/addons/tome/auto-advance-action

Known Issues:
* PC doesn't approach enemies properly if there are obstacles in the way.

To other addon makers:
I'm still not familiar with ToME scripting very well. Right now I calculate the direction to move towards the enemies using "util.getDir" but that doesn't work when enemy stands around the corner.
Is there a better function to calculate direction of the next step to take when moving from A to B?

Re: [1.0.4] Auto-Advance/Attack Addon

Posted: Mon Jun 10, 2013 8:14 pm
by Jack Trades
Updated the addon. Fixed some small errors and tweaked the logic a bit.

Re: [1.0.4] Auto-Advance/Attack Addon

Posted: Tue Jun 11, 2013 3:21 am
by lukep
Can't you just use the standard AI move function?

Code: Select all

self:runAI("move_simple")
is it, but you will need to add in a few inputs.

Re: [1.0.4] Auto-Advance/Attack Addon

Posted: Tue Jun 11, 2013 1:33 pm
by Jack Trades
lukep wrote:Can't you just use the standard AI move function?

Code: Select all

self:runAI("move_simple")
is it, but you will need to add in a few inputs.
Thanks, I'll look it up.
I'm just not that familiar with ToME functions.

Re: [1.0.4] Auto-Advance/Attack Addon

Posted: Tue Jun 11, 2013 2:31 pm
by Jack Trades
lukep wrote:Can't you just use the standard AI move function?

Code: Select all

self:runAI("move_simple")
is it, but you will need to add in a few inputs.
I looked it up but I have to admit that I have no idea how to properly call runAI, any tips?

Re: [1.0.4] Auto-Advance/Attack Addon

Posted: Wed Jun 12, 2013 4:52 am
by lukep
Ah, not from me. At least not really. I thought Shadow Veil would work as an example, but it just calls the actions directly.

Re: [1.0.4] Auto-Advance/Attack Addon

Posted: Tue Jun 18, 2013 8:20 am
by Jack Trades
I have a problem with my addon being "wrong version" and forcing players into offline.
I have entered a (seemingly) correct MD5 supplied by te4_log.txt but the game doesn't seem to recognize it.
Any ideas about what I might be doing wrong?

Re: [1.0.4] Auto-Advance/Attack Addon

Posted: Tue Jun 18, 2013 8:31 am
by HousePet
Re enter the md5.

Re: [1.0.4] Auto-Advance/Attack Addon

Posted: Tue Jun 18, 2013 9:07 am
by Jack Trades
HousePet wrote:Re enter the md5.
I did that several times already, that didn't change anything.

Re: [1.0.4] Auto-Advance/Attack Addon

Posted: Tue Jun 18, 2013 10:01 am
by HousePet
Could be a side effect of recent website changes then :/

Re: [1.0.4] Auto-Advance/Attack Addon

Posted: Tue Jul 16, 2013 12:48 am
by Doctornull
Aww, too bad.

This is a nice addon, but it's not worth losing access to my Item Vault.

Re: [1.0.4] Auto-Advance/Attack Addon

Posted: Sat Feb 27, 2016 4:59 am
by crapmeiste
Hey, I really like this addon but the problem mentioned above is still there, has anyone found a way to fix it?