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!
);