Powerup Creation

Powerup Name

Choose a clever name for your powerup, such as 'clevername'.

Powerup Image

Powerup Sound (optional)

Selecting a sound to represent your powerup is optional; if you don't provide one, a default sound will be played.

Powerup Code Files

Now you're ready to write the header file and source file. There are templates located in:
/templates/Powerup
You could copy these templates and modify them by hand, but I wrote a script that does it for you; simply run Powerup.exe and follow the on-screen instructions (if you're paranoid, you can compile the program from the source).

Optional Overrides

By default powerups last for 10000 milliseconds and only affect one player. You can override this default behavior by providing definitions for the GetDuration and GetTargetType functions in the powerup header file.
There are 3 target types:

Powerup Behavior

Now comes the hardest part: implementing the actual powerup behavior. As mentioned previously, you only need to implement the StartEffect and StopEffect functions in the powerup source file. Look at the other powerup classes for examples. In general, you will have to add a state flag to Player::PlayerPowerupData. StartEffect will turn the flag on, and StopEffect will turn the flag off; some piece of game logic will operate differently while the flag is turned on. Good luck, you can do it!