Réapparition des objets

From ZeldaMods (Breath of the Wild)
Jump to navigation Jump to search
This page is a translated version of the page Object respawning and the translation is 21% complete.
Other languages:


Beaucoup d'objets, armes et ennemis de Breath of the Wild réapparaissent après un certain moment afin que le monde ne devienne pas trop vide. La façon exacte dont réapparaissent les objets est spécifique à chaque acteur.

Les GameData flags qui sont utilisés pour la réapparition des objets sont appelés Revival flags. Ils sont toujours chargés, que l'objet existe dans le monde ou non.

Objets des boutiques

Les objets des boutiques sont régénérés chaque jour à minuit, en supposant que les conditions suivantes soient remplies :

  • le joueur n'est dans aucune des zones associées avec l'objet de la boutique ; alternativement, si le joueur n'est pas dans MainField (Hyrule)
  • pour les objets avec le tag Arrow, le joueur possède moins de 50[1] flèches du type en question dans son inventaire.

[1.3.1+] La fonction de vérification de l'inventaire utilise les données d'inventaire du joueur réelles, et non les données de quête temporaires. Cela signifie que se téléporter dans les épreuves de l'Épée ou commencer n'importe quelle autre quête qui supprime temporairement l'inventaire afin de contourner GameDataMgr pour restocker les flèches ne fonctionne plus.

Les revival flags pour les objets de boutiques ont leur GameDataMgr mis à 3.

La grille de régénération des objets

La grille de régénération des objets est utilisée pour les objets de boutique et les objets régénérés de façon aléatoires. Elle est légèrement différente de la grille de carte normale et est composée de 10 colonnes (0 à 9) et 8 lignes (0 à 7).

Given an item located in column itemCol and row itemRow, the player is considered to not be in its map area if and only if:

  • itemCol < playerCol1
  • or itemCol > playerCol2
  • or itemRow < playerRow1
  • or itemRow > playerRow2

where the player column and row values are calculated as follows:

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.

Revival during blood moons (RevivalBloodyMoon)

This policy is used for most weapons and enemies. Every time a blood moon occurs, all associated revival flags are reset to their initial value.

Revival flags for objects under this policy have their GameDataMgr set to 1.

Actors under the RevivalBloodyMoon policy

No automatic revival (RevivalNone)

Objects under the RevivalNone policy will not be automatically revived.

Actors under the RevivalNone policy

No drop revival (RevivalNoneForDrop)

Drops for objects under the RevivalNoneForDrop policy will not be revived. This is used for broken Guardians.

Actors under the RevivalNoneForDrop policy

No revival for use flag (RevivalNoneForUsed)

The use status for objects under the RevivalNoneForUsed policy will not be reset. This is notably used for terminals.

Actors under the RevivalNoneForUsed policy

Random revival (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.

Actors 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 RevivalRandomForDrop 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.

Actors under the RevivalRandomForDrop policy

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.

Actors under the RevivalUnderGodTime policy
  1. Configuré par ActorInfo.product.sbyml (propriété itemSaleRevivalCount).
  2. Time spent in menus and cutscenes does not count