VarianceAPI allows you to create Variants for CharacterBodies, Variants can have different textures, lights, skills, and more. Now updated for Hallowed Concepts!
CharacterVariantCatalog.RetrieveDependantSpawnVariants methods have been deprecated as they did not enforce pooling properly.
Added a version of CharacterVariantCatalog.RetrieveDependantSpawnVariants that return a ListPool<CharacterVariantDef>.DisposableRental and have an out List<CharacterVariantDef> parameter
CharacterVariantProvider now has a ReadOnlyList<CharacterVariantDef> filteredVariants, which is all the variants that are available, regardless wether they're marked as unique or not.
Added CharacterVariantProvider.RetrieveVariantsWhere() method, used to retrieve a list of CharacterVariantDefs that match a given predicate.
Fixed an issue where there was a raw token as the description for VarianceAPI's configurations in Risk of Options
'3.1.1' - Proper Save
Added SoftDependency for ProperSave
VariantSpawnManager's RNG states are now saved properly.
Added an ExpansionRequirementCondition, a IVariantSpawnCondition that simply requires the chosen expansions to be enabled on the run
Fixed a bug where the BasicSpawnCondition's stage check would make variants unavailable even if the stage enum was set properly.
Fixed an issue where the VariantSpawnManager was not using the proper "roll variant args" struct metadata
'3.1.0' - This shit is not even a week old and something's already deprecated.
Updated to use R2API_Addressables version 1.1.4
Fixed some unecessary logging done during initialization relating to AddressReferencedBodyPrefabs
Removed the ability to add new equipment sets on the fly
This system was pretty much untested and trying to support this proves to be more trouble than its worth
EquipmentInfo can now either specify a single equipment. It can also override existing equipment if necessary.
Deprecated "cachedVariantName"
Reworked entirely how variants are applied.
Added IVariantBodyApplicator and IVariantMasterApplicator
Each interface defines how bodies and masters apply their assigned variants
Default implementations exist in the classes DefaultVariantBodyApplicator and DefaultVariantMasterApplicator
Each default implementation contains a MethodImpls nested class, which are the default implementations
New implementations are created by creating a Component that implements either IVariantBodyApplicator or IVariantMasterApplicator and adding it to the CharacterBody or CharacterMaster prefab respectively.
Added a custom IVariantBodyApplicator for DLC4's Mimics
The following modifiers and applied/unapplied depending on wether the mimic's disguised or not:
Scale Modifiers
Visual Modifiers
Name Modifiers
Arrival announcement is done the first time the mimic undisguises itself
'3.0.1' - Hotfix
Fixed an issue where the API would try to configure a variant's spawn are and uniqueness even when there was no provider, causing a NRE.
Ran code cleanup on the project
'3.0.0' - Long Term Support
This release marks the first LTS support for VarianceAPI.
A complete rewrite of the codebase has been done to address issues and improve the health of the project
There are a lot of changes that are very likely undocumented (given that it was a complete rewrite), but below should be the key points.
Regardless, VAPI comes with built in documentation using XML, so that should help out :)
General Changes
Thunderkit is no longer required to make new Variants.
Added dependency to "Mackysoft's SerializeReferenceExtensions"
This dependency is used to replace the plethora of ScriptableObjects VAPI required, the amount went from 7 to just 3
This dependency is required to be installed from the github repository if using thunderkit, otherwise the runtime redistribution marked as VAPI's dependency can be used for code only Variants.
all classes are marked as sealed, except for the ones that are intended to be inherited from.
The following ScriptableObjects have been replaced/deleted
Referencing base game assets (such as EquipmentDef, ItemDef, CharacterBody is done via R2API's AddressReferencedAssets)
Runtime Changes
CharacterVariantDefs are now persistent on a body
Once the Body rolls the CharacterVariantDefs, they're stored in the CharacterMaster object.
Next time the Body spawns, the CharacterVariantDefs stored in the CharacterMaster object are used instead of rolling for new ones
Modifications applied to the master are unapplied if the Body's index changes
Added support for creating CharacterVariantDefs at runtime utilizing the CharacterVariantDefBuilder
Contains chainable methods for defining new character variants
Added basic cloning support for CharacterVariantDefs
Creating a Devoted Lemurian variant from an existing Lemurian variant is as simple as calling VariantCloning.CloneIntoDevotedLemurian
Editor Changes
VariantPacks are no longer ScriptableObjects and instead are C# classes similar to ContentPacks
There's Wizards for upgrading your old scriptable objects to the new ones:
Tools/VAPI/VariantPack ScriptableObject Migration Wizard: Used to migrate from VAPI 2.0 to VAPI 3.0 Scriptable Objects
Tools/VAPI/Migrate AddressReferencedAsset Catalog Loads to GUID Loads: Used to migrate from referencing items/buffs/equipments/characters from Catalog names to GUIDS.
Mackysoft's SerializeReferenceExtensions is required to utilize the new interface setups explained on the Runtime Changes section.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.