Long-ranged attacks possible?

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:
Post Reply
User avatar
TheBladeRoden
Posts: 168
Joined: July 16th, 2007, 8:01 am

Long-ranged attacks possible?

Post by TheBladeRoden »

I was curious if the engine was capable of implementing attacks that affect units further than the attacker's adjacent hex? This isn't as much a recommendation for the main game but more for the moddability propects.
User avatar
Noyga
Inactive Developer
Posts: 1790
Joined: September 26th, 2005, 5:56 pm
Location: France

Post by Noyga »

This is not something we want.
Please read the FPI (ALL USERS READ THIS - Frequently Proposed Ideas (FPI) Thread)

Topic locked
"Ooh, man, my mage had a 30% chance to miss, but he still managed to hit! Awesome!" ;) -- xtifr
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

Noyga wrote:This is not something we want.
Please read the FPI (ALL USERS READ THIS - Frequently Proposed Ideas (FPI) Thread)

Topic locked
He asked whether it is possible for modding purposes, so whether it's FPI or not is completely irrelevant. I'm unlocking this for now in case he wants to talk about it more.

The answer: not really. Not in any way that's convenient to use for the player (for example you couldn't present him with the normal weapon selection dialog when attacking, which would be a huge drawback).

EDIT: I suppose this might or might not belong to the WML workshop instead.
User avatar
Elvish_Pillager
Posts: 8137
Joined: May 28th, 2004, 10:21 am
Location: Everywhere you think, nowhere you can possibly imagine.
Contact:

Post by Elvish_Pillager »

The Wesnoth engine doesn't supply a way for two units that are not on adjacent hexes to engage in combat, so if you wanted a "long ranged" attack to take place as normal, you would have to go through very complicated shenanigans.
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.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

So if what you really want could most specifically be described as "attacks across multiple hexes", then no, that's not possible. However, in some other rather specific cases (like casting an offensive spell across multiple hexes) the possible workarounds might be good enough. It depends on what you want to do exactly. Attacks in general across multiple hexes aren't doable while some other special actions over multiple hexes are.
User avatar
Elvish_Pillager
Posts: 8137
Joined: May 28th, 2004, 10:21 am
Location: Everywhere you think, nowhere you can possibly imagine.
Contact:

Post by Elvish_Pillager »

It's not impossible, it's just ridiculously complicated. You can move the units next to each other, change the terrain, bring along any units with applicable abilities (Leadership...), and freeze up the rest of the map until the player attacks.
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.
User avatar
Vendanna
Posts: 626
Joined: September 16th, 2006, 10:07 pm
Location: Spain

Post by Vendanna »

Well, I think you can make something with WML of an unit that at the start of his turn, create in a empty hex an "arrow/missile" unit (1 hp) with attacks and movement, the unit will be able to move and will banish at the end of turn.

As a note, if the "arrow" fails the attack, the unit could "cut the arrow midair" with his attack :P

Also, useful to represent "wizards launching spells" (if recruitable) apart from summoning creatures if you wanted to do something similar to MTG (someone tried to make a mod based on it with permission of wizards of the coast but abandoned the project)

Anyhow, all things can be made with effort from your part, depending of how bad you want to get it (learning programming, etc...) and in most cases I suggest to implement other things you have in mind and leave these things at the end. (example background, stats graphics etc...) if you are serious you will probably find more help from people with more experience that usually have low time to spare for something that will inevitabily drop forgotten in a few days)
"Mysteries are revealed in the light of reason."
User avatar
Noyga
Inactive Developer
Posts: 1790
Joined: September 26th, 2005, 5:56 pm
Location: France

Post by Noyga »

Well we won't add support for this in the engine, we don't want to add a maintainability burden in the code...
AFAIK the answer is : No the engine doesn't support this, nor will support this.
It might be possible to do this with WML, but with some very complex code...
"Ooh, man, my mage had a 30% chance to miss, but he still managed to hit! Awesome!" ;) -- xtifr
User avatar
Ken_Oh
Moderator Emeritus
Posts: 2178
Joined: February 6th, 2006, 4:03 am
Location: Baltimore, Maryland, USA

Post by Ken_Oh »

I think this is very possible in the dev version. [set_menu_item] and [command] should at least let you lob some arrows or a fireball at a location and treat that as the unit's attack.

I'm not sure if you can make it open up an attack dialog. Honestly, I'm not even sure why you would want it to do that.
Edward V Riley
Posts: 265
Joined: June 28th, 2007, 4:42 pm
Location: Baldwyn Mississippi

Post by Edward V Riley »

I've often heard that Wesnoth owes some of it's roots to the game Warsong. So

Archers in that one had to fight one hex away, but could fire on the units before they reached them to close for melee.

What didn't make sense to me was that your hero units in that game could fire magic from a safe hex distance away. This could have easily(at least in my reasoning) been adapted for ranging units.

