My two cents... (or three, or four)

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:
Po0Och

My two cents... (or three, or four)

Post by Po0Och »

The one thing that I'd like to see in Wesnoth would be 'castable' magical abilities that can affect only allied units. The current system for offensive magic (built into attacks) works really well, but at the moment all we have for friendly effects are Illuminate and Cure. I think it would add a lot of strategy if there were effects that could be cast on friendly units the same way that slow and poison effects are placed on enemies.

Now I'm not a coder, but it seems to me that most of what you'd need to implement this already exists in game. There is already a system for effects on units (slow and poison) that can be delivered by an attack, all that needs to be coded is a new ‘attack’ type that:
-Can only target allied units
-Has a 100% chance to hit (or less than 100%, if you're feeling sadistic)
-Doesn't allow retaliation (to keep allied casters from retaliating with their own enchantments. Or, you could allow retaliation and call it a combo! :) ).

I know that the Wesnoth Philosophy™ says that spells should be completely built into attacks, and I know that spellcasting has been discussed elsewhere in the forum, but it seems to me that we lose out on the beneficial side of magic. Choosing which of your combat units get which enchantment on a given turn could be good strategy, the spells need only last one or two turns, and since it can be made ‘point and click’ like combat I don’t think it violates KISS.

So, good idea or bad?

Random ideas:
A lvl 1 mage, weak in hp, with a spell that heals 6 hp to a single unit in a single shot. Stronger than a regular healer, but only heals one unit at a time.

A higher level mage with a haste effect, which grants a one or two point boost in speed to a single unit for a turn or two.

A mage with a disenchant spell, which deals no damage but simply removes all spells good or bad on the unit. Useful against beefed up enemies and for cursed allies.
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo »

* Captain adjacent to 1st level units gives them damage bonus
* Healer adjacent to damaged units gives them healing

If there would be e.g. 'Mage of Protection'... I think (s)he should just simply give protection (resistance?) bonus to adjacent units, units that in the beginning of turn are adjacent to 'Mage of Haste' get haste for a turn, etc.

- Miyo
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

I'm inclined to say I like this idea. The implementation is simple. The burden on the user is simple. It leverages existing implementation and user familiarity well.

Still, adding a feature like this before version 1.0 would, imo, likely open the floodgates on people suggesting all sorts of changes and additions. Perhaps we should mark it as one of our 'very likely' features for post 1.0.

On the subject of healing though, I really think that's been done to death. Let's think about all the ways units can heal:

- by resting
- by being in a village
- by being next to a unit with 'heals'
- by being next to a unit with 'cures'
- by draining from enemy units with the 'drain' ability
- through the 'regeneration' ability
- between scenarios
- by advancing a level

I really, truly think that that's enough. We really, truly don't need any more ways to heal.

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
Po0Och

Post by Po0Och »

*bump*

I was considering making my own persistant effects (similar in style to slow, and poison) to test out this idea, when I discovered that slow and poison aren't defined in the game.cfg file, where I thought they'd be. I guess that means that they're built into the game code somewhere. I wonder if it could be possible to create effects like slow and poison in WML, similar to the way traits are handled. That would make them much more accessible.
User avatar
turin
Lord of the East
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas
Contact:

Post by turin »

Po0Och wrote:*bump*

I was considering making my own persistant effects (similar in style to slow, and poison) to test out this idea, when I discovered that slow and poison aren't defined in the game.cfg file, where I thought they'd be. I guess that means that they're built into the game code somewhere. I wonder if it could be possible to create effects like slow and poison in WML, similar to the way traits are handled. That would make them much more accessible.
you and Dacyn must be allied or something... "Everything must be in WML or nowhere at all! CHARGE!"

;)
i don't see the point of defining these in WML. its not a good idea to define them by adding new tag-types that are only used for those definitions.
although it would be nice to be able to make your own abilities, I don't really see the point. just learn how to program. :roll:
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
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

Creating the ability to define effects like this in WML and have them work as nicely as they would in-game is hard. It makes WML half way to being a programming language.

