Jump to content

Additional tweakable constants


Amineri

Recommended Posts

For those of you that like tweaking constants, I came across another set of them. (( not totally sure if this has been posted before, but at the risk of duplication, here goes ))

 

These are all found in the XGTacticalGameCoreNativeBase << XcomGame.upk

 

Of particular interest (in my opinion):

  • const LOW_COVER_BONUS = 20;
  • const HIGH_COVER_BONUS = 40;
  • const HUNKER_BONUS = 2.0;
  • const BASE_NUM_ROCKETS = 1;
  • const ROCKETEER_BONUS_ROCKETS = 1;
  • const BASE_SMOKE_BOMBS = 1;
  • const SMOKEANDMIRROR_BONUS_BOMBS = 1;
  • const DENSE_SMOKE_RADIUS_MULT = 1.25f;
  • const DENSE_SMOKE_DEFENSE_BONUS = 20;
  • const SMOKE_BOMB_DEFENSE_BONUS = 20;
  • const HEATAMMO_DMG_MULTIPLIER = 2;
  • const DEATH_DAMAGE_CYBERDISC = 3;
  • const DEATH_RADIUS_CYBERDISC = 192.0f;
  • const DEATH_DAMAGE_SECTOPOD = 5;
  • const DEATH_RADIUS_SECTOPOD = 320.0f;
  • const DEATH_DAMAGE_ETHEREAL = 4;
  • const DEATH_RADIUS_ETHEREAL = 144.0f;

(for those who beefed up cyberdiscs and sectopods, now you can make the helpers more annoying ^_^ ))

  • const DRONE_REPAIR_HP = 3;
  • const DRONES_PER_CYBERDISC = 1;
  • const DRONES_PER_SECTOPOD = 3;
  • const MINDMERGE_CRIT_BONUS = 25;
  • const MINDMERGE_HP_BONUS = 1;

( make those rookies panic longer !! ^_^ ))

  • const PANIC_TURNS = 1;
  • const PANIC_RANDOM_TURNS = 0;
  • const STUN_I_HP_THRESHHOLD = 3;
  • const STUN_II_HP_THRESHHOLD = 6;
  • const STUN_BASE_CHANCE = 70;
  • const STUN_MAX_CHANCE = 95;
  • const STUN_MIN_CHANCE = 1;

note, when it says "bonus", I think it really means "penalty" -- as in a negative bonus is a penalty))

  • const REACTION_BONUS_FOR_OVERWATCH = 20;
  • const REACTION_BONUS_FOR_DASH = 20;

(tracer beams = holo-targetting, I think))

  • const TRACER_BEAMS_BONUS = 10;

I'm hiding the full list in a spoiler, because there are a LOT more of them:

 

 

