new type of leadership

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderator: Forum Moderators

Forum rules
Before posting a new idea, you must read the following:
User avatar
Aldarisvet
Translator
Posts: 836
Joined: February 23rd, 2015, 2:39 pm
Location: Moscow, Russia

new type of leadership

Post by Aldarisvet »

I got an idea that influense from the leader to his neighbour unit can be not only about modifying a number of damage.

How about these (I have no idea if it was ever suggested or impemented in UMC), these for sure can improve Wesnoth tactical diversity:

1. Marksman leadership.
A leader is an expert in marksmanship. So he can help adjacent units to aim better. All adjacent units get marksmanship ability on their ranged attack.

2. Skirmisher leadership.
A leader is an expert in skirmishing. So he can help adjacent units to move better. All adjacent units get skirmisher ability. As soon they moved away from the leader, they lose it.

3. Poison 'leadership'.
Imagine a mobile barrel with a poison liquid. Units near can pull their blades/arrows to it and make them poisonous. All adjacent units get poison ability to their melee or ranged attacks.

4. Holy water 'leadership'.
Imagine a mobile barrel with a holy water. Units near can pull their blades to it and make them attack arcane. All adjacent units get arcane attacks to their melee.

5. Fire liquid 'leadership'.
Imagine a mobile barrel with a liquid fire. Units near can pull their arrows to it and make them attack with fire. All adjacent units get fire attacks to their ranged attacks.

6. Slowing substance 'leadership'.
Imagine a mobile barrel with some especially unpleasant substance, if it gets on the person's skin, he would be covered with scabies and slowed because of it. Units near can pull their blades to the substacne and get slowing attack. All adjacent units get slowing attacks to their melee attacks.
facebook.com/wesnothian/ - everyday something new about Wesnoth
My campaign:A Whim of Fate, also see it's prequel Zombies:Introduction
Art thread:Mostly frankenstains
User avatar
Ravana
Forum Moderator
Posts: 3008
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: new type of leadership

Post by Ravana »

All can already been done, and 2) has been done already.
User avatar
skeptical_troll
Posts: 500
Joined: August 31st, 2015, 11:06 pm

Re: new type of leadership

Post by skeptical_troll »

I think lady Jessen in tRoW does something similar to 2) with the ability 'distract' (I am not sure if this is what Ravana refers to, however).

I did something like 5) in my campaign, where two drakes can set fire to arrows of adjacent bowmen. I didn't find a very elegant and clean way of coding it up though (in particular to deal with the 'undo' possibility), and differently than leadership the player is not able to see the difference in the attack in preview (e.g. when checking attack probabilities) unless he already moved next to the unit with the ability. I don't know if this could be made easier to code, or there are already tricks that I don't know that may help.

As for the effects on the gameplay, I agree that this is interesting and may add tactical diversity, although I feel that more than 1-2 units with these abilities would overcomplexify and destabilize the battle.
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: new type of leadership

Post by Dugi »

I'd say that you have cool ideas, but half of them are already implemented in LotI for years, the others were not implemented because there was no bug resistant way to implement them. If it was an idea the developers found interesting, it would have been pulled to mainline long ago, I think.

Other similar abilities that are there too (some are really overpowered and are often only on non-playable enemy factions only):
murderous presence - adjacent enemies get backstab
despair - adjacent enemies do less damage
warlord's rule - adjacent allies do 1.5-times more damage and receive 1.5-times more damage
freezing aura - adjacent enemies are slowed at the beginning of their turn
evisceration - when the bearer kills an enemy, adjacent allies gain some health
temptation - adjacent enemies of opposite gender do not gain an opportunity to attack (behaving like if they had already attacked from the beginning, but can move)
martyrdom - when the bearer gets hit, adjacent allies' damage increases and the increase decays over time
blood drinking - bearer recovers health when adjacent units get hit
shield- adjacent allies get resistances
conviction - adjacent enemies' fire, cold and arcane resistances are reduced
frail tide - adjacent enemies' blade, pierce and impact resistances are reduced
hate speech - when the bearer hits, adjacent allies' damage increases and the increase decays over time
aura of hunger - adjacent allies get drain
anathema - adjacent allies deal less damage
...and more
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: new type of leadership

Post by zookeeper »

