Aegisub/automation/v4-docs/template-scripting-ideas.ass

58 lines
6.6 KiB
Plaintext
Raw Normal View History

[Script Info]
; Script generated by Aegisub v2.00 PRE-RELEASE (SVN r939, jfs)
; http://www.aegisub.net
Title: Default Aegisub file
ScriptType: v4.00+
WrapStyle: 0
PlayResX: 640
PlayResY: 480
Video Aspect Ratio: 0
Video Zoom: 6
Video Position: 0
[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,Arial,20,&H00FFFFFF,&H0000FFFF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,2,2,2,10,10,10,0
[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:00.00,0:00:00.00,Default,,0000,0000,0000,,some ideas on how templated karaoke could work in auto4/lua
Comment: 0,0:00:00.00,0:00:05.00,Default,,0000,0000,0000,code once,-- here's some code that gets executed once at the very beginning of processing
Comment: 0,0:00:00.00,0:00:05.00,Default,,0000,0000,0000,code,-- this code is also executed just once, at the start of processing (ie. like "once")
Comment: 0,0:00:05.00,0:00:10.00,Default,,0000,0000,0000,code line,-- here's some code that gets executed once every line
Comment: 0,0:00:10.00,0:00:15.00,Default,,0000,0000,0000,code syl,-- here's some code that gets executed once every syllable
Comment: 0,0:00:10.00,0:00:15.00,Default,,0000,0000,0000,code syl all,-- this code gets executed for any style, not just the one specified in the template line
Comment: 0,0:00:15.00,0:00:20.00,Default,,0000,0000,0000,code char,-- here's some code that gets executed once every character
Comment: 0,0:00:15.00,0:00:20.00,Default,,0000,0000,0000,code furi,-- here's some code that gets executed once for every furigana part
Comment: 0,0:00:20.00,0:00:25.00,Default,,0000,0000,0000,template pre-line 1,{this gets inserted before every line 1}
Comment: 0,0:00:25.00,0:00:30.00,Default,,0000,0000,0000,template line 1,{this gets inserted into line 1 for every syllable, text automatically follows}
Comment: 0,0:00:30.00,0:00:35.00,Default,,0000,0000,0000,template pre-line 2,{this gets inserted before every line 2}
Comment: 0,0:00:35.00,0:00:40.00,Default,,0000,0000,0000,template line 2 notext,{this gets inserted into line 2 for every syllable, syllable text not automatically inserted}
Comment: 0,0:00:40.00,0:00:40.00,Default,,0000,0000,0000,template line 2,{this appends more tags to each syllable in every line 2, the notext from previous line 2 template is automatically "carried over"}
Comment: 0,0:00:40.00,0:00:40.00,Default,,0000,0000,0000,template line,{this generates an anonymous simple-k-replacer style template line}
Comment: 0,0:00:40.00,0:00:40.00,Default,,0000,0000,0000,template line keeptags,{this creates another anonymous simple-k-replacer style template line, and also keeps all tags from the original text. the lines built by this template are separate from those built by the previous anonymous one}
Comment: 0,0:00:40.00,0:00:45.00,Default,,0000,0000,0000,template syl,{each syllable genrates a line like this, with the syllable text appended}
Comment: 0,0:00:45.00,0:00:50.00,Default,,0000,0000,0000,template syl notext,{each syllable generates a line like this, syllable text not automatically appended}
Comment: 0,0:00:50.00,0:00:55.00,Default,,0000,0000,0000,template syl repeat 10,{each syllable generates 10 lines like this, syllable text automatically appended, repeat counter in variable j}
Comment: 0,0:00:55.00,0:01:00.00,Default,,0000,0000,0000,template syl all,{this template is used for any style, not just the one specified}
Comment: 0,0:00:55.00,0:01:00.00,Default,,0000,0000,0000,template syl multi,{every highlight of a syllable generates a line from this, timing is changed to match current highlight}
Comment: 0,0:00:55.00,0:01:00.00,Default,,0000,0000,0000,template syl fx foo,{only applied for syllables with inline-fx "foo"}
Comment: 0,0:00:55.00,0:01:00.00,Default,,0000,0000,0000,template syl notext repeat 10,{modifiers can be combined}
Comment: 0,0:01:00.00,0:01:05.00,Default,,0000,0000,0000,template char,{each character generates a line like this, with the character appended. positioning variables matches the character and timing matches syllable}
Comment: 0,0:01:05.00,0:01:10.00,Default,,0000,0000,0000,template char multi,{multi highlight also supported for char, as well as repeat and notext}
Comment: 0,0:01:10.00,0:01:15.00,Default,,0000,0000,0000,template furi,{each furigana part generates a line like this, a new style with changed font size is automatically generated and applied}
Comment: 0,0:01:15.00,0:01:20.00,Default,,0000,0000,0000,template syl furi,{this template generates both normal syllables and furigana, positionig/sizing info adjusted to match whatever the template produces at the time}
Dialogue: 0,0:01:20.00,0:01:25.00,Default,,0000,0000,0000,,for notext syl and char templates there are also variables $pretext and $posttext which hold the text before and after the syllable/character, to be able to create "build up" style effects
Dialogue: 0,0:01:25.00,0:01:30.00,Default,,0000,0000,0000,,template line timing doesn't matter but layer does (layer is copied directly to the output lines)
Dialogue: 0,0:01:30.00,0:01:35.00,Default,,0000,0000,0000,,style is used for matching again the text
Dialogue: 0,0:01:35.00,0:01:40.00,Default,,0000,0000,0000,,it's not possible to do furigana per-character
Dialogue: 0,0:01:40.00,0:01:45.00,Default,,0000,0000,0000,,templates are applied first in order of class, then in order of appearance
Dialogue: 0,0:01:45.00,0:01:50.00,Default,,0000,0000,0000,,class order: pre-line/line, syl, char, furi
Dialogue: 0,0:01:50.00,0:01:55.00,Default,,0000,0000,0000,,ie. first all pre-line/line templates are applied for a karaoke line, then all syl templates are, then all char templates, then all furi templates, then proceed to next karaoke line
Dialogue: 0,0:01:55.00,0:02:00.00,Default,,0000,0000,0000,,code and template lines within same class are executed intermixed as they appear
Dialogue: 0,0:02:00.00,0:02:05.00,Default,,0000,0000,0000,,(code lines are like template lines, they just don't generate any output)
Dialogue: 0,0:02:05.00,0:02:05.00,Default,,0000,0000,0000,,the 'all' modifier should be used carefully, it will catch *any* line, even those without karaoke tags in them
Dialogue: 0,0:02:05.00,0:02:05.00,Default,,0000,0000,0000,,
Comment: 0,0:02:05.00,0:02:10.00,Default,template,0000,0000,0000,,auto3 multi-template style is not supported, it'll need a different script (supporting it all in one will be more work than it's worth, probably, particularily because of differences in variables)
Dialogue: 0,0:02:10.00,0:02:15.00,Default,,0000,0000,0000,,