V-Power [CPack] V1.6.1.4 (FINALIZED)

Started by Vertu, February 22, 2022, 10:59:16 PM

Previous topic - Next topic


I find the energy system in Creeper World to be vvveerrryyy simple (which is a good thing, like, really, really, good thing).
We can also add units that generate energy and we can manage how they do that... Well.. How about taking that to the next level?

I present you with an ENTIRE POWER-GRID separate to the vanilla one. The V-Grid.
The aim of the V-Grid is to make power management a bit more "interesting" in a sense of a late game rather than having more land, more reactors or miners... ERNs... ect. The V-Grid is an infrastructure that the more you develop, the more energy you will get out of it.

Think of it as an advanced way to get power that isn't giga-complicated (if you pay attention to the tool-tips at all). I will give a run-down of all basics you need to know for this CPack.
-All units are found in the STRUC build tab.-

The V-Grid is a power-grid with properties that require some management to ensure the grid doesn't blow up. The V-Reactor is the only unit that "contains" the V-Grid. Everything about the V-Grid happens and can be accessed at the V-Reactor. All V-Buildings affect the V-Grid but the V-Reactor is where it all happens.
The most important part of the V-Grid is the "Uncontained V-Grid power" number which can only be seen within the V-Reactor's UI.
This number is the limitation to your V-Grid's potential. The more V-Reactors, the more Uncontained V-Grid power is around. And if this power remains uncontained, it will overload the Reactors and destroy them in time.
Further more, if the Uncontained V-Grid power reaches below zero, the V-Reactor will suffer major inefficiency.
You need to build V-Rods and V-Capacitors to reduce and manage the uncontained V-Grid power in the V-Grid. Once enough power is contained, you can build another V-Reactor which benefits from all the V-Rods. Sharing is caring after all. Just be sure to not try containing too much power.

The more Uncontained V-Grid power, the less efficient the V-Reactor, but at worse (when at 40/40 in the vanilla CPack), this will cause a loss of 9 energy. So if you have 25 V-Capacitors and 2 V-Reactors, the Reactors will be producing 11 energy each. V-Reactors at neutral efficiency will produce 20 energy but at near-optimal efficiency (in the case of 0.2 Uncontained V-Grid power) with no V-Rods, will produce 25.87 energy from a single reactor and (a somewhat unrealistic) 62 V-Capacitors where needed to bring Uncontained V-Grid power down to 0.2 with only 1 V-Reactor. With more than 1 V-Reactor, you can get to exactly 0 with only Capacitors (a good 125 of em for 2 Reactors), 0 Uncontained V-Grid power is the ideal efficiency where each V-Reactor will produce 26.67 energy. Because math is cool and I made a very large Piecewise function.

The V-Grid can experience brownouts which for those who don't know, is when a power grid draws more power than is available, resulting in electrical damage to electric systems on the grid as the circuit is strained. When in a brownout, all V-Buildings will sustain damage in various degrees, the V-Reactor experiences the worse out of the V-Buildings. During a brownout, the V-Reactor will become unstable and you may need to turn it off and wait until your energy storage fills up again so you don't power-lock yourself as the 20+ energy you just had is now suddenly gone. Brownouts punish people who get into a deficit and don't get out of it, just chugging through it. A V-Grid brownouts will destroy the V-Reactor(s) and other V-Buildings if you don't get out of the deficit or turn the V-Buildings off.

When uncontained V-Grid power is above the tolerance of the V-Grid (40 by default), it will cause the V-Reactors and only the V-Reactors to begin overloading. The V-Reactors will take massive damage from this until they are turned off or uncontained V-Grid power is lowered to or below 40.

V-Grid Meltdown:
When uncontained V-Grid power enters the negatives, efficiency starts to drop, and it will keep dropping even if it means the V-Reactor(s) will begin draining energy from the RiftLab network. Once this is the case, the V-Grid will start to meltdown. The damage sustained by ALL V-Buildings is dependent on how much energy is being lost to the V-Reactor(s). The more energy being lost to each V-Reactor, the greater the damage. The more V-Reactors draining the RiftLab network energy, the greater the damage as well.

