GeneticArtifact

v4.5.3·Updated 2024-05-06

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

About this mod Author’s original text

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)

-

  • 2.4.1 - "Rapid Mutation" overview (outdated, this functionality hasn't been re-added yet)

-

  • 4.1.0 - Challenge Portal Promo

-

  • 4.4.0 - 5-minute overview for 4.X versions

-

Known Issues/Planned Updates

  • A feedback system (visual or other) to let the player know how the mutations are trending
  • I need to make some actual documentation/architecture to explain how it works from a dev point-of-view
  • Is GeneticsVariantsPatch coming back? Yep! Check it out here:
  • Is there anything else to add? Maybe. I'm considering making a patch for Artifacts of Doom and Risk of Chaos (\wink\)
  • Are you a dev who has questions? Make an issue on GitHub and flag it as a question, I'm always happy to help

Changelog

4.5.3

  • Added compatibility for RiskOfOptions
  • Gone are the days of restarting the game to update a config value
  • (Technically already could do this with DebugToolkit and saving over the config file)

4.5.2

  • Publicized the monster copy adaption method, for dev usage
  • Should`ve done this a long time ago, but now devs can force specific mutations ad-hoc
  • Monster copy methods do not trigger RecalculateStats on their own, to avoid duplicated effort
  • Added explicit RecalculateStats call on monster copy first generation
  • Monster spawn already does this iirc, but this guarantees genes take effect in fringe cases

4.5.1

  • No new functionality, just refactored to use the Nuget packages instead of local libraries
  • Should make remote development much easier if I ever need to do that

4.5.0

  • Gene-specific cap and floor overrides are back, and without config bloat this time
  • Two new config options, one to opt into using the overrides and the other to actually define them
  • Override syntax is "Gene1,FloorForGene1,CapForGene1|Gene2,FloorForGene2,CapForGene2"
  • Current valid Gene names are MaxHealth, MoveSpeed, AttackSpeed, and AttackDamage
  • Floors/caps need to be parseable into floats, and should follow the same rules as shared floor/cap

4.4.1

  • Bugfix for the token calculation and application methods
  • Stat modifications should more accurately and consistently represent the monster`s genes
  • Previously was bugged to represent the difference from the master copy instead sometimes
  • Also added public events to most major steps in the genetic engine, for dev usage
  • These include: master copy creation and mutation, monster copy mutation and scoring, and global engine learning

4.4.0

  • Added mode that allows stat modifications to apply even if the artifact is disabled
  • This means no sudden drops in difficulty if you disable it mid-run
  • Theres a config option for this, and its disabled by default (ie the old behaviour)

4.3.2

  • Re-Added a configuration file for this
  • Tweak-able values include: when and how the algorithm decides to learn, mutation rates and limits
  • Safety limits might be a bit strict for now, but I want testing a feedback before lifting them

4.3.1

  • Fix for Patch 1.2.3 since there are items in here
  • Converted to the new ArtifactCodeAPI methods since they work now
  • Also

Install & use Install: BepInEx plugin

  1. The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
  2. Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
  3. Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
  4. Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.

Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.

Dependencies

Install these first, or the mod will not work:

bbepis-BepInExPackRiskofThunder-HookGenPatcherRiskofThunder-R2API_CoreRiskofThunder-R2API_ArtifactCodeRiskofThunder-R2API_ContentManagementRiskofThunder-R2API_ItemsRiskofThunder-R2API_LanguageRiskofThunder-R2API_RecalculateStats

File & checksum

Filename
GeneticArtifact-4.5.3.zip
File size
187.2 KiB