Mastering ADV Development with GOKI2: Manage Character Assets, Audio Paths, and Dialogues Like a Pro
Source: Dev.to
Download
If you are interested, you can download the latest environment from the Avalanches‑Release2.x.y.z.zip in Assets on the release page:
https://github.com/halo1234/Avalanches/releases
Prerequisites
For more information on syntax extension, please refer to the following article:
Getting started with ADV development in GOKI2 – System Architecture & Module Structure
ModADV
GOKI2 includes a module called ModADV, which is specifically designed for ADV (Adventure) and Visual Novel games.
Since ModADV depends on ModMessage, ModImage, and ModSound, those modules are automatically loaded whenever ModADV is initialized.
Character Definition
First, define a character using the make_character tag. Below is an extended syntax that simplifies the definitions.
@!make_character image=with_image->true,without_image->false
@!make_character voice=with_voice->true,without_voice->false
; Create mob tag (redirect)
@redirect alias=mob name=make_character
; If no variables are specified with a pattern, the specified values will always be expanded.
@!mob /mob=trueCharacter declarations
@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=18Explanation
| Line | Meaning |
|---|---|
@make_character name=halo with_image with_voice | The character halo has a standing picture and a voice. |
@make_character name=halo sub_directory_name=images part_of_directory_path=A | Sets the path for the character illustration: images/A/CharacterIllustrationFileName.png. |
@make_character name=halo voice_sub_directory_name=testcase | Sets the voice path. If the running scenario script is test.gs, the voice file will be 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 | Defines the text colour for dialogue and history. |
@make_character name=halo history_icon=history_icon_halo history_icon_left=18 | Specifies the icon displayed next to the history text. |
Note
If you place the character illustration in a sub‑directory, you will need to rename the file when releasing. The/tools/maketool automatically handles this and generates the required master data.
Character Tag
The following extensions define the character halo (the tag halo can now be used). Internally, halo is redirected to character, so extensions made to character also apply to halo. Extensions made only to halo do not affect 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->pose2Scenario Script (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] erasesThe standing picture
Enter fullscreen mode
Exit fullscreen modeDefining a character with ModADV
If you want to try GOKI2, you can download the latest environment from the following link:
https://github.com/halo1234/Avalanches/releases
