Acrobatics config pt 1

This commit is contained in:
nossr50 2019-03-21 17:12:14 -07:00
parent 579109b2f5
commit 0c58f5073c
10 changed files with 95 additions and 17 deletions

View File

@ -17,7 +17,7 @@
</issueManagement>
<packaging>jar</packaging>
<build>
<finalName>mcMMO.jar</finalName>
<finalName>${project.artifactId}</finalName>
<sourceDirectory>${basedir}/src/main/java</sourceDirectory>
<resources>
<resource>
@ -77,9 +77,6 @@
<descriptors>
<descriptor>src/main/assembly/package.xml</descriptor>
</descriptors>
<!--<descriptorRefs>
b${BUILD_NUMBER}
</descriptorRefs>-->
</configuration>
<executions>
<execution>
@ -245,7 +242,6 @@
</dependency>
</dependencies>
<properties>
<BUILD_NUMBER>UNDEFINED</BUILD_NUMBER>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>

View File

@ -6,9 +6,9 @@
</formats>
<files>
<file>
<source>${project.build.directory}/${project.artifactId}.jar</source>
<source>${project.build.directory}/${artifactId}.jar</source>
<outputDirectory>/</outputDirectory>
<!--<destName>${project.artifactId}-${project.version}-b${BUILD_NUMBER}.jar</destName>-->
<destName>mcMMO.jar</destName>
</file>
</files>
</assembly>

View File

