YesNoOk
avatar

ZSS (Ikemen alternative for CNS scripts) (Read 13048 times)

Started by K4thos, February 10, 2018, 04:55:55 pm
Share this topic:
ZSS (Ikemen alternative for CNS scripts)
#1  February 10, 2018, 04:55:55 pm
  • ***
Not sure if MUGEN Class is a good place for ikemen stuff, so feel free to move it over.

While messing with Ikemen Go I've noticed that it introduces new characters script format called Zantei State Script (ZSS). Ikemen Go engine still supports CNS but full game developers and people who only now start learning how to create characters may be interested in this alternative, since it uses syntax more familiar to other programming languages and allows to use local variables and functions. Thanks to the open source of the engine it's also possible to add new triggers and sctrls if the engine is to limiting.

No ZSS documentation is available but it’s pretty easy to understand since basic syntax fallows Go rules (well documented language) and there is common1.cns file coded both ways, which can be used as a reference.

Example of common1.cns coded in CNS (taken from mugen 1.1, but also works in ikemen):
https://github.com/K4thos/Ikemen-GO-Plus/blob/K4-experimental/data/common1.cns

Same thing coded in ZSS (Zantei State Script)
https://github.com/K4thos/Ikemen-GO-Plus/blob/K4-experimental/data/common1.cns.zss

Here is google translated comment from above file: (hopefully someone who knows Japanese will translate it properly at some point)
Quote
# The character code is utf-8
# && and || are short circuit evaluations
# ignorehitpause The part surrounded by {} is executed even during hit pause
#include # ignorehitpause {} will also be executed
# Explod can optionally specify ignorehitpause
# ignorehitpause persistent (2) if 1 {} Specify multiple characteristics of a block if
# VarSet, VarAdd can not be used Instead of it: you can write expressions containing assignments with: =
# Add assignment to the end of the assignment expression
# Separate let variable name = trigger expression; can be assigned to local variable
# $ It can be used in a trigger expression with a variable name, but can not be assigned with: = =
# Variable names are abandoned for assignment to [a - z _] [0 - 9 a - z _] *, _
# Up to 256 local variables including arguments and return values
# Because functions can only be called predefined, recursion can not be done
When it comes engine parsing these files it works like this:
First engine tries to load CNS files referenced in character’s DEF file. If the file is not found in character’s directory it tries to load the same file name with added .ZSS extension. Characters can use both CNS and ZSS files at the same time (different st entries) although you can't mix these languages in the same file.

btw. another alternative existed in Ikemen S-SIZE engine, but with more obsure syntax.
Last Edit: February 14, 2018, 01:57:42 am by K4thos
Re: ZSS (Ikemen alternative for CNS scripts)
#2  February 06, 2022, 02:12:17 pm
  • *****
  • WIP: Tons and tons of IKEMEN stages
Current release: SF vs MK, fully interactive
https://www.youtube.com/watch?v=7bM9DpmVXOA