ACE.Points

S
26 functions

📄 lua/acf/shared/sh_ace_points_model.lua

Functions

Sort by:

ArmorProp

SNeeds Review

Per-prop armor survivability cost (scaled). mm is intensive (^1.4), HP is linear (^1.0).

function ACE.Points.ArmorProp(effMm, maxHealth)
2 params1 views

BaseRoundCost

SNeeds Review

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)
1 params0 views

ChargeCost

SNeeds Review

Mounted charges use one tube-window without the rack hardware floor. Stored ammo remains free.

function ACE.Points.ChargeCost(fillerKg)
1 params0 views

ChargeEntCost

SNeeds Review

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)
1 params0 views

CrewCost

SNeeds Review

Crew seat cost (scaled). Loader seats cost more than generic seats.

function ACE.Points.CrewCost(isLoader)
1 params1 views

EffectiveMm

SNeeds Review

No description available.

function ACE.Points.EffectiveMm(armourMm, ke, chem)
3 params0 views

EngineCost

SNeeds Review

Engine cost (scaled). hp is peak power (peakkw / 0.7457); fuel scales upkeep-ish value.

function ACE.Points.EngineCost(hp, fuelType)
2 params0 views

Gate

SNeeds Review

Share of the meta this pen defeats. The curve is continuous from zero with no minimum share.

function ACE.Points.Gate(pen)
1 params0 views

GatePen

SNeeds Review

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)
1 params0 views

GuidanceMul

SNeeds Review

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)
1 params0 views

GunCost

SNeeds Review

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)
3 params0 views

GunSustainedRps

SNeeds Review

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)
3 params0 views

IntrinsicValueMul

SNeeds Review

Intrinsic value beyond direct lethality terms; shared by billing and explanatory readouts.

function ACE.Points.IntrinsicValueMul(round)
1 params0 views

IsBetterCandidate

SNeeds Review

Candidate ordering is final weapon output, then per-shot score, then stable source order.

function ACE.Points.IsBetterCandidate(candidate, best)
2 params0 views

LethalityPen

SNeeds Review

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)
1 params0 views

MaterialEff

SNeeds Review

Returns nil for unknown materials so display code can fall back to live material data.

function ACE.Points.MaterialEff(mat)
1 params0 views

PostPenMult

SNeeds Review

The three parts summed: the per-round "inside-armor damage" multiplier.

function ACE.Points.PostPenMult(round)
1 params0 views

PostPenParts

SNeeds Review

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)
1 params0 views

PropArmor

SNeeds Review

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)
1 params0 views

RackCost

SNeeds Review

Tube count caps sustained rack rate over the engagement window.

function ACE.Points.RackCost(reloadTime, maxMissile, bestScore)
3 params0 views

RackCostFromRate

SNeeds Review

No description available.

function ACE.Points.RackCostFromRate(rate, bestScore)
2 params0 views

RackRate

SNeeds Review

No description available.

function ACE.Points.RackRate(reloadTime, maxMissile)
2 params0 views

RateFloor

SNeeds Review

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()
0 params0 views

RoundFromBullet

SNeeds Review

Build the plain pricing round from a gun/crate/rack BulletData table. nil if not a table.

function ACE.Points.RoundFromBullet(bdata)
1 params0 views

RoundScore

SNeeds Review

Round score = threat * baseRoundCost.

function ACE.Points.RoundScore(round)
1 params0 views

SustainedRps

SNeeds Review

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)
5 params0 views