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

DatatypeDescription
BoolExistance flag: only matters whether the key exists; its value is ignored
PathFilename with extension: added to internal file list
StringASCII text
TextShift-JIS text
KeyDatatypeSummaryValid TypesExample
TYPEStringAdd-on’s typeAll (Required)TYPE=HAIR
NAMEStringAdd-on’s unique internal nameAll except ARCHIVE, COORDINATE (Required)NAME=imo_hairD_06
FILE_{#}PathFile contained in archiveAllFILE_0=imo_hairD_06.tmb
ICON_{0,1}PathIcon to show in CCSAll except ARCHIVEICON_0=imo_hairD_06.psd
COORD_{Part}StringModel to use for specified partCOORDINATECOORD_12=imo_hairD_06
CAPTION_{0,1,3,4}TextName and description for the CCSAll except ARCHIVE, COORDINATECAPTION_0=Hair
UPPERONLYBoolFlags only upper-clothes are availableCOSTUME, UNDERUPPERONLY=1
BOTTOMONLYBoolFlags only lower-clothes are availableCOSTUMEBOTTOMONLY=1
HALFWEARBoolFlags half-removed states are availableUNDERHALFWEAR=1
VERSIONStringAdd-on’s versionUnusedVERSION=100
SEXStringTarget genderUnusedSEX=FEMALE

Types

TypeSummaryIn Character Customization Screen (CCS)?
ARCHIVEOnly contains other filesNo
COORDINATEPredefined set of models without the filesAs “Clothing Sets”
BGRoom model and animationAs the map selector
ARMArm item model (e.g., bracelet)Yes
BODYBase body modelYes
COSTUMEOuter clothes modelsAs “Clothing (Upper)” and/or “Clothing (Lower)”
EYEEyes modelYes
FACEFace item model (e.g., glasses)Yes
HAIRHair modelYes
HEADHead item model (e.g., hat)Yes
NECKNeck item model (e.g., necklace)Yes
SHOESShoes modelYes
SOCKSSocks modelYes
UNDERUnderclothes modelsYes

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_##.

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.

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.

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.

FlagFILE_0FILE_1FILE_2FILE_3
NoneNormal upperNormal lower
HALFWEARNormal upperNormal lowerHalf upperHalf lower
UPPERONLYNormal upper
Normal lower
HALFWEAR & UPPERONLYNormal 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.

KeyAccess 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.