Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
ForceItemsEqualShare
The mod should prevent players from picking up items when they have significantly more than the player with the fewest items.
| Date uploaded | 5 years ago |
| Version | 1.0.1 |
| Download link | Mordrog-ForceItemsEqualShare-1.0.1.zip |
| Downloads | 372 |
| Dependency string | Mordrog-ForceItemsEqualShare-1.0.1 |
This mod requires the following mods to function
bbepis-BepInExPack
Unified BepInEx all-in-one modding pack - plugin framework, detour library
Preferred version: 5.4.2121RiskofThunder-R2API_Prefab
API for Prefab creation, networking and duplication
Preferred version: 1.1.1README
RoR2-ForceItemsEqualShare
RoR2 mod - force all players to have similar amount of items per match
Mod will prevent players from picking items if they have significantly more items than the player with the fewest items.
How it works
Let's say a player tries to pick an item. The mod calculates the total costs of this player's inventory and finds the player with the lowest total inventory costs. Now we take the difference between the costs of these inventory and see if it exceeds the threshold. If so, the player will not be able to pick the item.
Inventory Costs
Inventory costs are calculated by taking each item from the player's inventory, multiplying it by its tier cost, and then adding it to the rest of the inventory cost.
Threshold
Threshold is calulcated by taking summed cost of inventory of player who is trying to pick item, multiplying it by ScaleItemsCostsDifference, and then checking whenever it falls between MinItemsCostsDifference and MaxItemsCostsDifference. If it does, then calulcated number is taken as thereshold, if not then min or max value are taken.
Default Config Settings
| Setting | Default Value |
|---|---|
| ScaleItemsCostsDifference | 0.2 |
| MinItemsCostsDifference | 6 |
| MaxItemsCostsDifference | 12 |
| WhiteItemsCost | 1 |
| GreenItemsCost | 2 |
| RedItemsCost | 4 |
| BossItemsCost | 2 |
| BlueItemsCost | 0 |
Additional infos
Mod is ignored on maps:
Bazzar
Void
Items ignored in calulcation:
ArtifactKey
ExtraLifeConsumed
TitanGoldDuringTP
TonicAffliction
CaptainDefenseMatrix\
Items ignored while picking up:
ArtifactKey
ExtraLifeConsumed
TitanGoldDuringTP
TonicAffliction
CaptainDefenseMatrix
ScrapWhite
ScrapGreen
ScrapRed
ScrapYellow