-
Notifications
You must be signed in to change notification settings - Fork 5
Strength
Strength is the balancing number between raid targets and raid attackers. A raid will always try to match the attackers to the raidtarget's strength. However, several calculations happen to come to the final totals. Most of these numbers can be tweaked in the Configs
Strength has been balanced around the simple premise that a zombie and a villager both count as a 5. Attribute boosts are balanced towards a 1.
The calculation of the strength of an individual wave is independent of the type of raid. It consists of several multipliers, that are added together to form the multiplier that is applied on the raid target's strength.
- Base Wave Multiplier: The initial multiplier. Making this less than 1 will make all raids easier, larger than 1 will make them harder. You can leave this on 1 and control each raid target individually.
- Wave Target Strength Spread: The random factor, which will slightly alter the value. Big impact on smaller raids, small impact on big waves. Creates some wave size variety.
- Multiplier Increase Per Wave: The amount added to the multiplier for every wave.
- Difficulty Multiplier: The amount added (or substracted) to the multiplier for the difficulty.
- Bad Omen Multiplier: The amount added to the multiplier based on the Bad Omen level of the raid.
- Total Multiplier: The total multiplier is calculated as the sum of all other multipliers.
- Target Wave Strength: The actual target wave strength is calculated by multiplying the raidTarget's strength with the total multiplier.
The exact code calculation:
float waveMultiplier = BASE_WAVE_MULTIPLIER.get() + (this.groupsSpawned * MULTIPLIER_INCREASE_PER_WAVE.get());
float spreadMultiplier = ((level.random.nextFloat()*2)-1)*WAVE_TARGET_STRENGTH_SPREAD.get();
float difficultyMultiplier = getDifficultyMultiplier(level.getDifficulty());
float badOmenMultiplier = MULTIPLIER_INCREASE_PER_BAD_OMEN.get() * (factions.size()-1);
float totalMultiplier = waveMultiplier + spreadMultiplier + difficultyMultiplier + badOmenMultiplier;
int targetStrength = (int) Math.floor(raidTarget.getTargetStrength() * totalMultiplier);A village's raid target strength is calculated based on 2 values and a mod compatibility event.
- Number of Villagers: The strength increases by 1 for every villager in the village.
- Number of Iron Golems: The strength increases by 2 for every Iron Golem in the village.
- CalculateStrengthEvent: For Mod Developers This Event is thrown on the Event Bus and allows other mods to write code to add values. A mod that adds extra defenses, or extra value, to a village should in theory be expanding this. A modder could write code that adds 1 for every gold block in the village, for example. The total of these values is then multiplied by the Village Raid Strength Multiplier for the final Raid Target Strength.
A player Raid Target is as of yet untested and the values might not be suitable.
- Base Value: A base value of 20 is applied to player strength.
- CalculateStrengthEvent: For Mod Developers This Event is thrown on the Event Bus and allows other mods to write code to add values.