|
|
Line 567: |
Line 567: |
| }} | | }} |
|
| |
|
| == Random revival (RevivalRandom) == | | == 隨機重生的物件 (RevivalRandom) == |
|
| |
|
| Objects under the RevivalRandom policy will be revived at random times ''independently of'' blood moons. This is used for most materials (fruits, rocks, etc.) | | Objects under the RevivalRandom policy will be revived at random times ''independently of'' blood moons. This is used for most materials (fruits, rocks, etc.) |
Revision as of 23:57, 28 May 2020
曠野之息裡的材料、武器、跟敵人會在一段時間後重生。這個機制是為了防止遊戲世界變得「太空曠」。確切的重生規則取決於每種東西的特性。
GameData 裡用來追蹤每個東西應該如何重生的 flag 叫做 "revival flags"(復活標籤)。這些 revival flags 無時無刻都存在遊戲的記憶體裡,即使是相應的物件可能並不存在。
商品
商店裡賣的東西會在子夜時更新(商店會補貨),但是必須滿足下面這些條件:
- 每件商品都會對應到一塊區域,玩家在補貨的當下不能處在個範圍內。
- 箭類的物品只有在玩家持有少於 50 [1] 個時才會補貨。
[1.3.1+] 檢查玩家持有多少箭的函數會檢查玩家「真正的」口袋。所謂「假的」口袋則是指玩家在劍之考驗之類的特殊任務裡,物品欄會被暫時清空。換句話說,故意進入這些特殊任務不再會讓 GameDataMgr 誤以為玩家箭很少,進而補貨。
商品的 Revival flags 裡,GameDataMgr 這一項被設成 3。(意思是凡是設成 3 的物品都會遵守上面講的商店補貨的邏輯。)
重生用地圖網格
上面提到的商品和另一類隨機重生的物件(下面會詳述)使用的地圖網格和正常的地圖網格有一點點不同。這裡用到的地圖網格有 10 columns (從 0 到 9)和 8 rows(從 0 到 7)。
假設一件商品(或一個隨機重生的物件)位在第 itemCol
個 column 跟第 itemRow
個 row 裡,那麼玩家「不在指定區域內」的意思是
- itemCol < playerCol1
- 或 itemCol > playerCol2
- 或 itemRow < playerRow1
- 或 itemRow > playerRow2
玩家的位置(playerCol1、playerCol2、playerRow1、playerRow2)是這樣計算的:
int col = std::clamp(((signed int)x + 5000) / 1000, 0, 9);
int row = std::clamp(((signed int)z + 4000) / 1000, 0, 7);
if ( (col + 0.5) * 1000.0 + -5000.0 >= x ) {
*col1 = col - 1;
*col2 = col;
} else {
*col1 = col;
*col2 = col + 1;
}
if ( (row + 0.5) * 1000.0 + -4000.0 >= z ) {
*row1 = row - 1;
*row2 = row;
} else {
*row1 = row;
*row2 = row + 1;
}
This grid is shown on the object map. It is also possible to show the no-revival area for an object by right clicking on it.
血月重生機制 (RevivalBloodyMoon)
血月 blood moon 是大部分武器跟敵人重生的關鍵。每次血月出現後,所有跟血月有關的 revival flags 都會被重設為預設值。
對於這一類的物品,GameDataMgr 這一項的值是 1。(換句話說,所有 ResetType 是 1 的物品都會在血月後復活。)
ExpandActors under the RevivalBloodyMoon policy
不自動重生的物件 (RevivalNone)
遵守 RevivalNone policy 的物件不會自動重生。這些物件的列表如下。
ExpandActors under the RevivalNone policy
- Ancient Arrow (Obj_AncientArrow_A_01)
- Ancient Arrow x3 (Obj_AncientArrow_C_01)
- Ancient Arrow x5 (Obj_AncientArrow_B_01)
- Ancient Core (Item_Enemy_30)
- Ancient Gear (Item_Enemy_26)
- Ancient Screw (Item_Enemy_27)
- Ancient Shaft (Item_Enemy_29)
- Ancient Spring (Item_Enemy_28)
- Arrow (Obj_ArrowNormal_A_01)
- Arrow x10 (Obj_ArrowBundle_A_02)
- Arrow x5 (Obj_ArrowBundle_A_01)
- Arrow x[NUMBER] (Obj_ArrowBundle_A_10)
- Blue Rupee (PutRupee_Blue)
- Bokoblin Guts (Item_Enemy_02)
- Bomb Arrow (Obj_BombArrow_A_01)
- Bomb Arrow x10 (Obj_BombArrow_A_03)
- Bomb Arrow x20 (Obj_BombArrow_A_04)
- Bomb Arrow x5 (Obj_BombArrow_A_02)
- BreakableRock
- Calamity Ganon (Enemy_Ganon)
- Ceremonial Trident (Weapon_Spear_049)
- Daruk's Protection (Obj_HeroSoul_Goron)
- Daruk's Protection + (Obj_DLC_HeroSoul_Goron)
- DgnObj_WallCrack_C_01
- DgnObj_WallCrack_Wind_A_02
- Fire Arrow (Obj_FireArrow_A_01)
- Fire Arrow x10 (Obj_FireArrow_A_02)
- Fire Arrow x5 (Obj_FireArrow_A_03)
- Fireblight Ganon (Enemy_SiteBoss_Lsword)
- Fireblight Ganon (Enemy_SiteBoss_Lsword_R)
- FldObj_AssassinPicture_A_01
- FldObj_AssassinPicture_A_02
- FldObj_BreakableRockDeathMT_A_01
- FldObj_BreakableRockDeathMT_A_02
- Giant Ancient Core (Item_Enemy_31)
- Gold Rupee (PutRupee_Gold)
- Green Rupee (PutRupee)
- Guardian Scout II (Enemy_Guardian_Mini_Practice)
- Heart Container (Obj_HeartUtuwa_A_01)
- Hestu's Maracas (Obj_Maracas)
- Ice Arrow (Obj_IceArrow_A_01)
- Ice Arrow x10 (Obj_IceArrow_A_02)
- Ice Arrow x5 (Obj_IceArrow_A_03)
- IceWall
- IceWallRuins
- IceWallRuins_Challenge
- IceWall_100enemy
- IceWall_Tower
- Korok Seed (Obj_KorokNuts)
- Lizalfos Tail (Item_Enemy_05)
- Master Kohga (Enemy_Assassin_Senior)
- Master Sword (Weapon_Sword_070)
- Medoh's Emblem (Obj_DLC_HeroSeal_Rito)
- Mipha's Grace (Obj_HeroSoul_Zora)
- Mipha's Grace + (Obj_DLC_HeroSoul_Zora)
- Naboris's Emblem (Obj_DLC_HeroSeal_Gerudo)
- Obj_CursedStatue
- Obj_RockBroken_A_02
- Obj_ThunderRock
- One-Hit Obliterator (Weapon_Sword_502)
- Purple Rupee (PutRupee_Purple)
- Red Rupee (PutRupee_Red)
- Revali's Gale (Obj_HeroSoul_Rito)
- Revali's Gale + (Obj_DLC_HeroSoul_Rito)
- Rudania's Emblem (Obj_DLC_HeroSeal_Goron)
- Ruta's Emblem (Obj_DLC_HeroSeal_Zora)
- Sentry (RemainsFire_Drone_A_01)
- Shock Arrow (Obj_ElectricArrow_A_01)
- Shock Arrow (Obj_ElectricArrow_B_01)
- Shock Arrow x10 (Obj_ElectricArrow_A_02)
- Shock Arrow x5 (Obj_ElectricArrow_A_03)
- Silver Rupee (PutRupee_Silver)
- Spirit Orb (Obj_DungeonClearSeal)
- Stamina Vessel (Obj_StaminaUtuwa_A_01)
- Thunderblight Ganon (Enemy_SiteBoss_Sword)
- Thunderblight Ganon (Enemy_SiteBoss_Sword_R)
- Travel Medallion (Obj_WarpDLC)
- Treasure Chest (TBox_Field_Enemy)
- Treasure Chest (TBox_Field_Iron)
- Treasure Chest (TBox_Field_Iron_NoReaction)
- Treasure Chest (TBox_Field_Iron_NoReaction_Aoc)
- Treasure Chest (TBox_Field_Iron_NoReaction_Aoc_long)
- Treasure Chest (TBox_Field_Iron_NoReaction_Collabo)
- Treasure Chest (TBox_Field_Stone)
- Treasure Chest (TBox_Field_Stone_NoReaction)
- Treasure Chest (TBox_Field_Wood)
- TreasureSpot_00
- TwnObj_HyruleCastleObject_Wallcrack_Before_A_01
- TwnObj_HyruleCity_Tower_WallCrack_A_01
- Urbosa's Fury (Obj_HeroSoul_Gerudo)
- Urbosa's Fury + (Obj_DLC_HeroSoul_Gerudo)
- VolcanoEruptionField
- WallCrack
- WallCrack_Wind
- Waterblight Ganon (Enemy_SiteBoss_Spear)
- Waterblight Ganon (Enemy_SiteBoss_Spear_R)
- Windblight Ganon (Enemy_SiteBoss_Bow)
- Windblight Ganon (Enemy_SiteBoss_Bow_R)
不重複掉落的物件 (RevivalNoneForDrop)
遵守 RevivalNoneForDrop policy 的物件也不會再次出現。這個類別主要包含了壞掉的守護者(眼睛不會亮的)底下的材料。
ExpandActors under the RevivalNoneForDrop policy
- FldObj_RuinGuardianSand_A_Dynamic
- FldObj_RuinGuardianSnow_A_Dynamic
- FldObj_RuinGuardian_A_Dynamic
不重複使用的物件 (RevivalNoneForUsed)
這一類的物件主要包含勇導石(林克拿希卡石去碰的東西),這些物件只能使用一次。
ExpandActors under the RevivalNoneForUsed policy
- BM_Relief
- Desert Voe Headband (Mannequin_006_Head)
- Desert Voe Spaulder (Mannequin_006_Upper)
- Desert Voe Trousers (Mannequin_006_Lower)
- DgnObj_AncientReactor_B_01
- DgnObj_AncientReactor_B_01_on
- DgnObj_DownloadTerminal_A_01
- DgnObj_DungeonEntranceSP
- DgnObj_DungeonEntranceSP_Far
- DgnObj_EntranceTerminalSP
- DgnObj_EntranceTerminal_A_01
- DgnObj_RemainsLithogragh_A_02
- DgnObj_RemainsLithograph_A_01
- DgnObj_RemainsTerminalBody_A
- Flamebreaker Armor (Mannequin_005_Upper)
- Flamebreaker Boots (Mannequin_005_Lower)
- Flamebreaker Helm (Mannequin_005_Head)
- FldObj_DownloadTerminal_A_01
- FldObj_DownloadTerminal_A_02
- FldObj_Terminal_A_01
- Gerudo Sirwal (Mannequin_007_Lower)
- Gerudo Top (Mannequin_007_Upper)
- Gerudo Veil (Mannequin_007_Head)
- Hylian Hood (Mannequin_001_Head)
- Hylian Trousers (Mannequin_001_Lower)
- Hylian Tunic (Mannequin_001_Upper)
- Korok (Npc_HiddenKorokFly)
- Korok (Npc_HiddenKorokGround)
- Radiant Mask (Mannequin_008_Head)
- Radiant Shirt (Mannequin_008_Upper)
- Radiant Tights (Mannequin_008_Lower)
- ShutterKey
- Snowquill Headdress (Mannequin_004_Head)
- Snowquill Trousers (Mannequin_004_Lower)
- Snowquill Tunic (Mannequin_004_Upper)
- Soldier's Armor (Mannequin_002_Upper)
- Soldier's Greaves (Mannequin_002_Lower)
- Soldier's Helm (Mannequin_002_Head)
- Stealth Chest Guard (Mannequin_003_Upper)
- Stealth Mask (Mannequin_003_Head)
- Stealth Tights (Mannequin_003_Lower)
- SwitchCandlestickAncient
- SwitchCandlestickAncientOn
- Treasure Chest (TBox_Dungeon_Iron)
- Treasure Chest (TBox_Dungeon_Iron_050)
- Treasure Chest (TBox_Dungeon_Iron_FinalTrial)
- Treasure Chest (TBox_Dungeon_Iron_Hanged)
- Treasure Chest (TBox_Dungeon_Stone)
- Treasure Chest (TBox_Dungeon_Wood)
- Treasure Chest (TBox_Dungeon_Wood_AreaCulling)
- Treasure Chest (TBox_Field_Iron_GodTree)
- TwnObj_AncientCandlePoleRoofOff_A_01
- TwnObj_AncientReactorCoreOff_A_01
- TwnObj_AncientReactorCore_A_01
- TwnObj_ArtifactObservationPostBed_A_01
- TwnObj_GateKeeperBed_A_01
- TwnObj_HeburaLodgeBed_A_01
- TwnObj_HunterHouseBed_A_01
- TwnObj_Village_KorokBed_A_01
- TwnObj_Village_SakuradaBed_A_01
- TwnObj_Village_ZoraFacilityBed_A_01
- Warm Doublet (Mannequin_009_Upper)
隨機重生的物件 (RevivalRandom)
Objects under the RevivalRandom policy will be revived at random times independently of blood moons. This is used for most materials (fruits, rocks, etc.)
Revival flags for objects under this policy have their GameDataMgr set to 0 and the position of the object on the main map is stored in the upper 7 bits of the initial flag value.
ExpandActors under the RevivalRandom policy
RevivalRandom and RevivalRandomForDrop logic
Every 60 seconds[2], RadarMgr determines where the player is on the revival grid.
If the player is on AocField (Trial of the Sword):
- Special flags (with the reset data set to 127) are skipped.
- Any other revival flag has a 1% chance of being reset.
Otherwise:
- If the player is on MainField, special flags have a 1% chance of being reset.
- If the player is not on MainField, non-special flags also have a 1% chance of being reset.
- In any other case, flags have a 1% chance of being reset, but only if the player is not in the same map area as the object that is to be revived.
Random drop revival (RevivalRandomForDrop)
Drops of objects under the RevivalRandom policy will be revived at random times independently of blood moons. This is used for wooden boxes and other things that contain materials (fruits, etc.)
Revival flags for objects under this policy have their GameDataMgr set to 0 and the position of the object on the main map is stored in the upper 7 bits of the initial flag value.
ExpandActors under the RevivalRandomForDrop policy
- Barrel (Barrel)
- Barrel_100enemy
- Barrel_CDungeon
- FldObj_KorokStoneLift_A_01
- Iron Box (Obj_BreakBoxIron)
- KibakoDesert_Contain_01
- KibakoJungle_Contain_01
- KibakoSeaside_Contain_01
- KibakoSnowMountain_Contain_01
- KibakoSnowMountain_Contain_100enemy
- KibakoVolcano_Contain_01
- KibakoZora_Contain_01
- Kibako_Contain_100enemy
- Obj_BreakBoxIron_100enemy
- Obj_LiftRockEldin_A_01
- Obj_LiftRockGerudo_A_01
- Obj_LiftRockWhite_100enemy
- Obj_LiftRockWhite_A_01
- Pot
- TwnObj_City_GerudoPot_A_LL_Act_02
- TwnObj_City_GerudoPot_A_M_Act_01
- TwnObj_City_GerudoPot_A_S_Act_01
- TwnObj_City_GoronPot_A_M_Act_01
- TwnObj_Village_FishingPot_A_M_Act_01
- TwnObj_Village_HatenoPot_A_L_Act_01
- TwnObj_Village_HatenoPot_A_M_Act_01
- TwnObj_Village_HatenoPot_A_S_Act_01
- TwnObj_Village_KorokPot_A_S_Act_01
- TwnObj_Village_RitoPot_A_M_Act_01
- TwnObj_Village_RitoPot_A_M_Act_02
- TwnObj_Village_RitoPot_A_S_Act_01
- TwnObj_Village_RitoPot_A_S_Act_02
- TwnObj_Village_SheikerPot_A_LL_Act_01
- TwnObj_Village_SheikerPot_A_L_Act_01
- TwnObj_Village_SheikerPot_A_M_Act_02
- TwnObj_Village_SheikerPot_A_S_Act_01
- TwnObj_Village_ZoraPot_A_M_Act_01
- Wooden Box (Kibako_Contain_01)
Revival whenever the Lord of the Mountain appears (RevivalUnderGodTime)
Objects under the RevivalUnderGodTime policy will be revived whenever the Lord of the Mountain appears (more precisely, when the AnimalMaster_Appearance flag is set by WorldMgr).
Revival flags for objects under this policy have their GameDataMgr set to 4.
ExpandActors under the RevivalUnderGodTime policy
- Blupee (Animal_RupeeRabbit_A)
- ↑ This is configured by ActorInfo.product.sbyml (itemSaleRevivalCount property) .
- ↑ Time spent in menus and cutscenes does not count