Skip to content

Commit

Permalink
Merge pull request #61 from jonathan-robertson/dev
Browse files Browse the repository at this point in the history
Update to New Flow with Fragile Memory
  • Loading branch information
jonathan-robertson authored Jan 3, 2023
2 parents feaf228 + 514bb90 commit b912e0a
Show file tree
Hide file tree
Showing 20 changed files with 313 additions and 246 deletions.
Binary file modified Amnesia.dll
Binary file not shown.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.1.0] - 2023-01-03

- add fragile memory state
- add retroactive refund for hardened memory
- disable near death trauma/xp debt for mem loss
- remove client-side-only respawn window info
- remove non-time text from buffs for cleanliness
- remove references to lives in positive outlook
- update journal entry to reflect new flow
- update memory boosters to cure fragile memory
- update memory loss to start at ltm level
- update to add fragile memory on death
- update to lose memory if fragile on death

## [1.0.0] - 2022-12-23

- add admin configurable xp boosts for zombie kills
Expand Down
28 changes: 15 additions & 13 deletions Config/Localization.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
Key,File,Type,english

amnesiaJournalTip,Journal Tip,,"Survivors are reporting strange occurrences of Amnesia when experiencing severe trauma...\n\n[ff8000]Becoming incapacitated after level[-] [007fff]{cvar(amnesiaLongTermMemoryLevel)}[-] will result in [ff8000]Memory Loss[-], causing you to forget certain experiences on this server.\n\n[007fff]What Can Cause Memory Loss?[-]\nDying will trigger memory loss, but there are a few exceptions. You will [00ff80]NOT[-] lose memory if:\n- [00ff80]another player kills you[-]\n- [00ff80]you die during Blood Moon for any reason[-]\n\n[ff007f]What Will I Forget?[-]\nYou will forget your level, learned skills, and unspent skill points (you'll be reset back to level [007fff]{cvar(amnesiaLongTermMemoryLevel)}[-] and can reallocate all skillpoints).\n\n[00ff80]What Will I Remember?[-]\nYou will not forget schematics, books, items/equipment (backpack is dropped on ground, but not deleted), vehicles, map, waypoints, land claims, bedroll location, quests, trader relationships.\n\n[007fff]How Can I Protect My Memory?[-]\nAll traders sell a new item called [007fff]Trader Jen's Memory Booster[-] in limited quantities, which you can use to protect your memory against the next time you experience severe trauma. This item is quite expensive, so you probably won't be able to afford it right away.\n\n[007fff]Anything Else?[-]\nYes; defeating certain powerful zombies will lift your spirits, providing a timed boost of double xp for you and everyone else on the server! Try to take these challenging enemies down for the benefit and relief of the entire community."
amnesiaJournalTip,Journal Tip,,"Survivors are reporting strange occurrences of Amnesia when experiencing severe trauma... At level [007fff]{cvar(amnesiaLongTermMemoryLevel)}[-] and beyond, becoming incapacitated will result in a [ff8000]Fragile Memory[-]. This [ff8000]Fragile Memory[-] will cause full-blown [ff007f]Memory Loss[-] if you were to become incapacitated once more.\n\n[ff8000]This Happens Every Time I Die?[-]\nDying will impact memory, but there are a few exceptions: if [00ff80]another player kills you[-], or if [00ff80]you die during Blood Moon for any reason[-].\n\n[ff8000]What Would I Forget Due to Memory Loss?[-]\nYou will forget your level, learned skills, and unspent skill points (you'll be reset back to level [007fff]{cvar(amnesiaLongTermMemoryLevel)}[-] and can reallocate the skillpoints you would've had at that level).\n\n[ff8000]Will I Remember Anything After Memory Loss?[-]\nYou will never forget schematics, books, items/equipment (backpack is dropped on ground, but not deleted), vehicles, map, waypoints, land claims, bedroll location, quests, trader relationships.\n\n[ff8000]How Can I Recover From a Fragile Memory?[-]\nYou'll find that all traders sell a new item called [007fff]Trader Jen's Memory Boosters[-] in limited quantities, which you can use to recover from a [ff8000]Fragile Memory[-]. This will give you a buffer against memory loss, but the sale price is also quite high; you probably won't be able to afford it right away.\n\n[ff8000]Anything Else I Should Know?[-]\nDefeating certain powerful zombies will lift your spirits, providing a timed boost of double xp for you and everyone else on the server! Try to take these challenging enemies down for the benefit and relief of the entire community."
amnesiaJournalTip_title,Journal Tip,,"Amnesia [ff8000][MOD]"

