Claim set · data/claims/amnesia-the-dark-descent.yaml

Amnesia: The Dark Descent (Frictional Games's source release, FrictionalGames/AmnesiaTheDarkDescent)

Game: Amnesia: The Dark Descent.

Health, sanity, and lamp oil each run from 0 to 100. A new player starts with all three at 100 and no tinderboxes. Adding sanity or oil stops at 100. amnesia-the-dark-descent/meters

Value: 100

CodeAmnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayer.cpp#L267-L270mfHealth = 100; mfSanity = 100; mfLampOil = 100; mlTinderboxes =0;Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayer.cpp#L907-L910if(mfSanity >= 100 && afX>0) return; mfSanity += afX; if(mfSanity > 100) mfSanity = 100;Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayer.cpp#L932-L936if(mfLampOil >= 100 && afX>0) return; mfLampOil += afX; if(mfLampOil > 100) mfLampOil = 100; if(mfLampOil < 0) mfLampOil = 0;Checked by claude, 2026-11-19 — read the player reset and the add-sanity and add-oil functions at the pinned commitChecked by a second AI model, 2026-11-19.

Cited by: Amnesia: The Dark Descent

While the lantern is lit, its oil falls each second by a rate set in the game's configuration, except while a memory flash (a scripted flash of text) is showing. When the oil reaches 0 the lantern goes out with an out-of-oil sound, and the player can't light it again until oil is added. amnesia-the-dark-descent/lantern-burn

About: Amnesia: The Dark Descent Light-source timer

CodeAmnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L1639mfLowerOilSpeed = gpBase->mpGameCfg->GetFloat("Player_Lantern","LowerOilSpeed",0);Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L1703-L1713if(mbActive && gpBase->mpEffectHandler->GetEmotionFlash()->IsActive()==false) { float fOil = mpPlayer->GetLampOil(); fOil -= mfLowerOilSpeed *afTimeStep; if(fOil <=0) { fOil = 0; gpBase->mpHelpFuncs->PlayGuiSoundData(msOutOfOilSound, eSoundEntryType_Gui); SetActive(false, true); } mpPlayer->SetLampOil(fOil);Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L1799-L1807if(abCheckForOilAndItems && abX && mpPlayer->GetLampOil() <=0) { if(abUseEffects) { gpBase->mpHintHandler->Add("LanternNoOil", kTranslate("Hints", "LanternNoOil"), 0); gpBase->mpHelpFuncs->PlayGuiSoundData(msOutOfOilSound, eSoundEntryType_Gui); } return; }Checked by claude, 2026-11-19 — read the lantern update and its switch-on check at the pinned commitChecked by a second AI model, 2026-11-19.

The rate is the Player_Lantern section's LowerOilSpeed in the game's config/game.cfg, which the source release doesn't include, so the burn time from full isn't known from the code. The memory flash is the effect a level's script or an emotion stone starts.

Cited by: Amnesia: The Dark Descent, Light-source timer

Below a level of oil set in the game's configuration, the lantern's light dims in proportion to the oil left, reaching black at 0. amnesia-the-dark-descent/lantern-dim

About: Amnesia: The Dark Descent Light-source timer

CodeAmnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L1640mfFadeLightOilAmount = gpBase->mpGameCfg->GetFloat("Player_Lantern","FadeLightOilAmount",0);Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L1692-L1698cColor lightColor = mDefaultColor; float fOil = gpBase->mpPlayer->GetLampOil(); if(fOil < mfFadeLightOilAmount) { lightColor = mDefaultColor * (fOil / mfFadeLightOilAmount); } mpLight->SetDiffuseColor(lightColor * mfAlpha);Checked by claude, 2026-11-19 — read the lantern update at the pinned commitChecked by a second AI model, 2026-11-19.

The level is the Player_Lantern section's FadeLightOilAmount in config/game.cfg, which the release doesn't include.

Cited by: Amnesia: The Dark Descent

Using a flask of oil needs the lantern in the inventory, and does nothing when the lantern is full. Otherwise it adds the flask's own amount, stops at 100, and uses up the flask. Up to 99 flasks stack in one inventory slot. amnesia-the-dark-descent/oil-potion

About: Amnesia: The Dark Descent Light-source timer

CodeAmnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxItemType.cpp#L355-L358cLuxItemType_LampOil::cLuxItemType_LampOil() : iLuxItemType("LampOil", eLuxItemType_LampOil) { mbHasCount = true; mlMaxCount = 99;Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxItemType.cpp#L368-L383void cLuxItemType_LampOil::OnUse(cLuxInventory_Item *apItem, int alSlotIndex) { cLuxInventory *pInventory = gpBase->mpInventory; if(pInventory->HasItemOfType(eLuxItemType_Lantern)==false) { pInventory->SetMessageText(kTranslate("Inventory","OilNeedsLantern"),0); return; } float fLampOil = gpBase->mpPlayer->GetLampOil(); if(fLampOil >= 100) return; fLampOil += apItem->GetAmount(); if(fLampOil > 100) fLampOil = 100; …Checked by claude, 2026-11-19 — read the lamp-oil item type at the pinned commitChecked by a second AI model, 2026-11-19.

Each flask's amount comes from its item, set in the level's entity data, which the release leaves out; the code sets no standard size. Oil over 100 is lost.

Cited by: Amnesia: The Dark Descent, Light-source timer

Picking up a tinderbox adds 1 to a count the player carries, instead of placing an item in the inventory. The count has no upper limit: a limit of 10 is commented out. amnesia-the-dark-descent/tinderbox-pickup

About: Amnesia: The Dark Descent Light-source timer

CodeAmnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxItemType.cpp#L402-L415bool cLuxItemType_Tinderbox::GetHasMaxAmount() { //if(gpBase->mpPlayer->GetTinderboxes()>=10) return true; return false; } bool cLuxItemType_Tinderbox::BeforeAddItem(cLuxInventory_Item *apItem) { gpBase->mpHintHandler->Add("PickTinderbox", kTranslate("Hints", "PickTinderbox"), 0); gpBase->mpPlayer->AddTinderboxes(1); return true; }Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayer.h#L191void AddTinderboxes(int alX){ mlTinderboxes += alX; }Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxInventory.cpp#L1127-L1134////////////////////////// //Check if something else should be done with the item (like adding to notebook). if(pItemType->BeforeAddItem(pItem)) { if(apRemoveItemProp) *apRemoveItemProp = true; hplDelete(pItem); return NULL; }Checked by claude, 2026-11-19 — read the tinderbox item type, the player's count, and the inventory's add path at the pinned commitChecked by a second AI model, 2026-11-19.

Cited by: Amnesia: The Dark Descent

Lighting an unlit lamp takes one tinderbox, and fails with a message when the count is 0. Each lighting also raises sanity, by an amount between a minimum and a maximum set in the configuration, weighted toward the maximum by (1 − s/100)², where s is the sanity before. A lit lamp does nothing when the player uses it, so the player can't put it out. amnesia-the-dark-descent/lamp-ignite

About: Amnesia: The Dark Descent Light-source timer

CodeAmnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxProp_Lamp.cpp#L203-L209bool cLuxProp_Lamp::CanInteract(iPhysicsBody *apBody) { if(CanBeIgnitByPlayer() && mbLit==false) return true; if(msInteractCallback != "") return true; return false; }Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxProp_Lamp.cpp#L217-L221if(mbLit) { //SetLit(false, true); //Nothing... }Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxProp_Lamp.cpp#L227-L250if(gpBase->mpPlayer->GetTinderboxes()<=0) { gpBase->mpMessageHandler->SetMessage(kTranslate("Game","NoMoreTinderboxes"), 0); return false; … float fIncreaseAmount = 1.0f - gpBase->mpPlayer->GetSanity() / 100.0f; fIncreaseAmount = fIncreaseAmount*fIncreaseAmount; //Want exp curve float fSanityAdd = gpBase->mpGlobalDataHandler->GetLightLampMinSanityIncrease() * (1-fIncreaseAmount) + gpBase->mpGlobalDataHandler->GetLightLampMaxSanityIncrease()*fIncreaseAmount; gpBase->mpPlayer->AddSanity(fSanityAdd, false); … gpBase->mpPlayer->AddTinderboxes(-1); …Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxGlobalDataHandler.cpp#L38-L39mfLightLampMinSanityIncrease = gpBase->mpGameCfg->GetFloat("Player_Sanity", "LightLampMinSanityIncrease",0); mfLightLampMaxSanityIncrease = gpBase->mpGameCfg->GetFloat("Player_Sanity", "LightLampMaxSanityIncrease",0);Checked by claude, 2026-11-19 — read the lamp's interaction and the global data reads at the pinned commitRevised after a check by a second AI model, 2026-11-19.

The minimum and maximum are the Player_Sanity section's LightLampMinSanityIncrease and LightLampMaxSanityIncrease in config/game.cfg, which the release doesn't include. A lamp the level marks as not lightable by the player isn't offered for use.

Cited by: Amnesia: The Dark Descent, Light-source timer

In hard mode, each map's tinderboxes and oil flasks are thinned as the map loads: about 65 in every 100 flasks are removed, and between 70 and 95 in every 100 tinderboxes, more the more tinderboxes the player carries, reaching 95 at six (computed from the removal rates). amnesia-the-dark-descent/hard-mode-items

About: Amnesia: The Dark Descent Light-source timer

Value: oil 0.65 · tinderboxes carrying none 0.7 · tinderboxes carrying six 0.95

CodeAmnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxMap.cpp#L205-L207////////////////// // HARDMODE if (gpBase->mbHardMode)Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxMap.cpp#L215-L232float fMin = 7.0f / 10.0f; float fMax = 9.5f / 10.0f; float fCurrentNumTinderBoxes = static_cast<float>(gpBase->mpPlayer->GetTinderboxes()); float fMaxNumTinderboxes = 6; float fT = fCurrentNumTinderBoxes / fMaxNumTinderboxes; float fTinderBoxRemoveEvery = (1.0f - fT)*fMin + fT*fMax; float fTinderBoxCounter = 0.0f; //float fTinderBoxRemoveEvery = 8.5f / 10.0f; int lNumTotalOil = 0; int lNumRemovedOil = 0; float fLampOilCounter = 0.0f; float fLampOilRemoveEvery = 6.5f / 10.0f;Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxMap.cpp#L257-L269if (itemType == eLuxItemType_Tinderbox) { lNumTotalTinderboxes++; fTinderBoxCounter += fTinderBoxRemoveEvery; if (fTinderBoxCounter >= 1.0f) { fTinderBoxCounter -= 1.0f; vEntitiesToDestroy.push_back(pEntity); lNumRemovedTinderboxes++; continue; } }Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxMap.cpp#L273-L283if (itemType == eLuxItemType_LampOil) { fLampOilCounter += fLampOilRemoveEvery; lNumTotalOil++; if (fLampOilCounter >= 1.0f) { fLampOilCounter -= 1.0f; vEntitiesToDestroy.push_back(pEntity); lNumRemovedOil++; continue; }Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxMap.cpp#L306-L311////////////////////////// // Remove the entities from above for (size_t i = 0; i < vEntitiesToDestroy.size(); ++i) { DestroyEntity(vEntitiesToDestroy[i]); }Checked by claude, 2026-11-19 — read the hard-mode pass of the map loader at the pinned commitRevised after a check by a second AI model, 2026-11-19.

The removal is a running count, not a random draw: each item of a kind adds the rate to a counter, and the item is removed whenever the counter reaches 1, so a map with 20 flasks loses 12 or 13 (computed: 13 in exact arithmetic, 12 with the game's single-precision floats). The tinderbox rate blends 0.7 and 0.95 by the count carried over 6, and the blend isn't capped: carrying 8 or more gives a rate of 1 or more, which removes every tinderbox (computed).

Cited by: Amnesia: The Dark Descent

Where the light on the player falls to a level the configuration sets, sanity drains. A lit lantern counts as light. The drain starts from nothing and builds to its full rate over 10 seconds of darkness, and fades back over about 3.3 seconds of light (computed). It pauses during flashbacks and memory flashes, and when a level's script turns it off. amnesia-the-dark-descent/darkness-drain

About: Amnesia: The Dark Descent Darkness

CodeAmnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L2821mfMinDarknessLightLevel = gpBase->mpGameCfg->GetFloat("Player_Darkness","MinLightLevel",0);Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L2836mfSanityLossPerSecond = gpBase->mpGameCfg->GetFloat("Player_Darkness", "SanityLossPerSecond",0);Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L2773-L2789if(mpPlayer->GetHelperLantern()->IsActive()) { mfExtendedLightLevel += 1.0f; mfNormalLightLevel += 1.0f; … float fExtLight = gpBase->mpMapHelper->GetLightLevelAtPos(vTestPos[i], &vSkipLights, mfRadiusAdd); … mfExtendedLightLevel = cMath::Max(fExtLight, mfExtendedLightLevel);Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L2916if(fExtLightLevel > mfMinDarknessLightLevel)Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L2935-L2936mfSanityLossMul -= afTimeStep*0.3f; if(mfSanityLossMul < 0) mfSanityLossMul = 0;Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L2940-L2950else { mfSanityLossMul += afTimeStep*0.1f; if(mfSanityLossMul > 1) mfSanityLossMul = 1; //////////////////////////// //Lower sanity if( mpPlayer->GetHelperFlashback()->IsActive()==false && mpPlayer->GetSanityDrainDisabled()==false && gpBase->mpEffectHandler->GetEmotionFlash()->IsActive()==false) { mpPlayer->LowerSanity(mfSanityLossPerSecond*afTimeStep*mfSanityLossMul, true);Checked by claude, 2026-11-19 — read the darkness helper and the light-level helper at the pinned commitRevised after a check by a second AI model, 2026-11-19.

The full rate per second is the Player_Darkness section's SanityLossPerSecond, and the light level is its MinLightLevel, both in config/game.cfg, which the release doesn't include. The light on the player is the brightest of five points on its body, and never less than 1 while the lantern is lit. The 10 and 3.3 seconds are the ramp's 0.1 and 0.3 per second, from 0 to 1.

Cited by: Amnesia: The Dark Descent

At an interval the configuration sets, the game checks whether the player can see a monster: one within 35 units, inside the camera's view, with a clear line to at least two of five points on its body. If any is seen, sanity drops by a configured amount, once per check however many are in view. amnesia-the-dark-descent/enemy-seen

Value: 35 units

CodeAmnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L1160-L1161mfCheckNearEnemyInterval = gpBase->mpGameCfg->GetFloat("Player_Sanity","CheckNearEnemyInterval",0); mfNearEnemyDecrease = gpBase->mpGameCfg->GetFloat("Player_Sanity","NearEnemyDecrease",0);Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L1343-L1354if(mfCheckEnemySeenCount >0) { mfCheckEnemySeenCount-=afTimeStep; return; } mfCheckEnemySeenCount = mfCheckNearEnemyInterval; ///////////////////////////////////// // Init vars bool bSeenEnemy = false; cLuxMap *pMap = gpBase->mpMapHandler->GetCurrentMap(); float fMaxRangeSqrt = 35 * 35;Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L1401-L1416if(pEnemy->IsActive()==false) continue; if(pEnemy->CausesSanityDecrease()==false) continue; iCharacterBody *pCharBody = pEnemy->GetCharacterBody(); ////////////////////////////// //Check so enemy is in range float fDistSqrt = cMath::Vector3DistSqr(pCharBody->GetPosition(), vPlayerHeadPos); if(fDistSqrt > fMaxRangeSqrt) continue; ////////////////////////////// //Check so enemy is in FOV if( pCam->GetFrustum()->CollideBoundingVolume(pCharBody->GetCurrentBody()->GetBoundingVolume()) == eCollision_Outside) { continue; …Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L1420-L1441cVector3f vPosAdd[5] = { cVector3f(0), vRight*vHalfSize.x, vRight*vHalfSize.x*-1, vUp*vHalfSize.y*0.8f, vUp*vHalfSize.y*-0.8f, … for(int i=0; i<5; ++i) { if(gpBase->mpMapHelper->CheckLineOfSight(vPlayerHeadPos, pCharBody->GetPosition()+vPosAdd[i], false)) { lCount++; …Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L1449-L1451if(bSeenEnemy) { mpPlayer->LowerSanity(mfNearEnemyDecrease, true);Checked by claude, 2026-11-19 — read the enemy-seen check at the pinned commitRevised after a check by a second AI model, 2026-11-19.

The interval and the drop are the Player_Sanity section's CheckNearEnemyInterval and NearEnemyDecrease in config/game.cfg, which the release doesn't include. A monster a script marks as not draining sanity is skipped. Distances are in the engine's units.

Cited by: Amnesia: The Dark Descent

On the same check, a crawling critter (a bug or spider) within 3 units of the player's head takes away a configured amount of sanity. amnesia-the-dark-descent/critter-near

Value: 3

CodeAmnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L1162mfNearCritterDecrease = gpBase->mpGameCfg->GetFloat("Player_Sanity","NearCritterDecrease",0);Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L1365-L1391float fMinCritterDistSqrt = 3.0f * 3.0f; … if(pCritter->CausesSanityDecrease()==false) continue; float fDistSqrt = cMath::Vector3DistSqr(pProp->GetBody(0)->GetLocalPosition(), vPlayerHeadPos); if(fDistSqrt > fMinCritterDistSqrt) continue; … if(bNearCritter) { mpPlayer->LowerSanity(mfNearCritterDecrease, true);Checked by claude, 2026-11-19 — read the critter part of the enemy-seen check at the pinned commitChecked by a second AI model, 2026-11-19.

The amount is the Player_Sanity section's NearCritterDecrease in config/game.cfg. Only critters whose entity marks them as draining sanity count; the game's critter types are bugs and spiders (LuxCritter_Bug, LuxCritter_Spider).

Cited by: Amnesia: The Dark Descent

While a monster is in sight, the screen takes a pulsing radial blur that builds to full over about 3.3 seconds of looking (computed). amnesia-the-dark-descent/enemy-seen-blur

CodeAmnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L1504-L1530if(mbEnemyIsSeen) … if(mfSeenEnemyCount <1) { mfSeenEnemyCount += afTimeStep * 0.3f; … float fPulse = 0.5f + (sin(mfT*2.5f)*0.5f + 0.5f)*0.5f; gpBase->mpEffectHandler->GetRadialBlur()->SetBlurStartDist(0.2f); gpBase->mpEffectHandler->GetRadialBlur()->FadeTo(0.12f * mfSeenEnemyCount*fPulse, 10.0f); … if(mfSeenEnemyCount > 0) { …Checked by claude, 2026-11-19 — read the enemy-seen effect at the pinned commitChecked by a second AI model, 2026-11-19.

The build is a counter rising 0.3 a second from 0 to 1, which scales the blur; out of sight it falls 0.15 a second, so a monster seen again soon after brings back part of the blur at once. The blur pulses on a sine of the time.

Cited by: Amnesia: The Dark Descent

Below a limit the configuration sets, sanity rises by itself at a configured rate per second. amnesia-the-dark-descent/sanity-regain

CodeAmnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L1147-L1148mfSanityRegainSpeed = gpBase->mpGameCfg->GetFloat("Player_Sanity","SanityRegainSpeed",0); mfSanityRegainLimit = gpBase->mpGameCfg->GetFloat("Player_Sanity","SanityRegainLimit",0);Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L1328-L1333float fSanity = mpPlayer->GetSanity(); if(fSanity < mfSanityRegainLimit) { fSanity += afTimeStep * mfSanityRegainSpeed; mpPlayer->SetSanity(fSanity); }Checked by claude, 2026-11-19 — read the sanity helper's update at the pinned commitRevised after a check by a second AI model, 2026-11-19.

The limit and rate are the Player_Sanity section's SanityRegainLimit and SanityRegainSpeed in config/game.cfg, which the release doesn't include. The regain runs every frame beside any drain, but not while a sanity hit's effect is playing or while the player is dead: the update returns before it in both cases.

Cited by: Amnesia: The Dark Descent

When sanity stays below a configured low level for longer than a configured time, it is set to a configured amount. Time spent back above the level counts the timer down again. amnesia-the-dark-descent/low-sanity-reset

CodeAmnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L1156-L1158mfSanityLowLimit = gpBase->mpGameCfg->GetFloat("Player_Sanity","SanityLowLimit",0); mfSanityLowLimitMaxTime = gpBase->mpGameCfg->GetFloat("Player_Sanity","SanityLowLimitMaxTime",0); mfSanityLowNewSanityAmount = gpBase->mpGameCfg->GetFloat("Player_Sanity","SanityLowNewSanityAmount",0);Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L1228-L1241if(mpPlayer->GetSanity() < mfSanityLowLimit) { mfAtLowSanityCount+=afTimeStep; if(mfAtLowSanityCount > mfSanityLowLimitMaxTime) { mfAtLowSanityCount =0; mpPlayer->SetSanity(mfSanityLowNewSanityAmount); } } else if(mfAtLowSanityCount >0) { mfAtLowSanityCount -= afTimeStep; …Checked by claude, 2026-11-19 — read the sanity helper's update at the pinned commitChecked by a second AI model, 2026-11-19.

The values are the Player_Sanity section's SanityLowLimit, SanityLowLimitMaxTime, and SanityLowNewSanityAmount in config/game.cfg, which the release doesn't include; whether the amount lifts sanity or lowers it is not known from the code.

When a loss takes sanity below 0, it is held at 0 and the player collapses; in hard mode the player dies instead of recovering. A collapse puts out the lantern, slows the world's sounds to half speed at three-quarters volume, and alerts every active monster in the map to the player. amnesia-the-dark-descent/sanity-zero

CodeAmnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayer.cpp#L619-L637void cLuxPlayer::LowerSanity(float afAmount, bool abUseEffect) { if(mfHealth <=0) return; mfSanity -= afAmount; if(mfSanity < 0) { mfSanity =0; mpInsanityCollapse->Start(); ////////////////// // HARDMODE if (gpBase->mbHardMode) { …Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayer.cpp#L869-L881void cLuxPlayer::SetSanity(float afX) { mfSanity = afX; ////////////////// // HARDMODE if (gpBase->mbHardMode) { if (mfSanity <= 0) { SetHealth(0.f); } }Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L109-L129void cLuxPlayerInsanityCollapse::Start() … gpBase->mpHelpFuncs->PlayGuiSoundData(msStartSound, eSoundEntryType_World); … mpPlayer->GetHelperLantern()->SetActive(false,false, false); … pSoundHandler->FadeGlobalVolume(0.75f, 0.15f, eSoundEntryType_World,eLuxGlobalVolumeType_InsanityCollapse, false); pSoundHandler->FadeGlobalSpeed(0.5f, 0.125f, eSoundEntryType_World,eLuxGlobalVolumeType_InsanityCollapse, false);Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L141-L148//Attract enemies cLuxMap *pMap = gpBase->mpMapHandler->GetCurrentMap(); cLuxEnemyIterator enemyIt = pMap->GetEnemyIterator(); while(enemyIt.HasNext()) { iLuxEnemy *pEnemy = enemyIt.Next(); if(pEnemy->IsActive()) pEnemy->AlertOfPlayerPresence(); }Checked by claude, 2026-11-19 — read the sanity loss and set functions and the collapse's start at the pinned commitChecked by a second AI model, 2026-11-19.

In hard mode, setting sanity to 0 or below also kills the player, so a collapse there ends in death.

Cited by: Amnesia: The Dark Descent

During a collapse the view sinks and rolls up to 35 degrees while random sounds play. After a time the configuration sets, sanity is set to a configured amount, the world's sounds return, and the view rises back. amnesia-the-dark-descent/collapse

Value: 35 °

CodeAmnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L64mfSleepTime = gpBase->mpGameCfg->GetFloat("Player_General","InsanityCollapse_SleepTime",0);Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L78mfAwakenSanity = gpBase->mpGameCfg->GetFloat("Player_General","InsanityCollapse_AwakenSanity", 0);Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L196-L216if(mlState == 0 || mlState == 1) { ////////////////////// // Height add if(mfHeightAdd > mfHeightAddGoal) { mfHeightAdd-= mfHeightAddCollapseSpeed*afTimeStep; if(mfHeightAdd < mfHeightAddGoal) { mfHeightAdd = mfHeightAddGoal; mlState = 1; } …Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L220-L253if(mlState == 1) … mfRandomCount -= afTimeStep; if(mfRandomCount <0) { gpBase->mpHelpFuncs->PlayGuiSoundData(msSleepRandomSound, eSoundEntryType_Gui); mfRandomCount = cMath::RandRectf(mfSleepRandomMinTime, mfSleepRandomMaxTime); … if(mfT > mfSleepTime) … pSoundHandler->FadeGlobalVolume(1, 0.2f, eSoundEntryType_World,eLuxGlobalVolumeType_InsanityCollapse, false); pSoundHandler->FadeGlobalSpeed(1, 0.25f, eSoundEntryType_World,eLuxGlobalVolumeType_InsanityCollapse, false); …Checked by claude, 2026-11-19 — read the collapse's update at the pinned commitChecked by a second AI model, 2026-11-19.

The time and amount are the Player_General section's InsanityCollapse_SleepTime and InsanityCollapse_AwakenSanity in config/game.cfg, which the release doesn't include.

Cited by: Amnesia: The Dark Descent

Under sustained loss of sanity, such as the darkness drain, a heartbeat and a draining sound repeat, faster the lower sanity is: three times as often at 0 as at 100 (computed). A single loss plays neither: each loss keeps the sounds' timers running for one second, too short for either to fire, and they restart from zero once a second passes without a loss. The draining sound has three strengths: one above 75 sanity, one above 50, and one at 50 or below. amnesia-the-dark-descent/sanity-loss-sounds

CodeAmnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L1212-L1215void cLuxPlayerSanity::SetSanityLost() { mfSanityLostCount = 1.0f; }Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L1535-L1567if(mfSanityLostCount <= 0) … return; … float fSanity = mpPlayer->GetSanity(); float fNormalizedSanity = fSanity / 100.0f; … mfSanityLostCount -= afTimeStep; mfSanityDrainVolume += afTimeStep * 0.1f; if(mfSanityDrainVolume > 1) mfSanityDrainVolume =1; float mfSpeedMul = 1 + (1 - fNormalizedSanity) * 2.0f; mfSanityHeartbeatCount += afTimeStep * mfSpeedMul * 0.1f; …Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L1569-L1583mfSanityDrainCount += afTimeStep * mfSpeedMul * 0.33f; if(mfSanityDrainCount >= 1) { mfSanityDrainCount =0; tString sSoundFile=""; if(fSanity > 75) sSoundFile = "sanity_drain_low"; else if(fSanity > 50) sSoundFile = "sanity_drain_med"; else sSoundFile = "sanity_drain_high"; if(mpPlayer->IsDead()==false) …Checked by claude, 2026-11-19 — read the sanity-loss effect at the pinned commitRevised after a check by a second AI model, 2026-11-19.

A steady drain such as darkness renews the one-second window every frame, so the sounds run as long as it lasts. In one second the heartbeat timer reaches at most 0.3 and the draining timer at most 0.99, and each fires at 1 (computed). The rate multiplier is 1 + 2 × (1 − sanity/100). At full speed a heartbeat comes every 10 seconds and a draining sound every 3 seconds at sanity 100, a third of that at 0 (computed from the 0.1 and 0.33 per second). Their volume builds over 10 seconds of loss.

Cited by: Amnesia: The Dark Descent

Below a sanity level the configuration sets, a wavy distortion covers the screen, stronger the lower sanity falls: its strength is 1 − sanity over that level. Below a second, lower level, also configured, the image smears, the player pants every 0.5 to 5 seconds, and a hint shows. amnesia-the-dark-descent/sanity-visuals

CodeAmnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L1150-L1151mfSanityVeryLowLimit = gpBase->mpGameCfg->GetFloat("Player_Sanity","SanityVeryLowLimit",0); mfSanityEffectsStart = gpBase->mpGameCfg->GetFloat("Player_Sanity","SanityEffectsStart",0);Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L1262-L1272if(mpPlayer->GetSanity() > mfSanityEffectsStart && mfSanityDrainVolume <=0 && mfInsaneWaveAlpha <=0) { gpBase->mpPostEffectHandler->GetInsanity()->SetActive(false); return; } gpBase->mpPostEffectHandler->GetInsanity()->SetActive(true); float fSanity = mpPlayer->GetSanity(); float fGoalAlpha = 1 - fSanity / mfSanityEffectsStart; if(fGoalAlpha < 0) fGoalAlpha =0;Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L1293-L1295gpBase->mpPostEffectHandler->GetInsanity()->SetWaveAlpha(mfInsaneWaveAlpha * mfSanityWaveAlphaMul);//mfInsaneWaveAlpha); gpBase->mpPostEffectHandler->GetInsanity()->SetWaveSpeed(mfInsaneWaveAlpha * mfSanityWaveSpeedMul);//*mfInsaneWaveAlpha); gpBase->mpPostEffectHandler->GetInsanity()->SetZoomAlpha(mfSanityDrainVolume * fZoomMul);Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L1588-L1620if(mpPlayer->GetSanity() > mfSanityVeryLowLimit) return; if(mfShowHintTimer<=0) { mfShowHintTimer = 3.0f; gpBase->mpHintHandler->Add("SanityLow", kTranslate("Hints", "SanityLow"), 0); … if(mbSanityLostIsUpdated==false) { gpBase->mpEffectHandler->GetImageTrail()->FadeTo(1.6f, 3); … if(mfPantCount < 0) { …Checked by claude, 2026-11-19 — read the sanity helper's visual effects at the pinned commitChecked by a second AI model, 2026-11-19.

The levels are the Player_Sanity section's SanityEffectsStart and SanityVeryLowLimit in config/game.cfg, which the release doesn't include. The distortion's strength moves toward its goal by up to 1 a second. The same effect also zooms in time with sanity loss.

Cited by: Amnesia: The Dark Descent

A sudden sanity loss that a level's script deals plays a sound and briefly narrows and stretches the view with a smear, then eases it back. amnesia-the-dark-descent/sanity-hit

CodeAmnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayer.cpp#L609-L616void cLuxPlayer::GiveSanityDamage(float afAmount) { gpBase->mpHintHandler->Add("SanityHit", kTranslate("Hints", "SanityHit"), 0); LowerSanity(afAmount, true); mpSanity->StartHit(); }Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L1203-L1208void cLuxPlayerSanity::StartHit() { mbHitActive = true; gpBase->mpHelpFuncs->PlayGuiSoundData("sanity_damage", eSoundEntryType_Gui); }Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L1480-L1497if(mbHitActive) { mfHitAlpha += afTimeStep * mfHitZoomInSpeed; if(mfHitAlpha >= 1) { mfHitAlpha =1; mbHitActive = false; } } else { mfHitAlpha -= afTimeStep * mfHitZoomOutSpeed; …Checked by claude, 2026-11-19 — read the sanity-damage function and the hit effect at the pinned commitChecked by a second AI model, 2026-11-19.

Levels' scripts call this through the script function GiveSanityDamage; the speeds and the amount of narrowing are Player_Sanity settings in config/game.cfg.

Cited by: Amnesia: The Dark Descent

Hallucinations come as events of four kinds: a sound, footsteps, particles, and crawling bugs. Each event has a highest sanity at which it can play. An event starts when the player is in one of a level's insanity areas, sanity is at or below a configured level, and the wait since the last event has run out. The wait is one of three configured lengths, chosen by which of three configured sanity bands the player is in when the last event ends. The event is picked at random among those not yet played, and when all have played they become available again. amnesia-the-dark-descent/insanity-events

CodeAmnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxInsanityHandler.cpp#L921-L928iLuxInstanityEvent* cLuxInsanityHandler::EventTypeToData(const tString& asType) { tString sLowType = cString::ToLowerCase(asType); if(sLowType == "soundstream") return hplNew(cLuxInstanityEvent_SoundStream, () ); if(sLowType == "steps") return hplNew(cLuxInstanityEvent_Steps, () ); if(sLowType == "particles") return hplNew(cLuxInstanityEvent_Particles, () ); if(sLowType == "bugs") return hplNew(cLuxInstanityEvent_Bugs, () );Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxInsanityHandler.cpp#L52-L56void iLuxInstanityEvent::LoadData(cXmlElement * apVarElem) { msName = apVarElem->GetAttributeString("Name","Unknown"); msSet = apVarElem->GetAttributeString("Set",""); mfMaxSanity = apVarElem->GetAttributeFloat("MaxSanity",100);Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxArea_Insanity.cpp#L104-L110if(CollidesWithPlayer()) { if(gpBase->mpInsanityHandler->NewEventIsPossible()) { if(mbAutoDisable) SetActive(false); gpBase->mpInsanityHandler->StartEvent(); }Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxInsanityHandler.cpp#L881-L884bool cLuxInsanityHandler::NewEventIsPossible() { return mfNewEventCount <= 0 && gpBase->mpPlayer->GetSanity() <= mfMaxSanity_LongWait && mlCurrentEvent <0; }Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxInsanityHandler.cpp#L745-L753float fSanity = gpBase->mpPlayer->GetSanity(); //Between between events depends on sanity level. if(fSanity <= mfMaxSanity_ShortWait) mfNewEventCount = mfTimeBetween_ShortWait; else if(fSanity <= mfMaxSanity_MedWait) mfNewEventCount = mfTimeBetween_MedWait; else mfNewEventCount = mfTimeBetween_LongWait;Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxInsanityHandler.cpp#L795-L821if(lUnusedEvents ==0) { for(size_t i=0; i<mvEvents.size(); ++i) { iLuxInstanityEvent *pEvent = mvEvents[i]; pEvent->SetUsed(false); } … int lIdx = cMath::RandRectl(0, lUnusedEvents); … if(SetIsDisabled(pEvent->GetSet()) || pEvent->IsUsed() || fPlayerSanity>pEvent->GetMaxSanity()) continue;Checked by claude, 2026-11-19 — read the insanity handler and the insanity area at the pinned commitChecked by a second AI model, 2026-11-19.

The thresholds and waits are the Insanity section's MaxSanity_LongWait, MaxSanity_MedWait, MaxSanity_ShortWait and TimeBetween_* in config/game.cfg, and the events themselves are listed in a file it names (misc/main_sanity_events.cfg on the HPL2 wiki); none is in the release. A level's script can also start an event directly. Each area checks for the player at random intervals.

Cited by: Amnesia: The Dark Descent

A script function sets sanity to 100 when it is under 25, to 90 under 50, and to 80 under 75, and adds 5 above that. Its small version adds 20, 15, 10, or 5 across the same bands. amnesia-the-dark-descent/sanity-boost

Value: under 25 100 · under 50 90 · under 75 80

CodeAmnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxScriptHandler.cpp#L1504-L1531void __stdcall cLuxScriptHandler::GiveSanityBoost() { if(gpBase->mpPlayer->GetSanity() < 25.0f) gpBase->mpPlayer->AddSanity(100.0f - gpBase->mpPlayer->GetSanity()); else if(gpBase->mpPlayer->GetSanity() < 50.0f) gpBase->mpPlayer->AddSanity(90.0f - gpBase->mpPlayer->GetSanity()); else if(gpBase->mpPlayer->GetSanity() < 75.0f) gpBase->mpPlayer->AddSanity(80.0f - gpBase->mpPlayer->GetSanity()); else gpBase->mpPlayer->AddSanity(5.0f); } //----------------------------------------------------------------------- …Checked by claude, 2026-11-19 — read the two sanity-boost script functions at the pinned commitRevised after a check by a second AI model, 2026-11-19.

Which events call them is in the levels' scripts, which the release doesn't include.

Cited by: Amnesia: The Dark Descent

Code that would top up health, sanity, and oil to random amounts between configured bounds after a death is commented out, though the bounds are still read from the configuration. amnesia-the-dark-descent/respawn-refill

CodeAmnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L1870-L1876mfMaxSanityGain = gpBase->mpGameCfg->GetFloat("Player_General","Death_MaxSanityGain",0); mfMaxHealthGain = gpBase->mpGameCfg->GetFloat("Player_General","Death_MaxHealthGain",0); mfMaxOilGain = gpBase->mpGameCfg->GetFloat("Player_General","Death_MaxOilGain",0); mfMinSanityGain = gpBase->mpGameCfg->GetFloat("Player_General","Death_MinSanityGain",0); mfMinHealthGain = gpBase->mpGameCfg->GetFloat("Player_General","Death_MinHealthGain",0); mfMinOilGain = gpBase->mpGameCfg->GetFloat("Player_General","Death_MinOilGain",0);Amnesia: The Dark Descent: the source release (FrictionalGames/AmnesiaTheDarkDescent, initial commit) · amnesia/src/game/LuxPlayerHelpers.cpp#L2257-L2281/*if(gpBase->mpSaveHandler->AutoLoad()) … if(fSanity < mfMaxSanityGain) { fSanity = cMath::RandRectf(cMath::Max(fSanity, mfMinSanityGain), mfMaxSanityGain); } if(fOil < mfMaxHealthGain) { fOil = cMath::RandRectf(cMath::Max(fOil, mfMinOilGain), mfMaxOilGain); } … }*/Checked by claude, 2026-11-19 — read the death helper's settings and its commented block at the pinned commitChecked by a second AI model, 2026-11-19.

The oil line of the commented block compares oil against the health bound, not the oil bound.

Cited by: Amnesia: The Dark Descent