Zyxpsilon wrote:
The main colored DELTA hint is related to the VB/C++ mnemonic that means indirect "FloorMath" calculations. In coding principle at least.. this sort of variable can reach max but only according to feed-through parameters that can't floor it to a MIN under certain conditions. Think of it as Integer rounding from float equations (or slope curves).
Huh, yeah .... whatdyoumean
I
somewhat understood the linked wikipedia article and from this it seems like it's an operation that can only be used on sets of numbers. In common mathematical speaking (when non mathematicians are trying to use mathematical terms
) delta is often used simply to indicate a difference and from that bit of code chrisb unearthed it looks like it's simply a factor to compare two values.
chrisb wrote:
Code: Select all
GlobalAlert - (ALERT_DELTA * (NumFacilities - MAX_UNOBSTRUCTED + 1)) < GlobalVigilance
With 3 faciliities it would be GlobalAlert + 10 < GlobalVigilance. So 10 or more NetGV would return false.
With 4 facilities it would be GlobalAlert < GlobalVigilance.
But, this code as far as I can tell will never be executed. So not sure if that's a bug or not.
That's close to what i guessed but without knowing where it starts so apparently you need 10 GV over GA to prevent the 4th facility construction, GV>GA to prevent the 5th and i guess GV>GA-10 to prevent a 6th facility.
If the code is not executed due to a bug however, it would mean that delaying AVATAR is harder than it should as facilities have a huge impact on AVATAR progress.
It would be good to have a developer's word.
My own code digging have revealed the template for the Build Facility activity which to my understanding holds the condition under which this activity can be started at the line 1273 of
X2StrategyElement_DefaultAlienActivities.uc
Of particular interest is this part.
Code: Select all
//these define the requirements for creating each activity
Template.ActivityCreation = new class'X2LWActivityCreation_FurthestAway';
Template.ActivityCreation.Conditions.AddItem(default.SingleActivityInWorld);
Template.ActivityCreation.Conditions.AddItem(default.AlertAtLeastEqualToVigilance);
Template.ActivityCreation.Conditions.AddItem(default.AnyAlienRegion);
Template.ActivityCreation.Conditions.AddItem(new class'X2LWActivityCondition_AlertVigilance');
My understanding of this is that the activity will occur in the non liberated region that's furthest away from any contacted region and where Alert Level is at least equal to Vigilance level. I don't think vigilance can be higher than alert in uncontacted regions but i may be wrong as there is an activity that simulates rebel actions without XCOM control. There can be only one such activity in the world at a given moment and it has an additional condition related to Alert and Vigilance but that condition (defined in
X2LWActivityCondition_AlertVigilance.uc) apparently evaluates to false in a number of situations that are not defined in that same file and returns true if it doesn't evaluate to false and i'm a bit lost where to look next