saurian side not playing nice

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
tashi
Posts: 49
Joined: March 2nd, 2007, 4:07 am
Location: Texas

saurian side not playing nice

Post by tashi »

Below is a side in one of my scenarios in The Mage Republic campaign. He is not recruiting. Basically all he does is leaves the castle to capture a close villiage, returns, then captures a slightly further away villiage and then returns.

My sides are 1) Human controlled. 2) Undead 3) Saurian 4) saurian and 5) Dwarven that only shows up under the right conditions.

The first saurian group works great. This one does not want to come out and play. Anyone see anything that I am overlooking here?

[side]
side="4"
controller="ai"
type="Saurian Flanker"
description="Hss'darnith"
user_description=_"Hss'darnith"
team_name="saurian"
gold="200"
income="0"
recruit="Saurian Augur, Saurian Skirmisher"
fog="no"
share_view="no"
shroud="no"
share_maps="no"
canrecruit="1"
passive_leader="yes"
aggression="0.0"
grouping="yes"
[/side]
Rhuvaen
Inactive Developer
Posts: 1272
Joined: August 27th, 2004, 8:05 am
Location: Berlin, Germany

Post by Rhuvaen »

The only thing I can see immediately is that these keys should be inside an ai subtag:

Code: Select all

passive_leader="yes"
aggression="0.0"
grouping="yes" 
Perhaps that'll cause this behaviour? Otherwise, you can set try to set a recruit_pattern (check out the usages of the Skirmisher and Augur).
meriton
Posts: 77
Joined: March 17th, 2007, 1:17 pm

Post by meriton »

Are you sure there should by a space following the comma in the value of the recruit-attribute?
tashi
Posts: 49
Joined: March 2nd, 2007, 4:07 am
Location: Texas

Post by tashi »

Thank you for the comments. I should have stated this was for 1.2.x incase it made a difference.

1st the AI one. I pasted the saurian side that works great below. It does not have the [ai] tags that way. I have seen the ai tags in ref to recruitment patterns. If that is proper way then I will try it out.

The space after the comma doesn't make a difference as far as I can tell.

[side]
race="saurian"
type="Saurian Oracle"
description="Hss-rth"
user_description=_"Hss-rth"
side="3"
canrecruit="1"
recruit="Saurian Augur, Saurian Ambusher, Naga Fighter"
team_name="saurian"
gold="250"
passive_leader="yes"
aggression="0.0"
grouping="yes"
[/side]
tashi
Posts: 49
Joined: March 2nd, 2007, 4:07 am
Location: Texas

Post by tashi »

I just noticed that the working side does not say controller="ai" and the nonworking side does say "ai". Does that make a difference?
Rhuvaen
Inactive Developer
Posts: 1272
Joined: August 27th, 2004, 8:05 am
Location: Berlin, Germany

Post by Rhuvaen »

tashi wrote:I pasted the saurian side that works great below. It does not have the [ai] tags that way.
Fine - then you might as well just delete them as they have no meaning. Also, specifying a race for a side has no meaning.

Generally, it's better to remove stuff that just bloats and obscures the real code. :wink:
recruit="Saurian Augur, Saurian Ambusher, Naga Fighter"
I'm almost positive that you need a recruitment_pattern for your other side. Look, this side at least has a "fighter" type unit. Check the usage of the Augur and Skirmisher (as I told you), I'm pretty sure it'll be "healer" or "archer" and "mixed-fighter". Put those usages in a recruitment_pattern (and I'd add them in a 2:1 ratio for the Skirmisher).
tashi
Posts: 49
Joined: March 2nd, 2007, 4:07 am
Location: Texas

Post by tashi »

Ok, I'll bite. Why include standard (I assume standard) variables that have no meaning (race, controller="ai") etc I am sure there are others that I don't know about.

Also seems to beg the question, what is the minimum variables that is needed for a side. Perhaps I will ask that in another general question in the forum
Clonkinator
Posts: 676
Joined: July 20th, 2006, 4:45 pm
Location: Germany

Post by Clonkinator »

I'd put the canrecruit=1 further above if I were you, if possible above the type-thing. I'm not sure if this changes anything, but this solved a similar problem for me once.
joshudson
Posts: 501
Joined: January 17th, 2006, 8:04 pm
Contact:

Post by joshudson »

I suspect the problem is placing the recruit string inside double quotes. Oh, and it doesn't like spaces there either.
CHKDSK has repaired bad sectors in CHKDSK.EXE
CIB
Code Contributor
Posts: 625
Joined: November 24th, 2006, 11:26 pm

Post by CIB »

joshudson wrote:I suspect the problem is placing the recruit string inside double quotes. Oh, and it doesn't like spaces there either.
Should actually make no difference..
Rhuvaen
Inactive Developer
Posts: 1272
Joined: August 27th, 2004, 8:05 am
Location: Berlin, Germany

Post by Rhuvaen »

tashi wrote:Why include standard (I assume standard) variables that have no meaning (race, controller="ai") etc I am sure there are others that I don't know about.
Well I can't answer you why you (or the original author of that scenario) put those keys there, obviously. Maybe I didn't explain myself well enough... all those keys do have a meaning, just not all of them in the context that they're used in the WML you posted.

WML only knows about keys in the context of a specific tag.

For instance, race is a valid key inside a unit tag. In any other context, it's just something the parser ignores.

Similarly, passive_leader, aggression and grouping are recognized keys inside ai. Ai itself is recognised only in a side.

The key controller=ai certainly has a meaning inside side (in fact it's effectively mandatory - if not technically).

I'm just guessing what the misunderstanding could be, I hope you're not offended if what I post here sounds too elementary. :)
Also seems to beg the question, what is the minimum variables that is needed for a side.
Interesting question - it depends a little on whether the scenario is SP or MP I suspect. It's also not straightforward to answer because it depends on victory conditions. In MP, I believe you could fly with as little as side, controller (perhaps not even that), and in earlier versions you still needed a type (but that might have changed since). You also need one of either no_leader=yes or canrecruit=1.

Note that the question is a bit academic, because for most playable scenarios you'll want the other keys, too. My experimentation dates back to around version 1.1.12.
tashi
Posts: 49
Joined: March 2nd, 2007, 4:07 am
Location: Texas

Post by tashi »

No not too academic/elementry. I don't believe I am the only one confused by this. But that's ok. just means a little more learning and practice.
tashi
Posts: 49
Joined: March 2nd, 2007, 4:07 am
Location: Texas

Post by tashi »

Just to let you know how I sorted this out. And not to my liking at the moment. This is basically a mirror of side 3 but with a name change. I wanted it to be a flanker, but I will settle for a Oracle for now. You will also notice that I paired down a lot of the keys.

[side]
type="Saurian Oracle"
description="Hss-ith"
user_description=_"Hss-ith"
side="4"
canrecruit="1"
recruit="Saurian Augur, Saurian Ambusher, Naga Fighter"
team_name="saurian"
gold="200"
[/side]
Rhuvaen
Inactive Developer
Posts: 1272
Joined: August 27th, 2004, 8:05 am
Location: Berlin, Germany

Post by Rhuvaen »

Sorry, I don't understand. Why don't you use the flanker?

And why did you add a fighter unit (Naga Fighter) when you could have just changed the recruitment_pattern as suggested:

Code: Select all

[ai]
  recruitment_pattern=scout,scout,healer
[/ai]
I've looked it up now: Skirmishers are "scout", Augur is a "healer". That is a very special race (no fighters and archers) - and that's probably why they had recruitment problems.
Post Reply