Making abilities a little more flexible
Moderator: Forum Moderators
Forum rules
Before posting a new idea, you must read the following:
Before posting a new idea, you must read the following:
Making abilities a little more flexible
Unit abilities such as 'heals', 'cures', 'regenerates', 'ambush', etc, are difficult to make flexible. To make a system that would allow anyone to define any ability they want in WML would require a full-fledged programming language, that'd probably be so complicated that anyone who could use it would probably be better off just modifying C++ anyway.
But, that doesn't mean we can't make it a little more flexible. One of the key things that people want in abilities is to specify that the ability is only active under certain conditions. The two main conditions I can think of are based on the time of day/night, and based on the terrain the unit is in. For instance, ambush can be defined as the 'invisible' ability, only active in 'forest'.
We could remove the definition of 'ambush' from the code, and just have a more general 'invisible' ability, and then we could define ambush in WML:
[/code]
Likewise, suppose you wanted an ability to regenerate, but not at night.
This would give scenario designers more flexibility in adding abilities that they want to.
Thoughts?
David
But, that doesn't mean we can't make it a little more flexible. One of the key things that people want in abilities is to specify that the ability is only active under certain conditions. The two main conditions I can think of are based on the time of day/night, and based on the terrain the unit is in. For instance, ambush can be defined as the 'invisible' ability, only active in 'forest'.
We could remove the definition of 'ambush' from the code, and just have a more general 'invisible' ability, and then we could define ambush in WML:
Code: Select all
[ability]
name=ambush
based_on=invisible
[condition]
terrain=f
[/condition]
Likewise, suppose you wanted an ability to regenerate, but not at night.
Code: Select all
[ability]
name=solar powered #ok this probably isn't the name we would give it ;)
based_on=regenerates
[condition]
time_of_day=day,twilight
[/condition]
[/ability]
Thoughts?
David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
That would be good, but to give further customization, the amount healed be regeneration should be variable. Heal and cure could also be merged by allowing a variable amount of healing and the possibility to cure poison and stone.
Likewise, leadership could be expanded to give variable bonus, and toggle who get affected by it (only lower level units, only units of the same race, only chaotic units,...)
More flexibility is always better
Likewise, leadership could be expanded to give variable bonus, and toggle who get affected by it (only lower level units, only units of the same race, only chaotic units,...)
More flexibility is always better
Re: Making abilities a little more flexible
This sounds like it would be moving WML in the directions of being a constraint language. I wonder if it would be a good idea to explicitly take that point of view, so you can make use of the work that's already been done on constraint languages. Constraint programming gives you a lot of the power of a "real" programming language, but would be a lot more natural in the context of Wesnoth scenarios (as you've already noticed).Dave wrote:Thoughts?
Just a thought induced by working way too much with constraint languages lately..I could be totally off my rocker .
Daniel
What do you mean by make them editable? They are found in data/translations/english.cfg (assuming you're using English) and you can edit them there...Sangel wrote:Could we also make the description which pops up from mousing over the ability editable?
David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
Make them editable as in when you give a unit ambush (based on invisibility) you want to have a description of it that is not a description of invisibility. yo would want to specify in a toot-tip that it is only invisible in forest.
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
And I hate stupid people.
The World of Orbivm
Yes, that would be possible by putting an entry in data/translations/english.cfg (hmm...it might also be directly specifiable in the tag...maybe)turin wrote:Make them editable as in when you give a unit ambush (based on invisibility) you want to have a description of it that is not a description of invisibility. yo would want to specify in a toot-tip that it is only invisible in forest.
David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
-
- Moderator Emeritus
- Posts: 2232
- Joined: March 26th, 2004, 10:58 pm
- Location: New York, New York
What would the point of that be? Non-swimmers are already weak in water, and getting a bonus to hit other aquatic creatures in water doesn't make sense.
As for hide-and-seek - most of the time, swimmers are only used in supporting roles. Hiding a bunch of mermen in the middle of the sea is useless - they usually end up in situations where they would be seen even with deep water invisibility.
As for hide-and-seek - most of the time, swimmers are only used in supporting roles. Hiding a bunch of mermen in the middle of the sea is useless - they usually end up in situations where they would be seen even with deep water invisibility.
"Pure logic is the ruin of the spirit." - Antoine de Saint-Exupéry