Generality and flexibility is very nice, but imo one of the most common mistakes in all software projects (Free and commercial, and I've been involved in some commercial ones of this nature), is trying to be too flexible.

Flexibility is very anti-KISS in many cases.

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
User avatar
turin
Lord of the East
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas
Contact:

Post by turin »

Dave wrote:Creating the ability to define effects like this in WML and have them work as nicely as they would in-game is hard. It makes WML half way to being a programming language.
Halfway? :)
Dave wrote:Generality and flexibility is very nice, but imo one of the most common mistakes in all software projects (Free and commercial, and I've been involved in some commercial ones of this nature), is trying to be too flexible.

Flexibility is very anti-KISS in many cases.
Now i agree with this.
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
Po0Och

Post by Po0Och »

turin wrote: don't see the point of defining these in WML. its not a good idea to define them by adding new tag-types that are only used for those definitions. although it would be nice to be able to make your own abilities, I don't really see the point. just learn how to program.
Ooo, I've been burnt to a crisp. =)

I didn't mean to turn WML into an entire programming language. I can see how poison is probably fairly complicated, but it seemed to me that if you could get an experience modifying effect, a speed modifying effect, an attack power or an attack numbering effect using the trait tag, e.g:

Code: Select all

[trait]
	id=quick
	name=quick
		[effect]
		apply_to=movement
		increase=1
		[/effect]
		[effect]
		apply_to=hitpoints
		increase_total=-10%
		heal_full=yes
		[/effect]
	[/trait]
Why couldn't you do something similar with abilities? You'd only need to add one new field, duration. I'm not a programmer though, so I really don't have any idea how complicated this would be to do (and everyone is telling me that it is complicated to do...). It just seemed uncomplicated to me based on what I've seen already from WML.
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

Po0Och wrote: I didn't mean to turn WML into an entire programming language. I can see how poison is probably fairly complicated, but it seemed to me that if you could get an experience modifying effect, a speed modifying effect, an attack power or an attack numbering effect using the trait tag, e.g:

Code: Select all

[trait]
	id=quick
	name=quick
		[effect]
		apply_to=movement
		increase=1
		[/effect]
		[effect]
		apply_to=hitpoints
		increase_total=-10%
		heal_full=yes
		[/effect]
	[/trait]
Why couldn't you do something similar with abilities? You'd only need to add one new field, duration. I'm not a programmer though, so I really don't have any idea how complicated this would be to do (and everyone is telling me that it is complicated to do...). It just seemed uncomplicated to me based on what I've seen already from WML.
This wouldn't be complicated to do, but this is one specific status effect -- slow. Mileage varies for other status effect, and in particular things like poison and stone are fairly complicated.

Also consider how slow takes effect for the very combat it is inflicted in. That's an example of a subtle effect that is difficult to get right without coding it in C++. That's the thing with defining things like this in WML -- you can do it 'mostly right' alot of the time, but to get it to behave exactly how you want is usually not quite possible. It's alot like making a web-based application vs making a real one.

FWIW I do actually have secret evil plans to probably do what you want, and maybe even more, but I'm not sure when if ever they will be implemented.

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

turin wrote:
Dave wrote:Generality and flexibility is very nice, but imo one of the most common mistakes in all software projects (Free and commercial, and I've been involved in some commercial ones of this nature), is trying to be too flexible.

Flexibility is very anti-KISS in many cases.
Now i agree with this.
Seriously this is one of the big things someone has to learn to become a truly good programmer or system designer.

Most decent designers want to fit everything into a super elegant catch-all system that does everything nice and smoothly. There's nothing wrong with this. Pursuing elegance and simplicity is nice. But you have to realize the cost of your generality.

Generality will often result in lower over-all quality in exchange for the generality, or in a super-complex system that just doesn't work nicely.

In my last job, I programmed part of a stockmarket data delivery system. We were told that our system had to work with 'any' kind of clients -- those with narrow connections who want to download lots of data over a long period of time. Those with broad connections who want large amounts of data. It had to be super-flexible, super-extensible, etc etc.

Despite having some very smart programmers (some of them smarter than me, certainly), the final result was a disaster: a system that communicated using XML, with super-nifty configuration files to specify that exact data format, which could be changed anytime. It could handle 2-3 clients at a time.

Meanwhile (and this really is rich) we had a guy writing a charting application, who decided that despite his task being to write a 2D charting library, he would generalize it by making his charts work in an arbitary number of dimensions. So, he wrote templated C++ code that took the number of dimensions you wanted things to be in as template arguments.

He did actually end up with an application that could work with data in an arbitary number of dimensions. The small limitation that he didn't actually manage to write code to actually plot any of the data that was in other than 2 dimensions didn't seem to phase him. Apparently it was still super-cool that his library was this general.

Anyway, I don't really know where I'm going here. I guess I'm just rambling on about how over-generalization is a big, common mistake, and one that we're not going to make.

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
quartex
Inactive Developer
Posts: 2258
Joined: December 22nd, 2003, 4:17 am
Location: Boston, MA

Post by quartex »

miyo wrote:* Captain adjacent to 1st level units gives them damage bonus
* Healer adjacent to damaged units gives them healing

If there would be e.g. 'Mage of Protection'... I think (s)he should just simply give protection (resistance?) bonus to adjacent units, units that in the beginning of turn are adjacent to 'Mage of Haste' get haste for a turn, etc.

- Miyo
Casting buffs or curses on other units is definitely a floodgate we don't want to open. Dave's idea of mages were that they didn't cast induvidual spells, but instead had a different form of attack (magic) that would be more effective against certain units. Inuvidual spells would break this rule.

However with leadership, healing and illumination as passive abilities, Haste or Protection would be interesting. I'm not sure what form of protection the mage would give (5% or 10% to all types of damage), and such a mage would probably be too powerful. But what about a hasting mage that increased the movement of all adjacent units by 1 (or 2?). Maybe it isn't a mage, but such an ability would be really useful for the dwarves, who are crippled in open terrain by their slow movement.
Dacyn
Posts: 1855
Joined: May 1st, 2004, 9:34 am
Location: Texas

Post by Dacyn »

Po0Och wrote:Now I'm not a coder, but it seems to me that most of what you'd need to implement this already exists in game. There is already a system for effects on units (slow and poison) that can be delivered by an attack, all that needs to be coded is a new ‘attack’ type that:
-Can only target allied units
-Has a 100% chance to hit (or less than 100%, if you're feeling sadistic)
but it's not an explicit magical spell?
How could there be a spell more explicit that this?
turin wrote:i don't see the point of defining these in WML. its not a good idea to define them by adding new tag-types that are only used for those definitions.
Actually, I agree that we shouldn't add many tag types[1]. However, many specials, for example "poison", could be defined without adding new tags, just add a "name=hit" event trigger...
Dave wrote:Also consider how slow takes effect for the very combat it is inflicted in. That's an example of a subtle effect that is difficult to get right without coding it in C++. That's the thing with defining things like this in WML -- you can do it 'mostly right' alot of the time, but to get it to behave exactly how you want is usually not quite possible. It's alot like making a web-based application vs making a real one.
of course, these kinds of things are complicated..
Is there a gameplay reason to have "slow" take effect immediately?

Unfortunately WML is a programming language now, so there may be no point to WML vs. engine...

[1]but there are so many already, does it really matter :wink:
KISS- keep it simple, stupid

When reading the above quote from TWP, keep in mind the words of Antoine de Saint-Exupéry: "Language is the source of misunderstandings."
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

Dacyn wrote: Is there a gameplay reason to have "slow" take effect immediately?
Among other things, 'slow' loses its effect at the end of the slowed unit's turn. This means that there's really no disadvantage of getting slowed on your turn, except that you're slowed for the rest of the combat.
Dacyn wrote: Unfortunately WML is a programming language now, so there may be no point to WML vs. engine...
Except that WML is a very simple programming language, and C++ is a complex one.

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
mlangsdorf
Posts: 129
Joined: April 27th, 2004, 4:24 pm

Post by mlangsdorf »

I think there should be code for "attack an allied unit and do something good". There's a couple of things it'd be useful for:

* A more intuitive rule for passing in Wesbowl
* Focused leadership or healing
* Targeted magical effects

One unit that was discussed a while back was an alternate Elvish Shaman upgrade, the Elvish Grovemaster, who had an Aura that effectively put all adjacent units in Forest. This would be a third level unit. It'd be neat to have a second level version that could just select one unit and put it Forest until the next turn.
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

mlangsdorf wrote:I think there should be code for "attack an allied unit and do something good".
Yeah, I agree with this. The code shouldn't be too complicated to write, and it'd make the engine alot more flexible.

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
Post Reply