RELEASED: Player AI

A place to post your add ons and ideas for them

Moderator: Moderator

Message
Author
jenx
Sher'Tul Godslayer
Posts: 2263
Joined: Mon Feb 14, 2011 11:16 pm

Re: RELEASED: Player AI

#16 Post by jenx »

As I suspected, it doesn't work with mindslayers at all. It deactivates and then activates Beyond the Flesh every turn lol.
MADNESS rocks

Charidan
Higher
Posts: 64
Joined: Wed Jul 22, 2015 8:12 pm

Re: RELEASED: Player AI

#17 Post by Charidan »

jenx wrote:It is also not using runes that do damage.
Really? I knew it would switch sustained powers as soon as possible, but I thought runes should all work by now. I don't have a good knowledge of damaging runes, can you give some examples?
Currently developing the Player AI addon. You can get it from the T-Engine Addon Hub or Steam
You can also view the source code.

Elkan
Archmage
Posts: 336
Joined: Wed Aug 08, 2007 12:23 pm

Re: RELEASED: Player AI

#18 Post by Elkan »

I know for a fact that it uses heat beam properly, I think the issue might be with the frozen cone rune not having an explicitly stated range, so the AI dosn't know when to use it, in any case, if you set the talents to use when in X range they will behave properly. as a workaround.
it is also useful to know that any talents you specify as auto use, will always be used when available, before the AI's choice. so you can priortise the most important moves/attacks, to ensure they fire off first.

Charidan
Higher
Posts: 64
Joined: Wed Jul 22, 2015 8:12 pm

Re: RELEASED: Player AI

#19 Post by Charidan »

Yeah, that's probably it. The AI makes sure it has a legal target before firing a targeted ability, so if the frozen cone doesn't tell it the range it won't know. Odd that it doesn't. I'd rather not add a range workaround just for one rune, as it would probably make the AI stupider as a whole.

Also, nice tip with the auto-use. I like gathering little things like that which the player can do to help the AI run.
Currently developing the Player AI addon. You can get it from the T-Engine Addon Hub or Steam
You can also view the source code.

Elkan
Archmage
Posts: 336
Joined: Wed Aug 08, 2007 12:23 pm

Re: RELEASED: Player AI

#20 Post by Elkan »

Ahh sorry, I wasn't suggesting you add a workaround, I'm just so used to using the custom auto use addon (which allows you to auto use talents when enemies are within X and y ranges) that I forgot it wasn't part of the default TOME UI

Charidan
Higher
Posts: 64
Joined: Wed Jul 22, 2015 8:12 pm

Re: RELEASED: Player AI

#21 Post by Charidan »

That's not really my concern. I already have code that finds all enemies in sight and knows the range to them.

The issue is that if I start telling the AI to always cast a talent when an enemy is within range X, I either have to start hard-coding the range of every talent in ToME into my AI, which is A) too much work and B) defeats generality. By generality, I mean that I want this AI to only use what the game provides so that it can fully perform with any other addon or new content that might include new talents, etc. If I don't give the AI all those ranges, that means my range threshold is a guess, and I'm either going to start firing talents off that miss, or running into problems where I try to cast talents and the game tells me no, and then I have to track each talent I've cast and stop casting it or I run into infinite loops.

It makes the AI a little worse as a whole, and it only gets me the ability to cast this strangely specific set of talents. I think that the real answer here might be to look at the runes in question and see why the answers they're giving my AI are confusing it, and maybe then I'll be able to file a bug report with DarkGod that something is wrong with the rune. That's my gut feel right now, but obviously I should actually check it out.

What occurs to me is that talents don't have a "range" per se, they just have a function that checks if it is legal for an entity to cast a talent on a given target. That's basically the only check I'm using for whether I can cast a talent, so it may be upset that I'm trying to target enemies instead of tiles, or something silly like that. Alternately, that might be returning true properly and my force cast isn't working. Neither makes sense, but the "makes sense" answer is that the rune already works right, so something has to be wrong.
Currently developing the Player AI addon. You can get it from the T-Engine Addon Hub or Steam
You can also view the source code.

ooli
Halfling
Posts: 106
Joined: Mon Dec 23, 2013 9:12 am

Re: RELEASED: Player AI

#22 Post by ooli »

It's a nice Addon!

Would you consider letting the player decide some weight/priority of the talent the AI use... A bit like we can do for the AI of the guardian in Chronomancy/Guardian.Unity talent ?

Charidan
Higher
Posts: 64
Joined: Wed Jul 22, 2015 8:12 pm

Re: RELEASED: Player AI

#23 Post by Charidan »

Sure! I'll try to work that out in probably 3 patches from now. If things go as I expect (which they rarely do in code) that patches will be:
  1. Hunting State. Responding to damage from unseen attackers, including blindness.
  2. Configurations. Ability to set a lot of the constants used like the low health threshold.
  3. Advanced configurations. Things dealing with specific talents and such.
At some point I'm going to make a separate thread for suggestions on how the configuration setup should work, as there are a lot of design-level decisions there I haven't made. The hunting state for the AI is plausibly functional, but I've been having trouble testing it. It's not common to be attacked by unseen sources. However, I'm starting my new job next week, so development will be a bit delayed.
Currently developing the Player AI addon. You can get it from the T-Engine Addon Hub or Steam
You can also view the source code.

Nagyhal
Wyrmic
Posts: 282
Joined: Tue Feb 15, 2011 12:01 am

Re: RELEASED: Player AI

#24 Post by Nagyhal »

Hey Charidan, I've dealt with that damn Rune: Biting Gale AI before. My spider mount AI wasn't using it and I fixed it, but I don't think my fix found its way into the main game.

I'll confer with DarkGod and see what I can do.

Nice addon!

Effigy
Uruivellas
Posts: 970
Joined: Fri Oct 10, 2014 4:00 pm

Re: RELEASED: Player AI

#25 Post by Effigy »

That change is included in 1.3.2.

Charidan
Higher
Posts: 64
Joined: Wed Jul 22, 2015 8:12 pm

Re: RELEASED: Player AI

#26 Post by Charidan »

Huh, the steam version of ToME is only v1.3.1. That might be something to talk to DarkGod about too.
Currently developing the Player AI addon. You can get it from the T-Engine Addon Hub or Steam
You can also view the source code.

Effigy
Uruivellas
Posts: 970
Joined: Fri Oct 10, 2014 4:00 pm

Re: RELEASED: Player AI

#27 Post by Effigy »

1.3.2 is the upcoming version. Not released yet.

Charidan
Higher
Posts: 64
Joined: Wed Jul 22, 2015 8:12 pm

Re: RELEASED: Player AI

#28 Post by Charidan »

Ah, that makes sense then. Carry on.
Currently developing the Player AI addon. You can get it from the T-Engine Addon Hub or Steam
You can also view the source code.

ooli
Halfling
Posts: 106
Joined: Mon Dec 23, 2013 9:12 am

Re: RELEASED: Player AI

#29 Post by ooli »

The new tactictal AI in 1.4 make this addon even better. Now it use Object.
One probleme so far: using object prompting a dialog box (like Command staf) crash the game.
And for some reason (without any other addon, on a windowed game) the AI stop from time to time unless I'm moving my mouse even slightly.

jenx
Sher'Tul Godslayer
Posts: 2263
Joined: Mon Feb 14, 2011 11:16 pm

Re: RELEASED: Player AI

#30 Post by jenx »

This still under development?
MADNESS rocks

Post Reply