Skip to content

Commit

Permalink
Readme updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheep-y committed Aug 26, 2018
1 parent 37d1f71 commit 63dd734
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 9 deletions.
2 changes: 2 additions & 0 deletions AttackImprovementMod/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ CHANGE LOG
* New: Critical hits now follows damage transfer.
* New: Hits may optionally crit through armour.
* New: Excludes intact structure from crits. (When through armor crit is disabled.)
* Fix: Errors when writing attack log is now (try to) logged by the mod log.
* Fix: Attempt to fix see-through armour with Mech Engineer's composite structure.

2018-08-22 AIM Version 2.2 for BATTLETECH 1.2.0

Expand Down
15 changes: 9 additions & 6 deletions AttackImprovementMod/src/ModSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,8 @@ [ JsonComment( "Fire support weapon after sprint. Default false." ) ]
public bool AllowDFACalledShotVehicle = true;
/**/


//
[ JsonSection( "Hit Resolution" ) ]
[ JsonSection( "Critical Hits" ) ]
//

[ JsonComment( "Skip critical checks if target is dead. Default true." ) ]
Expand All @@ -279,14 +278,14 @@ [ JsonComment( "Crit is now checked on final damaged location by following damag
public bool FixFullStructureCrit = true;

[ JsonComment( new string[]{
"A weapon must deal this much total damage to a location for through armour crit to roll. Default 10. Set to 0 for no threshold.",
"A weapon must deal this much total damage to a location for through armour crit to roll. Default 9. Set to 0 for no threshold.",
"A number between 0 and 1 (exclusive) means a fraction of max armour. 1 and above means fixed damage threshold." } ) ]
public decimal ThroughArmorCritThreshold = 0;
public decimal ThroughArmorCritThreshold = 9;

[ JsonComment( new string[]{
"Base crit chance of a location with zero armour but full structure.",
"Set to 0 to disable through armor critical. Default 0. Can be 0 to 1, e.g. 0.2 for 20%.",
"When logging through armour crits, the Max HP column logs the max armor." } ) ]
"Set to 0 to disable through armour critical. Default 0. Can be 0 to 1, e.g. 0.2 for 20%.",
"When logging through armour crits, the Max HP column logs the max armour." } ) ]
public decimal ThroughArmorCritChanceZeroArmor = 0;

[ JsonComment( new string[]{
Expand All @@ -295,6 +294,10 @@ [ JsonComment( "Crit is now checked on final damaged location by following damag
"If negative, crit will not happens until armour is sufficiently weakened." } ) ]
public decimal ThroughArmorCritChanceFullArmor = 0;

//
[ JsonSection( "Hit Resolution" ) ]
//

[ JsonComment( "Yang has improved autoloader's algorithm to balance ammo draw to minimise ammo explosion chance. Default true for friends." ) ]
public bool BalanceAmmoConsumption = true;
public bool BalanceEnemyAmmoConsumption = false;
Expand Down
63 changes: 60 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ For BATTLETECH 1.2.0
* [Net Hit Modifier Settings](#net-hit-modifier-settings)
* [Hit Roll Settings](#hit-roll-settings)
* [Hit Chance Preview Settings](#hit-chance-preview-settings)
* [Critical Hit Settings](#critical-hit-settings)
* [Hit Resolution Settings](#hit-resolution-settings)
* [Attack Log Settings](#attack-log-settings)
- [Compatibilities](#compatibilities)
Expand Down Expand Up @@ -557,18 +558,74 @@ These settings can be changed in `settings.json`.


## Hit Resolution Settings
## Critical Hit Settings


**Skip Criting the Dead Mech**

> Setting: `SkipCritingDeadMech` (true/false, default true)<br>
> Setting: `SkipCritingDeadMech` (true/false, default true)
>
> When true, critical hits are not rolled for dead units.
> This is mainly designed to prevent crit messages from flooding over cause of death.
> It will also slightly increase salvaged components.

**Crit Follows Damage Transfer**

> Setting: `CritFollowDamageTransfer` (true/false, default true)
>
> When true, critical hits will be rolled on last damaged location, i.e. they follows damage transfer.
>
> In un-modded game, critical hit is checked only on the rolled hit location and does not follow damage transfer.
> For example, when a laser hits a destroyed arm and structurally damage a side torso, crit is not rolled since the arm is already destroyed.

**Fix False Positive Crits**

> Setting: `FixFullStructureCrit` (true/false, default true)
>
> When true, critical hit does not happens on locations with intact structure.
>
> In un-modded game, critical hit is rolled on all location that is hit and has zero armour.
> This means crit is rolled even if an attack reduce the armour to exactly zero, even if it does not do any structural damage.
> Given the default min crit chance of 50%, a crit slot will be rolled half the time when this happens!
>
> This settings is ignored when through armour critical (below) is on, in which case zero armour uses the through armour rules.

**Through Armour Critical Hits**

> Setting: `ThroughArmorCritThreshold` (0 to 1000, default 9)
>
> Each weapon must deal this much damage to a location in an attack for through armour critical hit to be checked.
>
> Default is 9 which is 3 MG hits, 3 LRM hits, or 2 SRM hits to the same location when un-braced and un-covered.
>
> If the number is between 0 and 1 (exclusive), the threshold is a fraction of the max armour of the location.
> e.g. 0.2 means a weapon must do as much damage as 20% of the max armour of the location.

> Setting: `ThroughArmorCritChanceZeroArmor` (0 to 1, default 0)<br>
> Setting: `ThroughArmorCritChanceFullArmor` (-1 to 1, default 0)<br>
>
> The two settings together determine the range of through armour base critical chance.
> ThroughArmorCritChanceZeroArmor is the max chance, and ThroughArmorCritChanceFullArmor is the min chance.
> When ThroughArmorCritChanceZeroArmor is 0, through armour critical hit is disabled.
>
> For a fixed crit chance, set both numbers to be the same. Classic BattleTech has around 2% chance.
>
> Otherwise, the crit chance increase in proportion to armour damage.
> Example: When zero = 0.4 and Full = 0, a location with half armour has a 20% base crit chance.
> Example: When zero = 0.2 and Full = -0.1, crit happens after armour is reduced to 2/3 or below.
>
> When through armour critical hit happens and it is logged by this mod's Attack Log,
> the Max HP column logs the max armour of the location instead of max structure.


## Hit Resolution Settings


**Balance Ammo Consumption**

> Setting: `BalanceAmmoConsumption` (true/false, default true)<br>
Expand Down Expand Up @@ -633,7 +690,7 @@ but because the code that determine hit distribution is not designed for fractio
>
> **Location** - Location Roll, Hit Table, Called Shot, and the Hit Location.
>
> **Damage** - Damage, Final Damaged Location, and Armor/HP of this location.
> **Damage** - Damage, Final Damaged Location, and Armor/HP of this location.
> Damage is determined in a different phase from hit and location, and is a rather complicated info to log.
>
> **Critical** - Crit Location, Crit Roll, Crit Slot, Crit Component, and the result of the crit.
Expand Down

0 comments on commit 63dd734

Please sign in to comment.