It is currently 05 Jun 2024, 05:25
   
Text Size

Conditional AI Availability

Moderator: CCGHQ Admins

Conditional AI Availability

Postby Xander9009 » 13 Nov 2014, 20:47

Is there a way to use AI Availability tags only if a condition is met? For Teferi, Temporal Archmage we need to add the AI availability tags to the abilities if his ultimate has been activated. Only, I don't know of a way to conditionalize them.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: Conditional AI Availability

Postby NeoAnderson » 13 Nov 2014, 20:58

Xander9009 wrote:Is there a way to use AI Availability tags only if a condition is met? For Teferi, Temporal Archmage we need to add the AI availability tags to the abilities if his ultimate has been activated. Only, I don't know of a way to conditionalize them.
I think You can use Ai AVAILABILITY block as other blocks, set a variable to 1 when the ability is activated, reset it to 0 when the turn end. Inside the block you check the value and return true when the variable is 1.
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Conditional AI Availability

Postby thefiremind » 13 Nov 2014, 23:07

They are implicitly conditional already: if the AI can't follow some of the availability "advices", it will just ignore them. So I would add them without worrying about it. :)

NeoAnderson wrote:I think You can use Ai AVAILABILITY block as other blocks, set a variable to 1 when the ability is activated, reset it to 0 when the turn end. Inside the block you check the value and return true when the variable is 1.
This should need tests, I'm not sure if you can use AI_AVAILABILITY the same way as AI_CUSTOM_SCORE... if I were to guess, I'd guess not, but I can't be sure.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 721 times

Re: Conditional AI Availability

Postby Xander9009 » 13 Nov 2014, 23:35

I put it together and gave it to fallenangel to try out. So I'm just waiting to see if it worked. However, if it'll just ignore them, then I'll just add them and let the AI ignore them.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: Conditional AI Availability

Postby NeoAnderson » 14 Nov 2014, 14:24

thefiremind wrote:They are implicitly conditional already: if the AI can't follow some of the availability "advices", it will just ignore them. So I would add them without worrying about it. :)

NeoAnderson wrote:I think You can use Ai AVAILABILITY block as other blocks, set a variable to 1 when the ability is activated, reset it to 0 when the turn end. Inside the block you check the value and return true when the variable is 1.
This should need tests, I'm not sure if you can use AI_AVAILABILITY the same way as AI_CUSTOM_SCORE... if I were to guess, I'd guess not, but I can't be sure.
I also haven't test but what about to use normal <AVAILABILITY> block and inside this block check if the player IsAI() condition??
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times


Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 12 guests


Who is online

In total there are 12 users online :: 0 registered, 0 hidden and 12 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 12 guests

Login Form