amnesiaRespawnMessage,UI,Respawn Window,"This server runs the Amnesia mod.\nAfter reaching a certain level, [ff8000]dying will cause memory loss[-]!\nUse [007fff]Trader Jen's Memory Booster[-] to harden your memory against traumatic situations like this.\nTo learn more about Amnesia, [ff8000]take a look at your Journal[-]."
buffAmnesiaFragileMemoryName,buffs,Buffs,"Fragile Memory"
buffAmnesiaFragileMemoryDesc,buffs,Buffs,"You now have a [ff8000]Fragile Memory[-] due to being incapacitated. \n\nIf you become incapacitated again, you will experience [ff007f]Memory Loss[-].\n\n[007fff]Trader Jen's Memory Boosters[-] can be purchased from any trader to cure your [ff8000]Fragile Memory[-], which will provide a buffer against [ff007f]Memory Loss[-]."
buffAmnesiaFragileMemoryStartTooltip,buffs,Buffs,"You now have a [ff8000]Fragile Memory[-] due to being incapacitated"
buffAmnesiaFragileMemoryRemoveTooltip,buffs,Buffs,"You no longer have a [ff8000]Fragile Memory[-], thanks to [007fff]Trader Jen's Memory Boosters[-]"

buffAmnesiaHardenedMemoryName,buffs,Buffs,"Hardened Memory"
buffAmnesiaHardenedMemoryDesc,buffs,Buffs,"Your Memory is currently reinforced and able to withstand 1 episode of extreme trauma."
buffAmnesiaHardenedMemoryTooltipAdd,buffs,Buffs,"Memory Hardened: You will withstand your next episode of extreme trauma!"
buffAmnesiaHardenedMemoryTooltipRemove,buffs,Buffs,"Memory Loss Prevented! Boost again to protect against future trauma."
buffAmnesiaHardenedMemoryRemoveTooltip,buffs,Buffs,"[007fff]Memory Boosters[-] you previously used [00ff80]are being given back to you[-]; see Amnesia entry in [ff8000]Journal[-] for more info."

buffAmnesiaMemoryLossName,buffs,Buffs,"Memory Loss"
buffAmnesiaMemoryLossDesc,buffs,Buffs,"You feel a sense that mistakes were made, but perhaps can find a more effective method of survival this time around."
buffAmnesiaMemoryLossTooltip,buffs,Buffs,"Memory Loss: Extreme Trauma has caused memory loss. You barely recall who you once were..."
buffAmnesiaMemoryLossDesc,buffs,Buffs,"You feel a sense that mistakes were made, but perhaps can find a more effective method of survival this time around.\n\n[007fff]Trader Jen's Memory Boosters[-] can be purchased from any trader to cure your [ff8000]Fragile Memory[-], which will provide a buffer against [ff007f]Memory Loss[-]."
buffAmnesiaMemoryLossTooltip,buffs,Buffs,"You experienced [ff007f]Memory Loss[-] due to being incapacitated"

buffAmnesiaPositiveOutlookName,buffs,Buffs,"Positive Outlook"
buffAmnesiaPositiveOutlookDesc,buffs,Buffs,"You're feeling especially positive about your situation and the future.\n\nSure, the world has gone to hell, but that doesn't mean your attitude needs to!\n\n[00FF00]XP Gain is Doubled!"
buffAmnesiaPositiveOutlookTooltip,buffs,Buffs,"Positive Outlook: [00FF00]XP Gain Doubled!"

buffAmnesiaBloodmoonLifeProtectionName,buffs,Buffs,"Blood Moon Life Protection"
buffAmnesiaBloodmoonLifeProtectionDesc,buffs,Buffs,"You feel something in the air that seems to provide you with a sense of peace and clarity of thought... perhaps this is the same 'something' causing the zombies to go wild.\n\n[00ff80]You WILL NOT lose any lives if you die during this event[-].\n\n... but still, try to play it safe."
buffAmnesiaBloodmoonLifeProtectionTooltip,buffs,Buffs,"You [00ff80]WILL NOT[-] lose any lives during this event when/if you die"
buffAmnesiaBloodmoonLifeProtectionEndTooltip,buffs,Buffs,"Blood Moon Protection [ff007f]HAS ENDED[-] - dying will result in lives lost again"
buffAmnesiaBloodmoonLifeProtectionDesc,buffs,Buffs,"You feel something in the air that seems to provide you with a sense of peace and clarity of thought... perhaps this is the same 'something' causing the zombies to go wild.\n\n[00ff80]You [00ff80]CANNOT[-] lose memory during or otherwise experience harm to your memory if you die during this event[-].\n\n... but still, try to play it safe."
buffAmnesiaBloodmoonLifeProtectionTooltip,buffs,Buffs,"You [00ff80]CANNOT[-] lose memory if you die during this event"
buffAmnesiaBloodmoonLifeProtectionEndTooltip,buffs,Buffs,"Blood Moon Memory Protection [ff007f]HAS ENDED[-]"

