ACE.Points
S📄 lua/acf/shared/sh_ace_points_model.lua
Functions
ArmorProp
Per-prop armor survivability cost (scaled). mm is intensive (^1.4), HP is linear (^1.0).
function ACE.Points.ArmorProp(effMm, maxHealth)BaseRoundCost
Intrinsic cost of one configured round. Inventory count is not billed, but every weapon multiplies this value by its own delivery rate and threat factor.
function ACE.Points.BaseRoundCost(round)ChargeCost
Mounted charges use one tube-window without the rack hardware floor. Stored ammo remains free.
function ACE.Points.ChargeCost(fillerKg)ChargeEntCost
Mounted charge (scalable explosives / bombs family) -> scaled points. Prices the charge's REAL filler mass -- self.FillerMass, kg of HE, set once at spawn from the scaled charge volume -- as mounted ordnance via ACE.Points.ChargeCost. 0 for a filler-less/invalid entity.
function ACE.Points.ChargeEntCost(ent)CrewCost
Crew seat cost (scaled). Loader seats cost more than generic seats.
function ACE.Points.CrewCost(isLoader)EffectiveMm
No description available.
function ACE.Points.EffectiveMm(armourMm, ke, chem)EngineCost
Engine cost (scaled). hp is peak power (peakkw / 0.7457); fuel scales upkeep-ish value.
function ACE.Points.EngineCost(hp, fuelType)Gate
Share of the meta this pen defeats. The curve is continuous from zero with no minimum share.
function ACE.Points.Gate(pen)GatePen
Penetration the GATE judges a round by. HE/APHE payloads use their blast lethality reach because splash, module damage, and soft-target effects create combat value without literal armor penetration; HESH retains only the damage code's literal blast-penetration channel.
function ACE.Points.GatePen(round)GuidanceMul
Guidance multiplier for a round (1.0 for everything but guided missile ammo). Public so displays can show the "x 1.5 guidance" factor instead of hiding it inside baseRoundCost.
function ACE.Points.GuidanceMul(round)GunCost
Gun firepower cost (scaled). This is called once per gun entity; identical guns therefore add linearly instead of sharing or deduplicating the round cost.
function ACE.Points.GunCost(sustainedRps, baseRoundCost, threat)GunSustainedRps
ROFLimit is a pricing input and its trigger path must dirty points. LoaderCount is local to the gun, including loaders linked across contraption fragments.
function ACE.Points.GunSustainedRps(gun, bdata, crate)IntrinsicValueMul
Intrinsic value beyond direct lethality terms; shared by billing and explanatory readouts.
function ACE.Points.IntrinsicValueMul(round)IsBetterCandidate
Candidate ordering is final weapon output, then per-shot score, then stable source order.
function ACE.Points.IsBetterCandidate(candidate, best)LethalityPen
Penetration used for lethality: raw maxPen, but HE/APHE/HESH payloads floor it at a blast-equivalent so big fillers still register a threat even with token stated pen.
function ACE.Points.LethalityPen(round)MaterialEff
Returns nil for unknown materials so display code can fall back to live material data.
function ACE.Points.MaterialEff(mat)PostPenMult
The three parts summed: the per-round "inside-armor damage" multiplier.
function ACE.Points.PostPenMult(round)PostPenParts
Lethality once the round is inside armor: base damage plus the hole it tears (frontal area x the type's damage multiplier, normalized so a 100mm AP shell = 1.0; HEAT uses its jet cross-section, not the shell body), plus the explosive payload it delivers (sqrt of filler kg vs a 6kg reference). Utility (smoke/refill) rounds return 0,0,0.
function ACE.Points.PostPenParts(round)PropArmor
Prop -> (effectiveMm, maxHealth) for the armor term, or nil to skip. Skips ACF/ACE components and pods (they price in their own categories) and props with no armour or HP. Uses MAX armour/health (static design). Material ke/chem via the curated MATERIAL_EFF above.
function ACE.Points.PropArmor(ent)RackCost
Tube count caps sustained rack rate over the engagement window.
function ACE.Points.RackCost(reloadTime, maxMissile, bestScore)RackCostFromRate
No description available.
function ACE.Points.RackCostFromRate(rate, bestScore)RackRate
No description available.
function ACE.Points.RackRate(reloadTime, maxMissile)RateFloor
Public so readouts can tell a player when the priced-rate floor changed their bill, instead of leaving the window a silently duplicated magic number.
function ACE.Points.RateFloor()RoundFromBullet
Build the plain pricing round from a gun/crate/rack BulletData table. nil if not a table.
function ACE.Points.RoundFromBullet(bdata)RoundScore
Round score = threat * baseRoundCost.
function ACE.Points.RoundScore(round)SustainedRps
Static sustained cadence. Magazine-aware (burst then mag reload) and loader-aware for non-auto classes. baseRps already folds in the gun's current wire ROFLimit (the adapter below applies it via ACE_GetGunConfiguredRps before calling here), so a low limit lengthens the effective cycle through this same math rather than being ignored.
function ACE.Points.SustainedRps(baseRps, magSize, magReload, gunClass, loaders)