0 of 0

File information

Last updated

Original upload

Created by

simosas

Uploaded by

simosas1

Virus scan

Safe to use

About this mod

Randomizes NPCs in combat in various ways. READ DESCRIPTION. ALL OF IT. IT'S VERY IMPORTANT.

Requirements
Permissions and credits
Newest randomizer version is NOT compatible with versions before 2.1.0.8, might just crash when trying to load. There is nothing I can do about this. The change had to happen to prevent other crashes ruining the save file far into a run. This is because when NPCs that travel across acts (like Dammon) get transformed and travel to another act, their transformation might become unreferenced and cause the game to crash.


Randomizer only works with saves that were started with the mod enabled, vanilla saves cannot be transformed into randomizer saves.


Honor mode is not recommended if you value your save file.

(changelog is at the bottom of the description)

If a boss gets stuck at 0 hp and refuses to die, use script extender console to find their ID.

_D(Osi.DB_Is_InCombat:Get(nil,nil))

then use RemoveTransforms(ID_IN_QUOTES)  to remove their transformation, and it should work properly afterwards. Randomizer v2.1.0.10 should address this bug properly though by doing it automatically (also larian pls this wasnt the case before).




What the mod does:

Everything mentioned below is configurable.

When combat starts, it randomizes enemy equipment, spells, models, levels them up, gives extra resources (actions, spell slots, etc.), gives random positive or negative statuses, random consumables, applies health boosts, stat boosts,passives, AC boosts, changes their size and can multiply them a set amount of times. Also has a bunch of other flavor features, listed below in the configuration section.

Please read everything in the config to understand how the mod works exactly.





HOW TO CONFIGURE:


After installing the mod and loading a save file, a text file will be created in:
%localappdata%\Larian Studios\Baldur's Gate 3\Script Extender  (you can copy paste this into windows search to go there)

The config file is called "CombatRandomizerConfig.txt"


If you can't find it, click the settings icon in the Larian launcher (bottom left), then scroll down and find the "Open profile folder" button. The Script Extender folder should be there.


Configuration options:

The config file CAN be edited in-game. You need to manually reload it by using a "Ping" anywhere (ping is the button next to the minimap that marks a spot). If you want le funny mode, use
TransformAllNpcs (very good for videos/streams).

Randomness
- this number decides how extreme NPCs can get, it affects the amount of boosts/statuses/etc. they gain.
Recommended value (for a normal-ish playthrough) is around 20. Can go up to any number you want, may cause long-ish delays at high (100+) values. This is NOT a percentage, it's just a number used for random rolls. Think of it as a multiplier for other boosts.

NpcEquipment- this is a percentage chance (0-100) for NPCs to gain new equipment. Each equipment slot is rolled separately. Affected by EnemiesOnly and NpcsDropAddedItems. As of v1.9.0.2 , equipment is deleted immediately if the enemy did not succeed a NpcsDropAddedItems roll.

NpcSpells - this is a percentage chance (0-100) for NPCs to gain new random spells. Due to the way their AI is programmed, some NPCs can decide to spam certain spells, so a value of 100 is not recommended(unless you like fun). Affected by Randomness and EnemiesOnly.

Transformations - this is a percentage chance (0-100) for NPCs to transform into a random model. Can break some stuff, for example if an enemy gets a dragon model in a cave it might become unable to move due to collision. Affected by EnemiesOnly and ActualTransformations. If you want the enemies to not just be disguised as a different model, use ActualTransformations (described later). The game is (sadly) limited to only in-region NPCs for transformations, so if you're in Act 1 you will mostly see characters from Act 1.

EnemiesOnly - this is a toggle (0 or 1). If it's 1, then only enemies in combat will be affected by the mod. If it's 0, all NPCs in combat will be affected.

LevelUps - this is a percentage chance (0-100) for NPCs to randomly level up. NOT RECOMMENDED. Most enemies do not scale with level, and this will boost your XP gains exponentially, so only use it if you want that. Affected by Randomness. Also might crash the game if you've got high enemy multiplication settings, nothing I can do about that.

