Racial Leadership
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.
Racial Leadership
Not even in MP, but in campaigns and in multiracial custom factions. It came as odd to me that it is theoretically possible that Dwarvish Thunderer would listen to Elf Marshal and gain leadership bonus. It is possible to encode in WML, that some units with leadership can extend this bonus only over units of the same race?
- Elvish_Pillager
- Posts: 8137
- Joined: May 28th, 2004, 10:21 am
- Location: Everywhere you think, nowhere you can possibly imagine.
- Contact:
They're all in the same army, working for the same goal. Presumably they've all been brainwashed. In any case, it seems that if they weren't to listen to leadership, they'd also only be allies.
It's all fun and games until someone loses a lawsuit. Oh, and by the way, sending me private messages won't work. :/ If you must contact me, there's an e-mail address listed on the website in my profile.
- Eleazar
- Retired Terrain Art Director
- Posts: 2481
- Joined: July 16th, 2004, 1:47 am
- Location: US Midwest
- Contact:
Re: Racial Leadership
I see your point, but to me if you accept that Elves and Undead (for instance) can be allies, it doesn't strech believability much more to think that a member of one race can lead another. I tend to think of Leadership, as the leader coordinating rather than inspiring the troops-- which makes more sense in these kind of scenarios. It's more important that a soldier follows a general's orders than that he likes the general.Alks wrote:Not even in MP, but in campaigns and in multiracial custom factions. It came as odd to me that it is theoretically possible that Dwarvish Thunderer would listen to Elf Marshal and gain leadership bonus. It is possible to encode in WML, that some units with leadership can extend this bonus only over units of the same race?
Selective leadership would be an interesting option for campagn designers.
Feel free to PM me if you start a new terrain oriented thread. It's easy for me to miss them among all the other art threads.
-> What i might be working on
Attempting Lucidity
-> What i might be working on
Attempting Lucidity
- Casual User
- Posts: 475
- Joined: March 11th, 2005, 5:05 pm
Disclaimer: Off the top of my head, so some of the tags may be wrong
1. In a perfect world:
When placed in the [abilities] tag, should be a leadership that applies only to elves. But I have the feeling that leadership is still hard-coded (for now), so it wouldn't work.
You could obviously change the filter as you see fit.
I'm not sure it would work anyway ([if] doesn't always work the way I'd like it to), I'd prefer to be able to use an '#ifdef' on it.
2. A little hack that might work right now:
An alternative idea that should work anyway (but needs debugging, I'm at school and am writing stritctly from memor):
This requires you to have two different units : a tamer with leadership and one without. The {CHG_UNIT} is a macro you can find in scott's 'Liberty' (might require more arguments, I don't quite remember).
When you attack with a wolf, the tamer without leadership is changed to a tamer with leadership. When the attack takes place, the tamer has leadership and so can lead the wolf. After the attack, the tamer loses leadership so he can't lead anyone else. If you don't attack with a wolf, no leadership. Just put {TAMER_LEADERSHIP} in the scenario cfg file.
You can obviously put different filters (like race=elf).
P.S.http://www.wesnoth.org/forum/viewtopic.php?t=8503
P.P.S. It's not just being given orders, one also has to take them
1. In a perfect world:
Code: Select all
#define LEADERSHIP_ELF
[leadership]
description=leadership
[if]
[filter]
race=elf
[/filter]
[then]
per_level_bonus=25
[/then]
[else]
per_level_bonus=0
[/else]
[/if]
[/leadership]
enddef
You could obviously change the filter as you see fit.
I'm not sure it would work anyway ([if] doesn't always work the way I'd like it to), I'd prefer to be able to use an '#ifdef' on it.
2. A little hack that might work right now:
An alternative idea that should work anyway (but needs debugging, I'm at school and am writing stritctly from memor):
Code: Select all
#define TAMER_LEADERSHIP
[event]
first_time_only=no
name=attack
[filter]
type=Wolf
[/filter]
{CHG_UNIT Tamer_no_lead Tamer_lead}
[/event]
[event]
first_time_only=no
name=end_attack
[filter]
type=Wolf
[/filter]
{CHG_UNIT Tamer_lead Tamer_no_lead}
[/event]
enddef
When you attack with a wolf, the tamer without leadership is changed to a tamer with leadership. When the attack takes place, the tamer has leadership and so can lead the wolf. After the attack, the tamer loses leadership so he can't lead anyone else. If you don't attack with a wolf, no leadership. Just put {TAMER_LEADERSHIP} in the scenario cfg file.
You can obviously put different filters (like race=elf).
P.S.http://www.wesnoth.org/forum/viewtopic.php?t=8503
P.P.S. It's not just being given orders, one also has to take them
- Casual User
- Posts: 475
- Joined: March 11th, 2005, 5:05 pm
What did it do?alks wrote:It's excellent. Even if it didn't work, it will give me a wonderful opportunity to see WML tricks in action.
It should, theoretically, work.
Possible bugs:
- 'end_attack' is only in 1.1, so you might want to check your version number.
- I don't quite remember how {CHG_UNIT} is used. Check the second scenario of Liberty for info
- {CHG_UNIT} is a 1.0 macro while 'end_attack' is 1.1. It might cause problems.
- I don't remember if it's enddef or #enddef.
Alternative which should work fine in 1.0:
Code: Select all
#define TAMER_LEADERSHIP
[event]
first_time_only=no
name=attack
[filter]
type=Wolf
[/filter]
{CHG_UNIT Tamer_no_lead Tamer_lead}
[/event]
[event]
first_time_only=no
name=attack
[filter]
[not]
type=Wolf
[/not]
[/filter]
{CHG_UNIT Tamer_lead Tamer_no_lead}
[/event]
enddef
Actually, it would/will work like this:
Code: Select all
[leadership]
per_level_bonus=25
cumulative=no
affect_allies=yes
name= _ "Elven leadership"
description= _ "blah"
affect_self=no
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
race=elf
[/affect_adjacent]
[/leadership]
"It is time people learned about their failures and my successes."