Undertale Battle System
This is a plugin that replicates the Bullet-hell system from Undertale.
这个插件可以让你使用传说之下游戏中的弹幕战斗系统,有玩过这款游戏的务必协助翻译下,这里面写的我(⊙_⊙)?
Skill Notetags
Place these notetags into the notebox of a Skill to customize the qualities
of the UTB attack!
请把下列命令放入技能备注来自定义
For a Skill to use the Undertale Battle System, place this notetag in it:
设置使用UTB战斗系统
<Use Undertale Attack>
<UTB Duration: x>
设置UTB持续时间,1秒60帧
Set this to the amount of frames the UTB attack will last.
60 frames = 1 second.
<UTB Mode: 0>
Set’s this Skill to use the default mode.
设置UTB默认模式
<UTB Mode: 1>
Set’s this Skill to use the blue mode (gravity mode).
Can also use:
1.2 = Gravity to the left
1.3 = Gravity to the right
1.4 = Gravity to the up
设置UTB模式为蓝色(重力模式)
<UTB Mode: 2>
Set’s this Skill to use green mode (shield mode).
设置UTB模式为绿色(护盾模式)
<UTB Mode: 3>
Set’s this Skill to use purple mode (trap mode).
设置UTB模式为紫色(陷阱模式)
<UTB Mode: 4>
Set’s this Skill to use yellow mode (shooter mode).
设置UTB模式为黄色(射击模式)
<UTB Invincibility: x>
设置无敌时间
Set this to the amount of frames of invincibility that the player should
get when they’re hit with an attack.
60 frames = 1 second.
<UTB Delete Outside Frame>
设置去除战斗框
If this Notetag is in the Notebox of the Skill, then the “attacks” will
be deleted if they exit the battle frame.
If this isn’t present, then attacks will be seen everywhere.
<UTB Code>
</UTB Code>
This allows you to customize JavaScript code for the overall Skill.
You can use ‘f’ and ‘p’ which are variables representing the current frame
and player object respectively.
当然你也可以用JS来自定义UTB模式
Here’s some examples:
设置在100帧的时候改变模式为1
– How to change Player’s mode to 1 at frame 100:
<UTB Code>
if(f === 100) {
p.setMode(1);
}
</UTB Code>
设置在300帧的时候显示一条信息
– How to show a message at frame 300:
<UTB Code>
if(f === 300) {
this.message(“Hello \\!This is a message.”);
}
</UTB Code>
设置在1%的几率触发攻击序列1
– How to have a 1 in 100 chance for an instance of Attack 1 to
spawn every frame:
<UTB Code>
if(Math.randomInt(100) === 1) {
this.createAttack(1);
}
</UTB Code>
<UTB Initial Code>
</UTB Initial Code>
This is code that is run once at the start of the Skill.
It is mainly used to initialize variables and spawn preparation attacks
if it is necessary.
你可以设置技能一开始运行的命令
Here’s some examples:
设置某个变量为计数
– Creates a number variable called “count”:
<UTB Initial Code>
this._count = 0;
</UTB Initial Code>
一开始就释放攻击序列1
– Spawns Attack 1 on the first frame only:
<UTB Initial Code>
this.createAttack(1);
</UTB Initial Code>
设置窗口的宽度等
– Sets the frame’s Width to 500 and substract 50 from the frame’s X:
<UTB Initial Code>
this.window.width = 500;
this.window.x -= 50;
</UTB Initial Code>
<UTB Attack x>
</UTB Attack x>
Now, each Skill can have 9 individual “UTB attacks”.
You can customize one of them by using the tags above.
Then, you can customize the qualities of the attack by
using notetags inside of the UTB attack tags.
你可以设置独立的9套战斗序列
You may have to use this online tool to make the creation convenient:
http://sumrndmdde.github.io/UTB-Attack-Creator/
你可以在上面的网站获取创建工具
For example:
<UTB Attack 1>
Initial X: this.x + 220
Initial Y: this.y + 5
Collision Type: Rect
Width: 160
Height: 20
X Speed: 0
Y Speed: 0.5
X Accel: 0
Y Accel: 0
Color: green
Spawn Rate: 100
Spawn Delay: 0
</UTB Attack 1>
<UTB Attack 2>
Initial X: this.x
Initial Y: this.y
X Speed: 1
Y Speed: 1
X Accel: 0
Y Accel: 0
Collision Type: circle
Radius: 15
Spawn Rate: 100
Spawn Delay: 20
Delete Distance: 50
Destructible: true
<Direct Code>
if(this.x > width) this.xspeed = -1;
</Direct Code>
</UTB Attack 2>
###Actor Notetags
Use these to customize the Image and Collision of the Actor:
使用下面的命令来自定义图片和碰撞
<UTB Sprite: filename>
请注意文件路径为 img/SumRndmDde/utb/
Use this to set the file of the image of what you want the Actor to look
like. The image must be stored in img/SumRndmDde/utb/
Example: <UTB Sprite: heart>
<UTB Speed: speed>
Set this to the speed the Actor should move in the frame.
设置玩家移动速度
Simply set this to a number.
Example: <UTB Speed: 4>
<UTB Speed: 6>
<UTB Shape: shape>
Set this to the shape of this Actor’s collision box.
设置玩家碰撞判定的形状
You can use: “circle” or “rect”.
Example: <UTB Shape: circle>
<UTB Shape: rect>
In order to customize the size of the shapes, use:
设置判定大小
<UTB Radius: number>
For the “circle” collision.
<UTB Width: number>
<UTB Height: number>
For the “rect” collision.
###Misc JavaScript Eval Info
####Undertale Attack Evals
Here are the following variables for Undertale Attacks to be used in
“Direct Code”:
下面是一些你可以直接使用的代码
Image – this.image
Animation Frames – this.aniFrames
Animation Speed – this.aniSpeed
Type – this.type
Initial X – this.x
Initial Y – this.y
Collision Type – this.shape
Radius – this.radius
Width – this._mywidth
Height – this._myheight
X Speed – this.xspeed
Y Speed – this.yspeed
X Accel – this.xaccel
Y Accel – this.yaccel
X Scale – this.scale.x
Y Scale – this.scale.y
Opacity – this.opacity
Rotation – this.rotation
Visibility – this.visibility
Color – this.color
Delete Distance – this.deleteDistance
Destructible – this.destructible
Direct Code – this.directCode
Initial Code – this.iniCode
Window – this.window
####Window Frame Evals
For the “Direct Code” and “UTB Code” notetags, you can use the this.window
variable to reference various positions on the frame.
this.window.x – The X position of the Window
this.window.y – The Y position of the Window
this.window.width – The width of the Window
this.window.height – The height of the Window
this.window.left – The X position of the left side of the Window
this.window.right – The X position of the right side of the Window
this.window.top – The Y position of the top side of the Window
this.window.bottom – The Y position of the bottom side of the Window
this.window.x_middle – The X position of the middle of the Window
this.window.y_middle – The Y position of the middle of the Window
####Message Bubble Text Save
In order to “save” text to be shown in the next Undertale attack, use
the following Script Call:
如果你想保存住下一次显示的文本,请使用这段命令
$gameMessageBubble.saveText(Insert the text you wish to use in here!
);