This page documents where DC2 stores its gameplay data tables: item and weapon stats, shop inventories, monster attributes, invention recipes, Georama parts and requests, fishing parameters, dungeon floor medals, character stats, and townspeople.
For exporting and editing these tables from your disc, see editing game data.
For runtime memory budgets of each data loader, see memory.
For dungeon floor layouts, room parts, and treasure chests, see dungeons.
All engine source paths are relative to ps2/ in the ChronicleTwo decompilation (with unit notes in re/docs/<unit>/notes.md). All corpus counts cover the extracted PAL disc (SCES_511.90).
.cfg scripts: Plain-text scripts inside DATA.DAT (TAG arg, arg, ...;, \r\n line endings), parsed by CScriptInterpreter (src/scriptinterpreter.cpp).
Executable tables: Compiled into the .data section of SCES_511.90 (config/pal/main.symbols.txt). The single PT_LOAD segment maps file offset 0x80 to virtual address 0x100000, so any .data address A < 0x37CD80 sits at file offset A - 0xFFF80 (>= 0x37CD80 is zero-filled .bss).
CScriptInterpreter::GetArg parses each ;-terminated statement in four steps:
Comment stripping: Strips // line comments and /* ... */ block comments before parsing quotes (a // or /* inside quotes still strips the line or block).
Splitting: Splits arguments on commas outside double quotes, steps 2 bytes on Shift-JIS lead bytes, and unescapes \". Trailing empty arguments before ; are ignored.
Typing: Quoted tokens become strings; unquoted tokens (read up to the first space) with . use atof (float), tokens with only ASCII digits and - use atoi (32-bit wrapping int), and other tokens become invalid (0 / null).
Argument cap: Maximum 64 arguments per statement (SPI_STACK_SIZE); PushStack drops arguments >= 65.
local_com_itemdata, local_itemdatano_converttable, and per-family local_*.bss arrays
Prices and shop inventories
Item IDs 1..511; max 63 goods per shop
CShop::price[512]; SHOP_ITEM_MAX (64) and SPI_STACK_SIZE (64)
Invention recipes
234 recipes
Menu InventTeigiStack: 0x210 16-byte units (0x24 B/recipe)
Ideas and scoops
Idea IDs 1..999; 0x247 16-byte units for table + strings per language (~11 short names free in French); max 388 combined ideas + scoops; display name <= 24 B
Unused legacy files: menu/cfg5, menu/cfg6, menu/0/inv*.lst, menu/inv4.lst, menu/inv5.lst, sg/fish/fish.cfg, sg/gyo/racefish*.cfg, npc_place.cfg..npc_place3.cfg, npc.cfg, edit.cfg, and language-less .gpi files are never read.
Hardcoded growth formulas: CUserDataManager::Initialize sets starting defence to 4 or 8. Weapon required ABS increases by +50% per level, and max WHP increases by a random entry from htbl_1662 (0x33A490).
CGameData::LoadData (src/gamedata.cpp, 0x196980) parses the files in menu/cfg7/ using gamedata_tag (0x339B80). Item IDs (1..511) map to CDataCommon (local_com_itemdata[432]) via local_itemdatano_converttable, and CDataCommon::list indexes the family table selected by ConvertUsedItemType(type):
WEPNUM n; sets the count. Each subsequent block populates the next sequential CDataWeapon (0x4C bytes, indexed by list = n), and WEP_BUILD advances the slot index:
Statement
Fields
Type
Meaning
WEP
whp, abs
s16[2]
Base WHP (capped at 255); ABS required for first level-up.
WEP_ST
attack, durability
s16[2]
Starting Attack and Durability (calcWeaponParamWhp).
WEP_ST_L
attack_max, durability_max
s16[2]
Maximum Attack and Durability caps for this weapon.
File buffer cap: Each .cfg file in menu/cfg7/ must fit in LoadGameDataAnalyze's 0x77C0-byte buffer.
Spectrumising cap (item <= 425): Any non-weapon, non-attachment item with item > 425 must not set attribute & 0x2, because SetItemSpectolPoint indexes etcitem_spectol_table[item - 1] (425 entries) without bounds checking.
Icons (img/allitem.img and copies in menu .pac files):
itemicon (sheet 1): cells 52 and 191 (予約, "reserved") are unused.
wepicon (sheet 0): cells 52, 110, 150, and 191 are unused (56 is the night-time icon for item 56, Lamb's Sword, selected when GetMenuItemIconTexGetXY adds 1 during time band 2).
3D models: Menu viewers (MenuItemChrLoadEndCheck, CMenuInvent::LoadCharaCheck) load item .chr packs without animations (0 of 168item/*.chr packs have .mot files).
Non-zero shares a single loaded model across instances.
Floor monster spawn tables (dungeon/cfg_file/mos_place<dungeon>.cfg):
Parsed by LoadMonsterFile (src/dng_event.cpp, 0x293BB0) using FLS floor, count; FL id_1, param_1, ...; FLE;:
FL writes (id, param) pairs into CMonsterLocateInfo (hard limit of 32 pairs: _FL at 0x292DB0 has no bounds check, and 32 * 2 = 64 hits SPI_STACK_SIZE). AutoSetMonster spawns up to 24 monsters per random floor.
param sets locate_param (-1 = non-talkable; >= 0 = talkable via CheckMonsterTolk, triggering event 1150 and _GET_MONSTER_TALK_DATA).
Photo subjects (USER_PICTURE_INFO.neta_id) come from map FUNC_INVENT_DATA points (3,039 points across 121.map files; see maps) or monster AI _SET_SCOOP calls. IDs < 1000 are Ideas ([bulb2]); IDs >= 1000 are Scoops.
Table / File
Loader / Symbol
Record Layout & Capacity Limits
Invention recipes (menu/inv6.lst and copies in inv2_bg.pac, photo_bg1.pac)
LoadFilePictureName reads menu/<LanguageCode>/neta2.lst (6 falls back to 1/) into a 0x5000-byte buffer (241 ideas 1..250 + 53 scoops; IDs 30000 and 30001 are ignored/reserved for NPC 260):
PIC_INFO n;
PIC_NAME id, "name", sort;
Buffer / Array
Capacity
Allocation & Ordering Rules
pic_name_text_buff_1660
0x248 (584) 16-byte units (583 usable)
Shared by PIC_NAME_INFO array (ceil(n * 8 / 16) + 2 units) and strings (ceil((strlen + 1) / 16) units each). ConvertFontCode collapses [UNIxxxx] tags only when LanguageCode >= 5 (0x200FCC), so FR/DE/IT keep 9-byte tags. Retail uses 491 (ja), 508 (en), 566 (fr), 533 (de), 539 (it), 536 (es) units.
UpdataNetaMemoStrsort_keys[0x184]
388 combined ideas + scoops
Sorts only the first known_ideas_count entries by sort = letter_group * 100 + rank (A = 0 in EN/FR/DE/IT; ¡ = 0, A = 1 in ES; kana row 0..50 in JA). All ideas (< 1000) must precede all scoops (>= 1000).
MenuInventNetaMemoDrawtext[0x20]
24 B for name (32 B minus "[bulb2]")
Formats "[bulb2]" + name (some retail FR/DE/ES names slightly overflow up to 33 B).
EDIT_PARTS_NUM n; then EDIT_PARTS "name"; ... EDIT_PARTS_END; -> CEditPartsInfo (0x280 B): ID (0..127), PARTS_NAME (must match .map part in CMap::GetParts), PARTS_ATR, GROUND_PARTS / BLOCK_PARTS / RIVER_PARTS / FENCE_PARTS, up to 4 PARTS_MATERIAL item, count;, CPOINT cat, pts;, WEIGHT, GEO_STONE, MAX_NUM, PAINT_NUM, PAINT_USED, PARTS_TYPE, PLACE_EPS, MAP_NO, POLYN, PARTS_COMMENT.
map/g/gNN/gNN.cfg
CEditMap::LoadEditInfo (emap_tag, 0x33ABB0)
FIX_EPARTS_START n; / FIX_EPARTS and INIT_EPARTS_START n; / INIT_EPARTS id, x, y, z, angle; (fixed obstacles and starting parts), plus rivers and water (section 6.2).
Georama limits:
384 parts/town (GEORAMA_PARTS_LIST_MAX), part IDs 0..127 (UpdateGeoramaPartsList; stock counts in CSaveData::build_parts_num[0x100] are global by ID across all 5 towns), and 256 placed parts/town (CEditMap::CreateTable).
Part name <= 47 bytes (GEORAMA_PARTS_LIST_ITEM::name[0x30]). Town g01.gpi file <= 0x77D0 bytes (MakeDownLoadAnaunce0x7800-byte stack buffer).
Hardcoded part IDs in C++: 7, 0x13, 0x1D, 0x23, 0x28..0x2B, 0x2F (conditions) and 1, 9, 0x16, 0x1F, 0x38, 0x46..0x48, 0x56, 0x57 (houses).
LoadEditAnalyzeData (src/editdata.cpp, tag__6 at 0x358B20) reads geo%d.cfg into AnalyzeSrc[5] (0x340 B/town). All strings share buff_1271 (0x3000 B = 0x300 16-byte units):
Statement
Arguments & Limits
Description
GEO_ANALYZE / END_GEO_ANALYZE
town (0..4)
Selects and clears town 0..4.
CONDITION
num, "text"[, geostone]
Sets label for condition 0..63 and unlock floor (dungeon * 100 + floor).
ANALYZE / END_ANALYZE
req, unread, "title"[, geostone]
Defines request 0..15 (data[16], 0x1C B each; retail towns have 9, 10, 9, 11, 10).
CON_NO
cond_1, ... (max 7)
Condition indices (0..63) required to complete the request.
ON_PARTS / OFF_PARTS
"part;part/piece;..."
Up to 16 map parts (64-byte buffer) shown or hidden when fulfilled (GetOnOffParts, PartsOnOff).
PERCENT
points
Completion percentage added to the town.
Hardcoded evaluation: AnalyzeSharlot, AnalyzeStera, AnalyzeBenietio, AnalyzeHeim, and AnalyzeMoonFlower (src/editanalyze.cpp) set condition[0..63] booleans in C++. .cfg edits can recombine existing conditions or change ON_PARTS/OFF_PARTS/PERCENT, but cannot add new condition logic.
FISH_PARAM (0x54 B × 19; row 0 empty): name/model ptrs, item ID, base/min/max cm, weight & race pts/cm, pull strength, s16[18] bait preferences (0..3, indexed by EsaInfo at 0x361A00), s16[4] time preferences.
Fishing spots
sg/fish/fishing.cfg (LoadFishPlaceData)
FISH_MAP_NUM n; FISH_MAP map[, exclusive]; FISH_PLACE kind, "name", f1..f5; FISH species_idx, rate, wait_bias; FISH_MAP_END;. Allocates nFISH_PLACE_MAP (0x88 B) records (22 retail blocks, 110 fish). Max 8FISH rows/spot (kFishPlaceMaxFish, no bounds check) and 1 FISH_PLACE/block (only kind = 2 checks x, z, radius). GetAppearFish collects up to 16 fish (falls back to map = -1).
Finny Frenzy racing
ELF fish_data (0x3630C0) & sg/gyo/rfd<lang>.cfg
grFISH_DATA (0x1C B × 18) for terrain/scaling. Opponents in rfd<lang>.cfg (4 classes, 216 fish): NUM class, count; DAT item, "name", colour, power, spd1, spd2, spd3, stamina, size;.
GRP count, values...; PRIZE val, item1, cnt1, item2, cnt2, item3, cnt3;. RefreshFishPrize picks group 3 * class + min(2, wins) (race) or contest index and reads only the first PRIZE row.
Monster Badge gift check (CheckGiftPack, src/monster.cpp, 0x1DF520): all 3 items in a thrown Gift Capsule (_COLPRIM_GET_GIFT) must equal item_id for the monster's gift_type.
GolfClubDef
0x361340
0x2613C0
{ f32 power, f32 unk_4, s32 unk_8 } × 7
Spheda club stats (GetSphidaClubDef indexes club_id - 9 for clubs 9..14; row 7 is unused; _SPHIDA_GET_CULB_DEF).
aquafish_mixTable
0x3535A0
0x253620
s8 { parent_a, parent_b, child }[171]
Aquarium breeding (GetChildFishNo, src/menuaqua.cpp, 0x20ED80): each byte is fish_item_id - 0x136 (fish IDs 0x136..0x150); matches parents in either order (defaults to 0x136).
LoadNPCCfg (src/npccfg.cpp) reads npc%d.cfg into a 64-byte-aligned 0x8000-byte buffer (0x7FD0 usable bytes) using npc_spitag (NPC_NUM n; NPC_INFO number, "name", "model", kind, abilities, points, cost_1, cost_2, cost_3, cost_4, debug;) and populates NpcBaseData[180] (NPC_BASE_DATA, 0x36 bytes):
Argument
Struct Field
Meaning
number
s16 chara_no
Unique townsperson ID (1..32 can join the party or live in Georama houses via CUserDataManager::party_chara[32], JoinPartyChara).
"name"
char name[0x1C]
Localized display name (27 bytes max; strcpy runs before the "NAME OVER" check).
"model"
char model[0x10]
Model base name (15 bytes max) for chara/%s.chr, event/train/t%s.chr, and menu/npc/t%s.chr.
kind
u8 unk_31
Message category offset returned by _GET_PARTY_CHARA_MES_NO (query 4).
abilities
u8 ability_num
Support ability count in the party menu (0..4).
points
u8 max_npc_point
Maximum ability/stamina points (Kizuna / Recruitment points).
cost_1..4
u8 ability_cost[4]
Point cost for each of the 4 abilities.
debug
u8 debug_flag
Debug menu selection flag.
Capacity: npc_spi_count_num (u8) increments without bounds checking. NpcBaseData[180] holds at most 180 records (+3 over the retail 177).
Dialogue and placement: Dialogue IDs in npcmsg.mes use typetbl[type] + number * 100 (GetPartyCharaMessage). Town standing positions come from npc_place*.cfg (VlgrPlace[0x200]).