Indivdual Unit Abilities?

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
Fynmiir
Posts: 145
Joined: March 5th, 2006, 8:24 pm

Indivdual Unit Abilities?

Post by Fynmiir »

I sometimes dabble in WML and was just wondering if an indivdual unit can be modified to have an ability his type usually doesn't have.

for example:

Say the leader of my scenario is named Bob and he is a bowman. Is it possible to modify him so that he could have a leadership ability?

Is this possible?
Alks
Posts: 314
Joined: December 4th, 2005, 11:53 pm
Location: Poland

Post by Alks »

There's probably many ways. One is simple and possibly easiest - make for your Bob different .cfg file, and then you can give him whatever you want. Copy bowman .cfg, change what you want, change unit id to Bob the Bowman and add leadership.
Last edited by Alks on March 11th, 2006, 2:11 pm, edited 2 times in total.
scott
Posts: 5248
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

Not at the moment.

One thing to do is create a copy of the bowman's unit config file to make a new unit type (with a unique id but keep the name as "Bowman") that has leadership. Then switch the unit type whenever the unit gets leadership with [store_unit].

If you're trying to make an item that gives leadership to any unit, you would have to repeat this for every possible unit in your army. It sounds tedious, but with the right macros it wouldn't be that bad. Clunkier things have been done.
Hope springs eternal.
Wesnoth acronym guide.
Fynmiir
Posts: 145
Joined: March 5th, 2006, 8:24 pm

Post by Fynmiir »

Okay thanks a lot :lol:
Last edited by Fynmiir on March 11th, 2006, 2:13 pm, edited 1 time in total.
scott
Posts: 5248
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

Alks wrote:There's probably many ways. One is simple and possibly easiest - make for your Bob different .cfg file, and then you can give him whatever you want. Copy bowman .cfg, change what you want, change unit id to Bob the Bowman and add leadership.
Since we came up with the same first answer, what is the second way?
Hope springs eternal.
Wesnoth acronym guide.
User avatar
Tomsik
Posts: 1401
Joined: February 7th, 2005, 7:04 am
Location: Poland

Post by Tomsik »

AFAIK xan is working on it.
Alks
Posts: 314
Joined: December 4th, 2005, 11:53 pm
Location: Poland

Post by Alks »

I edited post a bit - that's a misunderstanding. Edit came almost at the same time as Scott's post. There's no second way at the moment, but you know that.
Post Reply