FORUM ARCHIVED

Thrown weapon animations

Discussion in 'Modding' started by Bohandas, Sep 28, 2013.

  1. Bohandas

    Bohandas Member

    Is there any way to animate the projectile of a thrown weapon without using a .spr file?
     
  2. Kazeto

    Kazeto Member

    The same way other effects which don't use ".spr" files are animated - make a series of ".png" files and a ".xml" file defining these into a sprite.
     
    bluehinter likes this.
  3. Bohandas

    Bohandas Member

    Do most animations do that?
     
  4. Kazeto

    Kazeto Member

    From what I know, yes.

    Take a look at the sprites for the female hero, or for pretty much anything added in the expansion packs.
     
  5. bluehinter

    bluehinter Member

    Wow. I had no idea you could do this for thrown animations either. Maybe I didn't waste my time on those lava lamp and pokeyball animations after all. My only question is how do you reference the .xml or .spr file in your itemDB.xml?

    I'm familiar with creating .xml files for monsters, but in my itemDB file, do I just say thrown="items/thrown_lava_lamp.xml" instead of thrown="items/thrown_lava_lamp.png"?

    If so, can this trick also be used to animate iconFiles for items sitting on the ground as well?
     
  6. MOOMANiBE

    MOOMANiBE Ah, those were the days. Staff Member

    Most animations have an associated XML that specifies all the frames. The DB then references the XML file at the appropriate time. Take a look at some of the current effects to get a good idea of how it works.

    (I would be more explicit, but it's been a while and I don't exactly remember. I think it was either props or effects that animated WITHOUT an XML at a fixed framerate. :X Honestly the best way to learn this stuff is to see how things already in the game are implemented.)
     
    Kazeto likes this.
  7. Bohandas

    Bohandas Member

    I think it's both. I had always therefore assumed that creatures were the only thing that could be animated with an xml.
     
    Kazeto likes this.
  8. Kazeto

    Kazeto Member

    Yes, it is both. Generally anything that would be considered completely "static" in its animations (as in, there is no need to change the frame-rate on a frame-by-frame basis) could function like that, and in DoD such things are effects and props. It's probably why they made them work like that.

    Albeit from what I know, it is usually supposed to work at changing frame-rate if you do it the longer way (with the ".xml" file) - it's just unnecessary for the most part.