Rico-GeneticArtifact icon

GeneticArtifact

Adds an artifact that emulates a genetic algorithm on monster stats.

Last updated 2 months ago
Total downloads 74445
Total rating 18 
Categories Mods Artifacts
Dependency string Rico-GeneticArtifact-4.1.0
Dependants 18 other mods depend on this mod

This mod requires the following mods to function

bbepis-BepInExPack-5.4.9 icon
bbepis-BepInExPack

Unified BepInEx all-in-one modding pack - plugin framework, detour library

Preferred version: 5.4.9
tristanmcpherson-R2API-3.0.50 icon
tristanmcpherson-R2API

A modding API for Risk of Rain 2

Preferred version: 3.0.50

README

´╗┐Basic Description

This mod adds a genetics system to the monsters, with every stat being able to mutate in specific ways The core stats that are affected are: Health, MoveSpeed, Damage, and AttackSpeed The goal of the system detailed below is to allow the game to adapt to the player, and in turn force the player to adapt to it

How it Works

  • Every monster has four genes (Health, MoveSpeed, Damage, and AttackSpeed)
  • Every minute (or after 40 monster deaths), the algorithm learns from the fallen monsters and adjusts it's "strategy"
  • This learning is primarily done through a weighted average system that attempts to judge the "combat effectiveness" of a mutation

Video Explanations

1.4.5 - 30-minute overview (outdated, but still semi-accurate) https://youtu.be/V4uxtHPvQKY 2.4.1 - "Rapid Mutation" overview (outdated, this functionality hasn't been re-added yet) https://youtu.be/odUNUfmcHg4 4.1.0 - Challenge Portal Promo https://youtu.be/wCFA7I3Oblk

Known Issues/Planned Updates

  • A feedback system (visual or other) to let the player know how the mutations are trending
  • 4.0.0 hasn't been stress-tested, if you find a breaking bug let me know in the #tech-support channel
  • The challenge portal code introduced in 4.1.0 will eventually be changed and hidden, once I decide how to do that

Changelog

4.1.0
- Added portal code, compound, and challenge for the artifact (thanks to ArtifactCodeAPI)
  - The Genetics challenge will not be required to unlock it for new runs, but...
  - The challenge will instead provide a dramatic mutation rate while in the Bulwark (20%-500% instead of base 90%-110%)
  - Portal code - in left-right top-bottom order - is TDTCGCTDT

4.0.7
- Fixed the random assignment math that`s been broken since 4.0.0 (oops)
  - Monsters now have the chance to get stronger instead of just atrophying away
  - Random range is now 90%-110% instead of 90%-90%

4.0.6
- Adjusted/fixed the math in the RecalculateStatsAPI stat hook
  - Stat modifications should work like all non-4.0.5 versions now

4.0.5
- Rebuilt the hidden item stats using RecalculateStatsAPI from R2API v3.0.43
  - This should help prevent future conflicts with other stat-adjusting mods

4.0.4
- Adjusted TakeDamage hook to avoid certain nullrefs
  - This should prevent Glacial Wisps from infinitely exploding when they die
- Adjusted learning algorithm to round to 2 digits before spawning new bodies
  - Should prevent fringe cases where items are given when they shouldn`t be

