Storyboarding by Scripting(osb file翻譯)

Storyboarding by Scripting

In the .osu file, under [Events]:
Note: underscores can be replaced with spaces.
(代碼部分的)下劃線表示空格

Sprites and Animations

The size of the active playfield is 640 pixels wide by 480 pixels high. For static background images/effects, it is best to limit images to these dimensions.
活動區域大小爲寬度640p高度480p,對於靜態背景圖像/效果,最好將圖像限制在本尺寸內。

Static Sprite:
靜態精靈:

Sprite,"layer","origin","filepath",x,y
_event, easing, starttime, endtime, [params]
_event, [...]
_event, [...]

Animation:
動畫:

Animation,"layer","origin","filepath",x,y,frameCount,frameDelay,looptype
_event,easing,starttime,endtime,[params]
_event, [...]
_event, [...]

For animations, specify a filename like "sliderball.png", and name your files "sliderball0.png" to "sliderball9.png" for a 10 frame animation.
對於動畫,可以指定文件名類似"sliderball.png",給文件名起名"sliderball0.png"至"sliderball9.png"用於顯示10幀的動畫。

frameCount: number of frames in the animation
動畫中幀的個數
frameDelay: delay in milliseconds between each frame.
每幀之間的毫秒延遲
looptype: LoopForever by default
默認無限重複
LoopForever - Loops over and over again
無限次的重複
LoopOnce - Loops once and stops on last frame.
重複一次並停止在最後一幀

Z-order (back to front) is determined by the order the files appear in the .osu file.
z軸順序(從後至前)定義了出現的資源文件順序
The first storyboard event will be behind everything else, ie.
第一個故事板event會處於最後的位置
if storyboard event 'A' is above storyboard event 'B', 'B' will be on top of 'A'.
如果故事板事件'A'在故事板事件'B'之前,'B' 會在 'A' 上方顯示。

layer(層)
Background 背景
Fail 失敗
Pass 通過
Foreground 前景
Note: Background and Foreground are always visible.
注意:背景和前景總是可見。

origin(原點): 
TopLeft
TopCentre
TopRight
CentreLeft
Centre
CentreRight
BottomLeft
BottomCentre
BottomRight

All Rotations and Size changes (Including Vector Scaling) are affected by origin.
所有的旋轉和大小的變化(包括矢量縮放)都受原點位置影響。

filepath: relative path of the image file (should be in the same directory as the .osu file)
文件路徑:圖像文件的相對路徑(應與 .osu 文件同目錄)
Note: file path must be in double quotes if it has spaces in the filename
注:文件路徑中如果含有空格,必須置於雙引號中

x, y: the position of the image
x,y:圖像位置
Note: (0,0) is the top left corner while (640,480) is the bottom right corner.
注:(0,0)是左上角,而(640,480)是右下角。

For each of the event types below, the initial value(s) of that event will assume the first assignment given to that event.
對於下方的每一個事件類型,指定了該事件的初始值。

event type(事件類型):
F - fade (淡入淡出)
M - move (位移)
S - scale (縮放)
V - vector scale (width and height separately) (拉伸縮放,可分別指定高寬)
R - rotate (旋轉)
C - colour (上色)
L - loop (循環)
T - Event-triggered loop (事件觸發循環)
P - Parameters (參數)

easing(緩動):
0 - none (無)
1 - start fast and slow down (由快至慢)
2 - start slow and speed up (由慢至快)

starttime, endtime:

the times in milliseconds between which the event will be animated
該事件執行動畫的時間

params(參數):

_F,[...],startopacity,endopacity

startopacity: the opacity at the beginning of the animation
開始透明度:動畫開始時的透明度
endopacity: the opacity at the end of the animation
結束透明度:動畫結束時的透明度
0 - invisible, 1 - fully visible
0 - 不可見, 1 - 完全可見

_M,[...],startx,starty,endx,endy

startx, starty: the position at the beginning of the animation
startx, starty: 動畫開始位置
endx, endy: the position at the end of the animation
endx, endy: 動畫結束位置
Note: the size of the play field is (640,480), with (0,0) being top left corner.
注:活動區域爲(640,480),左上角位置爲(0,0)

_S,[...],startscale,endscale

startscale: the scale factor at the beginning of the animation
開始比例:動畫開始時的縮放比例因子
endscale: the scale factor at the end of the animation
結束比例:動畫結束時的縮放比例因子
1 = 100%, 2 = 200% etc. decimals are allowed.
1 = 100%, 2 = 200%。允許小數值

_V,[...],startx,starty,endx,endy

startx, starty: the scale factor at the beginning of the animation
startx, starty: 動畫開始時的縮放比例因子
endx, endy: the scale factor at the end of the animation
endx, endy: 動畫結束時的縮放比例因子
1 = 100%, 2 = 200% etc. decimals are allowed.
1 = 100%, 2 = 200%。允許小數值

_R,[...],startangle,endangle

startangle: the angle to rotate by in radians at the beginning of the animation
開始弧度:動畫開始時的旋轉弧度值
endangle
: the angle to rotate by in radians at the end of the animation
結束弧度:動畫結束時的旋轉弧度值
positive angle is clockwise rotation
正數表示順時針旋轉

_C,[...],r1,g1,b1,r2,g2,b2

r1, g1, b1: the starting component-wise colour
r1, g1, b1: 動畫開始時的顏色分量
r2, g2, b2: the finishing component-wise colour
r2, g2, b2: 動畫結束時的顏色分量
sprites with (255,255,255) will be their original colour. sprites with (0,0,0) will be totally black. anywhere in between will result in subtractive colouring. to make full use of this, brighter greyscale sprites work very well.
值(255,255,255)表示精靈本身顏色,值(0,0,0)表示精靈全黑。其他處於兩者之間的值,都會產生染色效果。灰度精靈可以產生很棒的效果

