speedcalc
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| speedcalc [2022/09/02 15:15] – created freth | speedcalc [2022/09/03 23:27] (current) – freth | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | NOTE: The reason that horses are inconsistent with speed is because they have to pass soul strength checks in order for traits to kick. | + | ====== Speed Calculator ====== |
| - | /* | ||
| - | Original post text provided from author (https:// | + | |
| + | * This speed calculator does not factor in Ebony (+2.5%) and Silver/ | ||
| + | |||
| + | |||
| + | * Based on the creature' | ||
| + | |||
| + | * The author (below) thinks unicorns are immune to soul strength checks, but he's not definite. | ||
| + | |||
| + | ---- | ||
| + | |||
| + | Credit: [[https:// | ||
| I butchered together some decompiled WU code into a horse speed calculator to see how much of an effect the various factors (traits, weight, gear QL) can have. | I butchered together some decompiled WU code into a horse speed calculator to see how much of an effect the various factors (traits, weight, gear QL) can have. | ||
| Line 30: | Line 39: | ||
| < | < | ||
| - | */ | ||
| - | |||
| - | *(code from above pastebin link)* | ||
| - | |||
| public class MyClass { | public class MyClass { | ||
| - | + | | |
| - | public static void main(String args[]) | + | |
| - | { | + | boolean horse = true; |
| - | boolean horse = true; | + | boolean hellHorse = false; |
| - | boolean hellHorse = false; | + | boolean unicorn = false; |
| - | boolean unicorn = false; | + | // Unicorns are exempt from SoulStrength checks on traits, not modeled here. |
| - | + | ||
| - | // Unicorns are exempt from SoulStrength checks on traits, not modeled here. | + | |
| - | boolean isRidden = true; | + | boolean isSecondRider = false; |
| - | boolean isSecondRider = false; | + | boolean isSaddled = false; |
| - | boolean isSaddled = false; | + | boolean isShoed = false; |
| - | boolean isShoed = false; | + | |
| - | float saddleQL = 70.0F; | + | |
| - | byte saddleRarity = 0; //0 normal, 1 rare, 2 supreme, 3 fantastic | + | byte saddleRarity = 0; //0 normal, 1 rare, 2 supreme, 3 fantastic |
| - | float saddleWoA = 0.0F; | + | float saddleWoA = 0.0F; |
| - | float horseShoe1QL = 70.0F; | + | |
| - | byte horseShoe1Rarity = 0; | + | |
| - | float horseShoe1WoA = 0.0F; | + | byte horseShoe1Rarity = 0; |
| - | float horseShoe2QL = 70.0F; | + | float horseShoe1WoA = 0.0F; |
| - | byte horseShoe2Rarity = 0; | + | |
| - | float horseShoe2WoA = 0.0F; | + | |
| - | float horseShoe3QL = 70.0F; | + | byte horseShoe2Rarity = 0; |
| - | byte horseShoe3Rarity = 0; | + | float horseShoe2WoA = 0.0F; |
| - | float horseShoe3WoA = 0.0F; | + | |
| - | float horseShoe4QL = 70.0F; | + | |
| - | byte horseShoe4Rarity = 0; | + | byte horseShoe3Rarity = 0; |
| - | float horseShoe4WoA = 0.0F; | + | float horseShoe3WoA = 0.0F; |
| - | boolean trait1 = false; //It has fleeter movement than normal | + | |
| - | boolean trait3 = false; //It has a strong body | + | |
| - | boolean trait4 = false; //It has lightning movement | + | byte horseShoe4Rarity = 0; |
| - | boolean trait5 = false; //It can carry more than average | + | float horseShoe4WoA = 0.0F; |
| - | boolean trait6 = false; //It has very strong leg muscles | + | |
| - | boolean trait8 = false; //It has malformed hindlegs | + | |
| - | boolean trait9 = false; //The legs are of different length | + | |
| - | boolean trait11 = false; //It looks very unmotivated | + | boolean trait3 = false; |
| - | boolean trait23 = false; //Color is ebony black | + | boolean trait4 = false; |
| - | float mountCarriedWeight = 6500; // Assumes four 500 gram shoes and one 4500 saddle | + | boolean trait5 = false; |
| - | float riderOneFatLevel = 125; // 0 - 125, Only matters if under 30 | + | boolean trait6 = false; |
| - | float riderOneCarriedWeight = 50000; // Weight in grams | + | boolean trait8 = false; |
| - | float riderTwoFatLevel = 0; | + | boolean trait9 = false; |
| - | float riderTwoCarriedWeight = 0; | + | boolean trait11 = false; |
| - | int hungerPercent = 0; | + | boolean trait23 = false; |
| - | int damagePercent = 0; | + | |
| - | + | ||
| - | //The below are calculated values, do not change | + | |
| - | float mountStrength = 0; | + | float riderOneFatLevel = 125; |
| - | float mountMaxSpeed = 0; | + | float riderOneCarriedWeight = 50000; |
| - | boolean isHorse = false; | + | float riderTwoFatLevel = 0; |
| - | boolean isUnicorn = false; | + | float riderTwoCarriedWeight = 0; |
| - | float shoeBonus = 0; | + | |
| - | float saddleBonus = 0; | + | |
| - | + | int damagePercent = 0; | |
| - | if (horse) | + | |
| - | { | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | } | + | float mountStrength = 0; |
| - | + | float mountMaxSpeed = 0; | |
| - | if (hellHorse) | + | boolean isHorse = false; |
| - | { | + | boolean isUnicorn = false; |
| - | | + | float shoeBonus = 0; |
| - | | + | float saddleBonus = 0; |
| - | | + | |
| - | | + | if (horse) |
| - | } | + | { |
| - | + | mountStrength = 25; | |
| - | if (unicorn) | + | mountMaxSpeed = 30; |
| - | { | + | isHorse = true; |
| - | | + | isUnicorn = false; |
| - | | + | } |
| - | | + | if (hellHorse) |
| - | | + | { |
| - | } | + | mountStrength = 35; |
| - | + | mountMaxSpeed = 32; | |
| - | int hunger = hungerPercent * 65535 / 100; | + | isHorse = true; |
| - | int damage = damagePercent * 65535 / 100; | + | isUnicorn = false; |
| - | float factor = 0.5F; | + | } |
| - | + | if (unicorn) | |
| - | if (hunger < 45000) | + | { |
| - | { | + | mountStrength = 30; |
| - | | + | mountMaxSpeed = 33; |
| - | } | + | isHorse = false; |
| - | + | isUnicorn = true; | |
| - | if (hunger < 10000) | + | } |
| - | { | + | |
| - | | + | int hunger = hungerPercent * 65535 / 100; |
| - | } | + | int damage = damagePercent * 65535 / 100; |
| - | + | ||
| - | if (damage < 10000) | + | |
| - | { | + | if (hunger < 45000) { |
| - | | + | factor += 0.2F; |
| - | } else if (damage > 20000) | + | } |
| - | { | + | if (hunger < 10000) { |
| - | | + | factor += 0.1F; |
| - | } else if (damage > 45000) | + | } |
| - | { | + | if (damage < 10000) { |
| - | | + | factor += 0.1F; |
| - | } | + | } else if (damage > 20000) { |
| - | + | factor -= 0.5F; | |
| - | if ((isHorse) || (isUnicorn)) | + | } else if (damage > 45000) { |
| - | { | + | factor -= 0.7F; |
| - | | + | } |
| - | | + | if ((isHorse) || (isUnicorn)) |
| - | shoeBonus += Math.max(10.0F, | + | { |
| - | shoeBonus += horseShoe1WoA / 2000.0F; | + | if (isShoed) |
| - | shoeBonus += horseShoe1Rarity * 0.03F; | + | { |
| - | shoeBonus += Math.max(10.0F, | + | shoeBonus += Math.max(10.0F, |
| - | shoeBonus += horseShoe2WoA / 2000.0F; | + | shoeBonus += horseShoe1WoA / 2000.0F; |
| - | shoeBonus += horseShoe2Rarity * 0.03F; | + | shoeBonus += horseShoe1Rarity * 0.03F; |
| - | shoeBonus += Math.max(10.0F, | + | |
| - | shoeBonus += horseShoe3WoA / 2000.0F; | + | |
| - | shoeBonus += horseShoe3Rarity * 0.03F; | + | shoeBonus += horseShoe2WoA / 2000.0F; |
| - | shoeBonus += Math.max(10.0F, | + | shoeBonus += horseShoe2Rarity * 0.03F; |
| - | shoeBonus += horseShoe4WoA / 2000.0F; | + | |
| - | shoeBonus += horseShoe4Rarity * 0.03F; | + | |
| - | factor += shoeBonus; | + | shoeBonus += horseShoe3WoA / 2000.0F; |
| - | | + | shoeBonus += horseShoe3Rarity * 0.03F; |
| - | } | + | |
| - | + | | |
| - | float postperc = 0; | + | shoeBonus += horseShoe4WoA / 2000.0F; |
| - | float negtperc = 0; | + | shoeBonus += horseShoe4Rarity * 0.03F; |
| - | float tperc = 0; | + | factor += shoeBonus; |
| - | float poswmod = 0; | + | } |
| - | float negwmod = 0; | + | } |
| - | float wmod = 0; | + | |
| - | float weightPenalty = 0; | + | float postperc = 0; |
| - | + | float negtperc = 0; | |
| - | if (trait1) { postperc += 0.1; } | + | float tperc = 0; |
| - | if (trait3) { poswmod += 10000; } | + | float poswmod = 0; |
| - | if (trait4) { postperc += 0.2; } | + | float negwmod = 0; |
| - | if (trait5) { poswmod += 20000; } | + | float wmod = 0; |
| - | if (trait6) { postperc += 0.1; } | + | float weightPenalty = 0; |
| - | if (trait6) { poswmod += 10000; } | + | |
| - | if (trait8) { negtperc -= 0.1; } | + | |
| - | if (trait9) { negtperc -= 0.3; } | + | |
| - | if (trait11) {negwmod -= 30000; } | + | if (trait3) { poswmod += 10000; } |
| - | if (trait23) {postperc += 0.025; } | + | if (trait4) { postperc += 0.2; } |
| - | + | if (trait5) { poswmod += 20000; } | |
| - | if (isRidden) | + | if (trait6) { postperc += 0.1; } |
| - | { | + | if (trait6) { poswmod += 10000; } |
| - | | + | if (trait8) { negtperc -= 0.1; } |
| - | | + | if (trait9) { negtperc -= 0.3; } |
| - | saddleBonus += Math.max(10.0F, | + | if (trait11) {negwmod -= 30000; } |
| - | saddleBonus += saddleRarity * 0.03F; | + | if (trait23) {postperc += 0.025; } |
| - | saddleBonus += saddleWoA / 2000.0F; | + | |
| - | | + | |
| - | + | | |
| - | | + | { |
| - | | + | if (isSaddled) |
| - | | + | { |
| - | + | saddleBonus += Math.max(10.0F, | |
| - | | + | saddleBonus += saddleRarity * 0.03F; |
| - | | + | saddleBonus += saddleWoA / 2000.0F; |
| - | if (isSecondRider) | + | } |
| - | { | + | factor += saddleBonus; |
| - | | + | |
| - | | + | |
| - | } | + | mountCarriedWeight += riderOneCarriedWeight; |
| - | | + | |
| - | } | + | |
| - | + | | |
| - | float allFactor = 0; | + | { |
| - | float minFactor = 0; | + | if (isSecondRider) |
| - | float maxFactor = 0; | + | { |
| - | float allWeightPenalty = 0; | + | mountCarriedWeight += Math.max(30000, |
| - | float minWeightPenalty = 0; | + | mountCarriedWeight += riderTwoCarriedWeight; |
| - | float maxWeightPenalty = 0; | + | } |
| - | + | } | |
| - | //factor += tperc; | + | } |
| - | allFactor = factor + negtperc + postperc; | + | |
| - | minFactor = factor + negtperc; | + | float allFactor = 0; |
| - | maxFactor = factor + postperc; | + | float minFactor = 0; |
| - | + | float maxFactor = 0; | |
| - | if (mountCarriedWeight > (mountStrength * 5000 + poswmod + negwmod)) | + | |
| - | { | + | |
| - | | + | float minWeightPenalty = 0; |
| - | } | + | float maxWeightPenalty = 0; |
| - | + | ||
| - | allFactor -= allWeightPenalty; | + | |
| - | + | | |
| - | if (mountCarriedWeight > (mountStrength * 5000 + negwmod)) | + | allFactor = factor + negtperc + postperc; |
| - | { | + | minFactor = factor + negtperc; |
| - | | + | maxFactor = factor + postperc; |
| - | } | + | |
| - | + | ||
| - | minFactor -= minWeightPenalty; | + | |
| - | + | | |
| - | if (mountCarriedWeight > (mountStrength * 5000 + poswmod)) | + | { |
| - | { | + | allWeightPenalty = (float)(0.15D * (mountCarriedWeight - mountStrength * 5000.0D - poswmod - negwmod) / 50000.0D); |
| - | | + | } |
| - | } | + | allFactor -= allWeightPenalty; |
| - | + | ||
| - | maxFactor -= maxWeightPenalty; | + | if (mountCarriedWeight > (mountStrength * 5000 + negwmod)) |
| - | + | { | |
| - | int allSpeed = (int)Math.max(0.0D, | + | minWeightPenalty = (float)(0.15D * (mountCarriedWeight - mountStrength * 5000.0D - negwmod) / 50000.0D); |
| - | int minSpeed = (int)Math.max(0.0D, | + | } |
| - | int maxSpeed = (int)Math.max(0.0D, | + | minFactor -= minWeightPenalty; |
| - | + | ||
| - | System.out.println(“If the mount is classified as a horse, all traits (even negative ones) must pass”); | + | if (mountCarriedWeight > (mountStrength * 5000 + poswmod)) |
| - | System.out.println(“intermittent Soul Strength checks to stay active.”); | + | { |
| - | System.out.println("" | + | maxWeightPenalty = (float)(0.15D * (mountCarriedWeight - mountStrength * 5000.0D - poswmod) / 50000.0D); |
| - | System.out.println("" | + | } |
| - | System.out.println(" | + | maxFactor -= maxWeightPenalty; |
| - | System.out.println(" | + | |
| - | System.out.println("" | + | int allSpeed = (int)Math.max(0.0D, |
| - | System.out.println(" | + | int minSpeed = (int)Math.max(0.0D, |
| - | System.out.println(" | + | int maxSpeed = (int)Math.max(0.0D, |
| - | System.out.println(" | + | |
| - | System.out.println("" | + | System.out.println("If the mount is classified as a horse, all traits (even negative ones) must pass"); |
| - | System.out.println(" | + | System.out.println("intermittent Soul Strength checks to stay active."); |
| - | System.out.println(" | + | System.out.println("" |
| - | System.out.println(" | + | System.out.println("" |
| - | } | + | System.out.println(" |
| + | System.out.println(" | ||
| + | System.out.println("" | ||
| + | System.out.println(" | ||
| + | System.out.println(" | ||
| + | System.out.println(" | ||
| + | System.out.println("" | ||
| + | System.out.println(" | ||
| + | System.out.println(" | ||
| + | System.out.println(" | ||
| + | } | ||
| } | } | ||
| </ | </ | ||
speedcalc.1662149736.txt.gz · Last modified: by freth
