So, I developed some lua modules for Ikemen GO and decided to release them for general use. Feel free to use them in your projects (with or without giving credits), modify them, or re-use code, it's fine. These modules are meant to be used with 0.98.2, I can't assure these mods will work with previous versions of the engine, though I'll try to update them for future versions.
I must clarify not 100% of the code is mine, some of it has been taken and modified from default scripts, and that code belongs to Ikemen GO devs, of course.
How to install
To install these modules, you have to place them inside the folder external/mods in your Ikemen GO installation.
Alternatively, if you want to distribute these with a motif (screenpack), you can download an additional module from the downloads folder called modloader.lua. Just place that mod in the root of your screenpack folder and, after that, add the next line in system.def, inside [Files]:
[Files]
module = data/<yourscreenpackfolder>/modloader.lua
Finally, create a new folder inside your screenpack folder called "modules", and place all the modules you want to use there. Take in account you can only declare one module in your system.def file, so this lua code tries to make up for it by loading all modules from said folder.
For more information about this (and other ways to install external modules), check out this article at Ikemen GO wiki:
https://github.com/ikemen-engine/Ikemen-GO/wiki/Miscellaneous-info#external-modules
FADEDELAY
Version: 1.0
Compatible with: 0.98.2
This module modifies the function main.f_fadeAnim to allow simple fade delaying in all menu sections.
New system.def parameters:
- fadein.delay: sets amount of time to delay fadein. Takes effect after fadein.anim animation.
- fadeout.delay: sets amount of time to delay fadeout. Takes effect after fadeout.anim animation.
- fadeout.exit.delay: sets amount of time to delay exit (esc) fadeout. Takes effect after fadeout.anim animation.
Example:
In system.def:
[Select Info]
fadeout.time = 5
fadeout.delay = 80
Results
(Comparison without fadeout delay)
QUICKCONNECT
Version: 1.0
Compatible with: 0.98.2
Adds a new menu item (assignable via system.def) that lets the user directly insert an IP and connect to a host. An alternative to default serverconnect.
For more info about menu items and submenus in Ikemen GO: https://github.com/ikemen-engine/Ikemen-GO/wiki/Screenpack-features#grouping-elements-submenus
New system.def parameters:
At [Title Info]:
- menu.itemname.quickconnect = "name": creates a new menu/submenu item with a custom name.
Example:
[Title Info]
menu.itemname.menunetwork.quickconnect = "Join Game"
Results
MAPOPTIONS
Version: 1.0
Compatible with: 0.98.2
This mod lets you create options menu items that set up maps to all players when starting a new match (according to their values). These maps are named based on the item names, and you can use them to modify in-game behavior (via CNS/ZSS). For more info about maps: Map, Map (trigger), MapSet (SCTRL), MapAdd (SCTRL)
To use this mod, you have to declare some items inside [Option Info] using "menu.itemname.<optionName>" parameter. After that, you can modify them using the new parameters this mod offers. For more info about this: https://github.com/ikemen-engine/Ikemen-GO/wiki/Screenpack-features#grouping-elements-submenu
To make the save feature work, you have to modify options.lua in external/script. Just remove "local" from "local modified = false" and "local needReload = false", then save the file. This is only necessary for 0.98.2, future versions of the engine will not have this problem.
New system.def parameters:
At [Option Info]:
- mapoptions.save.filename = "filename.json": sets custom savefile for options created with mapoptions. If declared, all mapoptions' values will be saved here.
- mapoptions.item.<optionName>.type: sets option type. Acceptable values: "bool" (yes/no) or "number". Must be a string.
- mapoptions.item.<optionName>.default: sets option default value (1 or 0 for bool, any integer for "number").
- mapoptions.item.<optionName>.rangestart: sets option range start (if option is number-type).
- mapoptions.item.<optionName>.rangeend: sets option range end (if option is number-type).
- mapoptions.item.<optionName>.save: sets if the option must load the value from custom savefile at game's start (1 or 0).
- mapoptions.item.<optionName> = type, default, rangeStart (optional), rangeEnd (optional), save: alternative way to set option functionality (inline).
Example:
In system.def:
[Option Info]
mapoptions.save.filename = "custom.json" ; This is optional, of course :>
menu.itemname.menusecrets.disablejump = "Disable Jump"
mapoptions.item.disablejump.type = "bool"
mapoptions.item.disablejump.default = 0
mapoptions.item.disablejump.save = 1
;Alternative: mapoptions.item.disablejump = "bool", 0, 1
In CNS/ZSS (in this case, I'm using ZSS):
if map(disablejump) {
if stateno = 40 {
selfState{value: prevstateno}
}
}
Results
MULTIPLEFACE2
Version: 1.01
Compatible with: 0.98.2
Renders background portraits (face2) for all members in a team, instead of only one like vanilla Ikemen GO does. Works with select screen and versus screen.
This module overrides the function start.f_drawPortraits.
New system.def parameters:
At [Select Info] or [VS Screen]:
- p<pn>.face2.num: sets how many portraits can be rendered. If omitted or set to 1, later background portraits will override the previous ones when selecting characters in select screen (just like vanilla Ikemen GO behavior).
- p<pn>.member<num>.face2.offset = x, y: sets horizontal and vertical offset values for background portrait position of a given team member.
- p<pn>.member<num>.face2.window = posX, posY, width, height: sets background portrait window frame position and dimensions.
Example:
In system.def:
[Select Info]
p1.face2.num = 2
p1.face2.spr = 9000,1
p1.face2.scale = 0.5, 0.5
p1.face2.offset = 0, 19
p1.member1.face2.offset = 0, 0 ; Not necessary to do this, it is just to illustrate
p1.member2.face2.offset = 78, 0
Results
STAGETEXT
Version: 1.1
Compatible with: 0.98.2
Adds new parameters in system.def that allow rendering various stage info in select and versus screens.
New system.def parameters:
At [VS Screen]:
- stage.text: "Stage %s": sets stage text. %s renders stage name. %i can additionally render stageNo.
- stage.font: sets stage text font.
- stage.pos: sets stage text position.
- stage.scale: sets stage text scale.
At [Select Info] or [VS Screen]:
- stage.author.text: "Author %s": sets stage author text. %s renders stage author. %i can additionally render stageNo.
- stage.author.font: sets stage author text font.
- stage.author.pos: sets stage author text position.
- stage.author.scale: sets stage author text scale.
- stage.description.text: "%s": sets stage description text. %s renders stage description (from stage .def file, inside [Info]). %i can additionally render stageNo.
- stage.description.font: sets stage description text font.
- stage.description.pos: sets stage description text position.
- stage.description.scale: sets stage description text scale.
Example:
In system.def:
[Select Info]
stage.author.text = "Author: %s"
stage.author.font = 3,0,0
stage.author.pos = 160, 229
[VS Screen]
stage.text = "Next stage: %s"
stage.font = 3,5,0
stage.pos = 160, 210
stage.description.text = "%s"
stage.description.font = 3,0,0
stage.description.pos = 160, 220
In stage .def file:
[Info]
name = "Training Stage"
displayName = "Training Stage"
author = "Gacel"
description = "Great stage, play it...\nWhile you can!" ;New parameter to display with stage.description.text
Results
DOWNLOAD