Sly 1:Difficulty: Difference between revisions

Copyedit wording, layout, structure
(Adjusted categories)
(Copyedit wording, layout, structure)
 
(12 intermediate revisions by 2 users not shown)
Line 1:
{{About|game mechanic|data structure|Sly 1:DIFFICULTY}}
'''Difficulty''', also called '''suck''', '''uSuck''' or '''noob mode''', is the mechanic by which the game dynamically becomes easier or harder depending on your gameplay.
{{Infobox game mechanic
| name= Difficulty
| image= File:Sly 1 noob charm.png
| caption= After dying multiple times, you are granted a lucky charm
| sly1= y
}}
 
'''Difficulty''', also called '''suck''', '''uSuck''' or '''noob mode''', is the mechanic by which the game dynamically becomes easier or harder depending on your gameplay.
== Sly 1 ==
In Sly 1, the player is assigned a uSuck score between 0.0f and 0.1f for each individual level. These values are stored on the [[LS|level states]] and persist between loads.
 
== Difficulty levels ==
Sly 1 has three difficulty levels: easy, medium, and hard, each with a corresponding <code>Difficulty</code> struct in memory. On the easy and medium difficulty, uSuck increases by a set amount each time you die. On the hard difficulty, uSuck is locked at 0.{{check}}
Sly 1 has three difficulty levels: easy, medium, and hard. Each one has a corresponding global <tt>DifficultyLevel</tt> struct in the elf. During a transition, before loading the map, the function <code>LoadSwFromBrx</code> calls <code>OnDifficultyWorldPreLoad</code>, which sets the current difficulty level based on the following criteria:
 
* If the [[gameworld]] is <tt>GAMEWORLD::Intro or</tt> <tt>GAMEWORLD::Clockwerk</tt>, or if the current [[worldlevel]] is <tt>WORLDLEVEL::Hub</tt>, then it sets the easy difficulty.
During a level transition, the game first calls <code>OnDifficultyWorldPreLoad</code>. This function sets the difficulty level based on certain conditions such as what world the level is in, if the level is a hub or intro level, or if the key has been collected on the level. uSuck is not a factor in which difficulty level is set.{{check}}
* If the <tt>FLS::KeyCollected</tt> flag has not been set on the current level, then it sets the medium difficulty.
* In all other cases it sets the hard difficulty.
This means that the Prologue, World 5, and hub maps are always easy, and all other maps are initially medium but become hard once you collect the key. Levels which don't have a key are always medium.
 
== SlySuck 1score ==
Later on, the game calls <code>OnDifficultyWorldPostLoad</code>. This function compares the player’s current uSuck to the current difficulty level.
The player is assigned a uSuck score between 0.0 and 1.0 for each individual level. These scores are stored on the [[LS|level states]] in the save file. There is a global [[Sly 1:DIFFICULTY|DIFFICULTY]] struct called <code>g_difficulty</code> that tracks some difficulty values and stores a pointer to the current <tt>DifficultyLevel</tt> struct.
* If the current uSuck is above the difficulty’s <code>uSuckCharmLo</code>, it grants the player a silver charm.
* If the current uSuck is above the difficulty’s <code>uSuckCharmHi</code>, it grants the player a gold charm.
 
=== Changing suck ===
During normal gameplay, the uSuck is used to make certain aspects of the game more forgiving. For instance, on easy difficulty with a high uSuck you will be more likely to get more coins from breaking objects and killing guards.{{check}}
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 [[Sly 1:LM|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.
== Sly 2 ==
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.
 
== Lucky charms ==
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}}
LaterAfter onloading the map, the game calls <code>OnDifficultyWorldPostLoad</code>. This function compares the player’splayer's current uSuck on the level to the current difficulty level.
[[Category:Game mechanics]]
* If the player's current uSuck is aboveon the difficulty’slevel is above <code>uSuckCharmLouSuckCharmLow</code>, it grantsgives the player a silver charm. This value is always 0.4.
[[Category:Game mechanics in Sly 1]]
* If the player's current uSuck is aboveon the difficulty’slevel is above <code>uSuckCharmHiuSuckCharmHigh</code>, it grantsinstead gives the player a gold charm. This value is always 0.8.
[[Category:Game mechanics in Sly 2]]
The values of <code>uSuckCharmLow</code> and <code>uSuckCharmHigh</code> are determined by the currently difficulty, but for some reason they are the same for all difficulties. However, you will never get a charm on the hard difficulty because your uSuck is locked at 0.
 
== SlyCoin 2drops ==
Difficulty also controls how many coins drop when you break something or kill an NPC, but this is not affected 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.
 
{{Navbox Sly 1}}