"NANIKA"
Documents - shell -


Introduction

This article discusses the specification you should know when designing a shell of Nanika. Note that this document is supposed to be read by its developers.

Abstract

home
  +-ghost
      +-naru
         +-shell
            +-master
              +-surface0.png
              +-surface0a.png
              +-surface0s.png
              ....
              ..
         +-ghost

Basic component files

surface0.png
surface0s.txt
........
....
..
surface10.png
descript.txt
profile.txt
naru.ico
clover.cur
thumbnail.png
The "surace?.png" images are a set of bitmapped images which represent the standing forms of the character with various expressions.
The last digit of the file name represents the ID assigned to it. You are allowed to define up to 2,048(latest version=8192) images in a single shell. While you are able to decide which file responds to which expression, there are several IDs that are typically used for a particular expression.
00normal
01shy
02surprised
03worried
04depressed
05smiling
06with her/his eyes closed
07angry
08sneering
20Tsukuri signboard
25singing
10normal
11frowning
19singing


Although these IDs are typically regarded as reserved, it is not a requirement for them to be implemented in a ghost.
At the moment even Futaba, the default ghost, has no 'reserved' surfaces.

The color of left upper origin uses for transparent color to clip out the required area. Musk the area which you want to clip out with the same color of left upper origin.
You must not need to prepare all surfaces for your character.When the surface which doesn't exist is referred, the request redirects to surface0.png (or surface10.png on the part of "kero". Your shells will functions correctly even if you have prepared the minimum set of surface includes surface0.png and surface10.png only.

The "surface[id]s.txt" is the decision data of that the mouse cursor collides with the head/face/bust and/or clicked on there or not. The details descript in the following sections.

The "discript.txt" file includes the configuration information The details descript in the following sections.

The "*.ico" file is the icon file using with this shell. The file name of the icon is configured in the "descript.txt". The color depth of the icon must be less than 256 colors. You can't use the full-color icons.

The "*.cur" is the mouse cursor using with this shell. The file name of mouse cursor is configured in the descript.txt.

The "thumbnail.png" file is the thumbnail image of this shell. The thumbnail image is displayed as the guide when choosing the shell. The file format is the *.png or *.jpg format. If you prepare the thumbnail file in *.png format and with *.pnr file extension, it is treated as the *.png file that transparent with the upper left origin color. You can freely choose the color depth and the size of the thumbnail file. If unnecessary, you can omit this file.


descript.txt

name,winter clothes
type,shell

sakura.balloon.offsetx,0
sakura.balloon.offsety,80
kero.balloon.offsetx,-20
kero.balloon.offsety,10
The "name" entry is the name of this ghost. You must set the string data of wears of the shell or the size of it. (for example shown above or 100%, 80%, etc.)

The "type" entry is the type of the file set. If that is shell, you must configure as it is.

The "sakura.ballon.*" entry is the offset value of the balloon's position. The offset value is calculated from the position just side of the surface. If the value of "x" is plus, the balloon becomes near to the surface, or that value is minus, the balllon becomes far from the surface. If the value of "y" is plus, the balloon becomes down, nor becomes up.

You can omit whole entries. If not necessary, you can omit this file itself. If you omit this file or these entries, these values are set into the default value.

If you use tags or environment parameters in these entries, your shell will hangs up.
If you want to use the character "\" or "%", you can escape for using "\\" or "\%".

surface[id]s.txt

The "surface[id]s.txt" is the configuration file for descript the surfaces own data.
  • baloon offset
    sakura.balloon.offsetx,-4
    sakura.balloon.offsety,0
    
    kero.balloon.offsetx,0
    kero.balloon.offsety,0
    
    These value is overriding to baloon offset specified descript.txt
  • area check
    collision0,98,34,191,69,Head
    collision1,105,103,178,150,Face
    collision2,118,212,176,255,Bust
    
    point.centerx,150
    point.centery,200
    
    point.kinoko.centerx,150
    point.kinoko.centery,200
    
    The "collision[no]" entry is the decision data of collisions. These areas are directed by rectangle coordinate, and the values in order from left are left/top/right/bottom/the identifier of the collisions. You can freely configure the decision data of the collisions for your own shell, less than 8 entries. (from collision0 to collision7) In the example above, the three areas for decision of colliding is configured, Head, Face, and Bust. These three identifiers is the most standard, thus many ghosts supported them.

    The "point" entry is the data of coordinates. Only two entries are currently effective. The "centerx" parameter is the x coordinate of the center of the character, similarly the "centery" parameter is the y coordinate of it. The coordinate (centerx, centery) points to the center of the character's silhouette, near by the navel.

    The "point.kinoko.*" is the coordinate data of the center of the absolute kinoko field. The "centrex" parameter is the x coordinate of the center of the base of the kinoko, similarly the "centery" parameter is the y coordinate of it. The coordinate (centerx, centery) points to the center of the base of kinoko.
    Absolute KINOKO Field
You can omit all of these entries. However, in this occasion, your surface may not receive the appropriate service from many clients, especially Sakura.

About caching the region data
When the files of the shell are actually used, the directory named "region" is made on the home directory of the shell. The region data is cached on this directory. You can erase these caching data or directory whenever you like. (You must not include caching data with archive for distribution.)

Alias file name table

home
  +-ghost
      +-seriko
        +-alias.txt
You can use the surface name whatever you like, if you make the alias file name table.

The "alias file name table" is configured by "alias.txt".
surface0,normal
surface1,blush
surface2,surprise
surface3,anxious
If you add the entry shown above, for example, embryo will read the normal.png/normala.dat/normals.dat instead of surface0.png/surface0a.dat/surface0s.dat. This spec is similarly after surface1.

You can omit whole entries. Also you can omit this file itself, if unnecessary. In this occasion, the default file name (surface[id]) uses for the omitted entry.

Alias name table

home
  +-ghost
      +-mikan
        +-alias.txt
You can abstract the surface ID, if you make the alias name table. According to this spec, you can change your surface with the ambiguous direction of script, for example, with the script "\s[smile]". And you can direct to display the surface chosen from several surfaces, if you allocate several surfaces to the one surface alias name.

The "alias name table" is configured in "alias.txt"
sakura.surface.alias
{
normal,[0]
blush,[1]
surprise,[2]
anxious,[3]
bum,[4]
smile,[5]
calm,[6]
angry,[7]
sneer,[8]
tukuri signboard,[20]
sing,[25]
}

kero.surface.alias
{
normal,[10]
eyes,[11]
sing,[19]
}
For example, if you add the entries shown above, \h\s[normal] becomes equal to \h\s[0] or \u\s[10].

The entries of each scope must be enclosed by bless { .... }. If you don't obey this format, your shell will show unusual behavior.

If you want to assign several surfaces to an alias name, you must configure that entry as follows.
sakura.surface.alias
{
normal,[0,1000,2000]
}
In this occasion, when "\h\s[normal]" is directed, the one of the surface0, 1000, 2000 will display at random.

You can omit whole entries. Also you can omit this file itself, if unnecessary. In this occasion, the default alias name (the example shown above just as it is) uses for the omitted entry.

Appendix

The most different point between shell and general drawing data is that the anti alias of the surface's outline is not approved. If the outline's color of the surface and that of the mask has mixed, the edge of the surface does not clipped out with strange color, because of the transparent is done with the mask.

return to homepage

This page is based on phase 102.00 (2001/09/01)
This page was translated by:Hiro with SERIKO
Published by:Yoshiyuki.Sakakibara