Elin
Not enough ratings
Player Gene System (Stable)
2
   
Award
Favorite
Favorited
Unfavorite
Gameplay: Balance
File Size
Posted
Updated
264.318 KB
14 Sep @ 9:01pm
22 Sep @ 10:26pm
11 Change Notes ( view )

Subscribe to download
Player Gene System (Stable)

Description
Recent advancements in North Tyris have finally unlocked the secrets of genetic modification for adventurers like you. The gene machine, once a tool for enhancing allies, is now at your command.

This mod overhauls the gene system, allowing you to apply genetic traits to yourself instantly to reshape your very being. But be warned—tampering with your own DNA is not without consequence. A powerful 'Gene Shock' will wrack your body, and you must manage its effects to survive.

REQUIREMENTS: Elin Stable
- YK Framework (for Gene removal menu)
- CWL (for registering custom "Gene Shock" condition)
- Stable CWL (for Stable Elin): https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3544010094

Useful companion mods:
- CustomAIRedux: https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3561260845
- NPCSpellLearning (Stable): https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3561086399
- Tome of Memory Loss: https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3559347159
- Potion of Enlightenment (FP gain): https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3571963052

FEATURES:
- Player-Accessible Gene Machines: Interact with gene machines and select yourself as the target.
- Instant Application: Genes are applied immediately, no need for the lengthy sleep/suspension cycle used by NPCs.
- Reworked Costs: Feat costs and maximum gene slots are fully configurable for the player (Default 0.5 FP cost).
- Gene Compatibility: Learn spells and gain body parts from genes!
- Gene Shock System: Applying a gene induces a temporary debuff "Gene Shock" that lowers all stats, preventing further modification until it subsides.
- Gradual Recovery: Gene Shock's stat penalty weakens over time, and its duration can be reduced by sleeping or completely cured by Healer.
- Gene Removal UI: Use inferior genes to gain 'Removal Tokens', then access a new UI via the middle-click context menu to permanently remove unwanted genes.
- UI Transparency: Tooltips are enhanced to show player-specific costs and preview the exact strength and duration of the impending Gene Shock.

GENE SHOCK FORMULAS:
The intensity of Gene Shock is calculated from the source gene's properties:
- Strength = -[(Cost / 100) + (Slots * 2) + (NPC_Hours / 20)] * StrengthMultiplier
- Base Duration = [(Cost * 10) + (Slots * 250) + (NPC_Hours * 5)]
- Final Duration = Max(Base Duration, 1000) * DurationMultiplier

HOW IT WORKS:
Find a gene machine and use it. Select your character from the list to open the new player-focused interface. Apply genes using feat points and see the results instantly. Manage the resulting Gene Shock by visiting the Healer (full cure), sleeping (gradual heal), or waiting for it to fade. Use inferior genes to gain removal tokens, then right-click yourself on the map to open the removal menu.

1. Gene Insertion Exhaustion: Controlled by ApplyExhaustionOnInsert - happens when you apply a gene
2. Gene Removal Exhaustion: Controlled by ExhaustionOnShockedRemoval - happens when you remove a gene while in Gene Shock

Both use the same formula but trigger at different times:
- Insertion: Always if enabled, regardless of Gene Shock status
- Removal: Only if you're in Gene Shock AND the setting is enabled

exhaustionAmount = Mathf.RoundToInt(((geneCost * 2) + (geneSlots * 50) + (geneDurationHours * 1)) *
PlayerGeneSystem.ExhaustionMultiplier.Value);

CORE CONFIGS:
EnablePlayerGenes (true) - Master switch for the mod.
MaxGeneSlots (5) - Maximum gene slots for the player.
FeatCostMultiplier (0.5) - Feat point cost modifier (0=free, 1=normal). 0.333 is pretty fair ;)
WarnOnBodyPartOverflow (false):
- True: Shows warning and blocks insertion when body parts from gene would exceed remaining gene slot count
- False: Allows all body part gene insertions without restrictions

GENE SHOCK CONFIGS:
EnableGeneShock (true) - Enables the debuff after gene insertion.
GeneShockStrengthMultiplier (3.0) - Multiplier for the debuff's stat penalty.
GeneShockDurationMultiplier (3.0) - Multiplier for the debuff's duration in turns.
HealGeneShockOnSleep (true) - Enables partial healing of duration during sleep. If false, enable full CURE during sleep.
GeneShockHealAmount (50) - Ticks of duration healed per hour of sleep (when HealGeneShockOnSleep is true).
StatFloorValue (10) - The minimum value a stat can be reduced to by Gene Shock.

ADDITIONAL EFFECTS:
ApplyFatigueOnShock (true) - Adds a sleepiness effect during Gene Shock.
ApplyDimnessOnShock (true) - Adds a Dimness effect Gene Shock.
ApplyExhaustionOnInsert (true) - Causes immediate stamina loss on gene application.
ExhaustionMultiplier (0.5) - Modifier for the amount of stamina lost.

GENE REMOVAL:
AutoCloseAfterRemoval (false) - Automatically closes the UI after removing a gene.
ExhaustionOnShockedRemoval (true) - Inflicts exhaustion if a gene is removed during Gene Shock.

19 Comments
grueshanker  [author] 22 Sep @ 10:27pm 
Fixed Regression: Gene removal dropdown now instantly updates to remove deleted genes from the list.
grueshanker  [author] 22 Sep @ 9:39pm 
✨ New Features (unsub / resub)

- Rich Gene Information Display: Gene removal dropdown shows detailed info with colors
- Shows source, slots, cost, effects with star ratings and actual levels like <<Memory of Endurance>> [*] (4)
- New WarnOnBodyPartOverflow setting too many body part insertions depending on gene slot

⚙️ New Settings

- WarnOnBodyPartOverflow:
- True: Shows warning and blocks insertion when body parts from gene would exceed remaining gene slot count
- False: Allows all body part gene insertions without restrictions
grueshanker  [author] 21 Sep @ 10:58pm 
Update fix: Gene Removal Dropdown should now properly reflect removed gene instantly
Yuka 18 Sep @ 5:12am 
nice
grueshanker  [author] 17 Sep @ 7:17pm 
This mod will stay on Stable for now. Any new features/nightly changes will be split to new mod, as necessary
grueshanker  [author] 17 Sep @ 1:25am 
@DK
LOL
DK 17 Sep @ 1:08am 
@grueshanker annnnnnd we got a stable patch an hour after my comment.
grueshanker  [author] 17 Sep @ 1:03am 
@DK

thanks! I'll hold off on the Stable builds til release day.
grueshanker  [author] 17 Sep @ 1:01am 
Update: Fixed Gene Shock accidentally giving stat buffs and penalties disappearing after save/load. Gene removal now shows exact stamina cost per gene in Gene Removal UI (when ExhaustionOnShockedRemoval is true)
DK 16 Sep @ 11:55pm 
next Elin Stable patch should come soon (around 20th ish usually) so I think there's no rush to release a stable build for now - less work is best work