DEV Community

HALO
HALO

Posted on

Starting ADV Development with GOKI2 [ModSystem Introduction] Building System Screens and Defining Configuration Items

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

System Screen (ModSystem)

Normally, games have a system screen to change settings and such.
ModSystem is what implements that.

Building the System Screen

When you load ModSystem, several tags become available.
Building the system screen is done with the system tag.
For now, we will continue the explanation using GOKI2's default buttons and sliders without images.
It is also possible to use images. (In the manual, the <id>_storage attribute is the item where you specify the image file)

Setting the Page Size and Other Properties of the System Screen

First, set the position and size of the page.
After that, specify things like the sound effect for clicks.

@system_option page_left=0 page_top=30 page_width=800 page_height=570 click_sound=se001.ogg enter_sound=se002.ogg
Enter fullscreen mode Exit fullscreen mode

ページ定義

システム画面は、ページ単位で構築する事になります。
まずは、ページ0を定義します。

@system page=0 page_tab_caption=システム page_tab_left=0 page_tab_top=0
Enter fullscreen mode Exit fullscreen mode

Page 0 has been defined with this.
The display name is 'System'.

Setting Item Definition

Next, let's make it possible to adjust the sound volume.
Add a slider to page 0 as shown below.

@system page=0 master_left=400 master_top=10 master_caption="Master Volume" master_slider_left=530 master_slider_top=10 master_slider_width=160 master_slider_height=20 master_slider_color=0xFF0000
@system page=0 bgm_left=400 bgm_top=40 bgm_caption="BGM Volume" bgm_slider_left=530 bgm_slider_top=40 bgm_slider_width=160 bgm_slider_height=20 bgm_slider_color=0xFF0000
@system page=0 se_left=400 se_top=70 se_caption="Sound Effects" se_slider_left=530 se_slider_top=70 se_slider_width=160 se_slider_height=20 se_slider_color=0xFF0000
@system page=0 vo_left=400 vo_top=100 vo_caption="Voice" vo_slider_left=530 vo_slider_top=100 vo_slider_width=160 vo_slider_height=20 vo_slider_color=0xFF0000
Enter fullscreen mode Exit fullscreen mode

Specify the position and size of the slider caption and the slider itself.
master_left=400 master_top=10 master_caption="Master Volume"** specifies the position of the caption and the caption text.
master_slider_left=530 master_slider_top=10 master_slider_width=160 master_slider_height=20 master_slider_color=0xFF0000 specifies the position, size, color, and other properties of the slider.

With this, you can now change the sound volume.

From Page 1 Onward

You can use page=1, etc., just like on page 0. Make sure not to forget to add the page tab.

; Add page tab
@system page=1 page_tab_caption=Message page_tab_left=80 page_tab_top=0

; Add items to page 1
@system page=1 message_speed_left=400 message_speed_top=10 message_speed_caption="Message Speed" message_speed_slider_left=530 message_speed_slider_top=10 message_speed_slider_width=160 message_speed_slider_height=20 message_speed_slider_color=0x00FF00
@system page=1 auto_speed_left=400 auto_speed_top=40 auto_speed_caption="Auto Mode Speed" auto_speed_slider_left=530 auto_speed_slider_top=40 auto_speed_slider_width=160 auto_speed_slider_height=20 auto_speed_slider_color=0x00FF00
@system page=1 message_sample_left=400 message_sample_top=70 message_sample_width=300 message_sample_height=40 message_sample_caption_color=0xFFFFFF message_sample_shadow_color=0x808080 message_sample_edge_color=0x808000
Enter fullscreen mode Exit fullscreen mode

Loading Configuration Values

After defining the system screen, please load the configuration values with the load_system_config tag.

Finally

Since the configurable items are extensive, please refer to the manual (/doc/goki2/index.html) under "ModSystem Tags".

Top comments (0)