drugAmnesiaMemoryBooster,items,Medical,"Trader Jen's Memory Booster"
drugAmnesiaMemoryBoosterDesc,items,Medical,"Ingesting this special drug/vitamin cocktail will prevent the loss of memory typically caused by severe trauma.\n\nTo use this medicine:\n1. [007fff]you must exceed level {cvar(amnesiaLongTermMemoryLevel:0)}[-]\n2. [007fff]you must not already have a Hardened Memory[-]\n\n[ff8000]Don't Forget, Get BOOSTED![-]\n - Trader Jen's Experimental Pharmaceuticals"
drugAmnesiaMemoryBoosters,items,Medical,"Trader Jen's Memory Boosters"
drugAmnesiaMemoryBoostersDesc,items,Medical,"Ingesting this special drug/vitamin cocktail loaded with omega-3 fatty acids will stabilize a [ff8000]Fragile Memory[-].\n\n[007fff]Don't Forget, Get BOOSTED![-]\n - Trader Jen's Experimental Pharmaceuticals"

statStopsFragileMemory,ui_display,Item stat,"Cure Fragile Memory"
7 changes: 0 additions & 7 deletions Config/XUi_Menu/windows.xml

This file was deleted.

33 changes: 24 additions & 9 deletions Config/buffs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,43 @@
</effect_group>
</append>


<set xpath="/buffs/buff[@name='buffNewbieCoat']/effect_group/requirement[@name='PlayerLevel']/@value">@amnesiaLongTermMemoryLevel</set>
<set xpath="/buffs/buff[@name='buffNewbieCoat']/effect_group/triggered_effect/requirement[@name='PlayerLevel']/@value">@amnesiaLongTermMemoryLevel</set>

<append xpath="/buffs">
<buff name="buffAmnesiaHardenedMemory" name_key="buffAmnesiaHardenedMemoryName" description_key="buffAmnesiaHardenedMemoryDesc" icon="ui_game_symbol_intellect" icon_color="0,127,255" remove_on_death="false">
<!-- deprecated: keeping around for a while for backwards compatibility -->
<buff name="buffAmnesiaHardenedMemory" remove_on_death="false" hidden="true">
<duration value="0" />
<stack_type value="ignore" />
<effect_group>
<triggered_effect trigger="onSelfBuffRemove" action="ShowToolbeltMessage" message_key="buffAmnesiaHardenedMemoryRemoveTooltip" />
</effect_group>
</buff>

<buff name="buffAmnesiaFragileMemory" name_key="buffAmnesiaFragileMemoryName" description_key="buffAmnesiaFragileMemoryDesc" icon="ui_game_symbol_intellect" icon_color="255,128,0" remove_on_death="false">
<duration value="0" />
<stack_type value="ignore" />

<effect_group>
<triggered_effect trigger="onSelfBuffStart" action="ShowToolbeltMessage" message_key="buffAmnesiaHardenedMemoryTooltipAdd" />
<!-- TODO: add sound to notification (a good sound! your memory was kept!) -->
<triggered_effect trigger="onSelfBuffRemove" action="ShowToolbeltMessage" message_key="buffAmnesiaHardenedMemoryTooltipRemove" />
<triggered_effect trigger="onSelfBuffStart" action="ShowToolbeltMessage" message_key="buffAmnesiaFragileMemoryStartTooltip" />
<triggered_effect trigger="onSelfBuffRemove" action="ShowToolbeltMessage" message_key="buffAmnesiaFragileMemoryRemoveTooltip" />
<passive_effect name="BuffBlink" operation="base_set" value="2" duration="0,3" tags="buffAmnesiaFragileMemory" />
</effect_group>
</buff>

