• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

likwueron

Recruit
54 Badges
Jan 21, 2017
2
1
  • Crusader Kings III
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • BATTLETECH
  • Age of Wonders III
  • Cities: Skylines - Green Cities
  • Europa Universalis IV: Cradle of Civilization
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Europa Universalis IV: Dharma
  • Shadowrun Returns
  • BATTLETECH: Heavy Metal
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Prison Architect
  • BATTLETECH: Season pass
  • Europa Universalis IV: Pre-order
  • Victoria 2
  • Crusader Kings III: Royal Edition
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Hearts of Iron III
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Third Rome
  • Victoria 2: A House Divided
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - After Dark
Hey, guys.

First, English is not my native language, so you may find some strange words sometimes.

Second, Google said no one post article about statName, so I believed I'm the first one.



I found many modder release some interesting upgrade with special effect not found in original games, so I want to be one of them.
However, which value can I use?
Then, I found that SigmarPrime release decompiled files
I'm happy that I won't decompile myself because my c drive is almost full and cannot install VS.(well, maybe decompile no need VS?)

In the very first time, I only known that the statusEffect can modify value on mech we control.
I guess there must be a Class defined it.
Is it named Mech? Yes!

In file Mech.cs, a code like this will add a "statistic value" to a mech:
Code:
this.statCollection.AddStatistic<int>("BaseInitiative", base.Initiative);
The first argument is statName
The second one is it's value on initialization.
Text surrounded by angle brackets mean the "type in program". And we have 'int', 'float', 'bool', and etc.
However, in json, you need to use another one in "modType".
Here is the list(I though table is better but cannot use it, so seperated by =>)

in program => in json
int => System.Int32
float => System.Single
bool => System.Boolean
double => System.Double
string => System.String



"statName" we can use are(partial list)
statName => modType
BaseInitiative => System.Int32
TurnRadius => System.Int32
MaxJumpjets => System.Int32
SpotterDistanceMultiplier => System.Single
SpotterDistanceAbsolute => System.Single
SpottingVisibilityMultiplier => System.Single
SpottingVisibilityAbsolute => System.Single
SensorDistanceMultiplier => System.Single
SensorDistanceAbsolute => System.Single
SensorSignatureModifier => System.Single
MinStability => System.Single
MaxStability => System.Single
UnsteadyThreshold => System.Single
MaxHeat => System.Int32
OverheatLevel => System.Int32
MinHeatNextActivation => System.Int32
HeatSinkCapacity => System.Int32
IgnoreHeatToHitPenalties => System.Boolean
IgnoreHeatMovementPenalties => System.Boolean
EndMoveHeat => System.Int32
WalkSpeed => System.Single
RunSpeed => System.Single
EngageRangeModifier => System.Single
DFASelfDamage => System.Single
DFACausesSelfUnsteady => System.Boolean
EvasivePipsGainedAdditional => System.Int32
MeleeHitPushBackPhases => System.Int32
HeadShotImmunity => System.Boolean
CurrentHeat => System.Int32
Stability => System.Single
IsProne => System.Boolean
ReceivedInstabilityMultiplier => System.Single
StabilityDefense.Terrain => System.Single
StabilityDefense.JumpingFalling => System.Single
StabilityDefense.TurningSprinting => System.Single
StabilityDefense.Collisions => System.Single
StabilityDefense.MeleeWeapon => System.Single
StabilityDefense.RangedWeapon => System.Single
Head.Armor => System.Single
Head.Structure => System.Single
CenterTorso.Armor => System.Single
CenterTorso.RearArmor => System.Single
CenterTorso.Structure => System.Single
LeftTorso.Armor => System.Single
LeftTorso.RearArmor => System.Single
LeftTorso.Structure => System.Single
RightTorso.Armor => System.Single
RightTorso.RearArmor => System.Single
RightTorso.Structure => System.Single
LeftArm.Armor => System.Single
LeftArm.Structure => System.Single
RightArm.Armor => System.Single
RightArm.Structure => System.Single
LeftLeg.Armor => System.Single
LeftLeg.Structure => System.Single
RightLeg.Armor => System.Single
RightLeg.Structure => System.Single

You may notice that some statistic use a Class named LocationDamageLevel, but I have no idea how to change it.



Now, I notice that there is value named HeadShotImmunity which remind me there are some mech cannot be headshot in campaign.
Can I modify it and give my mech such immunity? I think, yes.
The problem here is I don't know which "operation" should I use. It maybe "Set" or "Assign".

In file named StatCollection.cs there is an enum named StatOperation which define all "operation" we can use.
List of operation and their function
Note:
  1. [newValue] is for the result of the operation.
  2. [originalValue] is for the statistic before operation.
  3. [modValue] is "modValue" in json.