ResourceBoosts - this is a percentage chance (0-100) for NPCs to gain random resource boosts. This includes actions, bonus actions, rage points, sorcery points, superiority dies, wildshape charges, lay on hands charges, channel oath charges, channel divinity charges and ki points. Affected by EnemiesOnly and Randomness.

Statuses - this is a percentage chance (0-100) for NPCs to gain random (positive or negative) statuses for a random duration. Affected by EnemiesOnly, Randomness and NegativeStatuses.

Consumables- this is a percentage chance (0-100) for NPCs to gain random consumables. A lot of enemies really like to spam them so a value of 100 is NOT recommended. Affected by Randomness and EnemiesOnly. Enemies will blow the shit out of you with OP bombs so use at own discretion.

NegativeStatuses- this is a toggle (0 or 1). If the value is 1, then enemies are allowed to gain negative statuses as well as positive ones, if the value is 0 then only positive statuses will be given. Only works if Statuses is higher than 0.

HealthBoosts - this is a percentage chance (0-100) for NPCs to gain a random amount of bonus (temporary) health. The health has been changed from max HP to reduce annoyance from enemies healing a shit ton and to allow clones to receive
HP boosts. Affected by Randomness and EnemiesOnly.

NpcsDropAddedItems - this is a percentage chance (0-100) for NPCs to drop items given by NpcEquipment and Consumables. Only use if you want to gain OP items. As of v1.9.0.2 , equipment is deleted immediately on death if the enemy did not succeed the item drop roll.

StatBoosts - this is a percentage chance (0-100) for NPCs to gain random stat boosts. Affected by EnemiesOnly and Randomness.

ACBoosts - this is a percentage chance (0-100) for NPCs to gain or lose a random amount of AC. Affected by EnemiesOnly and Randomness. The formula for calculation is a random number between 1 and Randomness divided by 3, rounded down minus random number between 1 and Randomness divided by 2, rounded down. TL;DR negative AC values are more likely cause they gain a shit ton from equipment anyway.


DamageBonus- this is a percentage that dictates how much extra damage your party members will deal to enemies. For example, setting this value to 100 would double damage done to enemies (in combat). This bonus will be applied as separate instances of damage, to bypass damage cap limitations (if you want to run 10 million% damage boost or something). Recommended, you will need it. Enabling non-lethal attacks will disable this feature.

ActualTransformations - this is a toggle (0 or 1). This makes enemies become who they transformed into. The game will attempt to combine the AI of the original and the transformed creature, which can be pretty wonky. Hopefully doesn't crash the game too much. Might cause very weird interactions. The "original" NPCs will still exist, so quests shouldn't be super broken.

EnemyMultiplication - this dictates how many times each NPC will be cloned in combat, for example a value of 1 would make everyone in combat get 1 clone of themselves (that then gets randomized separately). Affected by EnemiesOnly.
The clones appear slightly after the combat starts for not crashing reasons. Setting this to a very high number will likely softlock the fight completely. Clones attempt to automatically inherit equipment from the thing they were cloned from, but are then randomized separately and may gain different equipment. In big fights, clones may appear out of vision to the players and enter combat only when you move closer. Clones can receive resource, AC, and other boosts (though again, they are rolled separately), however their base stats may be slightly lower than the character they've been cloned from. You can change this to only clone enemies using the EnemyOnlyDuplication config option, or only target allies using AllyOnlyDuplication (explained lower in the mod description). Can fail to work if the enemies try to spawn in an invalid location (same thing happens in vanilla with stuff like the ogre horn so don't blame me). Clones also seemingly don't get name changes because the game hates everything fun. To make cloning chance based, use EnemyDuplicationChance. Clones can be looted mid-combat, however they will automatically be cleaned up after the fight. This feature can be kinda buggy because some fights are scripted and that messes with game logic.

ChangeSize- this is a percentage chance (0-100) for NPCs to change their size. Setting this to 100 will guarantee everyone will change their size. Minimum possible size is 0.2x, maximum is 2.5x. (size not configurable to prevent softlocks).
Might get some NPCs stuck in places because of their size, so if you're using it make sure to save often.


