Zybertryx Posted July 13, 2013 Share Posted July 13, 2013 Greets, I'm using, LOW_AIM=60HIGH_AIM=65 In the DGC to constrain the variance of starting rookie Aim values when enabling the SW option "Not Created Equal" and this results in rookies having either 60/65/70 Aim, but never 61, or 62, or 68 or 69. Only ever increments of 5. Is there a way it can be made more incremental within the boundaries set by the DGC? I don't know where it's handled (either). Link to comment Share on other sites More sharing options...
Amineri Posted July 13, 2013 Share Posted July 13, 2013 Generally the easiest way to find out where DGC.ini stats are being used is to do a class-search in UE Explorer (Ctrl-Shift-F). Currently the implementation is a little buggy in that it always searches the first UPK opened, so I only do searches with one upk open. Searching for LOW_AIM in XComStrategyGame.upk yields this following function in XGFacility_Barracks : function RandomizeStats(XGStrategySoldier kRecruit) { local int iMultiple; // End:0x1C0 if(IsOptionEnabled(2)) { iMultiple = 5; kRecruit.m_kChar.aStats[1] = RollStat(class'XGTacticalGameCore'.default.LOW_AIM, class'XGTacticalGameCore'.default.HIGH_AIM, iMultiple); iMultiple = 1; kRecruit.m_kChar.aStats[3] = RollStat(class'XGTacticalGameCore'.default.LOW_MOBILITY, class'XGTacticalGameCore'.default.HIGH_MOBILITY, iMultiple); iMultiple = 2; kRecruit.m_kChar.aStats[7] = RollStat(class'XGTacticalGameCore'.default.LOW_WILL, class'XGTacticalGameCore'.default.HIGH_WILL, iMultiple); } // End:0x2B8 else { kRecruit.m_kChar.aStats[1] = class'XGTacticalGameCore'.default.ROOKIE_AIM; kRecruit.m_kChar.aStats[3] = class'XGTacticalGameCore'.default.ROOKIE_MOBILITY; kRecruit.m_kChar.aStats[7] = class'XGTacticalGameCore'.default.ROOKIE_STARTING_WILL; } //return; } Hopefully this little tidbit will make it easier to start navigating around the upks ^.^ There is actually a lot of code floating around in there -- I'm constantly being surprised by new discoveries in the upks. In this case the multiples are hard-coded into the function : 5 for aim, 1 for mobility, and 2 for will. Link to comment Share on other sites More sharing options...
Zybertryx Posted July 13, 2013 Author Share Posted July 13, 2013 Fantastic tip on how to easily discover locations like this! And, Done and working. Rerolled new campaign, 62, 66, 63, 64. Thanks. :) Link to comment Share on other sites More sharing options...
Zybertryx Posted July 13, 2013 Author Share Posted July 13, 2013 To get the same min/max potential I had before (60 - 70) I changed the DGC values to 60 - 69. It seems there's a little bug/feature which will always give a +5 to the max settings defined in the DGC. This is why I was seeing the rare rookie with "70" Aim even though my DGC cap was "65". After setting the increment to "1" from "5" I was seeing a maximum of "66" (my DGC max +X - X being whatever the increment is). Confirmed when I adjusted my DGC values like so, LOW_AIM=60HIGH_AIM=69 Set like this with increments of "1", I'm now getting a range of 60 - 70 and all steps in between. Link to comment Share on other sites More sharing options...
Amineri Posted July 13, 2013 Share Posted July 13, 2013 Looks like a bug in the XGFacility_Barracks.RollStat function: function int RollStat(int iLow, int iHigh, int iMultiple) { local int iSpread, iNewStat; iSpread = iHigh - iLow; iNewStat = iLow + (Rand((iSpread / iMultiple) + 1) * iMultiple); if((iNewStat == iHigh) && Rand(2) == 0) { iNewStat += iMultiple; } return iNewStat; //return ReturnValue; } If iLow = 60 and iHigh = 70 and iMultiple = 1, then:iSpread = 10iNewStat = 60 + Rand(11) * 1, so properly a uniform random number between 60 to 70, inclusiveIf the stat is the max stat, then there is a 50% chance of adding another 1.This last bit is what is messing it up. It means that for your Low = 60, High = 69 case, each of 60 through 68 have a 10% chance, and 69 and 70 each have a 5% chance. I guess some sort of attempt to slew the results a bit low? Link to comment Share on other sites More sharing options...
Zybertryx Posted July 13, 2013 Author Share Posted July 13, 2013 Yeah, it's odd. I always set my DGC around it, I wanted 60 - 70 but to achieve that formerly I needed a setting of LOW=60 and HIGH=65. You nailed it right here. I guess it's kinda cool to be honest, the high end base Aim guys should feel rare, and thus special. Btw, Increments of 1 is awesome. In a bizzare way they all have 'personality' now. Highly Recommended. Link to comment Share on other sites More sharing options...
Recommended Posts