The V-Reactor is the core of the V-Grid power network. Without it, the V-Grid does not exist. It will produce 20 energy by default.. very.. default... This number will change a lot from many things. But so long as it exists and is connected to the Rift Lab it WILL produce energy in some manner.[/color][/color]
  • Produces 20 energy by default, 22.5 with full Energy ERN Port efficiency by default.
  • Can have energy production increased by V-Rods.
  • Costs 325 Lithic to build.
  • 8 HP.
  • Creates 25 uncontained V-Grid power.
  • Explodes in an explosion that will stun and damage surrounding units (killing anything not extremely tough within the main explosion radius) as well as COMPLETLY vaporizing ALL Creeper in the area. Including Anti-Creeper!
  • Upon detonating, will release <REDACTED> fallout that is highly dangerous and difficulty to nullify via Anti-Air Missile Launchers. Shields however will protect you from the fallout so long as it doesn't get too close to the shield generator as the blast will still go through the shield but the fallout will be intercepted.
  • The V-Reactor sustains significant damage when overburdened during a brownout, the most of all the V-Buildings.
  • The V-Reactor experiences overloads from going over the uncontained V-Grid power limit. This will kill the Reactor VERY QUICKLY but doesn't affect the other V-Buildings of the grid. To disable, set "CAN_OVERLOAD" to 0 (1=true, 0=false).
  • If the uncontained V-Grid power reaches too deep within the negatives, the V-Grid will begin to meltdown. This meltdown harms ALL V-Buildings but the damage sustained by the V-Buildings is proportionate to the amount of energy being drained by the V-Reactor(s). The more energy being drained and the more V-Reactors, the more damage V-Buildings will take. To disable, set "V_GRID_CAN_MELTDOWN" to 0. This is by far the most non-PAC-friendly part of the V-Reactor as it will destroy the PAC base and it's energy production by having the V-Reactor(s) (and most other V-Buildings) explode and also explode everything around them while they are exploding. All of this from the lack of management of the V-Grid.
  • The V-Reactor experiences various levels of efficiency depending on how much uncontained V-Grid power is within the V-Grid. The closer uncontained V-Grid power is to zero, the more efficient. The further from zero, the less efficient. However, beware of efficiency when going below 0 as efficiency will quickly drop compared to when having more uncontained V-Grid power. To disable, set "UCVGP_INFLUANCES_EFFICIENCY" to 0.
  • The V-Reactor has a massive UI-description that can tell you everything you need to know for how to manage, maintain, and efficiently use the V-Reactor.

The V-Rod will increase the amount of energy produced by all V-Reactors by 0.2 and there is no limit to how many you can build by default thanks to the power of V-Technology! (So long you can manage the uncontained V-Grid power that is). The ERN Port energy efficiency will also increase this power boost up to 0.3 for each V-Rod.[/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color]
  • Increases V-Reactor energy production by 0.2, 0.3 if at maximum Energy ERN Port efficiency.
  • No build-limit by default, you can indeed have so many that a V-Reactor produces 1,000 energy unless a build-limit is set... After managing uncontained V-Grid power in the process of such an absurd achievement...
  • Reduces uncontained V-Grid power by 1.5.
  • Greatly resists damage from brownouts but is not immune.
  • Costs 40 Lithic to build.
  • 1.75 HP.
  • Will detonate when below 0.5 HP but if quickly destroyed (as in HP becomes 0 before there is any time to be below 0.5 and greater than 0), will only release an EMP and stun nearby units. Stunning and damaging nearby units are separate events depending on how the V-Rod is destroyed.

Increases maximum energy storage by 10 but is quite poor at containing uncontained V-Grid power. This unit is going to be your life-line to ensure you don't experience brownouts as 100 energy storage is A LOT smaller than 200 and the extra buffer can be VERY useful.[/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color][/color]
  • Increases maximum energy storage by 10.
  • Reduces uncontained V-Grid power by 0.4.
  • Costs 60 Lithic to build.
  • 1 HP.
  • Will experience basic damage during brownouts.