4.0.3
- Algorithm will no longer attempt to give genes to bodies that lack inventories (Barrels, Pots, Vagrant Bombs, Urchins, etc.)
  - This would cause nullrefs for these bodies when it tried to allocate their genes
  - Mods that give inventories to these special bodies shouldn`t re-break them

4.0.2
- Fixed a potential divide-by-zero error that could happen during the learning cycle
  - This would only happen if a given BodyIndex had no scoring children

4.0.1
- Removed caching that was causing some major conflicts with certain lobby mods
  - This should fix not being able to start a run in most cases

4.0.0
- Reduced number of genes to 4 (Health, MoveSpeed, AttackSpeed, and AttackDamage)
  - Regen and Armor either didn`t apply to most monsters, or were used by the algorithm to "cheat-out" extra points in other stats
  - Size never really worked they way I wanted, and balancing it doesn`t make much sense
  - The remaining stats should keep the algorithm learning and guessing, instead of just sticking with one stat
- Max and Min gene values have been greatly expanded (0.01 to 10.00, starting at 1.00)
  - Max Product has also been adjusted (from 10 down to 1.5)
  - This should prevent the algorithm from maxing multiple stats, instead pushing for a more balanced build
- Scoring algorithm has been adjusted to focus on time spent in combat instead of just dps
  - Should prevent mega-tanks and glass-cannons, instead pushing for solid combatants
- Learning algorithm has been revamped to use new scores and more data
  - Instead of every 10 seconds, the learn only runs every 60 seconds or once enough data (40 monsters) is available
  - This may seem significantly slower than before, but the extra data means that it can be "smarter" with it
- Networking is now managed through hidden items
  - Host is now the source of truth for the algorithm, no more work for clients
- Rapid Mutation and Infection have been removed
  - Infection was unstable at best and buggy more often than it was worth
  - Rapid Mutation might come back if demand is high enough, but the new algorithm benefits from having more data

Installation

Place the .dll in Risk of Rain 2\BepInEx\plugins or use a mod manager.

Contact

If you have issues/suggestions leave them on the github as an issue/suggestion or reach out to Rico#6416 on the modding Discord.

Available versions

Please note that the install buttons only work if you have compatible client software installed, such as the Thunderstore Mod Manager. Otherwise use the zip download links instead.

Upload date Version number Downloads Download link  
2021-8-5 4.1.0 7315 Version 4.1.0 Install
2021-8-4 4.0.7 505 Version 4.0.7 Install
2021-6-3 4.0.6 6717 Version 4.0.6 Install
2021-6-2 4.0.5 566 Version 4.0.5 Install
2021-5-20 4.0.4 2787 Version 4.0.4 Install
2021-5-17 4.0.3 1160 Version 4.0.3 Install
2021-5-16 4.0.2 516 Version 4.0.2 Install
2021-5-16 4.0.1 177 Version 4.0.1 Install
2021-5-14 4.0.0 578 Version 4.0.0 Install
2021-4-16 3.2.2 4136 Version 3.2.2 Install
2021-4-13 3.2.1 1297 Version 3.2.1 Install
2021-4-12 3.2.0 708 Version 3.2.0 Install
2021-4-8 3.1.0 1588 Version 3.1.0 Install
2021-3-31 3.0.0 2647 Version 3.0.0 Install
2021-3-17 2.6.0 2966 Version 2.6.0 Install
2021-3-6 2.5.2 2225 Version 2.5.2 Install
2021-2-23 2.5.1 2251 Version 2.5.1 Install
2021-2-17 2.5.0 1495 Version 2.5.0 Install
2021-2-2 2.4.2 2774 Version 2.4.2 Install
2021-2-2 2.4.1 141 Version 2.4.1 Install
2021-1-8 2.4.0 5062 Version 2.4.0 Install
2020-12-23 2.3.1 2922 Version 2.3.1 Install
2020-12-21 2.3.0 606 Version 2.3.0 Install
2020-12-8 2.2.0 2158 Version 2.2.0 Install
2020-12-1 2.1.1 1142 Version 2.1.1 Install
2020-11-25 2.1.0 1008 Version 2.1.0 Install
2020-10-30 2.0.0 7651 Version 2.0.0 Install
2020-10-23 1.5.0 2000 Version 1.5.0 Install
2020-10-22 1.4.7 435 Version 1.4.7 Install
2020-10-17 1.4.6 1015 Version 1.4.6 Install
2020-10-17 1.4.5 81 Version 1.4.5 Install
2020-10-15 1.4.4 717 Version 1.4.4 Install
2020-10-14 1.4.3 669 Version 1.4.3 Install
2020-10-13 1.4.2 413 Version 1.4.2 Install
2020-10-13 1.4.1 98 Version 1.4.1 Install
2020-10-12 1.4.0 416 Version 1.4.0 Install
2020-10-2 1.3.0 1867 Version 1.3.0 Install
2020-9-27 1.2.1 1366 Version 1.2.1 Install
2020-9-25 1.2.0 755 Version 1.2.0 Install
2020-9-25 1.1.1 338 Version 1.1.1 Install
2020-9-24 1.1.0 505 Version 1.1.0 Install
2020-9-23 1.0.1 416 Version 1.0.1 Install
2020-9-23 1.0.0 256 Version 1.0.0 Install