skeptical_troll wrote:I did something like 5) in my campaign, where two drakes can set fire to arrows of adjacent bowmen. I didn't find a very elegant and clean way of coding it up though (in particular to deal with the 'undo' possibility), and differently than leadership the player is not able to see the difference in the attack in preview (e.g. when checking attack probabilities) unless he already moved next to the unit with the ability. I don't know if this could be made easier to code, or there are already tricks that I don't know that may help.
In 1.13, there are. You can now write abilities based on moveto events while retaining undo capability, using the [on_undo] and [on_redo] tags (1.13.2, but not yet wikified). The 'unit placed' event from 1.13.3 onwards will help a bit, too.

Now, it is actually pretty tricky to do things that way, but it is possible. For UtBS, I already wrote a "support" ability which makes adjacent units pay no upkeep, and it works mostly based on undo-retaining moveto events. The code is hard to make sense of especially when it's not commented yet, but it's still a proof-of-concept.

So, basically, all the crazy ability ideas which have so far been impractical due to issues with moveto undo invalidation can now be done. It just won't necessarily be easy.
User avatar
skeptical_troll
Posts: 500
Joined: August 31st, 2015, 11:06 pm

Re: new type of leadership

Post by skeptical_troll »

zookeeper wrote:In 1.13, there are. You can now write abilities based on moveto events while retaining undo capability, using the [on_undo] and [on_redo] tags
oh that will be cool! Basically at the moment I am creating ad hoc events (select-turn end..) to do what '[on_undo]' should do. It works reasonably well, but it looks like a dirty hack to me. Is there also a way to make the effect appear in the preview (i.e. when the menu with the attack choice appears) as it is for the leadership and illuminates abilities?
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: new type of leadership

Post by zookeeper »

skeptical_troll wrote:Is there also a way to make the effect appear in the preview (i.e. when the menu with the attack choice appears) as it is for the leadership and illuminates abilities?
There's nothing specifically for that, no.
User avatar
nuorc
Forum Regular
Posts: 582
Joined: September 3rd, 2009, 2:25 pm
Location: Barag Gor

Re: new type of leadership

Post by nuorc »

@zookeeper: What do you mean with 'specifically'?

Will the damage calculation count in those effects?
I have a cunning plan.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: new type of leadership

Post by zookeeper »

The features I mentioned have nothing at all to do with damage calculations, damage calculations works exactly as it always has. If you have an event which changes a unit's attacks for example, then of course the changed attacks will show up in damage calculations (how could they not?).
User avatar
skeptical_troll
Posts: 500
Joined: August 31st, 2015, 11:06 pm

Re: new type of leadership

Post by skeptical_troll »

@nuorc: I think my vague explanation was the source of the ambiguity. What I meant is: with the predefined abilities such as leadership you can see what damage a unit will deal even if he hasn't moved next to the unit with the leadership yet. For example it will be clear before moving that attacking from a hex next to a general will deal more damage than attacking from another hex.

