DEV Community

HALO
HALO

Posted on

Mastering ADV Development with GOKI2: Manage Character Assets, Audio Paths, and Dialogues Like a Pro

Download

If you are interested, you can download the latest environment from the link in the Avalanches-Release2.x.y.y.zip in Assets from the release tag of the following site (Avalanches release version 2.x.y.y).

https://github.com/halo1234/Avalanches/releases

Prerequisites

For more information on syntax extension, please refer to the following link:
https://dev.to/halo1234/getting-started-with-adv-development-in-goki2-system-architecture-understanding-module-structure-1olc

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, these modules are automatically loaded whenever ModADV is initialized.

Character Definition

First, define a character using the make_character tag. For this example, let's extend the syntax of make_character to simplify the descriptions.

@!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=true
Enter fullscreen mode Exit fullscreen mode

Next, define the character. Do it as follows.

@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
Enter fullscreen mode Exit fullscreen mode

Let's go through it line by line.

@make_character name=halo with_image with_voice
Enter fullscreen mode Exit fullscreen mode

This defines that the character "halo" is a character that has a standing picture and a voice.

@make_character name=halo sub_directory_name=images part_of_directory_path=A
Enter fullscreen mode Exit fullscreen mode

This is the information necessary to calculate the path when a character illustration is placed in a subdirectory of the automatic search path. In this case, the character illustration will have the following folder structure:

images/A/CharacterIllustrationFileName.png


!Note!
If you place the character illustration in a subdirectory, you will need to rename the file when releasing. The /tools/make tool automatically does this for you. The /tools/make tool is used to generate master data.

@make_character name=halo voice_sub_directory_name=testcase
Enter fullscreen mode Exit fullscreen mode

This is the information required to calculate the path when the voice is placed in a subdirectory. In this case, the voice folder structure is as follows:

testcase//halo000.ogg

specifies the file name of the currently running scenario script (without the extension). If the scenario being executed is test.gs, will be set to test, and the final path will be as follows:

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
Enter fullscreen mode Exit fullscreen mode

This specifies the text color for the character "halo"'s dialogue and history.

@make_character name=halo history_icon=history_icon_halo history_icon_left=18
Enter fullscreen mode Exit fullscreen mode

This specifies the icon to be displayed next to the history text.

Character Tag

This defines the character "halo". (The tag "halo" can now be used.)
We extend the syntax for the tags "character" and "halo".
By the way, internally, "halo" is redirected to "character".
If syntax extensions are made to the "character" tag here, they will also apply to "halo".
Conversely, if syntax extensions are made to the "halo" tag, they will apply to "halo" but not to "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_<POSE>_<FACE>
@!halo face=expression1->face1,expression2->face2
@!halo target=pose1->*target
@!halo pose=pose1->pose1,pose2->pose2
Enter fullscreen mode Exit fullscreen mode

I don't need any more explanations.
The scenario script should now look like this:

; 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 the standing picture.
Enter fullscreen mode Exit fullscreen mode

This is how to define a character using ModADV.

If you want to try GOKI2, you can download the latest environment from the following.

https://github.com/halo1234/Avalanches/releases

List of Related Articles

List of related articles on GOKI2

Top comments (0)