patchBattle for Wesnoth - Patches: patch #3682, Unit frame (not halo) square split...

Show feedback again

patch #3682: Unit frame (not halo) square split simplification

Submitted by:  David Mikos <coffee>
Submitted on:  Sat 09 Feb 2013 10:01:25 PM UTC  
Priority: 5 - NormalStatus: Done
Privacy: PublicAssigned to: Jérémy Rosen <boucman>
Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Sun 10 Mar 2013 09:19:28 PM UTC, comment #9:

Applied in revision 56479.

Thanks boucman for the assistance with this.

David Mikos <coffee>
Project Member
Sun 10 Mar 2013 09:18:00 PM UTC, SVN revision 56479:

apply unit animation WML patch #3682 and return deleted Steelclad-idle images as OKd by Jetrel.

(Browse SVN revision 56479)

David Mikos <coffee>
Project Member
Sat 23 Feb 2013 12:54:45 PM UTC, comment #7:

ok, I won't apply because I need the images for that, do you know where they are ? when they have been removed and why ?

you probably can PM Jetrel on the forum to ask...

Jérémy Rosen <boucman>
Project MemberIn charge of this item.
Wed 20 Feb 2013 11:39:17 AM UTC, comment #6:

I've attached the WML patch which addresses the souless drake death frame count by adding the count to the macro specification (and doing the same for the WC).

There are also updates to the syntax for the newly comitted dwarf fighter line since they came along recently as well as this patch. However, they will need the steelclad-idle#.png series of images put back for it to fully work, as they look to have been taken out and I couldn't include them in the patch.

(file #17278)

David Mikos <coffee>
Project Member
Sun 17 Feb 2013 09:04:51 PM UTC, comment #5:

updating the syntax sounds good, I think that the old one was implicitely relying on how a [frame] with no image behaves (which I am not sure but is probably documented in the wiki page

patch applied, i'm not closing this since I'm waiting for your followup with drake soulless fix

Jérémy Rosen <boucman>
Project MemberIn charge of this item.
Sat 16 Feb 2013 10:02:41 PM UTC, comment #4:

Updated the Wiki.

I've included another minor patch to fix some errors that crept in when updating the syntax of some units and update another begin/end depreciated set of tags.

The only problem I see now is the soulless drake variation death animation. Although this would have been a problem before updating the syntax, it needs another frame of death animation or we could change the death macro to specify the number of frames (made possible by the new syntax).

(file #17224)

David Mikos <coffee>
Project Member
Sat 16 Feb 2013 06:14:27 PM UTC, comment #3:

ok, commited.

please update the wiki accordingly so I can close this.

if you have followup patches please tell me in a comment so I don't close right away

Jérémy Rosen <boucman>
Project MemberIn charge of this item.
Sat 16 Feb 2013 03:03:05 AM UTC, comment #2:

I think you are right about the does_not_change function. I put an entry in for image and image_diagonal in the appropriate places and it now loops properly :)

This latest patch is split into the cpp code and the unit WML changes (all units have been converted).

In all, with these optimizations 9% less RAM is taken by Wesnoth by my tests from without these changes applied and can only be a good thing for loading speed when more standing/idle/etc. andimations come in.

I fixed a bug with the necrophage (attack frame 3 was never used) and similar fixes were applied throughout. Chances are that I introduced one or two bugs myself, like the thief one (now fixed). This is why I am saying that this is a v1 patch, but should be "complete" in the sense that it is intended to work fully.

(file #17210, file #17211)

David Mikos <coffee>
Project Member
Fri 15 Feb 2013 11:35:52 PM UTC, comment #1:

ok, good job for all the bugs catched and the syntax upgrade, awesome

i get this error message when using your patch

20130215 23:52:03 error general: Square bracket lengths do not match up: units/human-outlaws/thief-idle-[7~12,11~8].png:[300,100*10]

the loop parameter is definitely not a missing feature. it should be similar to progressive string in every aspect...

  • you defined a does_not_change function for the new parameters but you don't use it. does_not_change() is used to tell the animation engine that a unit needs to be redrawn because it moved. without that the animtion engine will leave the unit as is unless there is another reason to redraw it. a quick grep around should allow you to fix this
  • after that there is a remaining bug in the fencer standing wml, but it's trivial to fix

I'll wait for an updated patch with all WML updated. please be carefull since it's easy to get it wrong

quick note about looping anims. We don't have looping animations in wesnoth, the only thing we have is animations that end and are restarted right away :) i.e looping is handle at the animation choice level, not by the animation itself

Jérémy Rosen <boucman>
Project MemberIn charge of this item.
Sat 09 Feb 2013 10:01:25 PM UTC, original submission:

This is intended to be the last major application of the square_parenthetical_split function to unit animation WML.

The attached patch is a work in progress, converting fully only the human units to the new syntax and the animation macros (running/etc.). At the moment the idle animations do not work, and I suspect this is because they have mainly one frame block now and will need that 'cycle' parameter to be implemented that is on the supposedly 'easy_to_code' page. The fencer is a good example here.

Everything else seems to work.

I have been converting all the 'begin' and 'end' tags over to the new syntax as I've been going along, as these were set to be depreciated anyway.

Lastly, I picked up on some errors that were present in the original animations. FAERIE FIRE had an in-between halo sequence that was never played in game, due to the duration being too short for it. The arch mage idle animation showed the male unit due to missing frames for the female section, and the drake fire breath macro had a halo that had an incorrect duration (although still worked). Hopefully this new syntax will be less prone to errors like these.

David Mikos <coffee>
Project Member


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by shadowmaster (Updated the item)
  • -unavailable- added by boucman (Posted a comment)
  • -unavailable- added by coffee (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 06 Aug 2013 12:43:38 AM UTCshadowmasterOpen/ClosedOpen=>Closed
    Sun 10 Mar 2013 09:19:28 PM UTCcoffeeStatusIn Progress=>Done
    Wed 20 Feb 2013 11:39:17 AM UTCcoffeeAttached File-=>Added 2013.02.20-another_animation_WML.patch, #17278
    Sat 16 Feb 2013 10:02:41 PM UTCcoffeeAttached File-=>Added 2013.02.17-animation_WML_fixes.patch, #17224
    Sat 16 Feb 2013 03:03:05 AM UTCcoffeeAttached File-=>Added 2013.02.16-animation_cpp_changes_v1.patch, #17210
      Attached File-=>Added 2013.02.16-unit_animation_WML_changes_v1.patch, #17211
    Fri 15 Feb 2013 11:35:52 PM UTCboucmanStatusNone=>In Progress
      Assigned toNone=>boucman
    Sat 09 Feb 2013 10:01:25 PM UTCcoffeeAttached File-=>Added preliminary_square_split_animation_frame.patch, #17165
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup