Unit and Attack related WML

The place to post your WML questions and answers.

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.
Post Reply
dreampilot
Posts: 100
Joined: November 6th, 2005, 4:36 am
Location: Sweden
Contact:

Unit and Attack related WML

Post by dreampilot »

Hey again. I am having new issues and I have been hinted there might actually be a limitation in how adaptable the wesnoth engine really is.

Is it possible to create a new ranged attack at a different range then the current one. (still adjecent hex but to have different retaliations).
Then make a unit that has 2 types of attacks but both of them just ranged.

My current tries have always resulted in the actual difference in the attacks working but when animating the 1st attack will always be displayed as if melee combat and forcing your unit to move against it's target and into their hex.

This results in ugliness if your animation is for a stationary attack firing a missile.


Is it possible or a limitation of the wesnoth code for now?
dreampilot
Posts: 100
Joined: November 6th, 2005, 4:36 am
Location: Sweden
Contact:

Post by dreampilot »

forgot to say I use 1.1.11

I did more testing and found something that will actually give me the result I want.

ranged - long ranged will both work as range attacks but when I used

short - long
or
medium - long
the first attack would always show as a melee attack when animating,

Any ideas what I can call the closer range for it still to stay a range attack?

ranged is a little far fetched when it is the closest attack type.


EDIT: I take it back, they just switched places.

this is bugging me alot. any way around it?

EDIT2: Ok, so it works.

"ranged" - "long" will both be displayed as a ranged attack but be treated as different.

Is there a list somewhere what the different range attacks can be called?

having it say first ranged and then long at your attacks in the game is not ideal.
User avatar
Ken_Oh
Moderator Emeritus
Posts: 2176
Joined: February 6th, 2006, 4:03 am
Location: Baltimore, Maryland, USA

Post by Ken_Oh »

Damn, I think about 2 months ago I could have answered this better, but short/melee and long/ranged are 4 existing attack distances. Honestly, I'm not even sure but you might be able add whatever attack distance you want. Either way, I know at least those 4 are usable.
dreampilot
Posts: 100
Joined: November 6th, 2005, 4:36 am
Location: Sweden
Contact:

Post by dreampilot »

Found out the hard way :wink:

If I name them something else then ranged/melee they become melee attacks when animated.

Why I was hoping if someone knew any other usable name for a range attack
User avatar
Ken_Oh
Moderator Emeritus
Posts: 2176
Joined: February 6th, 2006, 4:03 am
Location: Baltimore, Maryland, USA

Post by Ken_Oh »

Not 100% sure if this will work, but I think you can change stuff within the [animation] tags within the [attack] tags to make it look like a ranged attack.

Actually, looking at it now, I'm pretty sure you can.
User avatar
Noyga
Inactive Developer
Posts: 1790
Joined: September 26th, 2005, 5:56 pm
Location: France

Post by Noyga »

One complex way to do this would be to use halos to counter the melee movement, and some for the projectiles.
But it's really a huge mess.

I believe boucman will make possible in 1.3 to animate custom range attack either like melee or ranged (perharps it is already possible ?).
"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:I believe boucman will make possible in 1.3 to animate custom range attack either like melee or ranged (perharps it is already possible ?).
Yeah, in trunk this is already possible. There you can have an offset= key in [frame]s with which you can do custom slides (slide as in like the melee attack slide) or negate them.
Boucman
Inactive Developer
Posts: 2119
Joined: March 31st, 2004, 1:04 pm

Post by Boucman »

yes, to do that, you iwll need 1.3 and offset progressive parameters...
Fight key loggers: write some perl using vim
dreampilot
Posts: 100
Joined: November 6th, 2005, 4:36 am
Location: Sweden
Contact:

Post by dreampilot »

Alright. I will stick to what works for now and come back to this at a later release :)
Post Reply