塞尔达旷野之息时间系统,红月与山神刷新机制

您所在的位置:网站首页 山神是啥 塞尔达旷野之息时间系统,红月与山神刷新机制

塞尔达旷野之息时间系统,红月与山神刷新机制

2023-07-31 13:49| 来源: 网络整理| 查看: 265

塞尔达旷野之息时间系统,红月与山神刷新机制是怎么回事呢?塞尔达旷野之息相信大家都很熟悉,但是塞尔达旷野之息时间系统,红月与山神刷新机制是怎么回事呢?下面就让小编带大家一起了解吧。

准备打卡西瓦%的时候发现了严重的问题:卡西瓦任务中有一个红月裸衣,它的存在直接使速通的性质颠倒过来了。速通不再是比快,而有点像比慢:在第一次红月之前你能稳稳做完其他任务,因此时间瓶颈变为了等待第一次红月;大部分速通技巧都会减慢红月来临的时间,只要它涉及到了选单、暂停、子弹时间等等。于是我找了一下红月相关的文献想看一看它的机制,找到了如下这篇文章。这里我对它进行了翻译,以方便国内有需要的玩家。

Source url:

https://www.reddit.com/r/Breath_of_the_Wild/comments/9t0xdz/clarifying_the_time_system_blood_moons_and_lord/

翻译有不准确的地方希望得到指正。

Everyone knows Blood Moons respawn defeated enemies and happen based on a timer. However, there still seems to be some uncertainty on what the exact conditions for regular Blood Moons are, and even more on emergency or panic Blood Moons.

众所周知血月周期性地复活魔物,然而它的具体刷新机制似乎不太确定,而且有时还会出现随机血月。(注:不少玩家应该都遇见过不在0点的血月,甚至大白天血月)

Documentation on how the game clock works, in particular at the beginning of the game and on Lord of the Mountain spawns also seem be pretty much inexistent.

似乎也没有什么对游戏时间系统,特别是游戏初期和山神出现机制的介绍文档。

