Sly 1:Difficulty: Difference between revisions
→Sly 1: Updated Sly 1 section
TheOnlyZac (talk | contribs) (Adjusted categories) |
TheOnlyZac (talk | contribs) (→Sly 1: Updated Sly 1 section) |
||
Line 2:
== Sly 1 ==
In Sly 1, the player is assigned a uSuck score between 0.
=== Difficulty Levels ===
Sly 1 has three difficulty levels: easy, medium, and hard, each with a corresponding <code>DifficultyLevel</code> struct in the executable. During a level transition, during execution of the function <code>LoadSwFromBrx</code>, the game calls <code>OnDifficultyWorldPreLoad</code>. This function sets the current difficulty level based on the following conditions:
* If the [[gameworld]] is Paris/the Hideout (<code>GAMEWORLD_Intro</code>) or The Cold Heart of Hate (<code>GAMEWORLD_Clockwerk</code>), or if the current [[worldlevel]] is a hub (<code>WORLDLEVEL_Hub</code>), then it sets the easy difficulty.
* If the key has ''not'' been collected on the level (the <code>FLS_KeyCollected</code> flag is not set), then it sets the medium difficulty.
* In all other cases it sets the hard difficulty.
Later on in level transition, the game calls <code>OnDifficultyWorldPostLoad</code>. This function compares the
* If the player's current uSuck on the level is above the
* If the player's current uSuck on the level is above the
=== Changing Suck ===
On the easy and medium difficulty, your uSuck increases by a 0.1 each time you die. Triggering a checkpoint for the first time lowers your suck by 0.8, and collecting a key resets your suck to 0. These changes happen by function calls to <code>OnDifficultyPlayerDeath</code>, <code>OnDifficultyTriggerCheckpoint</code>, and <code>OnDifficultyCollectKey</code> respectively.
On the hard difficulty, uSuck is always locked at 0, even if something would normally increase it. This is because each difficulty level stores a [[limit]] that the suck value is always clamped between; for easy and medium, this limit is from 0.0 to 1.0, but for the hard difficulty this limit is from 0.0 to 0.0.
=== Coin Drops ===
Difficulty also controls how many coins you get when you break something or kill an NPC, but this is not controlled by the difficulty level{{Check}}. Each time the player breaks something, the function <code>OnDifficultyBreak</code> is called to calculate the number of coins to drop.
== Sly 2 ==
<nowiki>In Sly 2, uSuck seems to be set on a per-mission basis{{. It ranges from 0.0f to 1.0f and increases each time you die or otherwise fail a job.</nowiki>
The uSuck value is used by the level scripts to make certain aspects of the game easier. For instance, in [[Moonlight Rendezvous]], Neyla will normally only wait 5 seconds{{check}} for you to catch up before you fail the job. As your suck increases, the time she waits also increases up to a maximum of 20 seconds.{{check}}
|