Categories
Article

Dialogue system for Ikemen Go

Dialogue system for Ikemen Go

Update: After almost 2 years from release date, I updated the module to be used with Ikemen Go 0.99 and Nightly.
Constants Added. You can configure the coordinates and the scale of the elements using constants.
No need to rewrite core files anymore. SFF, AIR and SND files are on their own.
Added support to 360P(4:3) and 720(16:9) resolutions.

I created a module that allows you to choose between 1 or 2 windows for dialogues between characters on Ikemen Go. You do not need to overwrite any character file to use it, and you can easily change the animations, frames, and other elements of the module. Enjoy! To check it out before downloading, watch this video on my YT channel.


dialogue working on a fighting game engine

How to Install the dialogue module

Before going further, to use this module properly you need to have knowledge about these triggers:

name, enemynear, teamside, stateno, animtime, roundstate.

If you do not know anything about these, please refer to any Mugen wiki and learn about them before going on. This module is intended to be used by people who have basic knowledge of CNS, triggers, and sctrls.

Also, you should get familiar with new stuff exclusive to Ikemen Go as:

map, dialogue, indialogue

Check the Ikemen Go wiki here to learn about these.
This module is intended to be an starting point to the dialogue sctrl.

Time to Install
Download the module HERE. You’ll find a folder called “dialogue” in the zip file. Extract that folder inside your Ikemen Go data folder. After that, open your save/config.json and add these files to their correspondent block:

CommonConst block
orochi_kyo_dialogue.const : This contains the constants to configure the dialogue module and all the scale and coordinates parameters.
CommonFX block
orochi_kyo_dialogue.def : This contains the calls to the needed SFX, SND and AIR files.
CommonStates
orochi_kyo_dialogue_main.zss : This file contains the dialogue itself. Check it out as it includes a working example of the dialogue.
orochi_kyo_dialogue_helpers.zss : Contains the calls to all the helpers and explods, like frames and backgrounds.

In the end, your config.json file should look like this

“CommonAir”: [
“data/common.air”
],
“CommonCmd”: [
“data/common.cmd”
],
“CommonConst”: [
“data/common.const”,
“data/dialogue/orochi_kyo_dialogue.const”
],
“CommonFx”: [
“data/dialogue/orochi_kyo_dialogue.def”
],
“CommonLua”: [
“loop()”
],
“CommonStates”: [
“data/functions.zss”,
“data/action.zss”,
“data/dizzy.zss”,
“data/guardbreak.zss”,
“data/score.zss”,
“data/tag.zss”,
“data/training.zss”,
“data/dialogue/orochi_kyo_dialogue_main.zss”,
“data/dialogue/orochi_kyo_dialogue_helpers.zss”
],

Then you need to copy one of the blocks located in the orochi_kyo_dialogue.def to your system.def. For example, if you are going to use the dialogue module with a 640×480(4:3) and double dialogue boxes, copy this block and replace the block in the system.def. These blocks contains all the coords for the “portraits” and the “text” positions.
There are four blocks here, both for single and dual window and for 4:3(360) and 16:9(16:9) ratio. Warning, to make this work correctly your fight.def should be also 4:3 or 16:9.

;——————————————————————-
; Dialogue Info for double window 360
;——————————————————————-
;Dialogue definition
[Dialogue Info] ;Ikemen feature
enabled = 1
starttime = 30
endtime = 60
switchtime = 30
skiptime = 30
key.skip = “a”
key.cancel = “b&c&x&y&z&s”
p1.bg.anim = ;0
;p1.bg.spr =
p1.bg.offset = 0,0
p1.bg.facing = 1
p1.bg.scale = 1.0, 1.0
p2.bg.anim = ;0
;p2.bg.spr =
p2.bg.offset = 0, 144
p2.bg.facing = 1
p2.bg.scale = 1.0, 1.0
p1.face.spr = 9000,1
p1.face.offset = 40, 42
p1.face.facing = 1
p1.face.scale = 0.42, 0.42
;p1.face.window = 0, 0, 320, 240
p2.face.spr = 9000,1
p2.face.offset = 280, 153
p2.face.facing = -1
p2.face.scale = 0.42, 0.42
;p2.face.window = 0, 0, 320, 240
p1.name.offset = 110, 50
p1.name.font = 2,0,1
p1.name.scale = 1.0, 1.0
p2.name.offset = 22, 163
p2.name.font = 2,0,1
p2.name.scale = 1.0, 1.0
p1.text.offset = 110, 62
p1.text.font = 2,0,1
p1.text.scale = 1.0, 1.0
p1.text.spacing = 0, 0
p1.text.delay = 3
p1.text.textwrap = w
p1.text.window = 90,32, 300,96
p2.text.offset = 22, 174
p2.text.font = 2,0,1
p2.text.scale = 1.0, 1.0
p2.text.spacing = 0, 0
p2.text.delay = 3
p2.text.textwrap = w
p2.text.window = 10,144, 220,208

dialogue between characters in Ikemen go

Configuring the Dialogue Module

You already setup everything needed to make the dialogue works. Now the dialogue should trigger when Kung Fu Man is facing himself. It is time to setup the dialogue. Open the orochi_kyo_dialogue.const file and check for these lines.

DualOrSingleWindow = 0 ; 0 for dual, 1 for single window
res360or720 = 1; 0 for 360 or 4:3, 1 for 720 or 16:9

For example, if you copied the “single 360” block to your system.def, set the DualOrSingleWindow=1 and the “res360or720=0”, this will cause all the module helpers to match the text and portraits coordinates.

Making the dialogue works

The dialogue will trigger at the start of the match with Kung Fu Man by default. If you want to make it work with other characters please open the dialogue.zss file and copy the entire block and paste it below inside the same file. You can optionally copy it to your character’s [statedef -4] state.

Change the name and the enemynear,name conditionals to your character’s name and the enemy name in the new block you just copied. This trigger a dialogue between two chars when the match is starting.
If you want to set a dialogue between chars at the end of the match you can delete the `stateno = [191,195]` conditional and add `matchover` conditional plus `stateno = [180,185]` which are the MUGEN/IKEMEN GO common win pose state numbers.

Other files

Take into account that before editing any file in this module, you should know how to use Fighter Factory.
orochi_kyo_dialogue.sff : Here you can find all the sprites used by the animations.
orochi_kyo_dialogue.air : Animations used by explods are here. To call these animations in CNS/ZSS use the prefix DIALOGUE before the animation id. For example, if you add a new animation inside this file with the id 9500, call it using the “anim=DIALOGUE9500”.
orochi_kyo_dialogue.snd : This file contains the sound clips. Right know I have not added any sounds to the module yet. Maybe in the near future I can record some lines of dialogue and use them in the module. Ikemen Go support call sounds from this file using also the prefix DIALOGUE. Example: text3 =
Refer to the dialogue sctrl section in the Ikemen Go Wiki.

dual dialogue between fighters in ikemen go

Conclusion

The purpose of this was to cover the basic steps to make the dialogue with explods and helpers work in your build. From here it is up to you and your imagination to take the dialogue tool to a new height and create deep and creative dialogues and story modes in Ikemen Go. Good Luck!!
If you need more help I’m on the English section of the Spanish Ikemen Go Discord server.
NOTE: Please guys, read the Ikemen Go Wiki before claiming the module does not work. Read the instructions in this section twice.

Leave a Reply

Your email address will not be published. Required fields are marked *