@ -12,6 +12,9 @@ public class ConfigConstants {
private final static String[] EXAMPLE_BLACKLIST_WORLDS = {"Example_15434453", "Example_2324423", "Example_323423465"};
public final static ArrayList<String> EXAMPLE_BLACKLIST_WORLDS_LIST_DEFAULT;
public final static String SKILL_SCALING_BENEFIT_EXPLANATION = "\nSub-Skills dynamically adjust their rewards to match the max bonus level, you can think of it as a curve that calculates what bonuses " +
"\n a player should have based on how far they are from the max bonus level value, and the other parameters used for the scaling of that sub-skill.";
//Add the worlds to the list
static {
EXAMPLE_BLACKLIST_WORLDS_LIST_DEFAULT = new ArrayList<>();

View File

@ -12,16 +12,18 @@ public class ConfigScalingSubSkillRetro {
public static final int MAX_BONUS_LEVEL_DEFAULT = 1000;
public static final double CHANCE_AT_MAX_SKILL_DEFAULT = 100.0D;
@Setting(value = "Retro-Mode-Max-Bonus-Level", comment = "At the max bonus level a player will have full benefits from this scaling skill." +
@Setting(value = "Max-Bonus-Level", comment = "Max bonus level is the level a player needs to reach in this skill to receive maximum benefits, such as better RNG odds or otherwise." +
"\nSkills dynamically adjust their rewards to match the max bonus level, you can think of it as a curve that calculates what bonuses " +
"\n a player should have based on how far they are from the max bonus level value, and the other parameters used for the scaling of the sub-skill." +
"\nNote: This is the setting for RETRO MODE!" +
"\nDefault value: "+MAX_BONUS_LEVEL_DEFAULT)
private int maxBonusLevel = MAX_BONUS_LEVEL_DEFAULT;
@Setting(value = "Retro-Mode-Success-Rate-Cap-Percentage", comment = "This is the odds for RNG components of this sub-skill to succeed when a player has reached \"Max-Bonus-Level\"." +
@Setting(value = "Max-Success-Chance", comment = "The maximum success chance for this Sub-Skill." +
"\nA value of 100.0 would be equivalent to 100% chance of success." +
"\nPlayers only have Max-Success-Chance when their skill level has reached the maximum bonus level." +
"\nMax skill chance is dynamically adjusted based on the players level difference from the \"Max-Bonus-Level\", you can think of it as a curve where reaching \"Max-Bonus-Level\" is the peak." +
"\nAs an example, imagine \"Retro-Mode-Success-Rate-Cap-Percentage\" was set to " + FIFTY_PERCENT_EXAMPLE + " and the \"Max-Bonus-Level\" was " + MAX_BONUS_LEVEL_EXAMPLE + "," +
"\nAs an example, imagine \"Max-Success-Chance\" was set to " + FIFTY_PERCENT_EXAMPLE + " and the \"Max-Bonus-Level\" was " + MAX_BONUS_LEVEL_EXAMPLE + "," +
"\n and the player was level " + FIFTY_PERCENT_EXAMPLE + " for this skill, that would give the player " + ODDS_PERCENTAGE_EXAMPLE + " odds to succeed with this skill." +
"\nNote: This is the setting for RETRO MODE!" +
"\nDefault value: "+CHANCE_AT_MAX_SKILL_DEFAULT)

View File

@ -12,16 +12,18 @@ public class ConfigScalingSubSkillStandard {
public static final int MAX_BONUS_LEVEL_DEFAULT = 100;
public static final double CHANCE_AT_MAX_SKILL_DEFAULT = 100.0D;
@Setting(value = "Standard-Mode-Max-Bonus-Level", comment = "At the max bonus level a player will have full benefits from this scaling skill." +
@Setting(value = "Max-Bonus-Level", comment = "Max bonus level is the level a player needs to reach in this skill to receive maximum benefits, such as better RNG odds or otherwise." +
"\nSkills dynamically adjust their rewards to match the max bonus level, you can think of it as a curve that calculates what bonuses " +
"\n a player should have based on how far they are from the max bonus level value, and the other parameters used for the scaling of the sub-skill." +
"\nNote: This is the setting for STANDARD MODE!" +
"\nDefault value: "+MAX_BONUS_LEVEL_DEFAULT)
private int maxBonusLevel = MAX_BONUS_LEVEL_DEFAULT;
@Setting(value = "Standard-Mode-Success-Rate-Cap-Percentage", comment = "This is the odds for RNG components of this sub-skill to succeed when a player has reached \"Max-Bonus-Level\"." +
@Setting(value = "Max-Success-Chance", comment = "The maximum success chance for this Sub-Skill." +
"\nA value of 100.0 would be equivalent to 100% chance of success." +
"\nPlayers only have Max-Success-Chance when their skill level has reached the maximum bonus level." +
"\nMax skill chance is dynamically adjusted based on the players level difference from the \"Max-Bonus-Level\", you can think of it as a curve where reaching \"Max-Bonus-Level\" is the peak." +
"\nAs an example, imagine \"Standard-Mode-Success-Rate-Cap-Percentage\" was set to " + FIFTY_PERCENT_EXAMPLE + " and the \"Max-Bonus-Level\" was " + MAX_BONUS_LEVEL_EXAMPLE + "," +
"\nAs an example, imagine \"Max-Success-Chance\" was set to " + FIFTY_PERCENT_EXAMPLE + " and the \"Max-Bonus-Level\" was " + MAX_BONUS_LEVEL_EXAMPLE + "," +
"\n and the player was level " + FIFTY_PERCENT_EXAMPLE + " for this skill, that would give the player " + ODDS_PERCENTAGE_EXAMPLE + " odds to succeed with this skill." +
"\nNote: This is the setting for STANDARD MODE!" +
"\nDefault value: "+CHANCE_AT_MAX_SKILL_DEFAULT)

View File

@ -4,7 +4,7 @@ import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class ConfigScalingSubSkill {
public class ConfigSubSkillScalingRNG {
@Setting(value = "Standard-Mode-Scaling-Settings", comment = "Standard mode is the new default level scaling for mcMMO" +
"\nMost skills in standard mode scale from 1-100, maxing out at 100." +

View File

@ -1,8 +1,27 @@
package com.gmail.nossr50.config.hocon.skills.acrobatics;
import com.gmail.nossr50.config.hocon.skills.acrobatics.dodge.ConfigDodge;
import com.gmail.nossr50.config.hocon.skills.acrobatics.roll.ConfigRoll;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class ConfigAcrobatics {
@Setting(value = "Roll", comment = "Settings related to the Roll Sub-Skill." +
"\nSettings related to preventing abuse of this skill can be found in the anti_exploit config file.")
private ConfigRoll roll = new ConfigRoll();
public ConfigRoll getRoll() {
return roll;
}
@Setting(value = "Dodge", comment = "Settings related to the Dodge Sub-Skill." +
"\nSettings related to preventing abuse of this skill can be found in the anti_exploit config file.")
private ConfigDodge dodge = new ConfigDodge();
public ConfigDodge getDodge() {
return dodge;
}
}

View File

@ -0,0 +1,29 @@
package com.gmail.nossr50.config.hocon.skills.acrobatics.dodge;
import com.gmail.nossr50.config.hocon.skills.ConfigSubSkillScalingRNG;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class ConfigDodge {
public static final double DAMAGE_REDUCTION_DIVISOR_DEFAULT = 2.0D;
@Setting(value = "Damage-Reduction-Divisor", comment = "If a player successfully dodges the incoming damage will be divided by this value." +
"\nPlayers can dodge almost all types of damage from other entities, such as player damage, monster damage, etc." +
"\nAs an example, a value of 2.0 for this setting would result in the player taking half damage." +
"\nHigher values would further decrease the amount of damage the player takes after a successful dodge." +
"\nDefault value: "+DAMAGE_REDUCTION_DIVISOR_DEFAULT)
private double damageReductionDivisor = DAMAGE_REDUCTION_DIVISOR_DEFAULT;
@Setting(value = "RNG-Settings", comment = "Settings related to random chance elements for this Sub-Skill.")
private ConfigSubSkillScalingRNG rng = new ConfigSubSkillScalingRNG();
public ConfigSubSkillScalingRNG getRng() {
return rng;
}
public double getDamageReductionDivisor() {
return damageReductionDivisor;
}
}

View File

@ -0,0 +1,27 @@
package com.gmail.nossr50.config.hocon.skills.acrobatics.roll;
import com.gmail.nossr50.config.hocon.skills.ConfigSubSkillScalingRNG;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class ConfigRoll {
public static final double ROLL_DAMAGE_THRESHOLD_DEFAULT = 7.0D;
@Setting(value = "Damage-Threshold", comment = "Rolling will reduce up to this much damage." +
"\nGraceful Rolls will reduce twice this value." +
"\nDefault value: "+ROLL_DAMAGE_THRESHOLD_DEFAULT)
private double damageTheshold = ROLL_DAMAGE_THRESHOLD_DEFAULT;
@Setting(value = "RNG-Settings", comment = "Settings related to random chance elements for this Sub-Skill.")
private ConfigSubSkillScalingRNG rng = new ConfigSubSkillScalingRNG();
public ConfigSubSkillScalingRNG getRNGSettings() {
return rng;
}
public double getDamageTheshold() {
return damageTheshold;
}
}

View File

@ -1,6 +1,6 @@
package com.gmail.nossr50.config.hocon.skills.repair;
import com.gmail.nossr50.config.hocon.skills.ConfigScalingSubSkill;
import com.gmail.nossr50.config.hocon.skills.ConfigSubSkillScalingRNG;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ -8,9 +8,9 @@ import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
public class ConfigRepairSuperRepair {
@Setting(value = "Settings")
private ConfigScalingSubSkill superRepair = new ConfigScalingSubSkill();
private ConfigSubSkillScalingRNG superRepair = new ConfigSubSkillScalingRNG();
public ConfigScalingSubSkill getSuperRepair() {
public ConfigSubSkillScalingRNG getSuperRepair() {
return superRepair;
}
}