operation => function => note
Set => [newValue] = [modValue] => [modValue] must be same type as statName
Int_Add => [newValue] = [originalValue] + [modValue] => only for integer
Int_Subtract => [newValue] = [originalValue] - [modValue] => only for integer
Int_Multiply => [newValue] = [originalValue] * [modValue] => only for integer
Int_Divide => [newValue] = [originalValue] / [modValue] => only for integer
Int_Divide_Denom => [newValue] = [modValue] / [originalValue] => only for integer
Int_Mod => [newValue] = [originalValue] mod [modValue] => only for integer
Int_Multiply_Float => [newValue] = [originalValue] * [modValue] => [modValue] can be float. [newValue] will discard number after floating point.
Int_Divide_Float => [newValue] = [originalValue] / [modValue] => [modValue] can be float. [newValue] will discard number after floating point.
Int_Divide_Denom_Float => [newValue] = [modValue] / [originalValue] => [modValue] can be float. [newValue] will discard number after floating point.
Float_Add => [newValue] = [originalValue] + [modValue]
Float_Subtract => [newValue] = [originalValue] - [modValue]
Float_Multiply => [newValue] = [originalValue] * [modValue]
Float_Divide => [newValue] = [originalValue] / [modValue]
Float_Divide_Denom => [newValue] = [modValue] / [originalValue]
Float_Multiply_Int => [newValue] = [originalValue] * [modValue] => [modValue] must be integer
Float_Divide_Int => [newValue] = [originalValue] / [modValue] => [modValue] must be integer
Float_Divide_Denom_Int => [newValue] = [modValue] / [originalValue] => [modValue] must be integer
String_Append => [newValue] = [originalValue] + [modValue] => eg: "imurfather" = "imur" + "father"
String_Prepend => [newValue] = [modValue] + [originalValue] => eg: "imurfather" = "imur" + "father"
Bitflag_SetBit => [newValue] = [modValue] => bitflag operation need addition value "modIndex" no idea about it
Bitflag_FlipBit => [newValue] = NOT [originalValue] => bitwise operation NOT
Bitflag_Combine => [newValue] = [originalValue] OR [modValue] => bitwise operation OR



"statusEffects" : [
{
"durationData" : {
"duration" : -1,
"ticksOnActivations" : false,
"useActivationsOfTarget" : false,
"ticksOnEndOfRound" : false,
"ticksOnMovements" : false,
"stackLimit" : 1,
"clearedWhenAttacked" : false
},
"targetingData" : {
"effectTriggerType" : "Passive",
"triggerLimit" : 0,
"extendDurationOnTrigger" : 0,
"specialRules" : "NotSet",
"effectTargetType" : "Creator",
"range" : 0,
"forcePathRebuild" : false,
"forceVisRebuild" : false,
"showInTargetPreview" : false,
"showInStatusPanel" : true
},
"effectType" : "StatisticEffect",
"Description" : {
"Id" : "StatusEffect-ImmueHeadShot",
"Name" : "Immue head shot",
"Details" : "Enemy cannot use headshot on this mech",
"Icon" : "uixSvgIcon_equipment_Cockpit"
},
"nature" : "Buff",
"statisticData" : {
"appliesEachTick" : false,
"effectsPersistAfterDestruction" : false,
"statName" : "HeadShotImmunity",
"operation" : "Set",
"modValue" : "true",
"modType" : "System.Boolean",
"additionalRules" : "NotSet",
"targetCollection" : "NotSet",
"targetWeaponCategory" : "NotSet",
"targetWeaponType" : "NotSet",
"targetAmmoCategory" : "NotSet",
"targetWeaponSubType" : "NotSet"
},
"tagData" : null,
"floatieData" : null,
"actorBurningData" : null,
"vfxData" : null,
"instantModData" : null,
"poorlyMaintainedEffectData" : null
}
]



You may wonder, what about bonus HP and addtional weapon accuracy?

Bonus HP is defined in Class Pilot which in file Pilot.cs, and you must set "targetCollection" as "Pilot" in statisticData
For the weapons, just search them in Weapon.cs, and set "targetCollection" as "Weapon" in your statisticData
Here is the list

For Pilot

statName => modType
Piloting => System.Int32
Gunnery => System.Int32
Guts => System.Int32
Tactics => System.Int32
Injuries => System.Int32
Health => System.Int32
BonusHealth => System.Int32
LethalInjury => System.Boolean
HasEjected => System.Boolean
MaxTargets => System.Int32
CanEject => System.Boolean
ArmorDamageInflicted => System.Single
StructureDamageInflicted => System.Single
UnitsKilled => System.Int32
MechsKilled => System.Int32
OthersKilled => System.Int32
ExperienceUnspent => System.Int32
ExperienceSpent => System.Int32

For Weapon
statName => modType
MinRange => System.Single
MinRangeMultiplier => System.Single
MaxRange => System.Single
MaxRangeModifier => System.Single
ShortRange => System.Single
MediumRange => System.Single
LongRange => System.Single
HeatGenerated => System.Single
ForceMaxDamage => System.Boolean
HeatDamageModifier => System.Single
CriticalChanceMultiplier => System.Single
RefireModifier => System.Int32
ShotsWhenFired => System.Int32
ProjectilesPerShot => System.Int32
AttackRecoil => System.Int32
System.Int32ernalAmmo => System.Int32
TemporarilyDisabled => System.Boolean
DamagePerShot => System.Single
Instability => System.Single
AccuracyModifier => System.Single
DamageVariance => System.Int32
OverheatedDamageMultiplier => System.Single
HeatDamagePerShot => System.Single



There are still many thing need to study.
Hope these are usefull for everyone.
 
  • 1Like
Reactions: