User Tools

Site Tools


cw4:cpack:docs:23977d46-b69d-431a-82e1-f4013f889c5a

This is an old revision of the document!


Index

qople - First Person Tools

canonical link to CPACK - where to get the author-maintained version

This is the documentation page for the first person gamemode. Information for players can be found here.

The FPS scripts were made with extensibility and versatility in mind, but because of that, some parts of them may seem a little daunting. This page's goal is to act as a guide and a reference to hopefully lower that barrier to making your own first person levels.

As a starting note, the term “weapons” does not include the sniper unless explicitly stated, since it currently does not conform to the same system as the others.

Weapon Attributes

As far as the scripts go, the only fundamental differences between the weapons is their visual appearance. If the mortar is given the cannon's default stats, it will have the exact effect on the creeper as the default cannon. This is how AC was added to the cannon in “FPS: Anti Up” (map #586): The item upgrade simply gives the cannon anticreep-related attributes.

To put it simply, any attribute is applicable to any weapon, and will behave the same on all of them.

Attribute Name Default Value Description Notes
Rate 30 The number of updates between shots. Values of 1 and below max the weapon fire rate, at once per update.
DmgDepth 0.0 The depth of normal damage to creeper. Is affected by crimson (20% damage). The same as the MaxNumCells, Radius, and Amt arguments to the DamageCreeper function.
DmgDist 0 The maximum radius that normal damage will damage creeper at.
DmgMaxCells 9999 The maximum number of cells that normal creeper damage can affect.
DmgIterations 1 Increases normal damage spread against thin creep, decreasing damage loss. Multiplies the max cells when creeper is less than DmgDepth deep. Implementation is to spread damage across several DamageCreeper calls with decreased amounts.
ProjSpeed 10 How fast the weapon's projectiles travel, in cells per update.
MinRange 0 The lower bound of the mortar's targeting, in cells. Mortar only.
MaxRange 100 The upper bound of the mortar and sniper's targeting, in cells. Mortar and sniper only.
AcDepth 0.0 The depth of AC deposited per shot. Same as the Amt, Range and Cap arguments to the AddCreeperWithCapInRange function.
AcDist 0 The radius that AC is deposited inside of.
AcCap 0.0 The maximum depth that AC can be deposited to. Keeping the cap at 0 will add AC damage without creating AC, effectively giving bonus damage against crimson.
UnitDmgAmt 0.0 The amount of damage dealt to vulnerable enemy units.
UnitDmgDist 0.0 The radius inside of which vulnerable enemy units will be damaged.
AimAssist 0.0 The maximum angle from the center of the screen that the sniper will lock onto a target. Sniper only.
NetMult 0.0 Keeps track of the total strength of upgrades the weapon has received. Should not be modified without upgrading the weapon accordingly. Infocache-based upgrades increment this automatically, so only custom upgrades should interact with it.

List of Units (CMODS) in this CPACK

cw4/cpack/docs/23977d46-b69d-431a-82e1-f4013f889c5a.1612847013.txt.gz · Last modified: 2021/02/09 00:03 by qople