Make your own custom power-up using this Blueprint.
Version: 1.0.0 (Uploaded: March 16, 2025)
When you extract the .apk file in APK Editor Studio, you will find a new folder assets/powerup.
This singular folder contains almost everything you will need to create your custom power-up. Other edited files include menu/main.lua, hud/main.lua and gfx/sprites.png.
After opening the powerup folder, you will see three files as shown.
time_left.png is the circle overlay that will be displayed on the ball counter while the power-up is active. This image can be replaced with the texture of your power-up (resolution of the image must be 210x210 pixels).
inventory_icons.png is the spritesheet of the power-ups that will be seen in the inventory. You need to replace the sprite of the fourth power-up in this sheet to the texture of your power-up.
Similarly, you need to change the first sprite in gfx/sprites.png to the texture of your power-up. It is not located in the powerup folder, because of technical limitations.
main.lua is where almost all of the custom powerup code is located.
This blueprint comes with three example power-up effects for you to check out: No-clip, Crystal Doubler and a Timed Multiball. The values for each of these examples are 1, 2 and 3 respectively in assets/powerup/main.lua.
For these power-ups to be functional you need to change the value for customPu on line 17 of the script (this value is 0 by default).
--choose an example powerup (0 - none, your custom powerup; 1 - noclip; 2 - crystal doubler; 3 - timed multiball)
customPu = 0
If you want to script your own power-up effect, you may leave this value to be 0. Otherwise, you can go ahead and test the example power-up you chose in game!
If you want to check how these example power-ups work, go to the examplePowerups() function on line 43.
Note: You need to use the Homing power-up in your segments for it to actually show up in-game and work (This is just the default value and can be changed manually).
Upon opening main.lua you will find some basic functions for the power-up, such as border settings and automatic activation toggle at the start of the powerupInit() function. You can adjust these values to your liking. Make sure, that customPu is set 0, so that your code is executed, and not the one from an example power-up.
If you're ready to start coding your custom power-up, go to the customPuCode() function on line 31:
function customPuCode() --function made for custom powerup code
customPuActive = (mgGetPowerupFraction(customPuName) > 0)
if examplePowerups() == true then
if not customPuActive then
--code which gets executed every frame the custom powerup is not active
return end
--code which gets executed every frame the powerup is active
end
end
As you can see, there are comments telling you where to put code that gets executed every frame the power-up is active/inactive. You can write your code in those areas.
Fourth Power-up Blueprint © 2025 by Smash Hit Lab is licensed under CC BY-SA 4.0