As I've finally learned how to make meaningful changes to game mechanics and functions beyond single byte replacements I'm going to fulfill a promise I made and lay out the process using a real function and a real change in a step-by-step manner. That said, I am a complete novice so there may be ways of doing things much faster or more efficiently that I've yet to make a habit of. It is not glamorous work.
Should note that I have absolutely no prior coding experience at all (and this will probably become quite clear as we move forward). Ironically, this is what the pros here have said qualifies me for writing this tutorial!
Six weeks ago I was using Toolboks and Modpatcher. Four weeks ago I was changing integers in the .upks with the help of UE Explorer and HxD. Two weeks ago I was asking questions like "How can I tell where the integer "1" is; I don't see any "2C 01" here?" And today I'm going to completely rewrite the Second Wave option "Hidden Potential".
First things first, and the hardest part can't be easily taught; knowing where a particular thing you want to change is handled in Vanilla. I suck at this part, so I fill my time by browsing through function after function in UE Explorer getting familiar with various functions and locations and often stumbling into "Ah Ha!" moments when I intuit that a particular function is handling a particular mechanic I'd like to see changed. That's how this Hidden Potential thing started, I just stumbled across it, stroked my chin and thought, "Yep, I'm doing it".
Looking at XGStrategyGame >>> XGStrategySoldier.LevelUpStats in UE Explorer I noticed it seemed to handle the "Hidden Potential" Second Wave option. (Yes, you reading now, ye interested and clueless parties, get UE Explorer, open up a decompressed "XGStrategyGame.upk", browse to the "XGStrategySoldier" function, expand it and click on the "LevelUpStats" section, have looks).
I don't use (or like) Hidden Potential because my mod is extremely anti-HP increases (excepting via equipment), very tight on Aim buffs, and very much dependent on the DGC values to make the classes distinct when leveling, but if I could tailor Hidden Potential for my mod then I would certainly use it, oh yes indeed - more variation in toons is always better - so long as it's sane.
So, with the suitable and necessary level of insatiable will in place, lets get to it.
---- Continues Below ----
Edited by Zybertryx, 18 July 2013 - 12:02 PM.