How to create a Custom power?

I’m trying to create a power that spawns units in an area, if the player has line of sight. I took the oldenburg baloon as a template to do this. In the process, I came to know about the protocommands file, which holds the icons used in all the blue framed icons in the game (for example, the hacienda work modes, the consulate tax modes, the carolean charge).

So far I figured out a power depends on:

  • A tech file
  • A Proto file (which unit has the tech)
  • An Ability file (which unit has the power and on which condition its active)
  • A Power file (the power itself)
  • A protounitcommands file (the ui?)
    There must be something else though. I can’t make a power of my own with those files

So far, I’ve managed to port the Oldenberg Scientific Exploration to the TC


Keeping it as a control check that the files are working, I created a custom power and assigned it to the Barracks

This button can be pressed, triggering the “kaching!” sound, but it has no cooldown and does nothing.

I made it work, there was a misspell at the power file.

With that out of the way, there comes the next question. Can I assign a resource cost to this power?

1 Like

Yes, you can assign costs to the associatedtech in techtree.

Great, I made it work, but not as intended

There is the tech at the barracks, you research it, and then you can use the ability for free. Is it posible to make it so the ability always has a cost to use?

The USlevy does it, but it works completly different from the royal houses power