ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

ElevationModel

From ModEnc
Jump to navigation Jump to search
This page should correctly be named "[ElevationModel]"; it is wrong due to technical restrictions.



Projectiles that have SubjectToElevation=yes will gain a range bonus when there is a height difference between the firer and the target. This section controls that bonus, which is calculated like this (pseudocode):

// Only when both firer and target are on the ground will the following calculation be performed; if either is in the air, it directly returns 0.

HeightDiff = max(0, FirerCellLevel - TargetCellLevel)[1]
StepCount = HeightDiff / ElevationIncrement
StepBonus = StepCount * ElevationIncrementBonus
if StepBonus > ElevationBonusCap
  then StepBonus = ElevationBonusCap
RangeBonus = sqrt( (HeightDiff * 104)^2 + (StepBonus * 256)^2 )[2]

Applicable INI Flags

These tables show all INI flags applicable[Applicable INI Flags 1] to ElevationModel. The flags are grouped by the internal classes the flags are inherited from, and then listed in the order they are read in by the game. You can re-sort the rows by column values by clicking the arrow icons in the column headings. Each flag can be clicked to visit its page for detailed information.

Please note that this section is accurate only for Yuri's Revenge. All other C&C games use different sets of flags.

  1. "Applicable" in this context means "read from the INI files". Certain flags listed here don't have any effect ingame , but they are read and in certain cases cause a crash if not present. Again, refer to each flag's individual page for detailed information.


[ElevationModel]
INI File Section Key Value Type Default Value Adds to list
Rules(md).ini [ElevationModel] ElevationIncrement int 0
Rules(md).ini [ElevationModel] ElevationIncrementBonus float 1.0
Rules(md).ini [ElevationModel] ElevationBonusCap float 0.0

Footnotes

  1. From here, it can be seen that only when the firer is higher than the target can a range bonus be obtained.
  2. From here, it can be obtained that the bonus is always non-negative. And since the parameters read from INI never affect HeightDiff, RangeBonus is at least the value of HeightDiff * 104.