It turns out that time, Blood Moons and the LotM are all handled by the same system (which I'll call the time manager) and based on time, so first let me clarify how time works.

事实上时间、红月和山神都由同一套时间系统控制(我称它为时间管理器)。我们首先介绍时间机制。

How time works in BotW

野炊的时间机制

Internally, time of day is stored as a float in the [0.0, 360.0] range.

一天中的时间被存储为[0.0, 360.0]范围内的一个浮点数。

When the game starts, time is set to 78.75 (05:15) and the "Bloody Moon end reserve timer" (which I'll explain below) is set to 0. If you have an existing save file, the game timer is reloaded from your save.

游戏一开始会把时间设置为78.75(对应游戏时间5点15分),同时“血月收尾计时器”(后面会解释)被设为0。如果有存档的话,计时器会从存档中读取。

Every game tick

游戏中每一时刻(While True:)

If the Shrine of Resurrection exit cutscene (Demo103_0) hasn't played, time is reset to 78.75. This means that if you manage to clip out of the Shrine of Resurrection and skip that cutscene, the game clock will be stuck at 05:15.

如果野炊片头(Demo103_0)还没触发,时间被重置为78.75。这意味着你如果穿出复苏神庙并跳过片头,时间将永远固定在5点15分。

Otherwise, if there is no active event/cutscene:

否则,如果当前没有处在某一事件或过场动画中:

The game timer is incremented by 0.0083333 * elapsed frames. Effectively, this means that 1 in-game minute = 1 real-life second.

游戏计时器每过一帧增加0.0083333,实际上它使游戏内一分钟对应了现实时间的一秒。(注:游戏正常情况下为30FPS,即每秒30帧)

If Link hasn't received the The Isolated Plateau quest and if the current time is >= 165.0 (11:00), the time is forcefully set to 11:00. Effectively, this means that time will not get past 11:00 until the Great Plateau Tower is activated and the Old Man cutscene is triggered.

如果塞尔达还没有接“封锁的台地”任务,或者当前时间已经到达165.0(11点整),时间会被强制设为11点。也就是说,你在接下“封锁的台地”任务并触发老人过场动画前,时间不会越过11:00。

If the timer reaches 360.0 (midnight), the game performs special checks. See the next section.

如果时间到达了360.0(午夜),程序执行一系列检查,见后文。

A value called the blood moon timer is also incremented by 0.0083333 * elapsed frames.

一个叫做血月计时器的数也会每帧增加0.0083333。

Afterwards, if "Bloody Moon end reserve timer" is non zero, it is decremented. If the new value is zero, the WM_BloodyDay flag is cleared. Finally, Lord of the Mountain state is updated.

之后,如果“血月收尾计时器”非零,它会被减少1。如果新值为0,WM_BloodyDay(血月)标志被清除。最后,山神的状态被更新。

Every time the timer reaches 360.0 (midnight)

当时间来到午夜

First, WM_NumberOfDays is incremented. This has an effect on the moon cycle.

首先,WM_NumberOfDays(游戏天数)加一,它会影响月相。

If a Blood Moon is scheduled:

If Blood Moons are "prohibited" (see below for a full list of conditions), the timer is set to 2880.0 and nothing happens. Otherwise, the Blood Moon cutscene (Demo011_0) is triggered and the timer is reset to 0.0.

如果今天是血月日:

如果血月在禁止状态(后面列出了所有情况),血月计时器会被设为2880.0,然后无事发生。否则,血月动画(Demo011_0)触发,血月计时器重置为0。(注:血月动画指的是塞尔达说话,而不是23:30分开始的血月特效)

The game then determines whether to schedule a Blood Moon or not:

接下来游戏将决定新的一天是否为血月日:

If the 'FirstTouchdown' flag is set (i.e. if the player has left the Great Plateau), and if the Blood Moon timer is > 2520.0 (7 in-game days):

如果'FirstTouchdown'(初着陆)标志为真(即玩家已经离开台地,踏上了广袤的海拉鲁大地),并且血月计时器大于2520.0(游戏内7天):

The WM_BloodyDay flag is set to true, which means that a Blood Moon is scheduled for the next night.

WM_BloodyDay(血月)标志被设为真,即当天为血月日。

The Blood Moon timer is reset to 0.0.

血月计时器被重置为0。

Otherwise, the "Bloody end reserve timer" is set to 150. This ensures that WM_BloodyDay is cleared 5 in-game minutes (= 5 seconds in real life) after a Blood Moon occurs.

否则,“血月收尾计时器”被设为150,这保证了发生血月后,血月标志在游戏内5分钟(现实时间5秒)内被清除。

Blood Moon inhibitors

血月禁止因素

If any of the following conditions are true, the Blood Moon cutscene will not be triggered.

属于下列任一种情况时,血月动画不会触发。

Not on MainField (main overworld) 不在主世界

IsInHyruleCastleArea is set 在城堡区域内

LastBossGanonBeastGenerateFlag is set (fighting Dark Beast Ganon) 魔兽盖侬战

BloodyMoonProhibition is set 禁止血月的标志为真

Wind_Relic_BattleStart is set (Vah Medoh battle) 风神兽战

Electric_Relic_Battle is set (Vah Naboris battle) 骆驼战

Water_Relic_BattleTime is set (Vah Ruta battle) 水神兽战

Something involving the Sky Manager 有些什么东西干涉了天空

(看似没有火蜥蜴战,然而火蜥蜴战会设置BloodyMoonProhibition,所以血月还是不会发生)

(由于迷雾跟天空系统有关,所以本人猜测最后一条应该应用于迷雾森林、呀哈哈森林、黑暗遗迹这些地方)

However, these do not prevent the Blood Moon timer from advancing, or the WM_BloodyDay flag from being set.

不过这些因素只会防止当次血月,对血月计时器无影响,也无关下一日是否为血月日。

Special case: passing time at a campfire or sleeping

特例:篝火旁消磨时间或上床睡觉

When you pass time at a campfire or sleep, the time is instantly set to the destination time. The game never speeds up or slows down the flow of time.

消磨时间或睡觉时,时间立即被设为目标时间。游戏不会加快或减缓时间流。

Now you may be wondering: wouldn't this skip the checks that happen at midnight?

你可能会问,这不会跳过本应在午夜时刻进行的各种检查吗?

This case was foreseen by Nintendo. If the time change causes the clock to cross midnight, the game sets a special flag that causes the Time Manager to run the "handle new day" function once, even if it's not midnight. The game also explicitly checks if a Blood Moon was scheduled to happen and triggers the cutscene if needed.

任天堂早就想到了。如果时间跨过了午夜,游戏会设立一个特殊标志,它会执行一次“来到新的一天”函数,尽管现在并不是午夜。游戏仍然会决定血月日,或者触发血月动画。

Takeaway

小结

Time starts at 05:15, not 11:00, and flows normally until 11:00 is reached. Activating the Great Plateau Tower sets the time to 11:00, shows the time on the UI and restores the normal flow of time.

时间从5:15开始,而不是11点。它会正常地流动,直到11点。开初始之塔会把时间设为11点,在此之后游戏界面会显示时间,时间继续正常地流动。

Blood Moons occur at midnight if and only if the WM_BloodyDay flag is set. As far as I can tell, there is no way to force blood moons to be scheduled.

当且仅当血月标志被设为真后,血月才会发生。据我所知没有任何方法让血月强制发生。

That flag is set the night before at midnight if you have left the Plateau and if the Blood Moon timer has reached 7 in-game days. Not 7 days and 15 minutes, but exactly 7 days (2520/360 = 7). Also, note that you do not need to pass time at a campfire after the WM_BloodyDay flag is set.

如果你离开了台地,并且血月计时器到达了游戏内7天,血月标志会在血月发生的前一晚的午夜被设置。不是7天零15分钟,而是刚好7天(2520/360 = 7)。注意,血月标志设置之后,你不需要消磨时间。

The Blood Moon timer starts ticking as soon as you've left the Shrine of Resurrection normally. Any time spent in a state where even the main game timer is paused does not count. However, you do not necessarily need to be in the open world: time spent in shrines, divine beasts, etc. does count.

血月计时器在触发片头动画后就开始计时。在任何主游戏时间暂停计时的情况下,血月计时器也会暂停计时。但是你并不一定要呆在主世界里:神庙或者神兽解谜的时间都是算的。

Passing time at a campfire or sleeping repeatedly does not help trigger a Blood Moon at all. Quite the opposite, as the timer does not advance during cutscenes.

不停在篝火旁消磨时间或者上床睡觉不会有助于推进血月进程。恰恰相反,消磨时间的动画反而让血月计时器不会增长一丝一毫。

Panic Blood Moons

随机血月

Blood moons are also used to reset internal state when some subsystems are running out of memory or become unresponsive. Such blood moons do not follow the regular schedule and are commonly referred to as "panic blood moons".

当某些子系统爆内存或无响应时,也会利用血月来重置系统状态。这种血月不走寻常路,通常被称作“随机血月”。(注:随机血月这名字我鬼扯的,有谁知道正式的中文翻译吗)

Why and when do Panic Blood Moons happen?

随机血月为什么会发生,什么时候会发生?

A common misconception is that blood moons help replenish system memory by resetting enemy kill flags. This is however total nonsense, because enemy kill flags are just GameData flags, and all GameData flags are loaded at bootup, inserted into a sorted list and stay in memory forever[1].

一个常见的误解认为,血月通过重置“魔物被击杀”的标志来回收系统内存。然而这简直是胡说八道,因为击杀魔物的标志属于GameData(游戏数据)标志,所有的游戏数据标志在游戏启动时就全部读入内存,并以有序列表的形式永久储存[1]。

Panic Blood Moons occur when the game is running out of memory[2] or when some tasks are taking too much time. Contrary to a widespread theory, they are not used as a generic error handler or a fallback for "unhandled events". Panic blood moons can only occur in specific cases.

随机血月会在游戏内存不够[2]或者某些任务耗时过久时发生。和普遍理论相反,它并不被用作通用错误处理程序,或者对无法处理的事件的一种应对方式。随机血月只会在特定情况下出现。

To illustrate how specific these cases are, here is a simplified but exhaustive list of reasons:

为了阐述到底是多么“特定”的情况,我们列出了所有的特定情况:

Resource system: Bit 12 is set in the ResourceMgrTask's flags (indicating a problem with a resource load), or a memory arena is running out of memory.

PhysicsMemSys: Havok main heap is running out of memory (less than 5% free)

PlacementMgr: Actor spawning heap is running out of memory (less than 5% free)

OverlayArena: ForResourceS heap (which is used to load small resource files) is running out of memory (less than 5% free)

OverlayArena: ForResourceL heap (which is used to load large resources) is running out of memory (less than 5% free)

OverlayArena: Audio heap is out of memory (0% free)

TextureHandleMgr: Last TextureHandleMgr::calc execution took more than 60 seconds

(计组、操桶全都不会的我选择放弃翻译此段)

[1] Even without looking at the code, the fact that the GameData configuration files are never loaded again after init means that the game cannot possibly be unloading flags. Not to mention that it'd be inefficient to unload and reload flags all the time and ineffective at freeing a significant amount of memory: the entire GameData Manager only uses 15 MB.

[1]不看代码都知道,游戏数据配置文件在init之后再也不会被加载,这意味着程序就不太可能把这些标志释放出内存。更不用说反复加载释放这些标志非常低效,且无用:整个游戏数据管理器只用15MB内存,这种操作完全释放不了多少内存。

[2] Debug play reports refer to the event as a "BloodyMoon ForMemory" at 0x71007A95B4 (Switch 1.5.0).

[2] Debug报告称它为“为了内存的血月”。

The effects of a Panic Blood Moon

随机血月的效果

A panic moon causes parts of the actor system and the Placement Manager to be reset. It also causes enemies and other respawnable objects to be revived since it calls Demo011_0 just like the regular blood moon code.

随机血月使部分actor系统和布局管理器被重置。它也能导致魔物和其他可刷新的物体重新出现,因为它像普通的血月那样调用Demo011_0的代码。

Moon cycle

月相

Now that the Blood Moon mechanic is perfectly clear, let's move on to the moon cycle.

现在我们很清楚血月机制了,接下来我们聊一聊月相。

The moon type is calculated based on the number of in-game days (WM_NumberOfDays). The formula is (numberOfDays + x + 1) modulo 8, where x is 1 if the current time is > 180.0 (noon) and 0 otherwise.

月相基于游戏内天数(WM_NumberOfDays)进行计算。公式是(游戏天数+x+1)模8,其中x为1代表午后,x为0代表午前。

Here are the possible values and associated phases:

这里是可能的值以及它们对应的月相

0: Full Moon or Blood Moon or on a Bloody Day after 04:00 满月(望月)/血月

1: Waning gibbous 亏凸月

2: Third quarter 下弦月

3: "26th-day" 残月

4: New moon 新月(朔月)

5: Waxing crescent 娥眉月

6: "Seven-day" 上弦月

7: "13-day" 盈凸月

(作者后来疑似补充:月相跟血月没有任何关系。 血月不只会在本来应该是满月的晚上出现,血月后也不会接到下弦月。)

The Lord of the Mountain

山林霸主

The Lord of the Mountain appears whenever a special flag is set ('AnimalMaster_Appearance'). Its value is managed by a very simple state machine.

当一个特殊的标志('AnimalMaster_Appearance')被设置时,山神就会出现。这个值由一个非常简单的状态机确定。

0. If the moon type is 5 and if Link is not in map area 64 (Satori Mountain, presumably), the game generates a random "appearance hour" in the [0 .. 22] interval.

When the current hour matches the appearance hour, the LotM is allowed to appear. Link must still NOT be in map area 64 until this happens, otherwise the game goes back to step 1.

One hour after the appearance hour, the current day of the week is stored.

After some period of time (that depends on the day of the week and the hour) the LotM will disappear.

0.如果月相值为5(娥眉月)且塞尔达不在地图的区域64中(估计就是萨托利山),游戏会在[0,22]区间随机生成一个整数作为“山神出现的小时”。(注:确实是萨托利山,见我下面在物件地图里截的图)

当到达"山神出现的小时"后,山神就可以出现。出现前塞尔达不得呆在区域64中,否则会返回第一步。

在山神出现小时后的一小时,当前是星期几会被储存。

过一定的时间(这取决于星期几和小时数),山神消失。

References

略。主要意思就是希望大家帮忙挑错,然后创了一个wiki:

https://zeldamods.org/wiki/WorldMgr/zh

其实全部翻译完了才发现上面已经有一个比较简陋的中文翻译版本了orz,不过有些地方我觉得自己翻译得还不错,比如“血月收尾计时器”这个名词,自我感觉很是贴切了(

好了,以上就是关于塞尔达旷野之息时间系统,红月与山神刷新机制的事情了,大家有什么想法呢,欢迎在评论区告诉小编一起讨论哦!



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3