If instead the ability is custom made and coded in some event, the damage calculator will not know anything until the even has fired, i.e. until the unit has moved next to the one with the custom ability. So what happens is that if you order a unit to move and attack from a hex next to the unit carrying the custom ability, the attack will be stopped because the custom event has fired. After that, the damage calculator is aware of the ability and will change accordingly. It is just a detail, but at the moment it seems to me the bigger difference between custom made abilities and default (beside the undo issue, which I'm happy to hear it can be solved in 1.13).
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: new type of leadership

Post by zookeeper »

skeptical_troll wrote:@nuorc: I think my vague explanation was the source of the ambiguity. What I meant is: with the predefined abilities such as leadership you can see what damage a unit will deal even if he hasn't moved next to the unit with the leadership yet. For example it will be clear before moving that attacking from a hex next to a general will deal more damage than attacking from another hex.

If instead the ability is custom made and coded in some event, the damage calculator will not know anything until the even has fired, i.e. until the unit has moved next to the one with the custom ability. So what happens is that if you order a unit to move and attack from a hex next to the unit carrying the custom ability, the attack will be stopped because the custom event has fired. After that, the damage calculator is aware of the ability and will change accordingly. It is just a detail, but at the moment it seems to me the bigger difference between custom made abilities and default (beside the undo issue, which I'm happy to hear it can be solved in 1.13).
Ah, now I get it. Yes, that's something I overlooked: that is a case that would indeed still not work correctly when invoking the attack dialog from a distance. So... unfortunately, abilities based on moveto events which modify combat-relevant stats of the units would still not work right in those cases. :(
User avatar
nuorc
Forum Regular
Posts: 582
Joined: September 3rd, 2009, 2:25 pm
Location: Barag Gor

Re: new type of leadership

Post by nuorc »

zookeeper wrote:that would indeed still not work correctly when invoking the attack dialog from a distance.
That's what I meant. Well, as long as one is aware of that it's possible to work around it...
I have a cunning plan.
User avatar
Aldarisvet
Translator
Posts: 836
Joined: February 23rd, 2015, 2:39 pm
Location: Moscow, Russia

Re: new type of leadership

Post by Aldarisvet »

zookeeper wrote: Ah, now I get it. Yes, that's something I overlooked: that is a case that would indeed still not work correctly when invoking the attack dialog from a distance. So... unfortunately, abilities based on moveto events which modify combat-relevant stats of the units would still not work right in those cases. :(
So AI would never guess about the bonus he can potentially get from the attack before unit moves next to the leader. A pity.
I suggested quite simple features so AI would able to understand them and it would not be new for players.
Still AI would never guess to use these features properly.
As I understood, this is the main reason why more futures are not implemented. AI can use backstab well but cannot use simple leadership properly.
facebook.com/wesnothian/ - everyday something new about Wesnoth
My campaign:A Whim of Fate, also see it's prequel Zombies:Introduction
Art thread:Mostly frankenstains
User avatar
Aldarisvet
Translator
Posts: 836
Joined: February 23rd, 2015, 2:39 pm
Location: Moscow, Russia

Re: new type of leadership

Post by Aldarisvet »

Working over balancing second scenario of Zombies:Introduction I got the following idea.
I have the level0 hero there with no attacks at all, called Cup Girl, she can heal surrounding units and also herself with magical water she creates from the ordinary water in the cup.
I got idea that she could have [4. Holy water 'leadership'] also to increase her role in the gameplay, and also to ease the fight which is quite hard for me with level0 units (rats, spiders and snakes) vs level0 zombies as enemies, because level0 units are fast candidates to become zombies since they have low HP.
I took a look into skeptical_troll's code for drakes making fire arrows for archers. Wow, that is complex! And also I found hard to adopt different types of attacks to arcane and back (not like simple pierce to fire and back).

Then I got another idea.
What if the effect would not have leadership nature but something more close to the reality. A unit must be near the Cup Girl at the end of the turn to get his attack changed from the ordinary to the arcane. Then even if it moves out of Cup Girl, it retains its arcane attack till the first battle. No matter how much turns passed. If it attacked or was attacked, it loses its arcane attack and the attack is ordinary again. Seems much easier to implement for me and also creates absolutely new gamplay, 'accumulating effect' tactics.
But moreover, the fact is that AI can use this! Not only he would understand that unit got new type of the attack while chosing the target. If we give this ability to a healer unit, AI would try to put his units close to that healer just for healing and also will spread that arcane (or other) effect. Moreover, as in my example, if the healer would have no attacks at all, the only thing AI would think about while moving that unit would be healing purpurses. I really hope that this healing tactics are programmed for AI as something default and AI really can think out healing purpuses, this is a question for those who know how AI works, I never seen AI uses healers properly but I hope there is reason we write 'usage=healer', so again probably a unit without attacks would be a better healer under AI control. But also by this AI would spread that side effect (arcane or whatever weapon 'infestation'), even not knowing this! So this creates new gamplay possibilities not only vs AI but also for AI. Of course AI wouldnt be able to guess about such things as 'accumulating effect' but still it would able to operate all this at least in some degree.

Wooh, I am going to provide also an overlay images in Besige Druids style to mark units that have temororary arcane bonus, that would be great!
____________________
Tell me please, what a mistake can be in this code??? It does nothing to units adjacent to Cup Girl.

[event]
name=new turn
first_time_only=no
[filter]
race="monster"
[filter_adjacent]
type=Cup Girl
is_enemy=no
[/filter_adjacent]
[/filter]
{VARIABLE unit.attack[0].type "arcane"}
[unstore_unit]
variable=unit
[/unstore_unit]
[allow_undo]
[/allow_undo]
[/event]
facebook.com/wesnothian/ - everyday something new about Wesnoth
My campaign:A Whim of Fate, also see it's prequel Zombies:Introduction
Art thread:Mostly frankenstains
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: new type of leadership

Post by zookeeper »

It fundamentally doesn't make any sense. There is no unit associated with a new turn event, meaning that the [filter] is meaningless and there can be no auto-stored $unit variable.
Post Reply