User talk:Alex the weeb/Kirby spit star duration (SSBU)

Formula
I believe I've worked out the formula, or at least got very close. It should be, where p is the opponent's percent and k is Kirby's percent with the result being between 1 and 60 frames. The first formula can be found in vl_params under starmissile as thrown_star_life and thrown_star_life_target_damage. The second formula I'm not sure where the values come from, but that is what the math gives. --CanvasK (talk) 10:42, January 2, 2022 (EST)
 * Thanks, it's good to be able to work out, at least as a ballpark figure, how much the star duration will be reduced by. Regarding the second equation though, one thing I noticed is that it seems the release frame may be tied to when the star stops moving as well. That is to say that regardless of how much time is predicted to be left by the first equation (which is pretty straightforward, fortunately), the opponent will always be released on the frame the star either stops, or drops below a certain speed. Note that the initial velocity of the star is determined by both opponent's percent and Kirby's percent. This may explain why a direct formula doesn't appear to be present in params. That's just a theory though.  Alex the  Weeb  11:41, January 2, 2022 (EST)
 * I noticed it coming to a near complete stop too (except with very high %s where it hits the 60 frame limit), so I think speed is very likely. There's even parameters for speed under starmissile. I did try to do some (very) rough math with those values but it never lined up with the frame count, but I could easily be doing it wrong. I'll try to do some proper testing later, may take a bit as pixel-counting is a little fuzzier than frame-counting. --CanvasK (talk) 12:21, January 2, 2022 (EST)
 * I now have further evidence to support my theory about the star speed causing early release. When the opponent is at 70% and Kirby at 0%, the base star duration is 60 frames, and after 7 frame perfect inputs, they can escape. If we increase Kirby's percent to 130%, the base duration now becomes 40 frames, however the number of frame perfect inputs to escape remains 7. If, on the other hand, we keep Kirby's percent at 0%, but reduce the opponent's percent to 30%, the base star duration is once again 40 frames, but the number of frame perfect inputs required to escape shrinks to just 5. This suggests that raising Kirby's percent isn't actually reducing the base duration at all, but rather a release is being forced on frame 41 regardless of how many trapped frames are remaining.  Alex the  Weeb  14:46, January 3, 2022 (EST)
 * I also have some evidence to support the speed idea. In vl_param there is thrown_star_spd_x = 2.8, thrown_star_brake_x = 0.05, thrown_star_spd_x_target_damage and thrown_star_spd_x_my_damage both = 0.008, and thrown_star_release_speed = 0.4. After spending a couple hours trying to get as precise as possible with pixel counting, I was able to determine that the star starts out at a speed of 2.8 (thrown_star_spd_x), decreases by 0.05 each frame (thrown_star_brake_x), and releases when the speed drops below 0.4 (thrown_star_release_speed). Starting speed is plus starred fighter percent times 0.008 (thrown_star_spd_x_target_damage) minus Kirby's percent times 0.008 (thrown_star_spd_x_my_damage) (at p=100, 100*0.008=.8 and tested speed was 3.6, 2.8+.8). We can then create a formula from that to determine frames: ; since it is linear I went ahead and subtract 0.4 since that is effectively our 0, and "+2" because "it just works"™ (+1 probably because technically 1f's velocity is unknowable since there was no prior speed and another +1 for release because 0.4 is not less than 0.4). Using this formula on my data gives slightly more accurate results than my original (sometimes is the same, depends on if I remove redundant brackets because of floating point errors). Side note, there's also thrown_star_life_clatter_frame = 10 for mashing. --CanvasK (talk) 16:41, January 4, 2022 (EST)
 * Thanks a lot for this. I'm in the process of updating this page (I don't know if this should be included on the Wiki's mainspace or not).  Alex the  Weeb  03:35, January 5, 2022 (EST)
 * I think the formulas deserve the mainspace. Though this would then necessitate information on the other games. The spreadsheet lists Smash 4's values and they're the same as Ultimate, so that saves a headache. The other 3 games I can use a memory viewer and get position info that way. --CanvasK (talk) 07:19, January 5, 2022 (EST)
 * I can tell you that in 64, Melee and Brawl, neither Kirby's, nor the opponents percent has any effect on either the star duration (30 frames in 64 and Brawl, 29 in Melee) or the flight speed.  Alex the  Weeb  07:50, January 5, 2022 (EST)
 * There goes my afternoon's plans. I did open Smash 4 to check and both the opponent's and Kirby's percent affects duration in a similar manner to Ultimate. --CanvasK (talk) 09:12, January 5, 2022 (EST)

(Reset indent) King Dedede's is simpler than Kirby's. He has different parameter values but lacks thrown_star_spd_x_target_damage and thrown_star_spd_x_my_damage. He uses the formula, causing the star duration to ramp up faster. His star starts at 3.15 units/frame (vs 2.8) and decreases at the same rate of 0.05 units/frame and releases at 0.1 units/frame (vs 0.4). Because he doesn't have the damage params, the resulting duration due to speed is always 63 frames, making the duration purely reliant on the base formula as the limit is 60 frames. His clatter param is 12 (21.6 for button) compared to Kirby's 10 (18 for button). Values are identical in Smash 4. --CanvasK (talk) 21:46, January 6, 2022 (EST)