RaidBosses - this is a percentage change (0-100) for a random ENEMY in combat to become one of the available raid boss variants (4 variants are available). They are special enemies that get their own pre-configured stats and abilities. Raid boss events will make every other enemy in combat Surprised for X amount of turns (configurable using the FreezeTurns config option). They will also become enraged after X amount of turns (configurable using RaidBossEnrageTurns config option). After becoming enraged, they become much stronger. Allies/neutral NPCs in battle cannot become raid bosses and will not be surprised by a raid boss appearing. (Thanks to Muffin for the idea!)

RaidBossEnrageTurns - this is the number of turns before a raid boss becomes enraged.

FreezeTurns - this is the number of turns enemies become Surprised for when a raid boss appears.

Passives - this is a percentage chance (0-100) for enemies to gain a random passive.

EnemyDuplicationChance- this is a percentage (0-100) that dictates the chance for an enemy to be duplicated. If set to 100, the enemies will  always succeed a duplication check, however the mod also checks
RandomDuplicationAmount afterwards.

EnemyOnlyDuplication - this is a toggle (0-1). If set to 1, only enemies will be duplicated in combat, if set to 0, then everyone can be duplicated.

AllyOnlyDuplication - this is a toggle (0-1). If set to 1, only allies will be duplicated in combat, if set to 0, then everyone can be duplicated. Not compatible with EnemyOnlyDuplication (obviously)

RandomDuplicationAmount - this is a toggle (0-1). If set to 0, enemies will duplicate the exact amount of times specified by EnemyMultiplication. If set to 1, enemies will duplicate a random amount of times between 0 and EnemyMultiplication.

NameChanges - this is a percentage chance (0-100%) for each NPC to gain a random epithet (like Goblin Scout The Stupid as an example) after their name. It's purely a visual feature. Affected by EnemiesOnly. NPCs with changed names will appear as "Not Found" after restarting the game, so only use this if you don't mind that.

Elites - this is a percentage chance (0-100%) for each NPC to become Elite. Elite NPCs gain extra health and can be one of the 7 possible types:
Blazing - leaves a trail of hellfire and burns enemies it attacks.
Glacial - chills enemies it attacks and sometimes spawns a big ice field around itself.
Overloading - gains slightly more health, zaps enemies it attacks. On death, can electrify every surface around itself in a big area.
Malachite - applies anti-healing and poison on hit. On death, leaves a pool of acid.
Frenzied - gains extra movement, and temporary Unstoppable and Legendary Resistance.
Volatile - creates small explosions on the target when attacking, dealing extra force damage. At 60% health, will initiate a countdown to self-destruct. One-shotting them will not make them explode.
Leeching - heals and gains extra temporary health when hitting enemies, applies bleed.

Affected by EnemiesOnly.

All elites have effects on them and a prefix in their name to differentiate which is which.
(the idea was totally yoinked from Risk of Rain, epic game)

GiveRandomSpellToParty - this is a percentage chance (0-100%) for each party member to get a random spell from the same list the enemies get spells from. Most spells given from this only cost an action, and no actual resource. The given spells are removed after combat ends. Good spells not guaranteed.

TransformPartyMembers - this is a percentage chance (0-100%) for each party member to transform into a random NPC when combat starts. This can transform people even if they aren't in combat yet, like if one of your party members join combat it will still trigger. Transformations will be removed once the combat that triggered them ends. The transformations use the same rules as the NPCs, so you will NOT lose spells you had, only gain ones that the NPC you transformed into has.
This will also change your health to whatever you transformed into. Equipment changes are also possible, if the NPC you transformed into has equipment it's supposed to wear.
May cause characters to remain in their transformed form in some cases, especially when they die and are unable to lose their transformation. Use Script extender console, RemoveTransforms(GetHostCharacter()) command to get rid of it.

WhoopsAllBosses - this is a percentage chance (0-100%) that will transform every enemy into a "boss" enemy if it succeeds. Transformations and ActualTransformations must be enabled for this to function properly. The roll for it only happens once per combat and resets after combat ends.

RandomTreasure - this is a percentage chance (0-100%) that generates random loot in NPC inventories when they died. It picks a random existing treasure table and gives loot from that, so it might range from magic items to random junk. The chance is rolled every time an NPC dies.