Link to V-Power unit wiki pages:
V-Reactor: http://knucklecracker.com/wiki/doku.php?id=cw4:cmod:docs:9966395a-9a1b-4f41-92ad-ebd27d1263d0
V-Rod: http://knucklecracker.com/wiki/doku.php?id=cw4:cmod:docs:44cd6f78-3161-44f8-bd31-58c9f3bf7933
V-Capacitor: http://knucklecracker.com/wiki/doku.php?id=cw4:cmod:docs:4b92f788-91df-4dd4-ba07-89241cc4a105

Life isn't fair because we say it isn't. Not because it is unfair. In fact, it is so fair we want to say it isn't and do.


1.3.0 Lethal bug fix.
Fixed a lethal bug where the V-Reactor will be hard-locked from a false negative scenario that would perpetuate until some kind of recompile. This can be witnessed consistently after finalizing a map with active V-Reactors. After finalizing, the V-Reactors will enter this hard-locked state.
This has now been fixed.
Life isn't fair because we say it isn't. Not because it is unfair. In fact, it is so fair we want to say it isn't and do.


V1.4.1.0 Possibly final version - Refining, fixing, and finalized version.

  • V-Reactor releases fallout and a shockwave upon detonation. The fallout is extremally dangerous and hard to destroy with Anti Air Missile Launchers, make sure your V-Reactors don't detonate.
  • Reduced Overloading energy modifier to prevent a mathematical error from occurring and causing the Rift Lab to have an ammo of NaN.
  • Attempted to enhance NaN failsafe if the Rift Lab ever has NaN ammo.
  • Reduced the number of effects from V-Rod and V-Capacitor detonations.
  • Many tiny changes.
  • The only chance of another update is the implementation of V-Storage but based on how V-Power works mathematically I may not add the V-Storage to V-Power after all. This is due to the sensitivity of the math behind the V-Reactor's workings.
Hope you enjoy the V-Power CPACK for all your power needs in missions to come. If you encounter any major bug please inform me.
Life isn't fair because we say it isn't. Not because it is unfair. In fact, it is so fair we want to say it isn't and do.



  • Moved V-Rod DamageUnits API from :Destroyed to the main flow of the script and is only triggered when health is below 0.5 and above 0. HP has been increased by 0.25 because of this.
  • V-Rods now cause a bigger stun.
  • V-Rods stunning units and damaging units are now mutually exclusive. If the V-Rod is obliterated it will only stun. If it was slowly destroyed it will meltdown and explode, damaging nearby units.
  • V-Reactor now can't damage shrapnel from the SML Strat Missiles and its own shrapnel.
  • V-Reactor fallout shrapnel can no longer damage other fallout shrapnel, including the ARG shrapnel from the SML Strat Missiles.
  • V-Reactors can not damage other V-Reactors when exploding now. However, they instead further stun them for over 5 additional seconds along with all the other stun affects, making the stun time take years. Needless to say, don't let V-Reactors detonate!
Life isn't fair because we say it isn't. Not because it is unfair. In fact, it is so fair we want to say it isn't and do.


Mainly just more user friendlyness added. V-Rods and V-Capacitors now display how much they lower UC.V-G.P.
Minor performance optimizations.
Life isn't fair because we say it isn't. Not because it is unfair. In fact, it is so fair we want to say it isn't and do.


Thank you "Dev" for informing me to better word the UI of all units. It revealed an error in the reactor's code which caused old and unintended text of the V-Reactor to overwrite the superior, newer and intended UI text.

Capacitor and Rod also have had their UI text altered.

The UI of all 3 units should be a bit more clear.
Life isn't fair because we say it isn't. Not because it is unfair. In fact, it is so fair we want to say it isn't and do.


Download has been updated to ensure if any changes where made in my dev-version, they are available here too.
Life isn't fair because we say it isn't. Not because it is unfair. In fact, it is so fair we want to say it isn't and do.


  • Reactor explosion fallout can now be corruptive when having the REDACTED CPACK and is enabled. Integration of this CPACK is TBD.
  • Support for measuring execution time.
  • Fixed V-Capacitor shading.
Life isn't fair because we say it isn't. Not because it is unfair. In fact, it is so fair we want to say it isn't and do.