[RMMV] DragonBones 2d Animation Integration

Discussion in 'JS Plugins In Development' started by TheGreenKel, Jul 9, 2017.

  1. exel.exe

    exel.exe Veteran

    Messages:
    54
    Likes Received:
    10
    First Language:
    español
    i can make my armature jump im make it wrong? i took the code from drigwood and itdosnt work on
    armatures, here a test:



    here the code:

    <target action>

    camera focus: target

    zoom: 120%, 30

    opacity not focus: 0, 60

    wait for opacity

    move user: targets, front, 20

    jump user: 200, 20

    wait for movement

    motion attack: user

    action animation: target

    wait for animation

    action effect

    immortal: target, false

    zoom: 100%, 60

    wait: 60

    opacity not focus: 100%, 60

    wait: 60

    </target action>

    sorry for the bad english
     
  2. bhindi1224

    bhindi1224 NOT Indian Okra

    Messages:
    295
    Likes Received:
    164
    First Language:
    English
    Primarily Uses:
    RMMV
    Export your files as Dragonbones 5.0 You have the option on export.

    Edit: Sorry, literally was answered just a few posts down. Not sure how to delete posts.
     
  3. SwiftIllusion

    SwiftIllusion Veteran

    Messages:
    93
    Likes Received:
    146
    First Language:
    English
    @Dirge I was able to get the animation locations working correctly, though I'm not sure how efficient it is (hopefully the plugin will be updated in the future to have this fixed).
    Open the plugin file KELYEP_DragonBones.js with a good text editor (recommend notepad++ which is free), search for "Sprite_Battler.prototype.updateStateIconSpritePosition = function() {" and below that section add
    Code:
    dragonBonesIntegration.Sprite_Animation_updatePosition = Sprite_Animation.prototype.updatePosition;
    Sprite_Animation.prototype.updatePosition = function() {
      dragonBonesIntegration.Sprite_Animation_updatePosition.call(this);
      if (typeof this._target._battler != 'undefined'){
        if (this._animation.position !== 3) {
            if (this._animation.position === 0) {
                if (this._target._battler.isActor()) {
                this.y -= this._target._battler.actor().meta.dragonbone_height;
                } else {
                this.y -= this._target._battler.enemy().meta.dragonbone_height;
                   };
            } else if (this._animation.position === 1) {
                if (this._target._battler.isActor()) {
                this.y -= this._target._battler.actor().meta.dragonbone_height / 2;
                } else {
                this.y -= this._target._battler.enemy().meta.dragonbone_height / 2;
                   };
            }
        }
        }
    };
    To also fix this for side view enemies if necessary, open YEP_X_AnimatedSVEnemies.js and below the "Yanfly.SVE.Sprite_Enemy_update = Sprite_Enemy.prototype.update;" section add
    Code:
    Yanfly.SVE.Sprite_Animation_updatePosition = Sprite_Animation.prototype.updatePosition;
    Sprite_Animation.prototype.updatePosition = function() {
      Yanfly.SVE.Sprite_Animation_updatePosition.call(this);
      if (typeof this._target.parent._battler != 'undefined'){
        if (this._animation.position !== 3) {
            if (this._animation.position === 0) {
               if (this._target.parent._battler.isEnemy()) {
                this.y -= this._target.parent._texture.height;
               };
            } else if (this._animation.position === 1) {
               if (this._target.parent._battler.isEnemy()) {
                this.y -= this._target.parent._texture.height / 2;
               };
            }
        }
       }
    };


    @exel.exe Jump only works for animated side view enemies (with YEP_X_AnimatedSVEnemies.js)
    So for that enemy you need to manually animate the jump in DragonBones, like this
     
  4. exel.exe

    exel.exe Veteran

    Messages:
    54
    Likes Received:
    10
    First Language:
    español
    thanks for the feedback I will start my tests again with new animations for jumps
     
  5. Ultimar

    Ultimar Warper

    Messages:
    3
    Likes Received:
    0
    First Language:
    English
    Will this eventually be compatible with Victor's animated battle sprites? YEP is somewhat limited in the animation department compared to his system.
     
  6. bhindi1224

    bhindi1224 NOT Indian Okra

    Messages:
    295
    Likes Received:
    164
    First Language:
    English
    Primarily Uses:
    RMMV
    I'm not sure I have this question formed properly, but here goes. I was looking at Spriter because I see a lot of resources that already have existing Spriter animations. Do you know of a way to convert the .scon or .scml file from Spriter into a JSON file that can be read by Dragonbones? I've been redoing all the animations inside of Dragonbones and it's becoming a chore. I would LOVE to have the ability to just convert those files over, but I have practically no programming experience. Just comparing the two application's files, .scon and .json, inside of Notepad++ they seem to have similar data, but I would have no idea how to change the format of one to the other. If it helps at all, and I honestly wouldn't even be able to tell if it does, the reference for the .scml file is located here.

    Just to be completely clear, I want to use Spriter .scml (or .scon) animation files to animate in MV. I would like to do it by either a plugin magically being produced to import Spriter files, or a way to use them with the Dragonbones plugin. I don't expect any solution to this as I've noticed threads about MV using Spriter for a long time that go unanswered, but here's hoping! :kaoluv:
     
  7. Rhino

    Rhino Champion Snoozer

    Messages:
    407
    Likes Received:
    464
    First Language:
    English
    Primarily Uses:
    RMMV
    Hello, I'm using version 4 of your demo, and noticed a problem with the animations drawn directly on the screen (by talking to Vice.) The demon's run and dead animations will play, but normalattack and uniqueattack do not. I tried replacing it with Ubbie and found that atc and stand work, but turn face and walk just don't play. It doesn't matter what order you try to play them in. I haven't edited any of the files, so I can't think of any reason why they're not working.

    I can see that they're working in the original video of the demo you posted. If anyone can confirm that this is a real issue that arose in the current version, and that there's an old copy where it's working as intended, I'd really appreciate if that could be shared. ;_;

    Edit: Tested it with one of Aekashics battlers and it seemed to work fine, so this is pretty strange. I'm just going to go ahead and make my custom battler and hope it works :kaoswt:
     
    Last edited: Oct 8, 2017
  8. styx92

    styx92 Veteran

    Messages:
    275
    Likes Received:
    33
    First Language:
    German
    Hey guys :D
    No one found a way to convert SpriterPro animations into DragonBones? :kaocry:
     
  9. KasuraKen

    KasuraKen Villager

    Messages:
    10
    Likes Received:
    0
    First Language:
    Englisch
    Primarily Uses:
    RMMV
    So I have a problem. It says "dragonbones is not defined" when I start a testbattle. Can someone help?
     
  10. Dirge

    Dirge Sound Engineer

    Messages:
    413
    Likes Received:
    265
    Location:
    Canada
    First Language:
    English, German
    Primarily Uses:
    N/A
    @KasuraKen did you define the battler in the enemy's notetag in the database?
     
  11. Isabella Ava

    Isabella Ava Veteran

    Messages:
    270
    Likes Received:
    116
    First Language:
    English
    Hello, please help i cannot make the evade animation play.
    I am sure that the animation name is correctly (evade in dragonbones and Ani Evade: evade in RPGMV)
    any other animations work fine.
    Can anybody confirm that evade animation work fine for you?
     
  12. KasuraKen

    KasuraKen Villager

    Messages:
    10
    Likes Received:
    0
    First Language:
    Englisch
    Primarily Uses:
    RMMV
    @Dirge Yes. I wrote the notetage with the battler name in the notes.
     
  13. Dirge

    Dirge Sound Engineer

    Messages:
    413
    Likes Received:
    265
    Location:
    Canada
    First Language:
    English, German
    Primarily Uses:
    N/A
    @SwiftIllusion hey, upon further testing, that snippet of code fixed animation placement for enemies but not for actors. Is it meant to only work with enemies?
     
  14. SwiftIllusion

    SwiftIllusion Veteran

    Messages:
    93
    Likes Received:
    146
    First Language:
    English
  15. Dirge

    Dirge Sound Engineer

    Messages:
    413
    Likes Received:
    265
    Location:
    Canada
    First Language:
    English, German
    Primarily Uses:
    N/A
    That it did, I didn't see that it had been updated. Nice, thank you!
     
    SwiftIllusion likes this.
  16. Kike

    Kike Paladin

    Messages:
    14
    Likes Received:
    6
    Location:
    Brasil
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    I found a incompatibility with animation in map
    1.png

    Cannot read property 'hasDragonBone' of undefined

    It's happen when I use an event animation:

    2.png

    If I remove this, the event works, and if I remove dragonbones plugin, it works too, but they're incompatibles, I already tried to change the position of the plugin, however... no results...:kaocry:
     
  17. Harken_W

    Harken_W Veteran

    Messages:
    80
    Likes Received:
    22
    First Language:
    English
    Primarily Uses:
    N/A
    @KasuraKen I've had this same error, Are your "dragonBonesPixi.js" and "dragonBones.js" in their own folder in the 'libs' folder?
    the folder name should be "dragonBones"

    js/libs/dragonBones/


    Extra note. I did this because of how it tells you to insert
    <script type=”text/javascript” src=”js/libs/dragonbones/dragonBones.js”></script>
    <script type=”text/javascript” src=”js/libs/dragonbones/dragonBonesPixi.js”></script>

    into the index.html.

    So I assume if you didn't want them in their own folder you'd instead insert.
    <script type=”text/javascript” src=”js/libs/dragonBones.js”></script>
    <script type=”text/javascript” src=”js/libs/dragonBonesPixi.js”></script>

    However I'm no programmer of any kind, these are just my assumptions.
     
    Last edited: Oct 21, 2017
  18. airdrowned

    airdrowned Warper

    Messages:
    3
    Likes Received:
    0
    First Language:
    English
    The battler I made in DragonBones is not showing up as an actor or enemy. I exported as Data Version 5.0 and checked exact spellings. When I change the battler name to one of the premade battlers, it works. Mine keeps showing as blank. I even downloaded DragonBones 5.3 to see if that was the issue... No luck.
     

    Attached Files:

    Last edited: Oct 22, 2017
  19. airdrowned

    airdrowned Warper

    Messages:
    3
    Likes Received:
    0
    First Language:
    English
    Fixed by changing the name of my armature in DragonBones to match the filename.
     
  20. muramasa

    muramasa Abomination of life, or life itself.

    Messages:
    570
    Likes Received:
    263
    Location:
    CR
    First Language:
    Spanish
    Hi! Sorry if this has been asked one hundred times, but... is there any chance of this working for characters on map too? I was thinking about using something like this for animating my character's expressions, or changing equipment, etc. I'm doing for now my characters in layers for each part. If there is no plan of doing that, no worries, I'll try and make the good old composite characters (a bunch of sprites one over the other).

    Thanks!
     
    Kike likes this.

Share This Page