<buff name="buffAmnesiaMemoryLoss" name_key="buffAmnesiaMemoryLossName" description_key="buffAmnesiaMemoryLossDesc" icon="ui_game_symbol_skull_crusher" icon_color="255,0,127" remove_on_death="false">
<duration value="30" />
<stack_type value="ignore" />
<display_value_key value="Memory Loss" />
<display_value value="x" />
<effect_group>
<effect_group name="display-effects">
<!-- TODO: add bad/sad sound (you lost your memory :[ ) -->
<triggered_effect trigger="onSelfBuffStart" action="ShowToolbeltMessage" message_key="buffAmnesiaMemoryLossTooltip" />
<passive_effect name="BuffBlink" operation="base_set" value="2" duration="0,3" tags="buffAmnesiaFragileMemory" />
<passive_effect name="BuffBlink" operation="base_set" value="2" duration="0,3" tags="buffAmnesiaMemoryLoss" />
</effect_group>
<effect_group name="erase-xp-debt">
<passive_effect name="ExpDeficitPerDeathPercentage" operation="base_set" value="0" />
<passive_effect name="ExpDeficitMaxPercentage" operation="base_set" value="0" />
</effect_group>
</buff>

Expand All @@ -37,6 +51,7 @@
<display_value_format value="time" />

<effect_group name="activeEffects">
<passive_effect name="BuffBlink" operation="base_set" value="2" duration="0,3" tags="buffAmnesiaPositiveOutlook" />
<!-- TODO: consider setting to @amnesiaPositiveOutlookXpBoostPerc instead so admins can adjust as necessary -->
<passive_effect name="PlayerExpGain" operation="perc_add" value="1" />
</effect_group>
Expand All @@ -54,9 +69,8 @@
<buff name="buffAmnesiaBloodmoonLifeProtection" name_key="buffAmnesiaBloodmoonLifeProtectionName" description_key="buffAmnesiaBloodmoonLifeProtectionDesc" icon="ui_game_symbol_intellect" icon_color="0,255,128" remove_on_death="false">
<duration value="0" />
<stack_type value="ignore" />
<display_value_key value="Mem Safe" />
<display_value value="x" />
<effect_group>
<passive_effect name="BuffBlink" operation="base_set" value="2" duration="0,3" tags="buffAmnesiaBloodmoonLifeProtection" />
<triggered_effect trigger="onSelfBuffStart" action="ShowToolbeltMessage" message_key="buffAmnesiaBloodmoonLifeProtectionTooltip" />
</effect_group>
</buff>
Expand All @@ -67,6 +81,7 @@
<display_value value="$postBloodmoonProtectionTime" />
<display_value_format value="time" />
<effect_group name="setup">
<passive_effect name="BuffBlink" operation="base_set" value="2" duration="0,3" tags="buffAmnesiaPostBloodmoonLifeProtection" />
<!-- 300s == 5m -->
<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$postBloodmoonProtectionTime" operation="set" value="300" />
</effect_group>
Expand Down
11 changes: 6 additions & 5 deletions Config/items.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<config>
<append xpath="/items">
<item name="drugAmnesiaMemoryBooster">
<item name="drugAmnesiaMemoryBoosters">
<property name="Tags" value="medical" />

<property name="DescriptionKey" value="drugAmnesiaMemoryBoosterDesc" />
<property name="DisplayType" value="drugAmnesiaMemoryBoosters" />
<property name="DescriptionKey" value="drugAmnesiaMemoryBoostersDesc" />
<property name="CustomIcon" value="drugPainkillers" />
<property name="CustomIconTint" value="0,127,255" />
<property name="TintColor" value="0,127,255" />
Expand All @@ -24,12 +25,12 @@
<property name="Delay" value="1.0" />
<property name="Use_time" value="..." />
<property name="Sound_start" value="player_painkillers" />
<requirement name="!HasBuff" buff="buffAmnesiaHardenedMemory" />
<requirement name="PlayerLevel" operation="GT" value="50" />
<requirement name="HasBuff" buff="buffAmnesiaFragileMemory" />
</property>
<effect_group tiered="false">
<triggered_effect trigger="onSelfPrimaryActionEnd" action="PlaySound" sound="spawnInStinger" />
<triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" buff="buffAmnesiaHardenedMemory" />
<triggered_effect trigger="onSelfPrimaryActionEnd" action="RemoveBuff" buff="buffAmnesiaFragileMemory" />
<display_value name="dStopsFragileMemory" value="1" />
</effect_group>
</item>
</append>
Expand Down
2 changes: 1 addition & 1 deletion Config/traders.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<config>
<insertAfter xpath="/traders/trader_info/tier_items/item[@name='drinkJarGrandpasForgettingElixir']">
<item name="drugAmnesiaMemoryBooster" count="1" />
<item name="drugAmnesiaMemoryBoosters" count="1" />
</insertAfter>
</config>
7 changes: 7 additions & 0 deletions Config/ui_display.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<config>
<append xpath="/ui_display_info/item_display">
<item_display_info display_type="drugAmnesiaMemoryBoosters" display_group="groupConsumables">
<display_entry name="dStopsFragileMemory" title_key="statStopsFragileMemory" display_type="Percent" />
</item_display_info>
</append>
</config>
2 changes: 1 addition & 1 deletion ModInfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Name value="Amnesia" />
<Description value="Reset player progress after a configurable number of deaths" />
<Author value="Jonathan Robertson (Kanaverum)" />
<Version value="1.0.0" />
<Version value="1.1.0" />
<Website value="https://github.com/jonathan-robertson/amnesia" />
</ModInfo>
</xml>
Loading

0 comments on commit b912e0a

Please sign in to comment.