CPS Test
A simple click-speed test for SimplePlanes, abusing some in-game mechanics. You should bind the FireWeapons button to the one you want to practice clicking.
It's probably well-known that countermeasures can be launched slowly by holding down the button, and quickly if you mash the button. However, there is no command for getting the ammo of countermeasures, so I had to find an alternative.
I found that setting the armed activation group to !FireWeapons
will fire the weapon normally when the button is pressed, but will not continuously fire the weapon. Instead, the button must be released and pressed again.
Mod parts are only used to display information. You can run the minigame without mods if you download, undo, redo, then paste the following FTs into DebugExpression:
Remaining number of clicks:
smooth(ammo(#Cannon#), FireWeapons ? 0 : 10000)
Timer:
sum(smooth(ammo(#Cannon#), FireWeapons ? 0 : 10000) < 50 & smooth(ammo(#Cannon#), FireWeapons ? 0 : 10000) > 0 ? 1 : 0)
Actual CPS:
1/(sum(smooth(ammo(#Cannon#), FireWeapons ? 0 : 10000) < 50 & smooth(ammo(#Cannon#), FireWeapons ? 0 : 10000) > 0 ? 1 : 0) * 0.02)
Specifications
General Characteristics
- Created On Windows
- Wingspan 6.6ft (2.0m)
- Length 17.1ft (5.2m)
- Height 4.9ft (1.5m)
- Empty Weight 831lbs (377kg)
- Loaded Weight 831lbs (377kg)
Performance
- Wing Loading N/A
- Wing Area 0.0ft2 (0.0m2)
- Drag Points 3073
Parts
- Number of Parts 15
- Control Surfaces 0
- Performance Cost 45
Required Mods
-
Informative Components
by hpgbproductions
Version 1.0 (10/9/2020 1:16:56 PM)
View Mod Page
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
... what?
@SnoWFLakE0s huh, I never thought of using sum() and rate() together before to get proportional change, looks so obvious now lol
Cool, nicely done. Here's a function that detects the total # of changes in a boolean variable that might be more universally applicable:
.
Change Counter Script:
sum(abs(rate(EXP)))
.
This script returns the number of times a change in the variable EXP has occurred (best fit for boolean or fixed-interval change variables). For example, ammo("Cannon") can be substituted for EXP to count the number of shots fired (with some adjustment), or the variable LandingGear to count the number of times the LandingGear button was pressed.
.
It may aid in shortening code character count if you use this "change counter" instead. You could also theoretically have the first click automatically start a timer, and end the timer at a predetermined time, then divide recorded change count by said time interval to get the CPS result, which may be preferable over using
smooth()
. Just my $0.02.