TransformAllNpcs - this is a toggle (0 or 1). If set to 1, then all NPCs in the current region will immediately transform into random NPCs instead. Quests/dialogs will remain the same, just that NPCs will have different stats and appearances. This is PERMANENT. Npcs transformed by this will be unaffected by Transformations caused by Randomizer if they get into combat (as in, they won't transform into a different thing again). Certain "cutscene" NPCs will appear as normal but they don't actually exist so can't do much about that.

AutomaticallyReadConfig - this is a toggle (0 or 1). If enabled, the game will read and update the config every few seconds automatically. If disabled, you need to use "Ping" to reload the config. Automatically reading config may cause crashes when loading saves in rare situations.

ReadingAbilityUnlocked - Set this to 1 to disable the message box. Hope you read something while scrolling down here!

ConsoleDebug-  This is a toggle (0 or 1). It makes the mod print out what it's doing in the script extender console. Don't use unless you're interested and know what you're looking at, as it will reduce performance and spam up your console window.


ADVANCED USERS/MODDERS ONLY:

A "CombatRandomizerModdedItems.txt" file will appear in the same place as the config file.

You can use it to insert modded items/spells/statuses into Randomizer tables.



This is the file with examples on how to insert items into it (it's a bunch of JSON arrays basically)
Transformations accept any UUIDs of characters
Spells accept spell names in the format shown in the picture.
All Equipment categories and consumables accept UUIDs of those items.
Statuses and Negative statuses accept names like shown in the picture.
Modded items file gets re-read when you load a save.

You will need the mods the items/spells/etc. come from loaded as well for this to work (obviously)


Notes:




This mod can be EXTREMELY UNBALANCED gameplay wise, make sure to change up the config if you want a more general-purpose difficulty mod.


NPCs will keep their bonuses if you run away from combat, excluding
recruitable Origin NPCs which aren't targeted by the mod at all.



Some spells the NPCs can get are normally only used by specific enemies, so
some animations may be missing and/or cause a short delay in the AIs
thought process.

Transformations are kept after combat ends. Won't fix cause funny

Requires Norbyte's Script Extender.



Compatible with Lethal AI/Immersive AI, most likely compatible with a whole bunch of other mods as well.


Multiplayer - should work fine.





==== Changelog ====

V2.1.0.11
same as V2.1.0.9 basically but with more checks in place

V2.1.0.10

Removed previous fix, instead replaced with a function that removes bosses' transformation when they're supposed to be dead and then does a ton of damage to them to the fight goes how it was supposed to. They also become elligible for a transformation again after a few seconds (mostly so Ketheric can transform again).

V2.1.0.9

Ketheric now untransforms when low on health so his cutscene can proceed as normal. Sucks, but thats the only way to fix it.

V2.1.0.8

Forgor to add some npcs to the global list. Added now

V2.1.0.7

Removed a bunch of civilian transformations (though there are still a lot left due the bg3 having so many)

NPCs now get proficiency with every weapon type



V2.1.0.6

Randomization should be more random now (which means more naked NPCs probably)

Every NPC from every act (with some exceptions) should now be able to appear anywhere (hopefully)

This should also fix crashing issues with the mod, since invalid references shouldn't be possible anymore.

Removed the shitty ass jank added in v2.1.0.5 that prevented crashing but messed up other stuff


V2.1.0.5

Added extreme jank to hopefully fix the crashing.

V2.1.0.4

Added more bugs.

DamageBonus is now disabled for characters using non-lethal attacks.

TransformPartyMembers now depends on ActualTransformations, if you only want to transform visually.

NPCs will now have their models re-randomized when entering a region (going through a loading screen). This sucks ass and i hate it but it hopefully fixes the crashing due to invalid transformations carrying over to different acts. Not even sure if this'll work for the crashing tbh. Also it probably will be wonky if you're doing multiple playthroughs at the same with randomizer, causing npcs to reroll even when they're not supposed to

V2.1.0.3

Added more bugs.

Removed 5 transformations that caused crashes (this will not apply retroactively to fix saves that are stuck in crash loops).

Volatile elite enemies now attempt to explode when below 60% max hp instead of 30%.

Config is no longer read automatically by default, it's now a config option. Use ping to reload config if it's disabled.

Added AutomaticallyReadConfig option to config.

Attempted to fix friendly summons being counted as clones and deleted after combat is multiplication is enabled.

Cloned enemies should now become surprised if others in the fight are surprised. This only works if the clones enter combat and happens with a small delay due to the game needing time to process stuff.


V2.1.0.2
Added RandomTreasure config option.
Added TransformAllNpcs config option.
Randomizer config now reloads itself automatically every few seconds, so as soon as you save the config file it will be applied ingame.
Added Slayer to "whoops all bosses" table.

V2.1.0.1
Did ABSOLUTELY NOTHING.

V2.1
Added WhoopsAllBosses config option
Added ReadingAbilityUnlocked. Not sorry

V2.0.0.9
Removed some useless transformations (there are still plenty left!)
Added TransformPartyMembers config option
Changed the default config numbers because people don't read the description

V2.0.0.8
Removed swarm behavior completely
Instead, made the enemies less dumb so they're more likely to use all the spells they got
Removed the full scale Netherbrain from the transformations list, cause it takes up the whole screen and spawns underground, unable to do anything.
Increased amount of spell slots NPCs can get

V2.0.0.7
Apparently setting everyone to a group makes them dumb, no more of that
Instead some NPCs will get grouped based on whether their AI is "stupid"
Recommend using cheat engine to speed up turns with a lot of dudes

V2.0.0.6
Fixed items from enemies being unequipable for NO REASON. what the fuck larian
NPCs targeted by randomizer will now attempt to act simultaneously to reduce how long their turns take.
Added AllyOnlyDuplication config option
Added GiveRandomSpellToParty config option

V2.0.0.5
Reduced action point gain EVEN MORE, capped max action point gain at 3
Enemies should now have access to wayyy more transformations (which means more weird ass enemies)
Transformations are no longer removed on death, cause funny
Fixed enemies randomly reviving (again) (probably not the last time tbh)

V2.0.0.4
More bug squishing:

NPCs should hopefully no longer randomly revive after combat ends
DamageBoost now no longer tries to deal 0 damage if the boost percentage is low and the attack didn't deal enough damage.  (should stop combat log spam for 0 damage and make enemies not flinch even if you missed)

V2.0.0.3
Small bugfix for modded item insertion

V2.0.0.2
Apparently i forgot to give enemies amulets. Fixed now
Also added amulets table to CombatRandomizerModdedItems.txt . Delete your old file and let it regenerate pretty please
Stats can now go up to 10000 instead of being capped at 30
Items no longer get the "Randomized" status

V2.0.0.1
Went to sleep after v2.0 release, forgor i left in a test function that would delete every item in existence that was ever given by randomizer. Whoops!

V2.0 baby!
Rewrote item removal function AGAIN. Should work fine now hopefully
Reformatted the transformation system, which made it kinda limited to the current region but also way better variety and gameplay wise
Added EnemyDuplicationChance
Added ConsoleDebug
Nerfed action gain, should hopefully see no more NPCs attacking 10 times in a row (unless Randomness is high)


V1.9.0.2
Rewrote item drop/delete logic (NpcsDropAddedItems). Now items are deleted/not deleted upon the death of the NPC carrying them, instead of when combat ends. This is mostly to prevent confusion for people who didn't read the description (smh my head)
AC boosts are now more likely to be negative. Fuck 15% hit chances.
Added RandomDuplicationAmount config option.
Removed "Until Death Do Us Part" from rings because it makes NPCs like players and sometimes crashes the game.
Added more bugs (probably, i fucking hate the item removal function and everything related to cloning)

V1.9.0.1
AC boost values increased, however they can also become negative now which should decrease the chance of every enemy being stupidly hard to hit.
TransformRules has been changed into ActualTransforms
Non-hostile NPCs should now have their transformations removed properly after combat.

V1.9
Added 7 types of 'elite' enemies.
Some le bug fixes (mostly around items not being cleaned up despite 0% drop chance)

V1.8.5
Added one more raid boss variant
Equipment is now rolled separately for each slot instead of a chance for NPCs to gain a full set of stuff or nothing.
Added NameChanges cause it's funny

V1.8
Added raid bosses (3 variants) along with config options for them.
Added random passives.
Added enemy only duplication
Reworked config to not delete old settings when it's updating to the newest version.
You can now reload the config in-game by using a "Ping"
Fixed some wack ass bugs (hopefully)

V1.7.0.1
Changed HP gain logic to temporary hp instead of max (for clone reasons)

V1.7
Now excludes recruitable (origin) NPCs from randomizing.
Reduced number of spells the enemies get (still tied to Randomness)
Now marks randomized NPCs with "Randomized" status, to prevent double-randomizing in the case of escaping combat.

V1.6.5
Added enemy multiplication (properly this time)
Added Scale settings to config
Now allows importing of modded stuff using the CombatRandomizerModdedItems.txt file
Changed the way DamageBonus is calculated to allow damage numbers above the maximum amount (46340)

V1.6
Added enemy multiplication (test version)

V1.5
Rewrote the configuration instructions to (hopefully) be easier to read and understand.
Added 4 new options: StatBoosts, ACBoosts, DamageBonus and TransformRules.
Nerfed statuses.
Removed special weapon attacks from the spell list (cause the enemies can't use those smh my head)


V1.4.9.10
Implemented a spell "anti-spam" feature, though it only works on some specific enemies (which kinda sucks)

V1.4.8.1
Removed "Backdraft" from spells list (enemies sometimes got confused and spammed it at nothing)
Reduced duration of statuses

V1.4.7.9
Small bugfix that caused enemies not to gain action points/resources
Reduced the chance for enemies to gain actions/bonus actions (to not be too busted)

V1.4.7
Even more config options!
Finally actually fixed the bug where enemies would still drop their op items. Hopefully. Please God.

V1.4.6
Added extra configuration options
Fixed a leftover bug from v1.4 that only made enemies get one status instead of multiple

V1.4.5
Added configuration options instead of making different versions
Removed some spells that caused the AI to be dumb

V1.4
(Probably) Actually fixed a small bug that made enemies not lose their given items after combat
Added a list of 197 status effects that the NPCs may get
Reduced HP gain on wacky version (it was kinda unplayable tbh)

V1.3.5
Hopefully fixed a small bug that made some enemies keep their OP items
Added 120(!) new spells that the AI might get, mostly weird enemy specific spells, some of which are super strong


V1.3
Separated items by slot, thus making enemies wayyy more likely to get high level gear, since they don't get useless items anymore.
The mod only has two versions now, wacky and not wacky.
Reduced the amount of spells the AI can get by A LOT, should hopefully help with performance.


V1.2.5
Added items/consumables are now removed from NPCs after combat ends (pls no looting mid fight)
Enemies can now gain random spell slots(the spells given to them don't have a cost, but their AI requires spell slots to be able to cast them anyway)
Which means: enemies now can cast a much wider array of spells! (in theory)


V1.2
Now gives enemies a random amount of equipment items that they will attempt to use (and that you can loot from them later, if you want to be OP)
Now also gives them a random amount of consumables (potions, arrows, bombs) that they may also use (if they feel like it)
Made everything more random in general, enemies aren't guaranteed to get all available buffs
NPCs may now exceed level 12 (mostly affects only really important NPCs, they gain levels and extra abilities sometimes)
Health and level gain maximum is now tied to the level and health of the NPC
HP loss removed
Added another version - enemies only + no transformations (probably the most "balanced" one)
(also considered adding no level-ups for enemies in case someone wants to not get half a level from one enemy, will add if people ask for it)


V1.1.5
Should no longer give a ton of spells to your party chars (whoops)

V1.1:
Added all Dragonborn breath attacks into spells that are possible for the AI to get
Transformations are now removed after combat ends (everything else stays though)
Fixed party members sometimes getting boosts when they're not supposed to
Enemies can now gain more action/bonus action points!
Changed HP gain logic, now enemies are less likely to have either 1 or 100+ hp
  翻译: