Scenario massive delays

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.
Post Reply
tribes55
Posts: 132
Joined: June 10th, 2012, 4:29 am

Scenario massive delays

Post by tribes55 »

Hello,

I was experimenting with [ai] to try and create a more artificial flow to one of my scenarios. I tried two different modifiers to achieve this:

Code: Select all

[ai]
		[goal]
			name=target_location
			[criteria] #NOTE: this is a SLF, because we're targeting a location
				side=2
			[/criteria]
			value=5
		[/goal]

		[avoid]
			[filter]
				x,y=24,30
			[/filter]
			radius=9
		[/avoid]
	[/ai]
However, after I did, the AI turn MUCH longer to finish their turns and move their units. After each movement from a unit, there was a freeze. Did I implement it incorrectly? These aren't contradicting-- side 2 is not within those coordinates.
Last edited by Pentarctagon on October 8th, 2020, 3:06 am, edited 1 time in total.
Reason: [c] -> [code]
User avatar
beetlenaut
Developer
Posts: 2825
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: Scenario massive delays

Post by beetlenaut »

A SLF doesn't have "side" as a key. That's getting ignored, so it's targeting every location on the map. Did you mean owner_side? ([avoid] keeps the AI from stopping on those locations, but they are probably still be targeted as well.)
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
tribes55
Posts: 132
Joined: June 10th, 2012, 4:29 am

Re: Scenario massive delays

Post by tribes55 »

beetlenaut wrote: October 8th, 2020, 2:39 am A SLF doesn't have "side" as a key. That's getting ignored, so it's targeting every location on the map. Did you mean owner_side? ([avoid] keeps the AI from stopping on those locations, but they are probably still be targeted as well.)
Ah, I see. I meant for them to want to ignore a side's players. If not this, how would I make the AI want to prioritize engaging one side before another?
User avatar
beetlenaut
Developer
Posts: 2825
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: Scenario massive delays

Post by beetlenaut »

Oh, of course. The SLF has a [filter] tag, which is a standard unit filter.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
User avatar
Celtic_Minstrel
Developer
Posts: 2207
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Scenario massive delays

Post by Celtic_Minstrel »

Rather than using a [filter] I think it would be more effective to change the target_location to target_unit.
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
Post Reply