_MX,[...],startx,endx

startx: the x position at the beginning of the animation
動畫開始時的x座標
endx: the x position at the end of the animation
動畫結束時的x座標

_MY,[...],starty,endy

starty: the y position at the beginning of the animation
動畫開始時的y座標
endy: the y position at the end of the animation
動畫結束時的y座標

_P,[...],p

p: the effect parameter to apply
要應用的效果
H - horizontal flip
水平翻轉
V - vertical flip
垂直翻轉
A - additive-blend colour (as opposed to alpha-blend)
添加混合色(非alpha混合)
using the shorthand below with parameters is possible. the applied parameters will take effect during the duration specified only.
也可以使用下方參數的速記,所設的參數將在指定的時間內生效

shorthand(速記):
This notation can be used to quickly script a large number of the same kind of event over the same time span.
這種寫法可以用來快速腳本大量的同一類型的事件在同一時間跨度。

_event,easing,starttime,endtime,val1,val2,val3,...,valN

等同於事件:

_event,easing,starttime,endtime,val1,val2
_event,easing,starttime + duration,endtime + duration,val2,val3
_event,easing,starttime + 2duration,endtime + 2duration,val3,val4

shorthand2(速記2):

This notation can be used when the start and end time of the event is the same.
這種寫法可以用於事件的開始和結束時間相同的情況

_M,0,1000,1000,320,240,320,240

可寫爲:

_M,0,1000,,320,240,320,240

Please note the blank space in the endtime field - this is required.
請注意結束時間位置爲空值,這是必須的

shorthand3(速記3):

This notation can be used when the start and end values of the event are the same.
這種寫法可以用於事件的開始和結束值相同的情況

_M,0,1000,,320,240,320,240

可寫爲:

_M,0,1000,,320,240

Looping

Standard Loops(簡單循環):

Loops can be defined to repeat a set of events constantly for a set number of iterations.
循環可以看作是在一組指定次數的迭代中不斷重複一組事件。

_L,starttime,loopcount
__event, [...]
__event, [...]

starttime: the time of the first loop's start.
開始時間:第一次循環的開始時間
loopcount: number of times to repeat the loop.
循環量:重複循環的次數

Note that events inside a loop should be timed with a zero-base. This means that you should start from 0ms for the inner event's timing and work up from there. The loop event's start time will be added to this value at game runtime.
要注意循環內的事件時間要以0爲基準。就是說要以 0毫秒 作爲事件的開始時間並執行後續工作,循環事件的開始時間會自行與遊戲運行時疊加。

Trigger Loops(觸發循環):

Trigger loops can be used to trigger animations based on play-time events. Although called loops, trigger loops only execute once when triggered.
觸發循環可以用來觸發基於播放時間事件的動畫。雖然被稱爲循環,但觸發循環當觸發時只執行一次。

_T,triggerName,start,end
__event, [...]
__event, [...]

start: When the trigger is valid
觸發器可用開始時間
end : When the trigger stops being valid
觸發器可用結束時間

Current triggers supported are:
當前觸發器支持:
HitSoundClap      (拍掌效果音)
HitSoundFinish    (結束效果音)
HitSoundWhistle    (哨子效果音)
Passing (transition from fail state to pass state)
通過(將失敗狀態變爲通過狀態)
Failing (transition from pass state to fail state)
失敗(將通過狀態變爲失敗狀態)

Trigger loops are zero-based similar to normal loops. If two overlap, the first will be halted and replaced by a new loop from the beginning.
If they overlap any existing storyboarded events, they will not trigger until those transformations are no in effect.
觸發循環內的事件時間要以0爲基準,和簡單循環類似。如果有重疊的情況,前一個循環將停止,後一個循環開始執行並覆蓋。如果出現與現有故事板事件重疊的情況,將不會觸發到這些變化不會有什麼影響。

Sound effects

Sample,time,layer,"filepath",volume

time: the time in milliseconds to start playing the sound effect
聲音效果的開始時間(毫秒)

layer
Background = 0
Fail = 1
Pass = 2
Foreground = 3

filepath: relative path of the sound file (should be in the same directory as the .osu file)
聲音文件的相對路徑(應與 .osu 文件同目錄)
Note: file path must be in double quotes
注:文件路徑必須位於雙引號之內

volume: volume of the sound file. (1-100) Can be left off for 100.
聲音文件的音量(1-100)。值100可省略(不確定是這個翻譯,請注意)

Variables

Primitive support for variables is now available. You can define any number of variables by includin a [Variables] section in the .osb file (currently not supported in .osu-specific storyboarding).
當前支持簡單的變量定義。你可以在 .osb 文件中添加一個 [Variables] 部分,定義任意數量的變量。(當前還不支持 .osu 內嵌故事板)

[Variables]
$white=255,255,255

Once you define variables, you can use them *anywhere* in the storyboard. This means you can have a variable containing as much as a whole line.
一旦定義了變量,在故事板內就可以任意位置使用。也就是說你可以把任意一整行的值定義爲變量。
Please don't make variable too small for the moment (ie. don't assign $var=1) because the editor is not smart enough to know where to put variables when it saves. All occurrences of the variables will currently be replaced at save time (so if you have one place you used $white and another you used 255,255,255 they will both become $white after a save in the editor).
暫時先不要把變量的值定義的過小(如,指定 $var=1)。因爲編輯器還不足夠智能的去瞭解到,當保存時要往何處存放值。在保存時所有變量都將會被替換(就比方說有一個位置你用的是 $white 另一個位置你用的是 255,255,255 那麼在編輯器保存時他倆都會變成 $white)。

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章