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)。

 

posted @ 2016-06-30 21:13  三台  阅读(414)  评论(0编辑  收藏  举报