YesNoOk
avatar

Introducing Iguana: A Golang rewrite of my movelist generator! (Read 25965 times)

Started by SuperFromND, August 22, 2023, 06:25:33 PM
Share this topic:
Introducing Iguana: A Golang rewrite of my movelist generator!
#1  August 22, 2023, 06:25:33 PM
  • *
  • Professional Amateur
    • USA
    • superfromnd.gitlab.io/


Introduction
A couple years ago now (man, time flies), I created a web-based tool called the IKEMEN GO Command List Generator (see its original thread here if you're curious). Its goal is to take a character's command input (.cmd) file and turn it into a movelist.dat which can then be viewed in-game. It was reasonably well-recieved, but due to a combination of burnout, other projects I took up, and the general limits of web tools, I abandoned it.

Today, I'm revealing Iguana, a complete rewrite of - and successor to - the Command List Generator, written in Go and released as a standalone command-line executable. It's open-source under the MIT license, and can be found here on Github:
https://github.com/SuperFromND/iguana

Iguana is still a work in progress as of this writing, but I feel it's in a good-enough state to at least post about here. Expect bugs and general wonkiness for now!

Why the new tool?
To put it simply, the web tool was a pigsty in terms of programming. The way it processed things was completely hanky-panky and prone to all manner of weird bugs with even slightly-unorthodoxly-written command files... and given just how loosely-compliant a lot of characters have been written over the years, that isn't very good!

On top of that, having a standalone executable tool for making movelists is something that I and a few others have wanted for some time now, and it doubles as a great way for me to learn how to write in Go. The benefits of having it as an executable include:
  • Near-instantaneous execution due to running native instructions instead of a JS interpreter
  • The complete rewrite means it should also hopefully be less error-prone (your mileage may vary, especially if you're reading this within a few days of posting)
  • I can properly host it as a Github repository, so other can contribute to its code and use it in their own projects
  • A standalone executable means all sorts of extra automation is now possible; this includes auto-patching of characters to use movelists and batch-processing of entire rosters at once

As you probably guessed, this also means that further developement on the web tool is unlikely as I put my focus into Iguana. I appreciate all of the feedback I got on that project and hope that Iguana makes for a more-than-worthy successor!

Usage
Head on over to the releases page and click the link that matches the OS you use under the Assets tab. For convenience, here's some permalinks to download the latest release version:

Download Iguana for Windows
Download Iguana for macOS
Download Iguana for Linux

Extract the ZIP and place the executable wherever you like. (I recommend making a tools folder in your IKEMEN installation for this, but anywhere else is fine too!)

Iguana is a command-line-only tool, meaning that double-clicking it won't do anything beyond ominously flashing a command prompt window for a split-second. In order to use it, you'll need to use a command prompt window.
Quote
Pro tip: Windows has a very convenient shortcut for this; Shift-right-click the folder you put Iguana into and you'll see an option called Open command window here, click it and you should get a command prompt ready to go!

All you have to do is run Iguana using the -i argument, and then type in the file location of either a character's command file or definitions file. Iguana will then do its thing and create a movelist.dat file in the same location as the command file you gave it.
Code:
$ iguana.exe -i path/to/file.cmd
$ iguana.exe -i path/to/file.def

Quote
Pro tip: You can open up a character folder and drag the .cmd or .def file on top of the command prompt, and it will automatically fill in the entire file path. Handy!

You can pass additional parameters as well for customizing Iguana's movelist output. You can get a list of these parameters by either running Iguana with the -h argument or with no argument at all:


Features
As mentioned above, Iguana is still very much a work in progress, and is still missing some functionality/options from the web tool.
Currently available options, in no particular order:

-i filename: Input File
The command (.cmd) or definitions (.def) file that Iguana will interpret. Pass a folder along for bulk-processing of all .def files in the folder's contents. If this argument isn't present, Iguana will print help instead.

-o filename: Output Name
The filename that Iguana will write to (automatically prefixed with the file location of the input file). Defaults to movelist.dat.

-def: Automatically Patch DEF
Automatically adds the movelist = movelist.dat line to the given DEF file. If this argument isn't present, Iguana will prompt you if it should do this instead. This argument has no effect if the input file is neither a .def or a folder.

-keep1: Preserve One-Button Moves
Disables stripping moves that don't use Power and are only a single button press. Iguana strips these moves by default as they are typically Normal attacks, which are not usually listed in movelists.

-keepai: Preserve AI-Only Commands
Disables stripping moves that are determined to be only usable by the AI. Specifically, Iguana strips WinMUGEN-style moves that are physically impossible to input, whether due to the command input time being extremely low or the amount of inputs being extremely high.

-kp: Use Specialized Button Glyphs
Enables the use of LK, MK, HK, LP, MP, and HP glyphs as substitutes for the generic A/B/C/X/Y/Z.

-nomotions: Preserve Raw Directional Inputs
Disables converting raw directions to common motion input glyphs, such as quarter-circle-forward or half-circle-back.

-header hexcolor: Header Color
The hex-color to use for the headers ("<Special Moves>" and "<Hyper Moves>"). Input must be either three or six characters long and consist only of hexadecimal digits (0-F).

-power hexcolor: Power Color
Similar to -header, but for the color used to highlight the amount of Power a move uses.

-d: Debug Logging
Disables file output and logs a lot of information while Iguana parses the command file. Not really useful unless you're a developer or just curious.

A list of features planned to be implemented are available on the Github's readme.

Credits and Thanks
I wanted to give my thanks to a few people in particular:
  • PoTS, who gave me some pointers/advice. (Thanks for all the great stuff you've made over the years, by the way!)
  • Foobs, who's given me quite a few test case files and further advice.
  • The IKEMEN Go dev team and both IKEMEN and MUGEN communities; the reason this tool even exists at all.
  • And finally, anyone who ever tested the Command List Generator or Iguana. Thank you for your time, I appreciate it! :heart:

Creator of the IKEMEN Go Command List Generator and its successor, Iguana. :heart:
Last Edit: September 29, 2023, 03:18:30 AM by SuperFromND
Re: Introducing Iguana: A Golang rewrite of my movelist generator!
#2  August 22, 2023, 07:32:11 PM
  • ******
    • Portugal
    • network.mugenguild.com/pots/
I'm getting this error on Windows 7:

Spoiler, click to toggle visibilty
You can help with Ikemen GO's development by trying out the latest development build and reporting any bugs on GitHub.
My Mugen and Ikemen content can also be found here.
Re: Introducing Iguana: A Golang rewrite of my movelist generator!
#3  August 22, 2023, 07:58:46 PM
  • ***
  • From the Republic of the Little Bananas
    • Brazil
It seems to have a problem with folders who have a space in their names
Spoiler, click to toggle visibilty
Re: Introducing Iguana: A Golang rewrite of my movelist generator!
#4  August 22, 2023, 09:03:08 PM
  • *
  • Professional Amateur
    • USA
    • superfromnd.gitlab.io/
It seems to have a problem with folders who have a space in their names
Spoiler, click to toggle visibilty

That's just a Windows thing, try surrounding the path in quotes like this:

Code:
iguana.exe -i "E:\Games\Ikemen\Kof Custom\chars\Andy_SS\Andy.cmd"

I'm getting this error on Windows 7:

Spoiler, click to toggle visibilty

Seems like whatever state controller "4" is, is getting read as having no command triggers at all, and thus crashes due to no safeguard being present. Good catch!
I wasn't able to track down this specific version of KFM that has this state controller, but I was able to reproduce it by just removing the trigger from some other move. Will fix this asap!

Creator of the IKEMEN Go Command List Generator and its successor, Iguana. :heart:
Last Edit: August 22, 2023, 09:22:39 PM by SuperFromND
Re: Introducing Iguana: A Golang rewrite of my movelist generator!
#5  August 22, 2023, 10:21:20 PM
  • ***
  • From the Republic of the Little Bananas
    • Brazil

That's just a Windows thing, try surrounding the path in quotes like this:

Code:
iguana.exe -i "E:\Games\Ikemen\Kof Custom\chars\Andy_SS\Andy.cmd"

Ah it's Windows being windows it worked but I've got another error:
Spoiler, click to toggle visibilty

Errors happens with other Soysause, Koopakoot and Jmorphman chars too, the later use a custom command buffer so I was expected to not work.
Re: Introducing Iguana: A Golang rewrite of my movelist generator!
#6  August 22, 2023, 10:41:02 PM
  • *
  • Professional Amateur
    • USA
    • superfromnd.gitlab.io/

That's just a Windows thing, try surrounding the path in quotes like this:

Code:
iguana.exe -i "E:\Games\Ikemen\Kof Custom\chars\Andy_SS\Andy.cmd"

Ah it's Windows being windows it worked but I've got another error
Errors happens with other Soysause, Koopakoot and Jmorphman chars too, the later use a custom command buffer so I was expected to not work.

Appears to be the same problem PoTS ran into earlier. I've already fixed it, so I guess I'll release a patched version real quick since this is a rather obvious problem. Frankly, I can't believe I somehow missed that when testing, so thank you to both of you!

Creator of the IKEMEN Go Command List Generator and its successor, Iguana. :heart:
Re: Introducing Iguana: A Golang rewrite of my movelist generator!
#7  August 23, 2023, 09:22:13 AM
  • ******
    • Portugal
    • network.mugenguild.com/pots/
Seems like whatever state controller "4" is, is getting read as having no command triggers at all, and thus crashes due to no safeguard being present. Good catch!
I wasn't able to track down this specific version of KFM that has this state controller, but I was able to reproduce it by just removing the trigger from some other move. Will fix this asap!
My bad. I had the same error with another character so I tried KFM to be sure, but turns out that "4" block is something I added myself so it wasn't an out of the box KFM.
You can help with Ikemen GO's development by trying out the latest development build and reporting any bugs on GitHub.
My Mugen and Ikemen content can also be found here.
Re: Introducing Iguana: A Golang rewrite of my movelist generator!
#8  August 24, 2023, 02:31:33 PM
  • *
  • Professional Amateur
    • USA
    • superfromnd.gitlab.io/

Creator of the IKEMEN Go Command List Generator and its successor, Iguana. :heart:
Re: Introducing Iguana: A Golang rewrite of my movelist generator!
#9  August 24, 2023, 03:42:06 PM
  • avatar
  • ***
  • Why,
Isnt Ikemen go do it AUTOMATE?
Hey, can i help, or maybe i need help
Re: Introducing Iguana: A Golang rewrite of my movelist generator!
#10  August 25, 2023, 12:07:31 AM
  • *
  • Professional Amateur
    • USA
    • superfromnd.gitlab.io/
Isnt Ikemen go do it AUTOMATE?

I'm assuming you're asking if IKEMEN automatically generates its own movelist.dat files, and no, it doesn't. This tool wouldn't exist if that were the case!

Creator of the IKEMEN Go Command List Generator and its successor, Iguana. :heart:
Re: Introducing Iguana: A Golang rewrite of my movelist generator!
#11  August 25, 2023, 05:45:59 PM
  • ******
    • Portugal
    • network.mugenguild.com/pots/
I tried to run it for Jade's Lucifer and the results are less than optimal. Just mentioning this in case that char gives you any ideas. I also had to modify the command file extension for it to work.



The first two are supers that use custom conditions. Also their buttons are duplicated.

Here's another test with DCL's Strider:


The issue with this one is the amount of redundancy. It's a pretty tricky subject though. Detecting when a move is or is not redundant.

A few more ideas:
- Changestates to states [3000, 4999] could also be detected as supers. This is not ideal but Elecbyte did recommend those numbers for supers and 99% of chars use them
- The program could work based on a def file. It'd open the def, check which one is the command file, parse it then add the movelist file to the file list
- Dashing is so common you could filter it to a "system" category or something. Or just omit it
You can help with Ikemen GO's development by trying out the latest development build and reporting any bugs on GitHub.
My Mugen and Ikemen content can also be found here.
Last Edit: August 25, 2023, 05:52:49 PM by PotS
Re: Introducing Iguana: A Golang rewrite of my movelist generator!
#12  August 25, 2023, 09:38:24 PM
  • *
  • Professional Amateur
    • USA
    • superfromnd.gitlab.io/
- The program could work based on a def file. It'd open the def, check which one is the command file, parse it then add the movelist file to the file list
- Dashing is so common you could filter it to a "system" category or something. Or just omit it

Funny you say these, by the time I read this message I had actually already implemented (at least most of) both of these ideas! The only part I haven't done yet is the part about patching DEF files to include the movelist; that should hopefully be fairly straightforward. (although I'll probably make it either prompt the user for [Y/N] confirmation or require a flag to do it; I generally don't like modifying existing files without at least asking if it's okay first or the user otherwise specifically opting into it)

The issue with this one is the amount of redundancy. It's a pretty tricky subject though. Detecting when a move is or is not redundant.

Mhm, I've thought about maybe adding some kind of heuristic or check for moves named identically save for specific keywords, but the more I thought about it the more I realized that'd just cause more problems than it solves.

I tried to run it for Jade's Lucifer and the results are less than optimal. Just mentioning this in case that char gives you any ideas. I also had to modify the command file extension for it to work.

I've already gotten a few test case files courtesy of Foobs that I suspect have a similar problem to what you're getting here with Lucifer, but thank you anyways for linking me another specific example to test! :heart:

Creator of the IKEMEN Go Command List Generator and its successor, Iguana. :heart:
Re: Introducing Iguana: A Golang rewrite of my movelist generator!
#13  August 26, 2023, 04:41:08 PM
  • *
  • Professional Amateur
    • USA
    • superfromnd.gitlab.io/
Iguana v1.2.0's out! Changelog can be found here.

This one doesn't improve much in terms of command filtering/merging (I want to focus on that for the next release!), but hopefully makes up for it by adding support for both reading and patching .def files, FF-style command labels, and some other quality of life improvements and fixes.

I'm likely gonna take a short break after 1.2.0 since I've been hammering away at Iguana pretty much exclusively for the past week. Take care, and happy weekend!

Creator of the IKEMEN Go Command List Generator and its successor, Iguana. :heart:
Re: Introducing Iguana: A Golang rewrite of my movelist generator!
#14  August 26, 2023, 04:52:54 PM
  • ****
While I don't use Ikemen, I've been looking at this thread whenever it shows up in the recent posts and I can see your dedication.
So I'm just passing by to show my support. The tool is very useful and I love the acronym for it. lol
Keep it up. :smitten:
Re: Introducing Iguana: A Golang rewrite of my movelist generator!
#15  August 26, 2023, 05:30:08 PM
  • *
  • Professional Amateur
    • USA
    • superfromnd.gitlab.io/
While I don't use Ikemen, I've been looking at this thread whenever it shows up in the recent posts and I can see your dedication.
So I'm just passing by to show my support. The tool is very useful and I love the acronym for it. lol
Keep it up. :smitten:

Thank you for the kind words! :heart:

Creator of the IKEMEN Go Command List Generator and its successor, Iguana. :heart:
Re: Introducing Iguana: A Golang rewrite of my movelist generator!
#16  October 09, 2023, 07:57:15 PM
  • *
  • Professional Amateur
    • USA
    • superfromnd.gitlab.io/
v1.3.0 came out a couple weeks back, but I forgot to bump this thread until just now, whoops! Changelog can be found here as usual. Have a good week, everyone! :)

Creator of the IKEMEN Go Command List Generator and its successor, Iguana. :heart:
Re: Introducing Iguana: A Golang rewrite of my movelist generator!
#17  November 20, 2023, 09:33:20 AM
  • avatar
  • *
    • USA
This is such a great resource and I, for one, have had a lot of fun going into the file after it was made and manually adjusting things. Thank you for making Iguana.

A question: where are the sprites located for the LP/MP/Direction Graphics/etc.? I was thinking of replacing them with custom stuff, but wasn't sure where exact IGUANA pulled them from.
Re: Introducing Iguana: A Golang rewrite of my movelist generator!
#18  November 20, 2023, 05:50:04 PM
  • ******
  • 90's Kawaii
  • :thinking:
    • Guatemala

  • Online
data/glyphs.sff
Re: Introducing Iguana: A Golang rewrite of my movelist generator!
#19  November 20, 2023, 05:56:36 PM
  • avatar
  • *
    • USA
Awesome, thank you!
Re: Introducing Iguana: A Golang rewrite of my movelist generator!
#20  November 20, 2023, 07:16:59 PM
  • *
  • Professional Amateur
    • USA
    • superfromnd.gitlab.io/
This is such a great resource and I, for one, have had a lot of fun going into the file after it was made and manually adjusting things. Thank you for making Iguana.

Thank you for the kind words! <3

Creator of the IKEMEN Go Command List Generator and its successor, Iguana. :heart: