Are "healing" and "retreat" valid ids for the [aspect] tag?
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Are "healing" and "retreat" valid ids for the [aspect] tag?
In [ai], I'm trying to get the AI to consider some units as completely expendable - are these ids for [aspect] the ones which control cautious behavior?
I'm just... a guy...
I'm back for now, I might get started on some work again.
I'm back for now, I might get started on some work again.
Re: Are "healing" and "retreat" valid ids for the [aspect] t
Umm, the short answer is no, but I am not entirely sure what you are asking. There's some confusion here, I'm just not sure on which side. There are candidate actions called "healing" and "retreat", but there are no aspects by those names (or ids). Only what's listed at those links is available. Another way to see what exists is to type :inspect in debug mode, click on any of the teams and then on 'ai config full'. That shows all the available CAs and aspects as well as their values.
Not sure if this helps ...
Not sure if this helps ...
SP campaigns: Galuldur's First Journey (1.12 & 1.14) & Grnk the Mighty (1.10 & 1.12)
AI experiments: Micro AIs (wiki, forum thread, known/fixed bugs), Fred, AI-demos add-on
AI experiments: Micro AIs (wiki, forum thread, known/fixed bugs), Fred, AI-demos add-on
Re: Are "healing" and "retreat" valid ids for the [aspect] t
You want to make the ai daring? Use the caution setting. But only for a few predefined units? Use 2 AI sides with different caution settings. You want it to be on the same side? No idea. Maybe you can limit the moves for certain better units with some trickery. You can give specific caution based on time of day. Maybe you can assign a leader guard somehow? not sure about this. There is some guardian trickery, if you want to have certain points defended. Most work with move limitation. Make a clone of the unit which can only move inside castle terrain and such.
Re: Are "healing" and "retreat" valid ids for the [aspect] t
That helps a lot, thank you!mattsc wrote:Umm, the short answer is no, but I am not entirely sure what you are asking. There's some confusion here, I'm just not sure on which side. There are candidate actions called "healing" and "retreat", but there are no aspects by those names (or ids). Only what's listed at those links is available. Another way to see what exists is to type :inspect in debug mode, click on any of the teams and then on 'ai config full'. That shows all the available CAs and aspects as well as their values.
Not sure if this helps ...
I have two custom status effects - one which renders a unit unhealable for a number of turns, and one which causes a unit to lose 8 HP permanently each turn. I need the AI to consider units afflicted with these status effects expendable where it'd consider other units worth keeping.Wussel wrote:You want to make the ai daring? Use the caution setting. But only for a few predefined units? Use 2 AI sides with different caution settings. You want it to be on the same side? No idea. Maybe you can limit the moves for certain better units with some trickery. You can give specific caution based on time of day. Maybe you can assign a leader guard somehow? not sure about this. There is some guardian trickery, if you want to have certain points defended. Most work with move limitation. Make a clone of the unit which can only move inside castle terrain and such.
I'm just... a guy...
I'm back for now, I might get started on some work again.
I'm back for now, I might get started on some work again.
Re: Are "healing" and "retreat" valid ids for the [aspect] t
I don't think that such a feature exists currently, but it would be pretty easy to write a custom candidate action that does an unconditional attack with certain units. In fact, I've been toying with the idea of writing a Micro AI that does pretty much that: you pass a Standard Unit Filter to it and the units which match that filter attack with the only consideration being maximum damage dealt to the enemy. All other units would follow standard behavior. Would that work for what you have in mind?A Guy wrote:I have two custom status effects - one which renders a unit unhealable for a number of turns, and one which causes a unit to lose 8 HP permanently each turn. I need the AI to consider units afflicted with these status effects expendable where it'd consider other units worth keeping.
SP campaigns: Galuldur's First Journey (1.12 & 1.14) & Grnk the Mighty (1.10 & 1.12)
AI experiments: Micro AIs (wiki, forum thread, known/fixed bugs), Fred, AI-demos add-on
AI experiments: Micro AIs (wiki, forum thread, known/fixed bugs), Fred, AI-demos add-on
Re: Are "healing" and "retreat" valid ids for the [aspect] t
Yes, that would be perfect. How would I go about writing something like that?mattsc wrote:I don't think that such a feature exists currently, but it would be pretty easy to write a custom candidate action that does an unconditional attack with certain units. In fact, I've been toying with the idea of writing a Micro AI that does pretty much that: you pass a Standard Unit Filter to it and the units which match that filter attack with the only consideration being maximum damage dealt to the enemy. All other units would follow standard behavior. Would that work for what you have in mind?A Guy wrote:I have two custom status effects - one which renders a unit unhealable for a number of turns, and one which causes a unit to lose 8 HP permanently each turn. I need the AI to consider units afflicted with these status effects expendable where it'd consider other units worth keeping.
I'm just... a guy...
I'm back for now, I might get started on some work again.
I'm back for now, I might get started on some work again.
Re: Are "healing" and "retreat" valid ids for the [aspect] t
Well, one option would be for you to wait and I'll do it. (I'll do this in any case, whether you write your own version or not.) I don't know yet exactly when I'll get around to it, but I expect it to be comparatively straightforward (at least in its first incarnation), so I should be able to get it done for the 1.11.6 release.A Guy wrote:How would I go about writing something like that?
Otherwise, you can check out the Practical_Guide_to_Modifying_AI_Behavior and in particular the Lua_AI_Howto.
SP campaigns: Galuldur's First Journey (1.12 & 1.14) & Grnk the Mighty (1.10 & 1.12)
AI experiments: Micro AIs (wiki, forum thread, known/fixed bugs), Fred, AI-demos add-on
AI experiments: Micro AIs (wiki, forum thread, known/fixed bugs), Fred, AI-demos add-on
Re: Are "healing" and "retreat" valid ids for the [aspect] t
Well, I was gone most of the last month, so I didn't make it for the 1.11.6 release, but a new Simple Attack Micro AI is available in trunk now and will be in the 1.11.7 release.mattsc wrote:... so I should be able to get it done for the 1.11.6 release.
If you want to try it before 1.11.7 comes out but don't want to compile Wesnoth, you can simply take the files from this commit and replace the respective files in your 1.11.6 Wesnoth data folder with them. You don't need to compile, just replacing the files is good enough.
SP campaigns: Galuldur's First Journey (1.12 & 1.14) & Grnk the Mighty (1.10 & 1.12)
AI experiments: Micro AIs (wiki, forum thread, known/fixed bugs), Fred, AI-demos add-on
AI experiments: Micro AIs (wiki, forum thread, known/fixed bugs), Fred, AI-demos add-on