【汉化】YEP.150 – DragonBones Integr

2017-08-14  本文已影响4076人  沧笙

Download one of the following two:
下面是这个插件必备的资源包,请自行选择其中一份使用即可
资源包

Introduction

DragonBones allows your games to use skeletal animation, a type of computer animation in which a character (or object) is represented by skins/textures and a digital set of interconnected bones (called the skeleton). Using a set of instructions, the game will create animations based off these skins, skeletons, and instructions to create beautifully smooth and light-weight movements.

龙骨插件允许你使用使用骨骼动画,这是一种将角色或对象的皮肤或材质分离出来,显示里面骨架的计算机动画形式。通过这个插件,你可以创造基于皮肤和骨架的动画,例如创作平滑的移动动画。

This plugin, made by TheGreenKel, and collaborated with Yanfly, will allow you to use skeletal animations made by DragonBones for your battle system! This means that with skeletal animation, you can make your battles look extremely fluid, more flexible animations outside of only 3 frames per motion, more than 18 possible motions, get rid of sprite based resources for faster loading times, and smaller file sizes for your games! In other words, there’s practically no drawback to using it provided you have the resources.

这个插件是TheGreenKel和Yanfly合作开发,让你可以通过龙骨来制作战斗中的骨架动画,这就意味着运用这项技术,你可以创造更加流程灵活的战斗动画,而不是局限于每个动作3帧的限制,可以制作超过18种动作,并且消除了图像资源的限制,可以更快的载入,并且减少了游戏文件的大小。换句话说,这项技术基本没什么缺点。

This is a collaboration plugin by TheGreenKel and Yanfly to ensure compatibility with the Yanfly Engine Plugins library.

这个插件是TheGreenKel和Yanfly合作开发,确保适配YEP库。

MIT License and Terms of Use

MIT License for the remaining code of the Plugin

关于插件的授权声明
Copyright 2017 TheGreenKel
著作权归为TheGreenKel
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
授权是理所当然免费的,任何人都可以得到这个插件的拷贝及帮助文件,你的使用不受限制,你可以使用拷贝,修改合并,出版分发再授权,甚至售卖。但是希望你可以遵守下面的协议:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
著作权及这份授权声明必须包含在所有备份或者分发的软件内
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
该软件为原版提供,不附带任何明示或暗示的保证,包括但不限于适销性,适用于特定用途和非侵权的担保。在任何情况下,作者或版权所有者均不对任何索赔,损害或其他责任负责,无论是否因与本软件或本软件的使用或其他交易相关的任何合同,侵权行为或其他方面的行为软件。

Yanfly Engine Plugins Terms of Use

YEP授权协议请参照目录页授权书

Installation Instructions

Follow these instructions to integrate DragonBones into your game:
下面是一份安装指南,图片版请直接拉到最后

  1. Make sure you have at least RPG Maker MV version 1.4.0 or above. Recommended version is 1.5.0 and above!
    确保你拥有MV1.4.0版本,推荐1.5.0以上。
  2. Download the Installation Pack from Yanfly.moe
    下载插件及资源包
  3. Extract the Installation Pack using WinZip or WinRar.
    解压资源包
  4. Copy the contents of the ‘js’ folder into your project’s folder matching the directory structure and files.
    复制JS文件内的文件放入游戏文件夹
  5. Open up your game project’s index.html file with Notepad/HTML editor
    用编辑器打开游戏文件夹内的index.html
  6. Find <script type=”text/javascript” src=”js/libs/pixi-picture.js”> and insert the following lines under it:
    找到<script type=”text/javascript” src=”js/libs/pixi-picture.js”>这段代码,在它下面插入下面的语句
    <script type=”text/javascript” src=”js/libs/dragonbones/dragonBones.js”>``</script><script type=”text/javascript” src=”js/libs/dragonbones/dragonBonesPixi.js”></script>
  7. Install this plugin by adding it through your Plugin Manager. 8. Make sure this plugin is located UNDER the following plugins:
    YEP_BattleEngineCore
    YEP_X_ActSeqPack1
    YEP_X_ActSeqPack2
    YEP_X_ActSeqPack3
    YEP_X_AnimatedSVEnemies
    你的插件必须在这几个插件下面
  8. Copy the DragonBone assets from the Installation pack into the respective folder you wish for your game project. Adjust the ‘Assets Path’ plugin parameter to match the folder path.
    将资源包放入游戏文件夹,并且设置插件内的路径来适配文件
  9. Save your game project!
    存储游戏文件

General Usage by TheGreenKel

