Modifying AI via leader_value=

The place to post your WML questions and answers.

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.
User avatar
Celtic_Minstrel
Developer
Posts: 2222
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Modifying AI via leader_value=

Post by Celtic_Minstrel »

The entire purpose of the [ai] tag is to contain the entire AI. That's why it works that way.
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
User avatar
Helmet
Posts: 641
Joined: December 19th, 2006, 5:28 pm
Location: Florida, USA

Re: Modifying AI via leader_value=

Post by Helmet »

Celtic_Minstrel wrote: November 11th, 2022, 3:50 am The entire purpose of the [ai] tag is to contain the entire AI. That's why it works that way.
Okay, I think I understand. It's that way so people can put multiple micro_ais within one ai tag, alongside ai modifications, such as aggression, and then it's all in one spot.

By the way, I got an error when I tried side=2,3 in a micro_ai. That surprised me. The error said something like, "There is no side 2,3."

I located the micro_ai in a prestart event, not a side tag, so I thought it would work. Oh well. So I duplicated the whole micro_ai and changed it to side=3. No big deal, but it still seems weird that wml didn't allow a list of sides. Or is there a good reason not to?
Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
User avatar
Celtic_Minstrel
Developer
Posts: 2222
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Modifying AI via leader_value=

Post by Celtic_Minstrel »

You're not the first to notice that. As of 1.17 it now supports a list of sides, just like you would expect.
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
User avatar
Helmet
Posts: 641
Joined: December 19th, 2006, 5:28 pm
Location: Florida, USA

Re: Modifying AI via leader_value=

Post by Helmet »

Sweet. I keep hearing good things about 1.17. I'm looking forward to the stable release.
Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
Post Reply