Updating unit definitions for 1.1.1+

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
quartex
Inactive Developer
Posts: 2258
Joined: December 22nd, 2003, 4:17 am
Location: Boston, MA

Updating unit definitions for 1.1.1+

Post by quartex »

I'm going through and updating my custom unit files to be compatable for 1.1.1+. I'm just fixing the things I have noticed have changed in the unit WML pages. Here's what I've found:

change long to ranged
change short to melee

change image_defensive to [defend] tag
change ability= to [abilities] tag

add [animation] [/animation] tags for each attack

(the [ability] tags seem to use macros for each ability, but I can't find any documentation on these macros in the WML help files)

Are there any changes I am missing? Thanks.
Xan
Inactive Developer
Posts: 258
Joined: August 28th, 2005, 3:05 pm
Contact:

Post by Xan »

Actually, if you look in the svn repo for Wesnoth under trunk/src/tools you'll find the source ('wml_update.cpp') for a c++ program which can automatically update unit wml.
"It is time people learned about their failures and my successes."
quartex
Inactive Developer
Posts: 2258
Joined: December 22nd, 2003, 4:17 am
Location: Boston, MA

Post by quartex »

Thanks Xan, I'll check that out. If I can get the c++ code to work, it might make my life easier.

I also forgot changing image_moving to [movement_anim] tag
User avatar
appleide
Posts: 1003
Joined: November 8th, 2003, 10:03 pm
Location: Sydney,OZ

Post by appleide »

Umm, is that [ability] tag compulsory?? I think I used ability=cures,regenerates, with not problem in 1.1.1
Why did the fish laugh? Because the sea weed.
scott
Posts: 5243
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

Both styles work right now so everyone's campaigns don't break. However, someday it will won't work anymore.
Hope springs eternal.
Wesnoth acronym guide.
Boucman
Inactive Developer
Posts: 2119
Joined: March 31st, 2004, 1:04 pm

Post by Boucman »

there is a sticky thread in this same forum that list every change in unit WML....

I even edit the first post every time to keep it up to date.
Fight key loggers: write some perl using vim
quartex
Inactive Developer
Posts: 2258
Joined: December 22nd, 2003, 4:17 am
Location: Boston, MA

Post by quartex »

Boucman wrote:there is a sticky thread in this same forum that list every change in unit WML....

I even edit the first post every time to keep it up to date.
I apoligize, I did notice this new forum had been created. Did you swap the unit and secondary_unit definitions for "sighted" events. It looks like they've been switched around but I'm not sure. I think I remember it used to be that the unit was the one you were seeing, and the secondary unit was your unit.
Post Reply