But if this is ever used for Wesnoth, being able to attack from more than one hex away, then the ranged units in the game's melee should be lowered, probably halved or in some cases be nonexistant(meaning they're completely helpless to a melee onslaught.) Ranged units couldn't have the time to put their bow away, draw their sword and close for melee. But a mage would have time for one defensive move before closing with an attacking meleer.
Who Knows what evil lurks in the hearts of men?
The Shadow knows
Angry Andersen
Posts: 205
Joined: September 15th, 2006, 1:22 pm

Post by Angry Andersen »

Ever played Battle Isle or History Line?

Especially in History Line, artillery units (e.g. units that have such ranged attacks) pretty much rule the game as they can kill opponents with no risk of retaliation most of the time. The result is, that strategies are mostly reduced to digging yourself in and pounding everything with the artillery. And the AI has problems being efficient at this which further spoils the fun...

Tbh, I do not think this ability is desireable in Wesnoth, except maybe for very limited cases in campaigns.
Edward V Riley
Posts: 265
Joined: June 28th, 2007, 4:42 pm
Location: Baldwyn Mississippi

Post by Edward V Riley »

Angry has a point there. We don't want this to evolve into an artillery duel and trench warfare. That's why so few World War I games have come out, It's flat out boring.

I foresee major problems also with the distance determintation. Do some archers shoot from 2 hexes or 3 hexes away? How about the Imperial Era Ballista...4 hexes? What else?

You'd also have to configure distance as taking away accuracy and power. Also, a prime tactic in the Greek and Roman infantry was simply to hide under their shields with a arrow barrage. Wouldn't the increase in distance of ranged also preclude more units evolving shields? Take the Romans for example. They're in 2 ranks, the front rank kneels and puts their shields out in front of them, the back rank moves forward with the sheild over the head and lowers themselves to where their shields are also protecting the head of the front rank.

THe point of all this is that it would violate the KISS principle way too much.

The only upgrade I can foresee for archers is giving them a DIFFERENT ranged attack. By this I mean that they have 2 ranged choices 1)fire straight at enemy(more shots, less accuracy) or 2)fire up in the air so arrow comes down(less shots, better accuracy).
Who Knows what evil lurks in the hearts of men?
The Shadow knows
User avatar
Viliam
Translator
Posts: 1341
Joined: January 30th, 2004, 11:07 am
Location: Bratislava, Slovakia
Contact:

Post by Viliam »

Seems to me that the largest problem with distance attack is the lack of user interface for selecting which unit to attack. So giving archers ability to fight 2 hexes away would be almost impossible. But other distance effects (triggered by something else) would be relatively easy. For example:


At the beginning of the turn, Fire Demon causes 5 HP damage to all Snowmen in distance up to 5 hexes.

When Warrior of Light kills an undead unit, all undead units on the adjacent hexes receive 20 HP damage. (Useful for walking through huge clouds of Walking Corpses.)

At the beginning of the turn, on all free hexes adjacent to Lord of Storm appear small Thunder units. Thunder units walk the same speed across any terrain, have 5-1 ranged fire attack, and automatically disappear at the end of turn.

When a friendly Peasant units moves on the hex adjacent to Master of Sacrifice, it is killed, and all enemy units in distance up to 6 hexes receive 20 HP damage.

When a Cannon Ball unit moves on the hex adjacent to Cannon unit, it is fired in direction it came from; hits the first unit in line up to 10 hexes distance, removes 50 HP, and disappears. Cannon unit can do this only once per turn.
Angry Andersen
Posts: 205
Joined: September 15th, 2006, 1:22 pm

Post by Angry Andersen »

I'm sure the user interface could somehow be modified to handle distance attacks if this was really wanted and the developers were willing to spend much time on doing it.

But for the reasons stated above, I 'm pretty convinced that such "artillery" units would seriously change gameplay in an undesired way.

Other games that include artillery units usually also have units that can't be hit by them, e.g. airborne units. This gives them some vulnerability and thus balances their power (a bit), but then again often leads to cases, were airborne units can strike ground units without danger of retaliation - boring!

All in all, I'm convinced that the introduction of artillery units in more than a very very limited way would make the game much worse. Balancing them would require huge changes to other units, the AI would have to be modified, etc.

In the end it wouldn't be BfW anymore!
User avatar
Ken_Oh
Moderator Emeritus
Posts: 2178
Joined: February 6th, 2006, 4:03 am
Location: Baltimore, Maryland, USA

Post by Ken_Oh »

You guys were making my doubt how possible this was, so I whipped up a quick and dirty scenario that lets you lob a fireball at any enemy within a 15 hex radius by right-clicking on an enemy unit (or doing whatever Mac users do instead) and selecting "*Fireball." The fireball acts as your leader's attack and does 30 fire damage. The obvious problem with this is not giving the normal attack dialog, but it isn't all that bad since it accounts for resistances and I'm sure it could be outfitted to included chance-to-hit.

Nod to TL, because the code is pretty much just ripped from his.
Attachments
Great Fireballs.zip
(4.2 KiB) Downloaded 170 times
Post Reply