掌握 GOKI2 ADV 开发:如专业人士般管理角色资产、音频路径和对话
Source: Dev.to
下载
如果您感兴趣,可以从发布页面的 Assets 中下载最新的环境文件 Avalanches‑Release2.x.y.z.zip:
https://github.com/halo1234/Avalanches/releases
前置条件
有关语法扩展的更多信息,请参阅以下文章:
Getting started with ADV development in GOKI2 – System Architecture & Module Structure
ModADV
GOKI2 包含一个名为 ModADV 的模块,专门用于 ADV(冒险) 和 Visual Novel(视觉小说) 游戏。
由于 ModADV 依赖 ModMessage、ModImage 和 ModSound,因此在初始化 ModADV 时会自动加载这些模块。
角色定义
首先,使用 make_character 标记定义角色。下面是简化定义的扩展语法。
@!make_character image=with_image->true,without_image->false
@!make_character voice=with_voice->true,without_voice->false
; 创建 mob 标记(重定向)
@redirect alias=mob name=make_character
; 如果模式中未指定变量,指定的值将始终被展开。
@!mob /mob=true角色声明
@make_character name=halo with_image with_voice
@make_character name=halo sub_directory_name=images part_of_directory_path=A
@make_character name=halo voice_sub_directory_name=testcase
@make_character name=halo shadow_color=0x808080 edge_color=0xFF0000
@make_character name=halo history_shadow_color=0x808080 history_edge_color=0xFF0000
@make_character name=halo history_icon=history_icon_halo history_icon_left=18说明
| 行 | 含义 |
|---|---|
@make_character name=halo with_image with_voice | 角色 halo 拥有立绘图片和语音。 |
@make_character name=halo sub_directory_name=images part_of_directory_path=A | 设置角色立绘的路径:images/A/CharacterIllustrationFileName.png。 |
@make_character name=halo voice_sub_directory_name=testcase | 设置语音路径。如果运行的场景脚本是 test.gs,语音文件将为 testcase/test/halo000.ogg。 |
@make_character name=halo shadow_color=0x808080 edge_color=0xFF0000@make_character name=halo history_shadow_color=0x808080 history_edge_color=0xFF0000 | 定义对话框和历史记录的文字颜色。 |
@make_character name=halo history_icon=history_icon_halo history_icon_left=18 | 指定显示在历史记录文字旁边的图标。 |
注意
如果将角色立绘放在子目录中,发布时需要对文件进行重命名。/tools/make工具会自动处理此事并生成所需的主数据。
角色标签
以下扩展定义了角色 halo(现在可以使用标签 halo)。在内部,halo 被重定向到 character,因此对 character 的扩展同样适用于 halo。仅对 halo 的扩展 不会 影响 character。
@!character center_x=left->200,middle->400,right->600,middleleft->300,middleright->500,leftend->100,rightend->700
@!character gray_scale=sepia->true r_gamma=sepia->1.5 g_gamma=sepia->1.3
@!character visible=show->true,erase->false
@!character no_voice=nv->true
@!halo /storage=A__
@!halo face=expression1->face1,expression2->face2
@!halo target=pose1->*target
@!halo pose=pose1->pose1,pose2->pose2场景脚本 (ModADV)
; Handling Scenario Text with ModADV
; If you don't do this, you won't see any text
@using_mod_adv
; If you also want to omit the [r] and [p] tags, run the following tags:
@cr_handling !ignore
; Define a character "mob" that is only valid within this scenario
@mob name=mob without_image without_voice
@halo pose1 expression1 middle show
[halo] halo's line.
; Make the standing picture sepia and move it to the left
@halo pose1 expression2 left Sepia
[halo] The voice will play if configured.
[mob] This is the line of the mob. There are no standing pictures or voices.
@halo pose1 expression2 medium
[halo nv] does not play the voice.
@halo erase
[halo] erases站立图片
Enter fullscreen mode
Exit fullscreen mode使用 ModADV 定义角色
如果你想尝试 GOKI2,可以从以下链接下载最新的环境:
https://github.com/halo1234/Avalanches/releases
