Repository navigation
World Progression
Kevin Bonnoron edited this page Nov 21, 2026
·
1 revision
The rules that govern how the world and your standing in it change: nation development levels and what they do to shops, the mercenary (Blade missions) system, the quest data layer and the zone and map data. Files in src/application/BF2/gf/data/ (D/), src/application/BF2/gf/game/ (G/) and src/application/BF2/gf/util/. Reading guide: Home. Snapshot: main at commit a313ecb66. Nation and map names in the source are inferred labels, so the page uses ids.
GfDataDevelop (D/gf_data_develop.cpp), driven by GfGameUtil (G/gf_game_util.cpp).
-
Storage. 8 nations (ids 1 to 8). Points: a 16-bit game flag at index
5 + nation(cap0xffff). Level: a 4-bit flag at index0x27b + nation, clamped to 1 to 5 (getLevel(0)andgetLevel(>8)return 0). See Save-Data for the flag store; new game data resets every nation's level to 0. -
Thresholds. The
FLD_DevelopmentLeveltable: levels 1 to 5 use the values at rows 3 to 7; the point cap is row 7. -
Level-up (
GfGameUtil::execDevelopLevelUp): for nations 1 to 8 it sets the highest level (5 down to 1) whose threshold is reached and above the stored level, shows a "develop" notice on change and re-checks quest tasks. -
Adding points (
GfGameUtil::addDevelopPoint(nation, points)): the added amount ispoints + OwnerBonus[index 5]; nation 0 maps to 1. At scenario flag0x1f65(8037, the flag the code calls "Arcadia destroyed",GfDataMap::isArcadiaDestroy), points that would go to nation 6 go to nation 5 instead, andGfGameUtil::execAddDevelopPointArcadia2Iyasakimoves nation 6's stored points to nation 5 and resets nation 6 (called fromGfGameScene). Nation 5 and 6 names are the repository's inferred labels. -
Sources of points: landmarks give a development reward (
SCOM_ADD_DEVELOP(developZone, get_DPT), see Field-Gimmicks). -
Effect on shops (
GfItemUtil::getPrice,src/application/BF2/gf/util/gf_item_util.cpp; the inn price version inG/gf_game_util_shop.cpp): the inn price and the item buy price are reduced byShopList.Discount[level - 1]percent, wherelevelis the development level of the current map's zone:buy = price - price * discount * 0.01, minimum 1. Sell price isprice / 2. Two other derived prices areprice * 0.01andprice * 0.005(each minimum 1); their roles are unclear. -
Effect on NPC talk. The development level indexes a BDAT row used for an NPC talk payout (
gf_npc_state_talk.cpp); the exact meaning is not established.
D/gf_data_mercenaries.cpp, with save layout in Save-Data.
-
Level and points. Level: 4-bit flag index 2, maximum 5. Points: 16-bit flag index 3; the per-level maximum comes from wildcard data values indexed through the table
{0, 59, 60, 61, 62, 0}(so level 0 and level 5 give 0) and a global limit from wildcard row 62. -
Team capacity.
getTeamMax: 1 team at level 1 or below, 2 at levels 2 and 3, 3 at level 4 and above. The save holds up to 3 teams; each has 6 member slots (u16 Blade ids), a mission quest id, team id, mission id, a float elapsed time and two elapsed-time structures. There are also 40 saved presets of 6 Blades. -
Reserve capacity (how many Blades you can hold):
getReserverMax = level * 24 + 24 + (48 when the game clear count is non-zero). -
Mission state machine. A 4-bit flag at index
5 + mission: 0 none, 1 order enabled, 2 expedition, 3 reward, 4 complete.isEnableOrderis true for state 0, or state 4 when the mission is repeatable (FLD_MercenariesMission.Repeatable).setMissionFlagalso updates two 2-bit progress flags (1 for states 2 and 3, 2 for state 4; not downgraded once at 2). Separate 1-bit flags track "new mission" (cleared once seen) and "ever completed". -
Mission data. A row of
FLD_MercenariesMissiongives a quest id, a request performance (also the base time throughgetMissionTime), a category,Repeatable, and the first and last mission ids. The quest leads throughListNextQuestAto a purpose whose tasks hold the requirements (up to 4 tasks); required map and field skills come from the quest's hints (HintsZoneID,HintsFSkillID1..3). If "Arcadia destroyed" holds and the map is 12, the mission's map becomes 14. -
Mission duration (
GfDataMercenaries::getTeamMissionTime):time = base * (100 - 6 * totalFieldSkillLevel) * 0.01, floored atbase * (configRatio * 0.01 + 0.001)and at 1 second.totalFieldSkillLevelsums, over the mission's up-to-3 required field skills and over all team members, each Blade's level in that field skill (searching its three field-skill slots).configRatioisFLD_MercenariesConfigvalue 17. The 6 per unit is the constantunknown025 = 6.0f(inferred role: "field skill time reduction per level"). -
Timer.
decTeamMissionTimeaccumulates float seconds into hours, minutes and seconds and subtracts them from the remaining time; it returns true on the frame the time first reaches 0. -
Reward. Repeat completions use reward set B (
ListRewardSetB) when the mission is repeatable and already completed, otherwise set A. The reward achievement ratio islevel * 5 + config[16]. -
Which Blades fit a mission (
isEnableMissionBlade): a Blade satisfies aFLD_RequestBladerow only if all its non-zero conditions hold: weapon type equals the category; attribute equals the requested attribute; Blade power is at least the request performance (see Drivers-Blades-Party); quest race matches (1 human, 2 animal, inferred); gender matches (4 means any); it has the required arts at the required level (checking 3 arts slots); it has the required field skill at the required level (checking 3 slots).getRequestConditionreports the first non-zero requirement in the order category, attribute, performance, race, gender, arts, field skill. -
Not decompiled:
getReserverNum,isReserverFill,isTeamEnableDestroy,isMissionOrderParty,addTeam.
-
Tables.
GfBdatQuestwraps the quest lists (FLD_QuestList,FLD_QuestListNormal,FLD_QuestListMini,FLD_QuestListMercenaries,FLD_QuestListAchievement,FLD_QuestListBlade), the task tables (FLD_QuestTaskand the same variants), the detail tables (FLD_QuestBattle,FLD_RequestItemSet,FLD_QuestCollect,FLD_QuestUse,FLD_QuestReach,FLD_QuestTalk,FLD_QuestTalkDummyGroup,FLD_QuestGimmick,FLD_QuestFieldSkillCount,FLD_RequestBlade,FLD_QuestCondition),FLD_QuestHints,FLD_QuestEvent,FLD_QuestReward,FLD_QuestRewardRandom, the achievement tables (FLD_Achievement,FLD_AchievementSet,FLD_AchievementList) and the mercenary, field-skill and development tables (FLD_MercenariesConfig,FLD_MercenariesMission,FLD_FieldSkillList,FLD_FieldSkillSetting,FLD_FieldSkillRandom,FLD_DevelopmentLevel). The first six lists load into oneQuestListAccwith category numbers: QuestList 1, Mini and Normal 3, Mercenaries 5, Blade 2, Achievement 6. Each list row has aPurposeIDthat selects its task rows. -
Quest id and category. A
QuestIDis two u16: the BDAT id and a sub-id that carries the achievement id for achievement quests.GfDataQuest::getListQuestCategoryclassifies by id range: 0 gives 0; below 1000 gives 1; below 5000 gives 3; below 6000 gives 2; below 7000 gives 5; 7000 and above gives 6.getQuestCategoryfirst uses the BDAT category and falls back to the parent quest's range category. -
Chains. Next-quest A and B ids 30000 and 30001 mean "none". The parent quest keeps the sub-id, or takes its high 16 bits when the sub-id is 0. There are also flags for parent and child (
ListFlagPRT,ListFlagCLD) and two call-event ids. -
Task types (inferred roles,
gf/game/quest/gf_quest_task_param.h): 1 battle, 2 request item set, 3 collect, 4 use, 5 reach, 6 talk, 7 talk to a dummy group, 8 gimmick, 9 request Blade, 10 condition, 11 field-skill count, 12 achievement. Type 10 reads a game-flag condition fromConditionFlag(flag id, min, max);getHanyouFlgonly accepts flags in0x8b0to0x8b0 + 0x5dc. -
Order timing list. Up to 330 quests in the 16-bit flag range
0x619to0x763record the order in which sub quests were accepted; quests of category 5 and above, or with an auto-start flag, are skipped and duplicates ignored. - Other save fields. The current scenario quest and selected quest; 256 "order parent quest" entries; 128 task achievements; an achievement-to-Blade table built at runtime.
-
Quest battle conditions are read by
BattleManager::QuestTaskProc(see Battle-System); quests report from gimmicks (SCOM_QUEST_GIMMICK,SCOM_QUEST_REACH; see Field-Gimmicks) and events (see Event-System).
-
Zones. 8 zones. The zone to map table is
{1: 3, 2: 6, 3: 9, 4: 10, 5: 14, 6: 12, 7: 13, 8: 15};getFieldZoneIdmaps field zone 0 to 6 to zone ids 1, 2, 3, 4, 7, 5, 6; map 15 always counts as zone 8. Zone ids and nation ids are the same numbers (the shop code usesGfDataDevelop::getLevel(zone)directly). -
Completion flags. 1-bit flags at
0x33d2 + map(map complete) and a single flag0x33e1(zone complete). "Arcadia destroyed" is true when the scenario flag is at least0x1f65(8037). -
Map jump. Map ids resolve through the BDAT sheets
SYS_MapJumpListandSYS_MapJumpEvList(columnMapList);getMapJumpIDis the reverse lookup. -
Map list columns (
GfBdatMaplist,gf_bdat_maplist.cpp):resource,select,rscGmkId,nameID,name_cndID,change_nameID,mapON_cndID,bgm_cndID,zone,mapATR,weatherATR,e_repoptime,m_repoptime,ene_disp_r/h,ene_release_r/h,e_balloondisp_r,stopTIME_cndID,st_allOFF_cndID,st_OFF_cndID; weather: 4 slots (watowd) each withtype,pop_rate,time_BNS,end_time,ON_cndID,OFF_cndID, pluswind_mor/non/eve/nit/mnit/emorandwind_WA..WD; alsoebb_ON_cndID,ebb_inn_cndID,ebb_pop_rate(meaning not established).getWeatherTypereturns "invalid" (21) for slot 4 and above. -
Cloud sea. Each of the 64 per-map info entries stores a 0 or 1 "cloud sea high/low" flag;
resetCloudTypeclears them all.
Drivers-Blades-Party, Field-Gimmicks, Event-System, Save-Data, Battle-System