Difficulty scaling: Difference between revisions

no edit summary
imported>Leoetlino
No edit summary
imported>Leoetlino
No edit summary
Line 70: Line 70:
In Master Mode, IsHardModeActor, DisableRankUpForHardMode and LevelSensorMode are combined on some actors to keep low-level enemies in the overworld (e.g. Red Bokoblin south of the Great Plateau).
In Master Mode, IsHardModeActor, DisableRankUpForHardMode and LevelSensorMode are combined on some actors to keep low-level enemies in the overworld (e.g. Red Bokoblin south of the Great Plateau).


== <code>LevelSensorMode</code> ==
== Properties ==
=== <code>LevelSensorMode</code> ===


This actor property controls whether scaling is enabled for an enemy or weapon. Also applies to any weapons held by an enemy since 'loadWeaponInfo' is called when an enemy drops their weapon.
This actor property controls whether scaling is enabled for an enemy or weapon. Also applies to any weapons held by an enemy since 'loadWeaponInfo' is called when an enemy drops their weapon.
Line 76: Line 77:
Note that this doesn't apply to weapons that are attached to a Hinox's necklace, because Hinoxes use a different underlying enemy actor which overrides the 'on weapon dropped' function and ignores 'LevelSensorMode'.
Note that this doesn't apply to weapons that are attached to a Hinox's necklace, because Hinoxes use a different underlying enemy actor which overrides the 'on weapon dropped' function and ignores 'LevelSensorMode'.


== <code>SharpWeaponJudgeType</code> ==
=== <code>SharpWeaponJudgeType</code> ===


This actor property controls the ''minimum'' modifier tier that a weapon can receive. Type: [[#weaponmodifier-s32-enum|<code>enum WeaponModifier</code>]].
This actor property controls the ''minimum'' modifier tier that a weapon can receive. Type: [[#weaponmodifier-s32-enum|<code>enum WeaponModifier</code>]].


If [[#levelsensormode|scaling]] is enabled, the weapon may receive modifiers from an even higher tier if point requirements are met.
If [[#LevelSensorMode|scaling]] is enabled, the weapon may receive modifiers from an even higher tier if point requirements are met.


Otherwise, the weapon will get modifiers from exactly the specified tier.
Otherwise, the weapon will get modifiers from exactly the specified tier.
Line 86: Line 87:
For example, 0 ('None') doesn't mean a weapon will never receive a modifier. It just means that the developers haven't forced the weapon to spawn with a blue/yellow modifier. If scaling requirements are satisfied, the weapon will receive blue or yellow modifiers.
For example, 0 ('None') doesn't mean a weapon will never receive a modifier. It just means that the developers haven't forced the weapon to spawn with a blue/yellow modifier. If scaling requirements are satisfied, the weapon will receive blue or yellow modifiers.


== <code>WeaponModifier</code> ==
=== <code>WeaponModifier</code> ===


=== <code>BymlWeaponModifier</code> (s32 enum) ===
==== <code>BymlWeaponModifier</code> (s32 enum) ====
There are three possible values for <code>weapons[].actors[].plus</code> in the LevelSensor config:
There are three possible values for <code>weapons[].actors[].plus</code> in the LevelSensor config:


Line 104: Line 105:
|}
|}


=== <code>WeaponModifier</code> (s32 enum) ===
==== <code>WeaponModifier</code> (s32 enum) ====
Internally and in other assets such as mubin map files, the following values are used instead:
Internally and in other assets such as mubin map files, the following values are used instead:


Line 123: Line 124:
|}
|}


== <code>Ecosystem::LevelSensor::loadByml</code> ==
== Scaling algorithm ==
=== <code>Ecosystem::LevelSensor::loadByml</code> ===


Called by <code>Ecosystem::init</code> from <code>ksys::InitializeApp</code>
Called by <code>Ecosystem::init</code> from <code>ksys::InitializeApp</code>
Line 135: Line 137:
[1.4.0] Flag entries for Golden enemies, Igneo Talus Titan and Monk Maz Koshia were added to the kill point table. Weapon entries for the One-Hit Obliterator and Weapon_Sword_503 were also added to the weapon scaling list. They cannot receive any modifier. (Yes, the developers forgot to add golden enemies to the config in 1.3.0.)
[1.4.0] Flag entries for Golden enemies, Igneo Talus Titan and Monk Maz Koshia were added to the kill point table. Weapon entries for the One-Hit Obliterator and Weapon_Sword_503 were also added to the weapon scaling list. They cannot receive any modifier. (Yes, the developers forgot to add golden enemies to the config in 1.3.0.)


== <code>Ecosystem::LevelSensor::calculatePoints</code> ==
=== <code>Ecosystem::LevelSensor::calculatePoints</code> ===


Called when loading actors
Called when loading actors
Line 158: Line 160:
In practice, settings have never been modified. 1.5.0 (which will likely be the last game update) still has the same Level2WeaponPower and Level2EnemyPower.
In practice, settings have never been modified. 1.5.0 (which will likely be the last game update) still has the same Level2WeaponPower and Level2EnemyPower.


== <code>Ecosystem::LevelSensor::loadWeaponInfo</code> ==
=== <code>Ecosystem::LevelSensor::loadWeaponInfo</code> ===


Called from treasure chest code, enemy actors (?), <code>Ecosystem::LevelSensor::loadActorInfo</code>
Called from treasure chest code, enemy actors (?), <code>Ecosystem::LevelSensor::loadActorInfo</code>
Line 222: Line 224:
</source>
</source>


== <code>Ecosystem::LevelSensor::loadActorInfo</code> ==
=== <code>Ecosystem::LevelSensor::loadActorInfo</code> ===


Analogous to <code>LevelSensor::loadWeaponInfo</code>.
Analogous to <code>LevelSensor::loadWeaponInfo</code>.
Anonymous user