CC2 Modding Limits

CC2 is a fun game to mod, partly because it is rewarding, but also because it is a challenge. There are some obstacles to better modding (such as not being able to add new script, sound or mesh files to mods). These are annoyances but not impassable barriers. There are a lot of those though, and they are on this page.

Challenge Unlocked

There have been a handful of things that we’ve figured out how to do, sometimes this is a bit Heath Robinson.

Get Aircraft Altitudes

The HUD can easily get altitudes, but the control screens and holomap get unit locations using the x,z coordinates from the map. The altitude value is y so we thought we would be unable to get it. However, the drydock at each team’s starting island is always at elevation=0, so we can use that to compute the altitude of any unit.

local rel = update_get_map_vehicle_position_relate_to_parent_vehicle(
    drydock:get_id(),
    unit:get_id())

return rel:y()

Change the carrier weapons

Again a drydock-related solution. The drydock is actually a unit, it has one vehicle attachment occupied by the first carrier on your team. Before you launch, you can use the same loadout calls to alter the carrier’s attachments as you do for seals an mantas etc.

This exposed that some attachments are are “free”. Meaning they come without any production cost or inventory count.

The turrets for the carrier (gun, torpedos, aa, ciws etc) are all unlimited by supply, and so is the 15mm turret.

Potential

The following are changes that could perhaps be attempted but essentially require extensive rewrites of the shipped lua scripting:

  • Increase purchase costs
    • Could perhaps work by hiding money in another game value, this would be a very messy mod that touches many files

Probably Impossible

The following are things we (the modding community) are pretty sure are practically impossible to do with CC2 Steam Workshop mods.

  • Change the production speed of new units
  • Change the hitpoints of units
  • Change the armour of units
  • Change the fuel capacity of units
  • Change the ammo capacity of units
  • Change the maximum range of the carrier gun
  • Change the maximum range of vehicle guns
  • Change the maximum range an IR/AA missile will lock on
  • Add another lift to the carrier
  • Add another runway to the carrier
  • Add more aircraft hanger or ground unit slots
  • Make CIWS shoot at bombs automatically
  • Change the weapons fitted to the Carrier
    • Before a carrier is launched, we can use drydock to alter the carrier’s attachments
  • Change the time a virus bot takes to capture an island
  • Change the range where a virus bot will start to capture an island
  • Cannot view waypoints from the unit HUD
  • Cannot view unit altitude from the control screens
    • Turns out you can if you take advantage of the features used by the landing screen.
      • We can calculate aircraft altitude by getting the vertical distance between a “drydock” unit and the aircraft
  • Alter the weapon attachments of deployed units (eg needlefish, barges, etc)
  • Use the island airfields
  • Transfer cargo/fuel directly from an island to the carrier without a barge
  • Attach/Deploy sub-units from anything that is not a carrier or petrel
    • Petrel can only airlift a few fixed ground unit types
  • Resupply other units with fuel or ammunition
    • The Mule is the only chassis that can resupply other ground units
    • The Carrier is the only chassis that can resupply needlefish)
  • Significantly change the AI behaviour
  • Create new unit types
  • Create new screen types/sizes
  • Add new lua scripts
  • Add new blueprints
  • Add new sound effects
  • Add new land turret types
  • Add new needlefish types
  • Spawn arbitrary units on the map
    • eg, we cannot give the player or AI a Swordfish via a mod
  • Script changes to lights
  • Script changes to carrier “button” systems
    • cannot turn power on/off from lua
    • cannot fire carrier AA missiles from lua
    • cannot fire carrier torpedos or countermeasures from lua
    • cannot move the lift
  • Add more key bindings or control input types
  • Make a map with more than 64 islands
  • Make a map with zero islands
  • Import third-party lua libraries or native functions
    • eg, we cannot connect to networks or explore the filesystem
  • Alter the ocean depth map