const SCREEN_PC_BUFFER = 0.25f;
const FLYING_MAXPATHCOST = 20;
const LOW_COVER_BONUS = 20;
const HIGH_COVER_BONUS = 40;
const HUNKER_BONUS = 2.0;
const AIR_EVADE_DEF = 20;
const NO_COVER_DEF = 20;
const REACTION_PENALTY = 0.7;
const LIGHTNING_REACTION_PENALTY = 0.375;
const DASHING_REACTION_MODIFIER = 0.7f;
const WEAPON_COOLDOWN_PER_TURN = 5;
const WEAPON_OVERHEAT_BASE = 0;
const GRENADE_TOUCH_RADIUS = 46.0f;
const FOUNDRY_PISTOL_AIM_BONUS = 10;
const FOUNDRY_SCOPE_CRIT_BONUS = 10;
const FOUNDRY_PISTOL_CRIT_BONUS = 20;
const HARDENED_ENEMY_CRIT_VALUE = 60;
const FLANKING_CRIT_BONUS = 50;
const FLUSH_MIN_DIST = 480;
const FLUSH_AIM_BONUS = 30;
const FLUSH_DMG_REDUCTION = 0.50f;
const FALLENCOMRADES_PENALTY = 5;
const BATTLEFATIGUE_PENALTY = 5;
const BATTLEFATIGUE = 1.0f;
const BATTLEFATIGUE = 0.51f;
const AIM_BONUS = 20;
const PRECISION_SHOT_DAMAGE_BONUS = 2;
const PRECISION_SHOT_CRITICAL_CHANCE_BONUS = 30;
const TELEKINETIC_FIELD_DEFENSE_BONUS = 40;
const MINDFRAY_MOBILITY_PENALTY = 0.5;
const BRING_EM_ON_DAMAGE_BONUS = 1;
const BRING_EM_ON_MAX_ENEMIES = 5;
const BUTTON_UP_SHOT_OFFENSE_MOD = -20;
const DANGER_ZONE_RADIUS_BONUS = 192;
const DAMN_GOOD_GROUND_OFFENSE_BONUS = 10;
const DAMN_GOOD_GROUND_DEFENSE_BONUS = 10;
const SNAP_SHOT_AIM_PENALTY = 20;
const DENSE_SMOKE_DEFENSE_BONUS = 20;
const SMOKE_BOMB_DEFENSE_BONUS = 20;
const COMBAT_DRUGS_AIM_CHANCE_BONUS = 20;
const COMBAT_DRUGS_CRITICAL_CHANCE_BONUS = 10;
const COMBAT_DRUGS_WILL_BONUS = 20;
const BASE_NUM_ROCKETS = 1;
const ROCKETEER_BONUS_ROCKETS = 1;
const BASE_SMOKE_BOMBS = 1;
const SMOKEANDMIRROR_BONUS_BOMBS = 1;
const HEATAMMO_DMG_MULTIPLIER = 2;
const TRACER_BEAMS_BONUS = 10;
const BASE_BATTLESCANNERS = 2;
const CHITIN_PLATING_DMG_MULT = 0.5f;
const COMBAT_STIM_DMG_MULT = 0.5f;
const COMBAT_STIM_WILL_BONUS = 40;
const COMBAT_STIM_MOBILITY_BONUS = 4;
const EXECUTIONER_AIM_BONUS = 10;
const EXECUTIONER_HP_MIN = 0.5f;
const BATTLE_SCANNER_DURATION = 2;
const AGGRESSION_CRIT_BONUS = 10;
const AGGRESSION_MAX_ENEMIES = 3;
const TACTICALSENSE_DEFENSE_BONUS = 5;
const TACTICALSENSE_MAX_ENEMIES = 4;
const CLOSECOMBATSPECIALIST_RANGE = 6;
const WILLTOSURVIVE_DMG_REDUCTION = 2;
const KILLERINSTINCT_CRIT_DMG_MULT = 0.5f;
const SHREDDER_ROCKET_DURATION = 4;
const FIELDMEDIC_CHARGES = 3;
const GRENADIER_CHARGES = 2;
const PSIINSPIRED_WILL_BONUS = 30;
const DOUBLETAP_COOLDOWN = 3;
const BLOODCALL_AIM_BONUS = 10;
const BLOODCALL_WILL_BONUS = 10;
const BLOODCALL_MOBILITY_BONUS = 4;
const MINDMERGE_CRIT_BONUS = 25;
const MINDMERGE_HP_BONUS = 1;
const LOW_AMMO_PERCENT = 23;
const SPREAD_THETA = 75;
const MAX_SPREAD_LENGTH = 576;
const DEATH_BLOSSOM_RANGE = 384;
const DEATH_BLOSSOM_COOLDOWN = 4;
const DEATH_BLOSSOM_DAMAGE_MIN = 4;
const DEATH_BLOSSOM_DAMAGE_MAX = 6;
const MINDFRAY_BASE_DMG = 5;
const FLAME_NUM_BURN_TURNS = 4;
const FLAME_MAX_SPREAD_HOPS = 1;
const FLAME_MAX_FIRES_FROM_EXPLOSION = 4;
const SMOKE_NUM_TURNS = 4;
const DENSE_SMOKE_RADIUS_MULT = 1.25f;
const POISONED_DAMAGE_PER_TURN = 1;
const POISONED_AIM_PENALTY = 20;
const POISONED_REACTION_PENALTY = 0.5f;
const POISONED_MOVEMENT_PENALTY = 0.25f;
const POISONED_INITIAL_DURATION = 2;
const POISONED_REMISSION_CHANCE = 0.33f;
const POISONED_REMISSION_CHANCE = 0.66f;
const POISON_ATTACK_CHANCE = 0.5f;
const POISON_NUM_TURNS = 4;
const RAPIDFIRE_AIM_PENALTY = 15;
const DISABLINGSHOT_AIM_PENALTY = 10;
const CHRYSSALID_SPAWN_HP_REDUCTION = 4;
const FLAME_UNIT_DOT = 2;
const ACID_UNIT_DOT = 6;
const FLAME_WORLD_DOT = 201;
const ACID_WORLD_DOT = 201;
const STATIC_HEIGHT_BONUS_Z = 192.0f;
const HEIGHT_OFF_BONUS = 20;
const HEARING_RADIUS = 40.0f;
const CRITICAL_BLEED_OUT = 3;
const BASE_CRITWOUND_CHANCE = 15;
const OTS_CRITICAL_WOUND_BONUS = 5;
const CRITWOUND_WILL_PENALTY = 15;
const LUCK_ROLL_BONUS = 5;
const CB_XP_BONUS = 0.25f;
const PANIC_TURNS = 1;
const PANIC_RANDOM_TURNS = 0;
const PANIC_BASE_VALUE = 30;
const MEDIKIT_HEAL_HP = 4;
const MEDIKIT_FOUNDRY_BONUS = 2;
const MEDIKIT_SAVIOR_BONUS = 4;
const REVIVE_HEALTH_AMOUNT = 0.33f;
const SPRINTER_MOBILITY_BONUS = 4;
const RAPIDREACTION_MIN_DIST = 192;
const TRACER_BEAM_DURATION = 1;
const CLUSTER_BOMB_PREVIEW_RADIUS = 432;
const MIN_TIME_ARC_HEIGHT = 3.0f;
const MAX_TIME_ARC_HEIGHT = 6.0f;
const MAX_ENGAGED_AI = 5;
const MIN_AI_TURN_LENGTH = 4;
const MAX_OVERMIND_REVEAL_TILES = 4;
const OVERLOAD_DAMAGE_DRONE = 3;
const DEATH_DAMAGE_CYBERDISC = 3;
const DEATH_DAMAGE_SECTOPOD = 5;
const DEATH_DAMAGE_ETHEREAL = 4;
const OVERLOAD_RADIUS_DRONE = 192.0f;
const DEATH_RADIUS_CYBERDISC = 192.0f;
const DEATH_RADIUS_SECTOPOD = 320.0f;
const DEATH_RADIUS_ETHEREAL = 144.0f;
const INTIMIDATE_CHANCE_MUTON = 33;
const INTIMIDATE_CHANCE_BERSERKER = 66;
const CC_RANGE = 3.0f;
const CC_INSTIGATOR_BASE = 20;
const CC_ASSAULT_BONUS = 10;
const CC_SECOND_MOVE_PENALTY = 20;
const CC_RUN_PATH_PCT = 50;
const RIFLE_I_MOB_BONUS = 2;
const RIFLE_II_SUPP_BONUS = 10;
const PISTOL_I_CRIT_BONUS = 25;
const PISTOL_II_DEF_BONUS = 15;
const HEAVY_I_OFF_BONUS = 10;
const HEAVY_II_OFF_BONUS = 20;
const SNIPER_I_OFF_BONUS = 10;
const SNIPER_II_CRIT_BONUS = 25;
const XP_KILL = 50;
const HP_PER_TICK = 1;
const HP_PULSE_PCT = 25;
const LOOT_RANGE = 3;
const LOOT_DESTRUCT_TIMER = 5;
const MIND_PROBE_INTEL = 10;
const NAV_INTEL = 5;
const COVER_DRAW_RADIUS = 1;
const JETPACK_FUEL_HOVER_COST = 1;
const MOVE_INTERVAL_REACTION_PROCESSING = 96.0f;
const SAFE_FROM_REACTION_FIRE_MIN_DIST_TO_DEST = 96.0f;
const REACTION_MINIMUM = 1;
const REACTION_BONUS_FOR_OVERWATCH = 20;
const REACTION_BONUS_FOR_DASH = 20;
const REACTION_FIRE_AMMO_COST_PERCENTAGE = 25;
const REACTION_FIRE_AMMO_COST_PERCENTAGE_HEAVY = 33;
const REPAIR_SHIV_HP = 6;
const STUN_I_HP_THRESHHOLD = 3;
const STUN_II_HP_THRESHHOLD = 6;
const STUN_BASE_CHANCE = 70;
const STUN_MAX_CHANCE = 95;
const STUN_MIN_CHANCE = 1;
const TIMEDILATION_APPROACHRATE = 15.0f;
const TIMEDILATION_MODE_NORMAL = 1.0f;
const TIMEDILATION_MODE_VICTIMOFOVERWATCH = 0.01f;
const TIMEDILATION_MODE_REACTIONFIRING = 0.4f;
const TIMEDILATION_MODE_TRIGGEREDPODACTIVATION = 0.0f;
const CYBERDISC_MIN_CLOSED_MOVE_DIST = 320.0f;
const CYBERDISC_MAX_FLIGHT_DURATION = 3;
const MAX_REPAIRS_PER_TURN = 1;
const DRONE_REPAIR_HP = 3;
const DRONE_COUNT_OVERRIDE = false;
const DRONES_PER_CYBERDISC = 1;
const DRONES_PER_SECTOPOD = 3;
const DRONE_MAX_FLIGHT_DURATION = 6;
const FLOATER_MAX_FLIGHT_DURATION = 3;
const HEAVY_FLOATER_MAX_FLIGHT_DURATION = 4;
const PSI_DRAIN_HP = 4;
const RIFT_MAX_DISTANCE = 100;
const RIFT_DAMAGE_RADIUS = 6.75;
const RIFT_WILL_BALANCE = 20;
const RIFT_WILL_DMG_SLICE = 10;
const RIFT_START_DMG = 8;
const RIFT_END_DMG = 10;
const RIFT_START_DMG_MIN = 4;
const RIFT_END_DMG_MIN = 5;
const PSI_LANCE_WILL_BALANCE = 20;
const PSI_LANCE_WILL_DMG_SLICE = 10;
const PSI_LANCE_BASE_DMG = 7;
const PSI_LANCE_MIN_DMG = 2;
const PSI_LANCE_MAX_DMG = 20;
const TELEKINETIC_FIELD_RADIUS = 12.75;
const PSI_INSPIRE_FIELD_RADIUS = 3.75;
const SUPPRESSION_AIM_PENALTY = 30;
const CLOSEANDPERSONAL_MAX_DIST = 9.0f;
const CLOSEANDPERSONAL_PER_DIST = 1.5f;
const CLOSEANDPERSONAL_BONUS = 5;
const RAND_DMG_VARIANCE = 1.5f;
const WOUND_AIM_PENALTY = -15;
const WOUND_MOB_PENALTY = -2;
const TINVENTORY_MAX_LARGE_ITEMS = 16;
const TINVENTORY_MAX_SMALL_ITEMS = 16;
const TINVENTORY_MAX_CUSTOM_ITEMS = 16;
const RELATIVE_HEIGHT_BONUS_ZDIFF = 192.0f;
const RELATIVE_HEIGHT_BONUS_WEAPON_RANGE = 1.5f;
const MAX_SIGHTLINES = 10;

 

