This is an old revision of the document!
⇐ Index
⇐ Custom CPACKs & Units
⇐ CPACK - VPAC Vertu Expansion
⇐ VPAC Wiki Page
VPAC CPACKs download location.
The code of this unit is tangled up in logic spaghetti and legacy code. It would benefit from peer-review to make it more stable and possibly more efficient. If you wish to check it out and obtain thoughts potentially worthy of action, contact me, Vertu, via the CW4 Discord in MapMakingChatter with an @ mention.
Have nightmares of trying to find out why Stun Mode is unreliable in using the :Prioritize function.
[VPAC Vertu Expansion] Lancer (Quantum Lancer)
The Quantum Lancer is an assault unit which can directly assault enemy units, towers, and some projectiles like Missiles from the Rocket Launcher. It also has a stun mode which has a lot more range and will stun the target unit as well as nearby units while also depleting their ammo by 80%. Additionally, vanilla shields are destroyed by this stun, including shields caught in the stun radius!
The Lancer must be created at the NEXUS using its build beam which will need to recharge for a minute after constructing a Lancer.
Overview
Uses 3 power.
15 Health.
Relatively fast.
Floats on Creep and Anti Creep. (Will be beached if stuck on dry land).
DAMAGED BY AC.
Is a direct assault unit which attacks nearby enemy units.
Assault Mode:
0.2 damage per shot. Bonus damage against towers (3x damage bonus).
Very fast rate of fire. Faster than its ability to recharge energy for shooting.
Deals only 50% damage to units under a shield (0.1 per shot).
Stun Mode:
Double the range of assault mode.
Removes 80% of the ammo of all units stunned by it.
Very long recharge time. - Will be fully recharged in energy for another shot before the weapon is recharged.
Stun lasts as long as the weapon recharge.
Only works against units that can be stunned.
If destroyed, it must be slowly reclaimed by Creeper. This is a slow process and does not work with AC. So be careful with these floaters!
Has smart targeting AI.
Can be told to only shoot at specific targets and target types (such as projectiles or ignore projectiles).
Has an increased heal rate of 2.5x so it doesn't need to sit around for an overwhelmingly long time after being shot up.
Constructing
The Lancer is constructed by the NEXUS. When the build plan of a Lancer is placed close enough to a NEXUS and it is stationary, the NEXUS will begin to build the Lancer.
Once the Lancer is constructed, the build beam of the NEXUS will need a full minute to recharge before being able to build another Lancer.
User Interface (UI)
0 [LABEL] Available energy display and amount needed for stun shots.
1 [LABEL] Recharge time display (reload timer).
2 [FLIP] Armed state. [Armed/Disarmed]
3 [FLIP] Mode. [Assault/Stun]
4
[CHOICE] Target prioritization. [ALL,
Cannons,
Mortars,
Sprayers,
Snipers,
Missile Launchers,
Nullifiers,
Shields,
M-Rifts,
Pylons,
Rocket Launchers, Be Point Defense, Only Units]
5 [CHOICE] Floating height in Creep/AC. [Creeper height / 2, Creeper Height, Approximately terrain height, 5 above terrain, 10 above terrain, 15 above terrain, 20 above terrain]
6
[BUTTON] Self reclaim (DESTROY button). This will take some time and can be canceled just like with the
Stash Base. This is much, much faster than having to reclaim the wreck of a Lancer.
7 [LABEL] In-game display of the reason for it having “Quantum” in its name.
Targeting Prioritization
It appears the targeting prioritization is very unreliable when the Lancer is set to stun.
Really.. Really.. not looking forward to looking into this.
The Lancer has smart targeting prioritization when told to target “ALL” and “Units Only”. The priority is as followed from highest to lowest:
Mirco-Rift, Nullifier, Sniper, Pylon, Shield
When none of these targets are in range, the Lancer will target the closest nonimpervious unit to it.
When the Lancer is not set to “ALL” or “Only Units”, it will strictly target only the specified type of target, allowing manual and strict control over what it shoots at. “Be Point Defense” is merely a whitelist of various projectiles the Lancer will target and ignore every other unit unlike the specific units in the choice widget.
Reclaiming
The Lancer has to be reclaimed by that Nanites within the Creeper once a Lancer is disabled and rendered dysfunctional by sustaining too much damage. The reclaim process takes a considerate amount of time and can only be done when not in a power deficit and the Lancer is in contact with Creeper.
However, it will always be better to allow the Lancer to repair itself than to manually reclaim it when it is low on health. Manually reclaiming (DESTROY button) still takes some time and the NEXUS takes time to prepare the construction of a Lancer before building it instantly while also having a minute long build beam recharge time after making a Lancer. So when a Lancer is low on health, retreat it. They have more range than an unupgraded Sniper (not ERNed and there is no Weapon Range ERN port buff) so it is very possible to keep them out of harms' way. If you are not facing unupgraded Sniper, then the longevity of each Lancer is your responsibility.
VPAC Note:
Only HARDCORE difficulty will have the Weapon Range ERN Port utilized.
Just know this only applies to VPAC maps made by Vertu.
History
[Click to view] This is entirely dev talk, not mechanic talk.
[Click to view] This is entirely dev talk, not mechanic talk.
You may be wondering why the Lancer is called the “Quantum” Lancer. It is entirely from how much pain and suffering was endured due to the “Quantum Physics” of the Lancer.
Ex: I have a ReverseList call to do nothing but update a list as without it, the list involved does not update! This is the closest thing to actual quantum mechanics where I have to ensure something “looks at” the list so it behaves consistently.
The targets list also would be essentially null while also not being null once the Lancer is built by the Nexus and SPECIFICALLY anything with target priority is immediately in range in this event. This would make the Lancer unable to target anything until you swap its Prioritize UI widget to something else. The Lancer has its proper range set only after a frame of its activation in order to fix this.
This is only the tip of the ice berg as many would say, and is why I wish for the Lancer to have its code “peer reviewed” as being a single individual, I have gone through too much to remember many of the coding mechanics used, even with all the notes provided in the code.
Non-VPAC operation
Hover height restricted to 5 above terrain.
Does not move.
When disabled, it will slowly be revived when in Creeper.
Can be told to be restricted to Stun or Assault mode. Just keep in mind this is a
UI State and will reset if you press the “Update Unit Instances” button in the editor.
All previous information applies if not stated otherwise by the above.
[Older Versions Difference] (VPAC v2.7.2.1 and earlier, CPACK version 2.5.1.3 and earlier)