Dingle 0 Posted April 16, 2012 I've decided to post this here because it involves a direct modification of code in the DDDK; hopefully someone at Trendy will see it and decide whether to implement something similar (or at least clarify that they want to leave things the way they are now.) The purpose of this change is to prevent the game from generating stats which, upon pickup, roll over due to storing as a single byte rather than the 4 byte integer the game generates the stat at. My propoed changes to the code are in bold. Example uses Charge Speed, but this would also be applicable for any other stat stored as a byte. if(WeaponChargeSpeedBonusUse) { curRandomValue = GenerateRandomizerValue(equipmentQuality,WeaponChargeSpeedBonusRandomizer)*FClamp(randomizerMult, 0, 126/WeaponChargeSpeedBonusRandomizer.MaxRandomValue); // Clamps the multiplier to the range that prevents the stat from generating over 126, by working out the point at which the multiplier would break the limit WeaponChargeSpeedBonus = FClamp(WeaponChargeSpeedBonus + ((curRandomValue>=0 || WeaponChargeSpeedBonusRandomizer.MaxRandomValueNegative == 0) ? WeaponChargeSpeedBonusRandomizer.MaxRandomValue : WeaponChargeSpeedBonusRandomizer.MaxRandomValueNegative) * curRandomValue, -126, 126); // Secondary clamp to prevent the base value of the stat, if any, from pushing the item out of range. if(int(WeaponChargeSpeedBonusRandomizer.MaxRandomValue * curRandomValue) != 0) TotalRandomizerValue += curRandomValue; } There's a bunch of stats this would need to be applied to, but it appears it would work similarly for all of them. This change would turn high randomizer multipliers from being a potential penalty to simply not being an improvement over the randomizer multiplier needed to max the stat. Note that I haven't compiled this code to see if it works properly in-game, but the theory's sound, and the FClamps are following usual syntax. I'd like to receive any sort of response from Trendy on this. People keep bringing the issue of stat rollover up, so I'd at least want to hear if it's intended, or if it's going to be fixed. Share this post Link to post Share on other sites
Auroram 0 Posted May 15, 2012 Bumping out of interest! Share this post Link to post Share on other sites
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now