Link to comment
Share on other sites

Right. It just clicked as to what these are about. Many other places in the code are code chunks that look like:

 

XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.20

 

 

I'd been curious as to why the method after m_kGameCore would be a constant number and not a method / variable. But I think the compiler optimizer is replacing these calls with the constant values at compile time.
For example:
if(m_bHasHeightAdvantage)
{
kInfo.arrHitBonusStrings.AddItem(m_strHeightBonus);
kInfo.arrHitBonusValues.AddItem(XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.20);
}
Compare this with the "const HEIGHT_OFF_BONUS = 20;" definition in XGTacticalGameCoreNativeBase, and it looks like the compiler set the value in the above snippet at compile time, using the const values.
While not as nice and pretty (or quick) as directly being able to change the const values themselves, this does provide some help in finding where all of the const values are being applied.
For example, const CLUSTER_BOMB_PREVIEW_RADIUS = 432;
If I do an "all file" search with Notepad++, searching for XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.432
I find the following two files:
XGAbility_ClusterBomb, line 88
and
XGAIBehavior_Sectopod, line 60
Unfortunately some of the values are used in native code, and some values are very common, but it could provide some help when trying to change a particular value.
Link to comment
Share on other sites

Could this be the reason empty params do 't show up in UE Explorer? Some compile-time mechananism? Anyway where should be then the place to approach any attemp to change those constant values? I looked at where they're difined (not at the pc now), but I couldn't distinguish the values they were suposed to express
Link to comment
Share on other sites

To change those constants -- if they are in the upk, and not the exe, you'll have to find them in the functions where they are in play.

 

Empty optional parameters are sometimes marked with a4 bytes, which don't show up in object mode in explorer but do in the hex. (Not sure if that's what you are referring to)

Link to comment
Share on other sites

@anUser

To find the values, you have to search for where they are actually applied. If it's in the .exe (as is the case for the stun values), then you can't use UE Explorer to find them. If it's in one of the .upks then there is a better chance.

 

It seems like those constants (as well as other things) are referenced using the:

 

XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.###

 

when UE Explorer decompiles. I have a set of all the decompiled files (a little old, but still useful) in a directory, and use Notepad++ to search all files in the directory for particular strings.

 

So, you can use the above tag combined with the decimal value of the constant you want to change to find all instances where it is assigned (but if it is a common value like 20, it may get ugly), or try and read through the files directly.

 

Just a couple of options...

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...