The plugin is only tested on DragonBones 5.2 & 5.3. I rewrote a chunk of the plugin to make it compatible with Yanfly plugins, and possibly more.
这个插件在DragonBones 5.2和5.3上测试过,我重新写了部分代码来适配YEP库

  1. After confirming your DragonBones Armature/Skeleton shares the name of your Battler, export DragonBones data into the ‘Assets Path’ parameter. Default is ‘dragonbones_assets’
    确保你的龙骨资源导出后放入了文件夹并且设置了插件的资源路径
  2. Add the new armature data into ‘Preload Assets’ parameter
    在Preload Assets参数内添加组件
  3. This plugin will automatically look for the 18 default animations inside the dragonbones armature.[walk, swing, damage, dead, wait, chant, guard, etc.]
    这个插件会自动搜索18种默认的内置骨骼组件动画,包括走路,摇摆,受伤,死亡,等待,诵唱,防御等。
  4. You can overwrite default animation by using ‘dragonbone_ani_’ notes.Example: ‘dragonbone_ani_walk:steady’, the ‘steady’ animation will be played inplace of the ‘walk’
    你可以通过dragonbone_ani_前缀来覆盖默认动画,例如dragonbone_ani_walk:steady这个steady动画会替代walk
  5. Vanilla actor/enemies now show up by default. You need to replace it with a blank image. Check the demo project to see what a blank image would look like. This change will make this plugin more compatible with plugins that changes UI.
    默认显示敌方和角色,你需要用空白的图片替换掉他们,检查演示游戏内,来看看如何操作。这项操作可以让插件更好的适配UI效果。
  6. If you are using Yanfly Action Sequence 2, you can now play any dragonbones’ animation using the ‘motion’ command.Example: “motion dance”. The game will look into the dragonbones armature to see if it has the ‘dance’ animation. If the animation is there then the animation will be played.
    如果你使用了Yanfly Action Sequence 2插件,你可以使用行动命令来设置任何骨骼动画,例如motion dance游戏将会检查是否存在dance的骨骼动画并且自动播放。
  7. You can now control whether an animation is looping or not by setting the ‘Play Times’ variable inside the Dragonbones Editor.
    你可以在龙骨编辑器中设置播放事件来设置循环。
  8. Get more info/tutorial at forum link:
    你需要自行前往MV官方论坛获取更多指导

Notetags

Use the following notetags to make full use of your DragonBone battler integration for your RPG Maker MV game!
你可以插入下面的备注代码来更好的使用骨骼动画

Actor and Enemy Notetags:

<DragonBone: name>
<DragonBone Battler: name>

– Sets the DragonBones associated with this actor/enemy to be “name”. The name will be associated with the assets used. It will be used to check for associated filenames that end with _ske.json, _tex.json, and _tex.png. The listed assets must be found in your assets folder.
将骨骼动画和角色或敌人关联,一般用于检查以_ske.json,_tex.json和_tex.png结尾的关联文件名。列出的资源必须在您的游戏文件夹中找到。
Note: The name is case sensitive.Note: If the plugin parameter ‘Auto-Preload Battlers’ is set to ‘true’, then this will add the battler to the list of assets to be preloaded.
该名称区分大小写。注意:如果插件参数“Auto-Preload Battlers”设置为“true”,那么这将进去预加载资源列表
EXAMPLES

<DragonBone: Demon>
<DragonBone: DragonBoy>
<DragonBone: Swordsman>
<DragonBone: Ubbie>

If a DragonBones battler is not detected here, it will not be able to utilize the following notetags and their effects.
如果在这里没有检测到DragonBones战斗者,它将无法使用以下的标签及其效果


<DragonBone ScaleX: n>
<DragonBone ScaleY: n>

– Replace ‘n’ with a number. It can be positive or negative, whole or decimal number. This will affect how much the battler will be scaled by. A number less than 1 will be smaller than the base asset itself while a number larger than 1 will be larger than the base asset. If the number is negative, it will be mirrored horizontally or vertically depending ifScaleX or ScaleY is used respectively.
用数字替换'n'。它可以是正或负,整数或十进制数。这将影响战斗者的比例。小于1的将缩小,大于1的将放大。如果为负数,则将根据ifScaleX或ScaleY分别使用水平或垂直镜像。
Note: This will overwrite the setting set in the plugin parameters for ‘Default ScaleX’ and ‘Default ScaleY’.
这将覆盖“Default ScaleX”和“Default ScaleY”的插件参数中的设置。

EXAMPLES

<DragonBone ScaleX: -0.3>
<DragonBone ScaleY: 0.3>
<DragonBone ScaleX: 1.2>
<DragonBone ScaleY: 1.2>

<DragonBone Width: x>
<DragonBone Height: x>

– This allows you to set the ‘width’ and ‘height’ of the DragonBones battler by replacing ‘x’ with an integar value. This value is mostly used for collision purposes as well as mouse click activation. These values can be adjusted because each battler can be a dynamic width/height so it is important for you to adjust them properly. If not adjusted, they will takeon the default width/height values found in the plugin parameters.
这样可以通过用“x”来设置骨骼动画的宽度和高度。该值主要用于碰撞目的以及鼠标点击激活。可以调整这些值,因为每个战斗者都可以是动态的宽度/高度,所以重要的是要正确调整它们。如果没有调整,它们将占用插件参数中的默认宽度/高度值。

EXAMPLES

<DragonBone Width: 150>
<DragonBone Height: 180>

<DragonBone Keep Sprite>
<DragonBone Replace Sprite>

– Lets you decide if you want to keep the original sprite used for the actor/enemy or have the DragonBone battler replace it altogether. If you opt to replace the sprite, then the sprite will be hidden during battle as long as there is a DragonBone battler in place of it.
让你决定是否要保留用于角色或敌人的原始图像,或者让骨骼动画完全替换它。如果您选择更换图像,那么只要有一个骨骼动画代替它,那么图像将在战斗中被隐藏


<DragonBone Ani motion: animation>

– Replace ‘motion’ with a proper battler motion name. ‘animation’ is to be replaced with a skeletal animation name from DragonBones. This is for any motion that doesn’t have a specified skeletal animation of the same name in DragonBones.
用适当的战斗名称替换'motion'。 ‘animation’ 将被骨骼动画名称所取代。这是可以用于没有相同名称的骨骼动画的任何动作。
Replace ‘motion’ with one of the following:attack walk thrust escape wait swing victory chant missile dying guard skill abnormal damage spell sleep evade item dead
你可以用下面的动画代替“motion”:攻击、走路、刺入、逃跑、等待、摇摆、胜利、诵唱、躲避、躺下、防御、技能、异常、受伤、迷惑、睡眠、躲避、使用物品、死亡
Note: The ‘animation’ to be replaced is case sensitive.
要更换的动作区分大小写。

EXAMPLES

<DragonBone Ani Attack: normalAttack>
<DragonBone Ani Walk: steady>
<DragonBone Ani Damage: hit>
<DragonBone Ani Dead: dead>
<DragonBone Ani Swing: normalAttack>
<DragonBone Ani Wait: steady>
<DragonBone Ani Chant: stun>
<DragonBone Ani Swing: stun>
<DragonBone Ani Evade: stun>
<DragonBone Ani Thrust: stun>
<DragonBone Ani Missile: stun>
<DragonBone Ani Skill: stun>
<DragonBone Ani Spell: stun>
<DragonBone Ani Item: stun>
<DragonBone Ani Victory: stun>
<DragonBone Ani Dying: stun>
<DragonBone Ani Abnormal: stun>
<DragonBone Ani Sleep: stun>

For those who want a more condensed way to adjust the DragonBone battler settings, you can use the following notetag format:
对于想要更多战斗动画设置的人,你可以使用下面的命令

<DragonBone Settings>
Battler: name // The name used for the DB battler
ScaleX: 0.3// Scale X used for the DB battler
ScaleY: 0.3// Scale Y used for the DB battler
Width: 150// Width used for the DB battler
Height: 180// Height used for the DB battler
// Below are a bunch of battler motions tied to skeletal animations
以下是一系列与骨骼动画相关的战斗动作。
Ani Attack: normalAttack
Ani Walk: steady
Ani Damage: hit
Ani Dead: dead
Ani Swing: normalAttack
Ani Wait: steady
Ani Chant: stun
Ani Swing: stun
Ani Evade: stun
Ani Thrust: stun
Ani Missile: stun
Ani Skill: stun
Ani Spell: stun
Ani Item: stun
Ani Victory: stun
Ani Dying: stun
Ani Abnormal: stun
Ani Sleep: stun

Keep Sprite // Allow the sprite to show alongside DB battler
Replace Sprite // Hide the sprite while the DB battler is active
</DragonBone Settings>

– Anything placed in between the notetags: <DragonBone Settings> and </DragonBone Settings> will be used to determine the properties set for the DragonBone battler used for the actor/enemy. With the exception of the ‘name’ property, all other properties are optional and can be omitted from the list of properties to sandwich inbetween your notetags.
任何放置在<DragonBone Settings></ DragonBone Settings>将用于确定为角色/敌人使用的骨骼动画设置的属性。除了'name'属性,所有其他属性都是可选的。

EXAMPLES

<DragonBone Settings>
Battler: Ubbie
Replace Sprite
ScaleX: -0.2
ScaleY: 0.2
Width: 150
Height: 100
</DragonBone Settings>

<DragonBone Settings>
Battler: Demon
Replace Sprite
ScaleX: 0.3
ScaleY: 0.3
Width: 140
Height: 140
</DragonBone Settings>

<DragonBone Settings>
Battler: Swordsman
Replace Sprite
ScaleX: -0.4
ScaleY: 0.4
Width: 150
Height: 180
</DragonBone Settings>

安装图示

dbInstallationInfographic

Happy RPG Making!

上一篇下一篇

猜你喜欢

热点阅读