sniggles Posted June 21, 2014 Share Posted June 21, 2014 Hi guys, Hoping i might attract the interest of some 'code diver' to help us find the hex code for the 1.5 critical hit multiplier (and also the 1.5 random damage multiplier) that is located at.... XComGame.upk / XGTacticalGameCore / CalcOverallDamage Anyone else interested please join my plea for some expert help to make this mod and leave your comment / opinion. I have modded my game using DefaultGameCore.ini to be high hit points and lower weapon damage for both allies and enemies for nice long tactical battles but i hate the very high critical and random damage dice rolls that occur quite often ( even when you drastically lower the base weapon stats in the DFGC.ini ) I also like the second wave starting option of ' Damage Roulette: Weapons have a wider range of damage ' for some unpredictable variety in the dice rolls (albeit not as high as it's currently set) My problem is the basic critical hit multiplier and the damage roulette multiplier are set to 1.5 and i would like to reduce this to 1.2 for both. The code is all in the same file but i am no expert modder (especially with hex code) and don't know how to locate the ' 1.5 ' variable in the hex code. Believe me i have read all the tutorials and used the UPK toos but failed over and over. If someone could just take a quick look in the file and point me to the hex code to change then i could use HxD myself to edit the XComGame.upk Better still if someone could make a txt script with the 2 changes for the excellent ' Patcher GUI (4.0) ' ufility which i use to add all my mods. I am talking about a mod for the XCom Enemy Within fully up to date etc. The code if it helps anyone is...... function int CalcOverallDamage(int iWeapon, int iCurrDamageStat, optional bool bCritical, optional bool bReflected){ local int iDamage, iRandDamage; bCritical = false; bReflected = false; iDamage = m_arrWeapons[iWeapon].iDamage + iCurrDamageStat; // End:0x54 if(bReflected) { return 0; } // End:0x76 if(WeaponHasProperty(iWeapon, 9)) { return iDamage; } // End:0x114 if(IsOptionEnabled(0)) { iRandDamage = 1 + class'XComEngine'.static.SyncRand(int(float(iDamage) * 1.50), (string(Name) @ string(GetStateName())) @ string(GetFuncName())); // End:0x10A if(bCritical) { return iDamage + iRandDamage; } // End:0x114 else { return iRandDamage; } } // End:0x1A4 if(bCritical) { iDamage += 1; iDamage = int(float(iDamage) * 1.50); iDamage += (class'XComEngine'.static.SyncRand(3, (string(Name) @ string(GetStateName())) @ string(GetFuncName())) - 1); return iDamage; } iDamage = (iDamage + class'XComEngine'.static.SyncRand(3, (string(Name) @ string(GetStateName())) @ string(GetFuncName()))) - 1; // End:0x217 if(iDamage < 1) { iDamage = 1; } return iDamage; //return ReturnValue Really appreciate some help and leave a comment if you would like to try out this change yourself. Link to comment Share on other sites More sharing options...
sniggles Posted June 22, 2014 Author Share Posted June 22, 2014 Just a quick heads-up to anyone that is interested in this mod that with Johnnylumps help i have finshed this mod and all works perfectly and fully tested. For people who want to reduce the very high random damage calculations that can occur for your weapons and the enemies.Just makes for longer tactical battles. The random bonus multiplier has been reduced from 50% to 20% for both critical hit calculations and the Second Wave Damage Roulette hit calculations. Pop over to the XCOM Mod Troubleshooting section of the forum and read the post ' Help please - want a script or mod to reduce critical multiplier to 1.2 'for details on how to make your changes or follow the link below (not sure if the link will work when i paste it - should work though) http://forums.nexusmods.com/index.php?/topic/1820650-help-please-want-a-script-or-mod-to-reduce-critical-multiplier-to-12/ Sorry i can't release this as a Patcher GUI script mod as i am no Johnnylump - LOL - and don't know how to do that - you'll just have to make the easy changes yourself using the HxD hex editor - only takes a few minutes now i have tracked down the hex strings for you. Just a quick note that i have the normal retail steam copy of XCOM Enemy Within fully up to date with patches. I can't guarantee the hex string references for any other versions although they might work if HxD locates them properly. Link to comment Share on other sites More sharing options...
Recommended Posts