Repository navigation
Drivers Blades Party
What the data layer knows about the characters you control: how many drivers and Blades there are, how Blades are attached to drivers, what a driver's stats and levels are made of, the Kizuna Ring achievement structure, trust (affinity) rank, the favourite-item "pouch", and the party. Files are in src/application/BF2/gf/data/ (D/ below) and src/application/BF2/gf/game/ (G/). Save-file layouts are in Save-Data. Reading guide: Home. Snapshot: main at commit a313ecb66.
About names. Driver and Blade ids appear as numbers; the repository's constants (DRIVER_UNKNOWN_n, BLADE_UNKNOWN_n, and a few named ones such as BLADE_HOMURA, BLADE_HIKARI) carry inferred names, so this page uses ids and roles, not character names. Members named unknownXX carry inferred roles; the page says "inferred" when it leans on one.
-
Capacity. 16 driver records of
0x5a0bytes (DRIVER_UNKNOWN_16).getSDataDriver(driver)indexesdriver - 1; an out-of-range id silently falls back to record 1 (alsogetDriverID,getDriverRelativeID).isDriveraccepts ids 1 to 9 (D/gf_data_driver.cpp). -
Level cap and base stats. The level cap is 99. Base stats are a straight line between the level-1 and level-99 columns of the driver's
CHR_Drrow:value = Lv1 + (Lv99 - Lv1) * (level - 1) / 98, for HP max, Strength, Ether power, Dexterity, Agility and Luck (GfDataDriver::calcDriverBaseParamByLevel, with the accessors ofGfBdatChrDr). Armour and critical/guard rates are separate (see Battle-System for what battle adds on top). -
Level-up.
isEnableLevelUp:level < 99,level < growEnd - 1andexp + battleExp >= growLevelExp(level + 1).expandbattleExpare two separate counters (offsets0xb0,0xb4).getExpUsedsumsgrowLevelExp(1..level);getExpNextLevelisgrowExp(level + 1) - battleExp, clamped, 0 at level 99 (table accessors inGfBdatBtl). -
Driver arts unlock (
openDriverArtsForLevelup,openDriverArtsForSetWeapon): the driver-arts table is scanned and an art is released at level 1 when all hold: its weapon type matches the Blade's; the driver has that weapon type activated and can equip it; the art's driver column is this driver; the art is not flagged "normal"; the driver's level is at least the art'sReleaseLv1(or the game is in a debug mode); and the art is still at level 0. The art goes into slotpriority - 1and a "got arts" event fires. The level-up variant looks at all party Blades; the set-weapon variant only at the newly equipped one. -
Weapons. 28 weapon-type records per driver (3 art slots, weapon points, total weapon points) and a 28-bit "activated weapon types" set recording every type the driver has ever had.
isEnableEquipWeaponis true when theCHR_Drweapon-type column for that type holds a value from 1 to 4 (0 means cannot equip). Driver arts levels are a0x280-byte array indexed by arts id. -
Blade slots. Driver id 1 has 5 Blade slots, every other driver 3 (
getMaxSetBladeNum).blade set(offset0x24) is the current slot, signed, -1 = none;getBlade(driver, -1)uses the current slot. - Blade stat bonuses. A driver's HP, Strength, Ether, Dexterity, Agility and Luck "Rev" values are the sum of those columns over every equipped Blade. For driver 1, if Blade 1002 is owned but not slotted its bonus is added anyway.
-
Slot rules for driver 1 (
getRuleSetBlade): Blade 1002 is placed in slot 3 when Blade 1001 sits in slot 0; Blade 1003 always goes in slot 4. The "dummy" Blades are 1012 (driver 1), 1013 (driver 7) and 1073 (driver 9);isDummyBladeaccepts exactly those. -
Who can equip which Blade (
isEnableEquipBlade): the Blade's "set driver" must be 0 or this driver; for drivers other than 1 the Blade's creator must be that driver; driver 1 may equip any Blade that has a creator when the creator is driver 1, orGfGameManager::isRexAwakening()holds, or the game has been cleared (GfDataUtil::isClearGame()). -
Activation states.
unknown20: 0 unused, 1 active.getDriverActivateType: unused = 0; active and in the party = 2; active but not in the party = 1 (reserve). Party ids 0 to 2 are the battle party; ids 3 to 9 are reserves. - Other fields. Attached-party flag, default-accessory flag, scenario mask, 2-bit Kizuna ring completion (first and second ring), 2 accessories (item handle and id), a skill-point pool with a "total earned" counter that only grows on positive adds, 5 skill rows plus 5 hidden rows (inferred).
-
Not decompiled:
unsetBlade(0x710029fb14, 1,204 bytes),setBlade(864),setActivateParty(1,244),setActivateReserver(756),setupSDataDriver(508),initSaveData,getClass,getValidEnhanceand more. So how a Blade is attached or removed is only partly visible.
-
Capacity and id ranges. 422 Blade records of
0x8a4bytes.getBladeID(index)maps record index to Blade id: indexes 0 to 19 are ids 1001 to 1013 (the "regular", story Blades; indexes 13 to 19 give 0), indexes 20 to 195 are ids 1014 up to the end of theCHR_Bltable (the "rare" Blades, at most 176 slots), indexes 196 to 421 are ids 1197 to 1422 (the "common" Blades, 226 ids).isRegularBladeis 1001 to 1013,isRareBlade1014 up toGfBdatChrBl::getChrBlEnd(),isCommonBlade1197 to 1422. Of the common ids, 1197 to 1396 (200) are the pool thataddCommonBladesearches; 1397 to 1400 are "UI common" and 1401 to 1422 "act common" (inferred). Ids 1051 to 1072 are "act" Blades that map to 1401 to 1422 (+350). Three Blades, 1005 to 1007, form a group (the "hana" group, inferred). -
Adding Blades.
addRareBladeonly succeeds if the slot is currently unused;addCommonBladetakes the first unused record in 1197 to 1396. Both then callsetActivateReserver(not decompiled) and unlock the driver arts of the creator driver's weapon type. How a created Blade reaches this point is the subject of Blade-Creation. -
Activate state (
unknown00): 0 unused, 1 driver (with a set driver: equipped, without: reserve), 2 mercenary team.setUnselecthides a Blade from lists; most lists exclude unselected and dummy Blades. The field-skill list walks the first 8 party members and collects each one's equipped Blades. -
The special Blade pair.
isDisableHomuraHikarihides whichever of 1001 and 1002 is not the current form; both must be in the party or both absent, otherwise neither is hidden.isHikariCurrent/setHikariCurrentread and write one byte of the save (see Save-Data). -
Ideas. A Blade has four idea types (
SDataIdea: 4 pairs of point and level), idea level cap 10, thresholds from theBLD_Ideatable; see Blade-Creation for the point-to-level rule and the attribute pairs. -
Trust (affinity) rank. Stored as trust points (u16, cap
0xffff) and a trust rank. Via a Kizuna Ring: the rank goes up by 1, up to a hard cap of 6, each time the key line step completes (GfGameUtil::addTrustRankForKizunaRing). Via points: only when the Blade's whole achievement set is complete (isCompleteAchievement, not decompiled); while the rank is in 6 to 15 it rises whileFLD_IdeaTable.TrustPoint[rank] <= total(16 is the exclusive limit). Displayed rank: the stored rank, minus 1 when the Blade is set to a driver other than its creator and the rank is above 1; stored ranks 7 to 15 display as 6; a Blade with no set driver counts the creator as its driver (GfGameUtil::getTrustRank). -
Kizuna Ring structure. Each Blade has 10 lines of 5 levels = 50 achievement ids. Lines 0 to 2 are arts, 3 to 5 Blade skills, 6 to 8 field skills, line 9 the "key" line. For an achievement id: line
= (id - 1) % 50 / 5, level= (id - 1) % 50 % 5 + 1; the quest prefix isbladeRelativeId * 50 + line * 5 + level(GfDataQuest::getAchievementLine/Level,GfDataBlade::getAchievementQuestPrefix).getKizunaringMaxcounts achievement tasks that exist,getKizunaringCompleteNumthose completed. Each record stores 3 arts and 3 normal arts (id, level, max level, release level), 3 skills and 3 field skills, 4 extra-parts bytes, 2 favourites, 3 orb slots and an equip block. Crown points (getCrownPoint): regular and rare Blades have 5; common Blades get 1 to 4 by comparingkizunaringMaxwith wildcard values 63 to 66 (fromGfBdatBtl), fallback 1. The reward of a completed ring is chosen byGfKizunaringUtil::getCompleteKizunaringReward: aBLD_CreateConfigrow{0, 0x31, 0x35, 0x39, 0x3d, 0x41}[crownPoint] + mtRand(4)gives a reward-set id. -
Blade power (
getBladePower): the sum of the 4 idea levels, plus, for each of 3 arts, 3 skills and 3 field skills with a non-zero level,(level * 2.5 + achievementDifficulty) * 0.5(difficulty fromFLD_AchievementList.DifficultythroughFLD_AchievementSetat level - 1); the total is rounded up and capped at 99. -
Voice and names.
makeNormalTalkByPersonalitymapsBTL_Bl_PersonalityVoiceID(base 61, 32 entries) to a message id range; the model-resource name of a common Blade tests for abl/bl2prefix; weapon-type suffixes are"",_01to_20. -
Not decompiled:
setActivateDriver(2,424 bytes),setupSDataBlade(3,808),setActivateReserver,setActivateUnuse(1,208),isCompleteAchievement(1,120),getEnableCountForCreateBlade(164),getNArts,getBladeByWeaponType,getListStatsand more.
- Each driver has 3 pouch slots (
SDataPouch: a float time, an item, an "opened" byte). Opening a slot consumes a specific item (ITEM_UNKNOWN_25305) and slots open in order 0, 1, 2 (GfPouchUtil::execOpen,src/application/BF2/gf/game/item/gf_pouch_util.cpp). -
Tick. A pouch item is consumed from the item box one at a time. Its timer is
GfDataItem::getFavoriteItemTime, or 180 s when that is 0 or below. When the timer hits 0 the next copy is consumed; if none are left the pouch empties and a popup shows. On each consumption the item's favourite trust points are added to every Blade the driver has equipped. Placing an item also marks "used favourite" on the driver and Blades. -
Effect factor.
1.0plus, for each of the 3 party drivers and each of their equipped Blades, a bonus over that character's 2 favourite slots: +0.5 when the item's favourite category equals the character's favourite category, and +1.0 more when the item equals the favourite item. Drivers' favourites come fromCHR_Dr(getChrDrFavoriteCategory/Item(driver, 0/1)); Blades' favourites are stored in the save (2 entries of category, item, used category, used item). The effect type isgetFavoriteItemType(item). -
Matching.
getPouchEnhanceFavoritebuilds a list of up to 64 entries (rate 1.0, type, driver state, Blade state); state 2 = favourite item matched, 1 = category matched, 0 = none; only items with a non-zero favourite type are listed. The driver's "used" bits live in the 8-bit game flag0xf8c + driver(see Save-Data).
-
Save party (
unknown124,D/gf_data_party.h): 10 member slots of (driver, hierarchy driver, hierarchy Blade) as u16; slots 0 to 2 are the battle party, 3 to 9 reserves; also leader (object type and id), saved leader, party gauge (u16) and two "clear" Blade ids (inferred).setDriver(member, driver)resets the member's hierarchy fields and returns true if the driver changed.getSavePosandgetSaveRotread 3 saved positions and rotations each for drivers and Blades. -
Fixed handle ids of party objects (
GfDataParty::getFixedHandleFor*): drivermember; Blade3 + member * 5 + slot; weaponmember * 5 * 8 + slot * 8 + weapon + 3 * 6; 8 weapons per Blade. That gives 3 drivers, 15 Blade handles and 120 weapon handles. -
Ride character.
isNiaByakko(member)is true when the member is driver 2, its current Blade is 1004 and the party leader is driver 2 or 1004. -
Runtime party (
GfGameParty): 3 member infos (driver handle, 5 Blade handles, a third "trinity" Blade handle, status property) and 6 stored positions; party member objects go through states none, loading, ready (ready requires at least 2 frames, capped at 100). Selection lists: drivers (cap 16) by party, reserve, both, unused, accessory; Blades (cap 422) by party, reserve, both, all (from index 20, not mercenary, not unused), mercenary. -
New game.
GfManager::setupNewGamebuilds the starting party (GfGameParty::setupNewGameParty); see Save-Data.