This is an alternate version of OPL2’s wiki page.
Overview
All PL2 archives’ first file is an INI-like configuration for the add-on; its name is ignored but usually “attribute”. It’s in Shift-JIS encoding, with player-facing text in the non-ASCII range. Newlines should use CRLF.
Single-line comments extend from an octothorpe (#) to an end-of-line and must begin at the start of a line.
Keys are case-sensitive; all official keys are uppercase. Unused keys are ignored. Note that player-facing English and other ASCII characters must use fullwidth characters.
Archives are loaded in an unspecified order and duplicate (internal) files are ignored. It should be noted NTFS normally uses an ordinal sort, which is sort of similar to alphabetical. E.g., if title.txt is in both sc00.pl2 and sc01.pl2 on an NTFS system, the sc00.pl2 instance is used.
Keys
| Datatype | Description |
|---|---|
| Bool | Existance flag: only matters whether the key exists; its value is ignored |
| Path | Filename with extension: added to internal file list |
| String | ASCII text |
| Text | Shift-JIS text |
| Key | Datatype | Summary | Valid Types | Example |
|---|---|---|---|---|
| TYPE | String | Add-on’s type | All (Required) | TYPE=HAIR |
| NAME | String | Add-on’s unique internal name | All except ARCHIVE, COORDINATE (Required) | NAME=imo_hairD_06 |
| FILE_{#} | Path | File contained in archive | All | FILE_0=imo_hairD_06.tmb |
| ICON_{0,1} | Path | Icon to show in CCS | All except ARCHIVE | ICON_0=imo_hairD_06.psd |
| COORD_{Part} | String | Model to use for specified part | COORDINATE | COORD_12=imo_hairD_06 |
| CAPTION_{0,1,3,4} | Text | Name and description for the CCS | All except ARCHIVE, COORDINATE | CAPTION_0=Hair |
| UPPERONLY | Bool | Flags only upper-clothes are available | COSTUME, UNDER | UPPERONLY=1 |
| BOTTOMONLY | Bool | Flags only lower-clothes are available | COSTUME | BOTTOMONLY=1 |
| HALFWEAR | Bool | Flags half-removed states are available | UNDER | HALFWEAR=1 |
| — | ||||
| VERSION | String | Add-on’s version | Unused | VERSION=100 |
| SEX | String | Target gender | Unused | SEX=FEMALE |
Types
| Type | Summary | In Character Customization Screen (CCS)? |
|---|---|---|
| ARCHIVE | Only contains other files | No |
| COORDINATE | Predefined set of models without the files | As “Clothing Sets” |
| BG | Room model and animation | As the map selector |
| ARM | Arm item model (e.g., bracelet) | Yes |
| BODY | Base body model | Yes |
| COSTUME | Outer clothes models | As “Clothing (Upper)” and/or “Clothing (Lower)” |
| EYE | Eyes model | Yes |
| FACE | Face item model (e.g., glasses) | Yes |
| HAIR | Hair model | Yes |
| HEAD | Head item model (e.g., hat) | Yes |
| NECK | Neck item model (e.g., necklace) | Yes |
| SHOES | Shoes model | Yes |
| SOCKS | Socks model | Yes |
| UNDER | Underclothes models | Yes |
Standard Add-on Format
All files contained in an archive (other than the attribute itself) must be specified in FILE_# or ICON_# keys.
Use nil to specify no file. (e.g., FILE_0=nil in a body add-on will make the body disappear when selected.)
Add-ons that show in the CCS also need ICON_# and CAPTION_# keys.
Icon files should be 190x80 px for rooms and 40x40 px for others.
Captions are the name and description shown. This text must be encoded in Shift-JIS. Caption #0 is the name
and #1 is the description; the costume type also uses #3 and #4. Note that there is no caption #2 or #5.
Example:
TYPE=EYE
NAME=imo_eye_04
CAPTION_0=サンプル
CAPTION_1=サンプル説明。
FILE_0=imo_eye_04.tmb
ICON_0=imo_eye_04.psd
This specifies an eye add-on and model file; an internal name of “imo_eye_04”; and a name, description, and icon for the CCS.
TYPE=ARCHIVE
Archive add-ons include files for use in the game, e.g., scripts, images, sounds; they do not appear in the CCS.
The attribute may contain any number of FILE_* keys; in this type—and only this type—the part of the key after the underscore is irrelevant.
Examples:
TYPE=ARCHIVE
FILE_00=script.txt
FILE_00=sc00_testing_title.txt
FILE_00=sc00_testing_test_model.txt
FILE_00=sc00_testing_test_script.txt
TYPE=ARCHIVE
FILE_0=script.txt
FILE_1=title.txt
FILE_I like this title better=title2.txt
FILE_1337=about.txt
TYPE=COORDINATE
Coordinate files don’t contain the models with them (usually), but instead tell the game which to load.
As such, they use COORD_## keys instead of FILE_##.
- The ## corresponds with the Part Index
- If the key for a part index isn’t included, the part remains unchanged
- If the value for a part is
nil, the part is removed
Example:
TYPE=COORDINATE
NAME=cos_school_B01
CAPTION_0=サンプル
CAPTION_1=サンプル説明。
ICON_0=cos_school_B01.psd
# Removes Socks
COORD_04=nil
# Lower Clothes; Loads imo_cos_school_B01A.tmb
COORD_05=imo_cos_school_B01A
# Upper clothes
COORD_06=imo_cos_school_B01B
# Neck item
COORD_09=imo_neck_school_01
# Removes Shoes
COORD_11=nil
TYPE=BG
Backgrounds include the models and animations for a room or area; this is the only selectable add-on type that includes animations.
- File keys are paired:
FILE_0is model 1 andFILE_1is animation 1,FILE_2is model 2 andFILE_3is animation 2 - If only one model is needed, omit the second’s keys
- If no animation is needed, specify
nil
Examples:
# 1 model, no animation
TYPE=BG
NAME=room_01
CAPTION_0=サンプル
CAPTION_1=サンプル説明。
FILE_0=room_01.tmb
FILE_1=nil
ICON_0=BG1.psd
# 2 models, 2nd is animated
TYPE=BG
NAME=room_01
CAPTION_0=サンプル
CAPTION_1=サンプル説明。
FILE_0=room_01.tmb
FILE_1=nil
FILE_2=room_01b.tmb
FILE_3=room_01b.tsb
ICON_0=BG1.psd
TYPE=COSTUME
Costume add-ons contain upper and/or lower clothes. Upper and lower pieces may be selected separately in-game.
- There are two icons:
ICON_0for upperICON_1for lower
- Four captions:
CAPTION_0for upper nameCAPTION_1for upper descriptionCAPTION_3for lower nameCAPTION_4for lower description
- Two files:
FILE_0for upper modelFILE_1for lower model
- There are also two flag keys:
UPPERONLYtells the game there is no lower clothing in the add-onBOTTOMONLYtells the game there is no upper clothing in the add-on
- If both are specified, the add-on will not appear in the CCS
Examples:
# Contains both upper and lower
TYPE=COSTUME
NAME=imo_cosE_02
CAPTION_0=サンプル
CAPTION_1=サンプル説明。
CAPTION_3=サンプル
CAPTION_4=サンプル説明。
FILE_0=imo_cosE_02A.tmb
FILE_1=imo_cosE_02B.tmb
ICON_0=imo_cosE_02A.psd
ICON_1=imo_cosE_02B.psd
# Upper-wear only
TYPE=COSTUME
NAME=imo_cosE_02
CAPTION_0=サンプル
CAPTION_1=サンプル説明。
CAPTION_3=nil
CAPTION_4=nil
FILE_0=imo_cosE_02A.tmb
FILE_1=nil
ICON_0=imo_cosE_02A.psd
ICON_1=nil
UPPERONLY=1
#Lower-wear only
TYPE=COSTUME
NAME=imo_cosE_02
CAPTION_0=nil
CAPTION_1=nil
CAPTION_3=サンプル
CAPTION_4=サンプル説明。
FILE_0=nil
FILE_1=imo_cosE_02B.tmb
ICON_0=nil
ICON_1=imo_cosE_02B.psd
BOTTOMONLY=1
TYPE=UNDER
Under add-ons contain upper and/or lower underclothes. Upper and lower pieces cannot be selected separately in-game.
There’s only a single icon and caption pair.
In addition, this type also uses the UPPERONLY flag (but not BOTTOMONLY) along with HALFWEAR.
| Flag | FILE_0 | FILE_1 | FILE_2 | FILE_3 |
|---|---|---|---|---|
| None | Normal upper | Normal lower | ||
HALFWEAR | Normal upper | Normal lower | Half upper | Half lower |
UPPERONLY | Normal upper Normal lower | |||
HALFWEAR & UPPERONLY | Normal upper Normal lower | Half upper Normal lower | Normal upper Half lower | Half upper Half lower |
Examples:
# No flags
TYPE=UNDER
NAME=imo_underA_01
CAPTION_0=サンプル
CAPTION_1=サンプル説明。
FILE_0=imo_underA_01A.tmb
FILE_1=imo_underA_01B.tmb
FILE_2=nil
FILE_3=nil
ICON_0=imo_underA_01.psd
# UPPERONLY
TYPE=UNDER
NAME=imo_underA_01
CAPTION_0=サンプル
CAPTION_1=サンプル説明。
FILE_0=imo_underA_01.tmb
FILE_1=nil
FILE_2=nil
FILE_3=nil
ICON_0=imo_underA_01.psd
UPPERONLY=1
#HALFWEAR
VERSION=100
TYPE=UNDER
NAME=imo_underA_01
CAPTION_0=サンプル
CAPTION_1=サンプル説明。
FILE_0=imo_underA_01A.tmb
FILE_1=imo_underA_01B.tmb
FILE_2=imo_underA_01HA.tmb
FILE_3=imo_underA_01HB.tmb
ICON_0=imo_underA_01.psd
HALFWEAR=1
# UPPERONLY and HALFWEAR
VERSION=100
TYPE=UNDER
NAME=imo_underA_01
CAPTION_0=サンプル
CAPTION_1=サンプル説明。
FILE_0=imo_underA_01A.tmb
FILE_1=imo_underA_01B.tmb
FILE_2=imo_underA_01HA.tmb
FILE_3=imo_underA_01HB.tmb
ICON_0=imo_underA_01.psd
HALFWEAR=1
UPPERONLY=1
Technical Notes
This table documents how exactly the different keys are implemented in PL2.
| Key | Access Method |
|---|---|
| TYPE | "TYPE" |
| NAME | "NAME" |
| FILE | "FILE_""FILE_%d""FILE_0""FILE_1""FILE_2""FILE_3" |
| ICON | "ICON_""ICON_0""ICON_1" |
| COORD | "COORD_%02d" |
| CAPTION | "CAPTION_0""CAPTION_1""CAPTION_3""CAPTION_4" |
| UPPERONLY | "UPPERONLY" |
| BOTTOMONLY | "BOTTOMONLY" |
| HALFWEAR | "HALFWEAR" |
There are other keys commonly included in add-ons; they’re unused by PL2, though there may be OPL2 plug-ins or PL2 mods that use them.