Setting the unit type of (AI) leader

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

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
User avatar
Crendgrim
Moderator Emeritus
Posts: 1328
Joined: October 15th, 2010, 10:39 am
Location: Germany

Setting the unit type of (AI) leader

Post by Crendgrim » October 15th, 2010, 10:50 am

I've got a problem and didn't find some sort of solution here in this forum or anywhere else:

The problem occurs while making multiplayer maps. (A campaign I didn't start yet - I just need to gather experience ;) )
When I try to set the unit type of a leader - for example, of an AI leader -, then ... well... just nothing happens. The AI gets any sort of random leader (and it's funny to see an elvish shyde making orcish noises ... :D )

I'm using Wesnoth 1.8.5 and the RPG Creation Toolkit.

My code so far: ([side]-fragment)

Code: Select all

[...]
    [side]
	side=4
	canrecruit=yes
	type="Orcish Warlord"
	id=Krsh-Oltu
	description= _ "Krsh-Oltu"
	recruit=Goblin Spearman, Young Ogre, Orcish Archer, Orcish Assassin, Orcish Grunt, Orcish Leader, Wolf Rider
	controller=ai
	team_name=baddies
	user_team_name= _ "Undead"
	fog=no
	hidden=yes
	allow_player=no
	team_lock=yes
        income=0
        gold=100
    [/side]
[...]
(I tried a lot, so this is only the latest version... )

I hope someone can help me out of this ...
Where is my (I guess dumb) problem?


Crend
UMC Story Images — Story images for your campaign!

Ceres
Forum Regular
Posts: 620
Joined: September 18th, 2010, 7:56 pm
Location: Germany

Re: Setting the unit type of (AI) leader

Post by Ceres » October 15th, 2010, 11:19 am

see Multiplayer Part of SideWML in the Wiki:
faction: this lock this side to this faction.
faction_from_recruit: if true then this side will be locked to the faction that matches the recruits better.

User avatar
Crendgrim
Moderator Emeritus
Posts: 1328
Joined: October 15th, 2010, 10:39 am
Location: Germany

Re: Setting the unit type of (AI) leader

Post by Crendgrim » October 15th, 2010, 11:25 am

This doesn't work either.
I tried both and nothing worked - there are always random leaders.


Crend
UMC Story Images — Story images for your campaign!

User avatar
bigkahuna
Posts: 657
Joined: September 11th, 2010, 6:24 pm
Location: In your mind.

Re: Setting the unit type of (AI) leader

Post by bigkahuna » October 15th, 2010, 12:48 pm

First of all, you cannot have spaces between your recruit lists. (you have Unit1, Unit2) put (Unit1,Unit2)

Secondly- I don't know if this will work, as I have no experience with multiplayer maps, but perhaps take the quote marks of the type="Orcish Warlord"

I never use quote marks and it works fine, perhaps this is the problem?

Also use "name" instead of "description" (you have description=Krsh-Oltu)

You might want to change the id-name to make it easier to spell and remember. A mispelled ID can wreak havoc on your scenario.
Check out my campaign Sweet Revenge!
Join the new R2D forum!

User avatar
Crendgrim
Moderator Emeritus
Posts: 1328
Joined: October 15th, 2010, 10:39 am
Location: Germany

Re: Setting the unit type of (AI) leader

Post by Crendgrim » October 15th, 2010, 1:23 pm

bigkahuna wrote:First of all, you cannot have spaces between your recruit lists. (you have Unit1, Unit2) put (Unit1,Unit2)
Until now, this way also worked fine ... :?
bigkahuna wrote:Secondly- I don't know if this will work, as I have no experience with multiplayer maps, but perhaps take the quote marks of the type="Orcish Warlord"

I never use quote marks and it works fine, perhaps this is the problem?
I tried this, but nothing changed ...
bigkahuna wrote:Also use "name" instead of "description" (you have description=Krsh-Oltu)
Both ways didn't work ...

Ok, now I'll try to do everything as you said.
Maybe it works when all these things are combined...

Thanks for your good ideas :)


Crend

EDIT:
I tested it.
No change.
The player isn't named as he should be and is generated randomly...
UMC Story Images — Story images for your campaign!

User avatar
bigkahuna
Posts: 657
Joined: September 11th, 2010, 6:24 pm
Location: In your mind.

Re: Setting the unit type of (AI) leader

Post by bigkahuna » October 15th, 2010, 1:33 pm

Sorry :?

Like I said I have no experience with multiplayer maps, I assumed that the syntax would be the same. A bit confusing, I think they should synch the WML with this.
Check out my campaign Sweet Revenge!
Join the new R2D forum!

User avatar
Crendgrim
Moderator Emeritus
Posts: 1328
Joined: October 15th, 2010, 10:39 am
Location: Germany

Re: Setting the unit type of (AI) leader

Post by Crendgrim » October 15th, 2010, 1:52 pm

The funny thing is that multiplayer maps of other authors (for example, the built-in ones) are working fine...
I also tried to just copy the [side]-rules from there - but I couldn't manage to have there a Orcish Warlord or anything else specified.

Is here anyone who has experience with those maps?


Crend
UMC Story Images — Story images for your campaign!

User avatar
Gambit
Loose Screw
Posts: 3266
Joined: August 13th, 2008, 3:00 pm
Location: Dynamica
Contact:

Re: Setting the unit type of (AI) leader

Post by Gambit » October 15th, 2010, 2:23 pm

Are you checking the "use map settings" box when setting up the game? Because you should be.

And the WML is the same whether you're in single-player or multi-player. The only difference is that there are a few unsynchronized things you shouldn't use. Please don't make strange speculation bigkahuna. The quotation marks are fine, and so're the spaces in the recruit list.

User avatar
Crendgrim
Moderator Emeritus
Posts: 1328
Joined: October 15th, 2010, 10:39 am
Location: Germany

Re: Setting the unit type of (AI) leader

Post by Crendgrim » October 15th, 2010, 2:44 pm

I cannot believe ...

:doh: :doh:

Thank you ... this shouldn't be true :oops:


Crend
UMC Story Images — Story images for your campaign!

User avatar
bigkahuna
Posts: 657
Joined: September 11th, 2010, 6:24 pm
Location: In your mind.

Re: Setting the unit type of (AI) leader

Post by bigkahuna » October 15th, 2010, 3:00 pm

Gambit wrote:Please don't make strange speculation bigkahuna.
Sorry. Incorrect assumption.
Check out my campaign Sweet Revenge!
Join the new R2D forum!

Post Reply