Tales of Maj'Eyal

Tales of Maj'Eyal

Not enough ratings
Player AI
 
Rate  
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
0.066 MB
Sep 23, 2015 @ 6:48pm
Oct 16, 2015 @ 11:41am
5 Change Notes ( view )

Subscribe to download
Player AI

Subscribed
Unsubscribe
Description
TOME FORUM LINK: http://forums.te4.org/viewtopic.php?f=50&t=45000

This addon adds a keybind to activate the new player AI. Set to Alt+F1 by default.
It will clear an entire floor or stop when it hits 1/4 health in the presence of enemies.
This AI has undefined behavior in the Sandworm Lair, use it there at your own risk.

COMPATIBILITY WARNING: This addon superwrites Player:act(). If another addon also touches Player:act() change the load order so that the Player AI addon loads *last*.

VERSION 1.5.1 FEATURE DESCRIPTION:
  • Rests!
  • Autoexplores!
    • Uses autoexploration from ToME core
  • Uses talents!
    • No exceptions yet for talents like Meditation or Phase Door to use them intelligently
    • Chooses talents at random
  • Attacks enemies!
CURRENT BUGS:
  • MAJOR: Any skill which causes a menu to be opened (like Command Staff) will crash the game when used by the AI.
  • Sometimes the AI will start bouncing between the entrance and exit of a level. If it does, hold in ESC and it'll stop once it hits an endpoint.
  • The AI still has trouble understanding water. It doesn't know about waterbreathing, and it doesn't recognize "bubbles" as air. So it's going to complain about suffocation constantly while it's underwater, but paradoxically seems to always move in the intelligent direction while doing so.
  • The AI assumes it is safe when attacked from unseen enemies, including when it is blinded in combat
  • The AI sometimes falls through to its "wait a turn" case when it doesn't seem necessary

v1.5.1 PATCH NOTES:
  • Updated the cast tracking system to check if a talent has failed
    • If a talent fails, the AI will not try to use that talent again that turn
v1.5 PATCH NOTES:
  • Fixed a bug with "waiting" where the AI called the wrong function to wait and ended up hanging.

Stuff I'm Working On (NOTE: Development on indefinite hiatus):
  • A "hunting"/"fleeing" AI state(s) to react to damage taken while out of combat
  • Configuration settings for various talent uses, the low-health exit threshhold, etc.
  • Stopping the AI when in sight of a Boss.
< >
38 Comments
Charidan  [author] Mar 24 @ 2:14pm 
Thanks for the tip, I'll check it out.

I've seen a few "configuration menus" but they've mostly been smallish things where you click on a field and input a single value; really clunky to work with on a large scale and impossible to just see all the values. I'm ambitiously going for something more like the main game's settings panel with two-column format.
Yusu Mar 24 @ 4:16am 
Actually, codefly has made mutliple mods with configuration menus. (Turn Seperator, Improved Combat Text, Streamlined Early Game)
Charidan  [author] Mar 23 @ 7:51pm 
The next major change is going to be configuration options, but I haven't worked out how to get a menu to work (and I haven't been actively investigating). I don't think anyone has bothered making a fully featured options menu, and i'm not sure there directly exists support for one. I think I'm going to have to dig into the core game and steal the menu code manually, so I keep putting it off. Which is why there's been 6 months with no word from me. Sometimes I tell myself I'll actually work on this mod again but I don't always believe myself.
Yusu Mar 22 @ 3:23pm 
For example, I would love the AI to stop not only on sight of bosses, but also rares and everything above.
Yusu Mar 22 @ 3:22pm 
I would love to see work on this guide continiued, as it potentially improves the early game by a LOT :) Unfortunately, you die way too often on higher difficulties with this and disabling the AI is WAY too unresponsive to help against that.
Charidan  [author] Jul 11, 2016 @ 9:54am 
Stopping when in sight of bosses is a good idea. I also need to add a fix someday so that it breaks when taking damage with no enemies in sight, to prevent the "being attacked by an unseen enemy" death spiral. This will have the irritating side effect of breaking when poisoned though, so maybe there is a better fix for that.

I still don't have any time scheduled for developing this mod, but these tantalizingly realizable fixes have tempted me.
Turambar Jul 11, 2016 @ 8:56am 
And I found another bug: my character began to rest in sight of an immovable ranged enemy, so he would rest/lose life/rest/lose life/... The only way to stop it was right click on a tile, then "move to"
Turambar Jul 11, 2016 @ 8:25am 
It is very useful! Aside from the bouncing bug (you'll figure it out, I'm sure, courage!), you should add the option to stop when a boss is spotted (maybe even for rare/elite enemies, or when X enemies are visible, but for bosses it is really important)
kabapow Apr 3, 2016 @ 7:13am 
I hope you figure it out! Holding ESC did the trick so much better than holding Shift + Z and praying for it to stop!!! Thanks for the help.
Charidan  [author] Apr 2, 2016 @ 10:47pm 
BTW, holding the ESC key will cancel the bouncing, so that's a good trick.