EX Script¶
About EX Script¶
EX Script is used to perform configuration-related operations on Live2DViewerEX instead of user operations
Run Script
■ Windows: Right-click the tray icon -> Run
■ MacOS: Left-click the status bar icon -> Run EX Script
Example¶
#EX Script
command line
command line
...
Template: template_en.txt
#EX Script | Script header, this field is a fixed value |
command | Command line |
Warning
If there is space in the name and path, you must add a backslash () before the space
Add LPK Model¶
add_lpk_model [path]
add_lpk_model model.lpk
path | Relative file path, the root directory is the folder where the script is located |
Load LPK Model¶
load_lpk_model [slot] [lpk] [char] [cos]
load_lpk_model 1 lpk char cos
slot | Slot index, 1 ~ 8 |
lpk | LPK file name without file suffix |
char | Character name |
cos | Costume name |
Tip
If there are multiple eligible models, only load the first one found
Edit LPK Model¶
edit_lpk_model [lpk] [char] [cos] [type] [item] [sp_key] [key]
edit_lpk_model lpk char cos 1 Tap:Mtn 3 A
lpk | LPK file name without file suffix |
char | Character name |
cos | Costume name |
type | Edit type: ■ 1: Key binding - Event ■ 2: Key binding - Motion ■ 3: Key binding - Expression |
item | Item name to be bound |
sp_key | Modifier: ■ 0: none ■ 1: ctrl ■ 2: shift ■ 3: ctrl + shift |
key | Hotkey. Supports A-Z and 0-9, where the letters must be capitalized |
Tip
If there are multiple eligible models, edit only the first one found
Set Model Position¶
set_model_position [slot] [x] [y]
set_model_position 1 50 100
slot | Slot index, 1 ~ 8 |
x | X-axis position relative to the center of the screen |
y | Y-axis position relative to the center of the screen |
Set Model Size¶
set_model_size [slot] [size]
set_model_size 1 1.5
slot | Slot index, 1 ~ 8 |
size | Size |
Set Model Angle¶
set_model_angle [slot] [angle]
set_model_angle 1 90
slot | Slot index, 1 ~ 8 |
angle | Angle |
Set Model Mirror¶
set_model_mirror [slot] [on]
set_model_mirror 1 1
slot | Slot index, 1 ~ 8 |
on | ■ 0:Off ■ 1:On |
Set Hotkey Enable¶
set_hotkey_enable [enable]
set_hotkey_enable 2
enable | ■ 0: Disable ■ 1: When click desktop ■ 2: Always enable |
Set Floating Icon¶
set_floating_icon [show]
set_floating_icon 1
show | ■ 0: Do not show ■ 1: Show |
Set Launch Mode¶
set_launch_mode [mode]
set_launch_mode 1
mode | ■ 0: Wallpaper Mode ■ 1: Desktop Mode |
Set Always On Top¶
set_always_on_top [on]
set_always_on_top 1
on | ■ 0: Off ■ 1: On |
Tip
Only works in Desktop Mode
Set Display Type¶
set_display_type [type]
set_display_type 1
type | ■ 0: Fullscreen ■ 1: Working Area ■ 2: Window |
Tip
Only works in Desktop Mode
Set Window Size¶
set_window_size [width] [height]
set_window_size 960 720
width | Width |
height | Height |
Tip
Only works in Desktop Mode
Set OBS Compat (Windows)¶
set_obs_compat [enable]
set_obs_compat 1
enable | ■ 0: Disable ■ 1: Enable |
Set Filter Color (Windows)¶
set_filter_color [color]
set_filter_color FF00FF
color | Hexadecimal RGB value, e.g. FF00FF |
Set Virtual Camera (Windows)¶
set_virtual_camera [enable]
set_virtual_camera 1
enable | ■ 0: Disable ■ 1: Enable |
Install Virtual Camera (Windows)¶
install_virtual_camera
install_virtual_camera
Uninstall Virtual Camera (Windows)¶
uninstall_virtual_camera
uninstall_virtual_camera
When Other App Fullscreen¶
set_other_app_fullscreen [method]
set_other_app_fullscreen 1
method | ■ 0: Keep running ■ 1: Pause ■ 2: Mute |
When Other App Maximized¶
set_other_app_maximized [method]
set_other_app_maximized 1
method | ■ 0: Keep running ■ 1: Pause ■ 2: Mute |