March 10th, 2024: The style guide has had an overhaul to make it easier to understand! Please check what's changed, and chime in with feedback so that our wiki can continue to improve.

SERIKO

SERIKO refers to the language used for shells, which dictates how they will display, how animations will run, how images will layer, what collisions are available, and more.

SERIKO can be written in two different ways, referred to as old definition and new definition. New definition is a newer version, which has improved syntax, and a few additional options. Old definition may still be used if desired, or may be converted to the new definition.1)

Old Definition

In the old definition, lines of code are written in this order:

#pattern#,surface,pause,method,X,Y

The first # corresponds to the number of the interval, and the second # corresponds to the frame number of the animation.

An example of old definition code:

0interval,random,4
0pattern0,1000,5,overlay,0,0
0pattern1,0,0,alternativestart,[1.2.3]
0option,exclusive

In the old definition, pause times are in centiseconds. So a pause time of 5 means that it will pause for 50ms before displaying that frame.

New Definition

In the new definition, lines of code are written in this order:

animation#.pattern#,method,surface,pause,X,Y

In this order, the number of the animation and the frame number are separated by a dot. Additionally, because the method has been moved before the pause time, the pause time and X/Y values may simply be omitted for methods where they are not used.

An example of new definition code:

animation0.interval,random,4
animation0.pattern0,overlay,1000,50,0,0
animation0.pattern1,alternativestart,(1,2,3)
animation0.option,exclusive

In the new definition, pause times are in milliseconds. So a pause time of 50 means that it will pause for 50ms before displaying that frame. This allows finer control of animation timing. To convert from the old definition to the new definition, a 0 should be added after all pause times.

Note the other difference, which is that the old definition uses [1.2.3] for methods such as alternativestart, while the new definition uses (1,2,3).

Finally, since the new definition is the standard going forward, new options that are added may only be implemented for the new definition and not work correctly in the old definition.

MAYUNA

MAYUNA refers specifically to the code that is used to display dressups. When creating an interval for a dressup, each line of code will be a layer, rather than a frame of animation, and the resulting image of frames composited together will be used as the dressup.

Errors

When there is an error in the shell code, SERIKO will attempt to continue running despite it. This may result in unexpected behaviors, or a shell appearing to work correctly some of the time, but having strange issues.

SERIKO will output all errors to the error log, and attempt to point the developer to the issue if at all possible. Often, it will list which surface/interval the issue is located in.

Note that it cannot always describe the error accurately. For example, SERIKO does not support same-line comments. If the developer is using same-line comments, these may cause errors depending on the content of the comment, which can be difficult to track down because the code before the comment may be correct.

1)
A tool called olddef2newdef is available to convert shell code automatically.