Posts for jdaster64

jdaster64
He/Him
Experienced Forum User
Joined: 12/1/2012
Posts: 103
Location: New Donk City
The resistance data is in that massive Excel sheet I put up earlier; I was just suggesting that resisted hits might not ever give you a Lucky. I've definitely gotten Lucky hits on Tolstar before, so it can't be all bosses. Hmm, though, that's odd. I do seem to remember something like that happening with Gameshark codes back in the day, but I can't seem to reproduce it if I edit the x2004800 values between battles. Even if I set HP to over 1,000, it'll only cap it at 999 on a level-up. In any case, I can't find any values that go up when you use StarBeans drinks; maybe you're setting the "with-equipment" stat values and not the "base" ones?
jdaster64
He/Him
Experienced Forum User
Joined: 12/1/2012
Posts: 103
Location: New Donk City
How are you editing the stats? I would have thought that edits made to the x02004800 area out of battle were permanent, assuming you didn't set them to over the max or something. Not sure how exactly the stats are verified, I could try to look into it later... As for Lucky hits not working on Queen Bean, could that just be because she resists hammer attacks?
jdaster64
He/Him
Experienced Forum User
Joined: 12/1/2012
Posts: 103
Location: New Donk City
Sorry for the repeated posts; with some help from the Yoshi's Lighthouse guys, here's how Lucky attacks work. EL = enemy level, ES = enemy STACHE (I believe that's just 2x EL), AL = attacker level, AS = attacker STACHE: If EL is 99, no Lucky chance at all. If AL * x100 is in range (xE7 * EL - 1, x119 * EL + 1) (so, AL is roughly 0.9 - 1.1 * EL): Lucky chance = (10 * AS * x100) / (ES * x100), clamped to range [6, 15]. If AL * x100 is in range (xC0 * EL - 2, x140 * EL + 2) (so, AL is roughly 0.75 - 1.25 * EL): Lucky chance = (12 * AS * x100) / (ES * x100), clamped to range [10, 20]. Else, Lucky chance = (6 * AS * x100) / (ES * x100) out of 100, clamped to range [4, 10]. If the attacker has the Lucky Attack effect from equipment, lucky chance increases by 15, to a max of 25. To determine whether a Lucky hit succeeds, roll the RNG, multiply by 100, take the high word (which is between 0 and 99, inclusive), and compare whether the result is less than the Lucky chance computed above.
jdaster64
He/Him
Experienced Forum User
Joined: 12/1/2012
Posts: 103
Location: New Donk City
Looked at some of the equipment effects today... Power-D multiplies counterattack damage by 1.75 in both versions, Pow-Up and Def-Up both temporarily increase the respective stats by 50% in both versions, and Lucky Mushroom gives you extra effective STACHE points in battle equal to (x33 x Mushrooms + x33 x Supers + x4C x Ultras + x66 x MAXs) / x100, again in both versions. The only effects that I couldn't figure anything out about were Item Grab (doesn't appear to change drop rate, give a bias to lower numbers to improve drop chance, or give extra rolls for more shots at a drop) and Lucky Attack (I haven't found where it's determined whether the next hit will be Lucky, though).
jdaster64
He/Him
Experienced Forum User
Joined: 12/1/2012
Posts: 103
Location: New Donk City
Is it possible to hit the ending bell a little later to have the spinner stop a bit faster? It seems like it takes a while to stop on that last segment.
jdaster64
He/Him
Experienced Forum User
Joined: 12/1/2012
Posts: 103
Location: New Donk City
Here's the actual constants used for calculating attack power (not counting equipment effects) in the (U) version. I'll add the (J) version equivalents eventually... https://dl.dropboxusercontent.com/u/64507723/mlss_damage_disassembly.txt Also, I'm not sure if I got the game versions or attacks mixed up at some point, but I did Chopper Bros. advanced on (U) for over 10 hits at x19 power, and it never dropped to xC, unlike what the older guide would suggest. EDIT: Fixed a few errors and added the Japanese version constants. Unsurprisingly, the Zero-DEF Thunder Bros. glitch doesn't work in the Japanese version.
jdaster64
He/Him
Experienced Forum User
Joined: 12/1/2012
Posts: 103
Location: New Donk City
I was doing more research into what stuff changed stat-wise between the international and Japanese versions of the game, so I thought I'd post an Excel doc with all the data in it in case it's of any reference. It's got all the item stuff from before, plus enemy stats (including item drops and weaknesses / resistances to various attacks / statuses), the Bros.' level-up tables, and STACHE discounts by group. Equipment effects (Shroom Force, Power-D, etc.), enemy attack power, and the Bros.' attack power are pretty much the only things of note missing, since there weren't convenient tables in the game data for them. Link: https://dl.dropboxusercontent.com/u/64507723/mlss_uj_allstats.xlsx
jdaster64
He/Him
Experienced Forum User
Joined: 12/1/2012
Posts: 103
Location: New Donk City
If anything, I wonder if high score-based objectives wouldn't better be done in Super Mario Bros. Deluxe, given that there's already existing goals to work with.
jdaster64
He/Him
Experienced Forum User
Joined: 12/1/2012
Posts: 103
Location: New Donk City
Here's an Excel doc with all the item, gear, and badge stats for U and J versions (I left out the StarBeans items, since they appear to be identical). https://dl.dropboxusercontent.com/u/64507723/mlss_uj_itemstats.xlsx I found a small data table that appears to be related to bonus effects (the pointers in the raw data end up pointing to their names), but changing the values doesn't seem to do anything in-game. Maybe they were used at some point, but I imagine all of that stuff is in unrelated scripts instead. On a random note, I seem to remember someone on the YL forums posting about the strength of Lucky Mushroom effect in terms of STACHE points, but it was probably for the American version only.
jdaster64
He/Him
Experienced Forum User
Joined: 12/1/2012
Posts: 103
Location: New Donk City
Those are just the in-game names of the effects in The American version. It probably wouldn't be too hard to compile a list of their effects. I had no idea the values were different in the Japanese version, but I'm not really surprised.
jdaster64
He/Him
Experienced Forum User
Joined: 12/1/2012
Posts: 103
Location: New Donk City
Attack formula wrote:
[max(1,greatforce*typeresist*[mushbonus + max(1,MovePower*[max(1,[2*pow-def/10])])])]]
That looks like a misunderstanding of and extrapolation from a simplified version of the damage formula I used in the guide accompanying my "Superstar Saga+" hack. Definitely not trustworthy for accurate values, at any rate. Also, from the "Item Editing" thread, the STACHE calculation is in a function starting at 0812EF44 in (U).
jdaster64
He/Him
Experienced Forum User
Joined: 12/1/2012
Posts: 103
Location: New Donk City
I'm not sure where the item data is in (J), but I can probably find it pretty easily. I could have probably clarified things a bit better in that file. In broad strokes, your STACHE discount starts at the item's DG's value in k_StartingDiscounts, and remains at that until your STACHE hits the item's DG's minimum value for discount to start increasing (k_LowestStacheForDiscount). Once your STACHE is higher than that, your discount counts up by the first value for the DG in k_DiscountRates, once per STACHE point, until the total discount hits the DG's first value in k_RateChangeThresholds (roughly, there's a bit of weirdness in how it calculates when to switch to the next rate I'll explain further down). Then it switches to the second value for the DG in k_DiscountRates until the total discount hits the DG's second value in k_RateChangeThresholds. This continues until the discount hits its max (0x3200, or 50%), or you run out of STACHE points. Here's an example: Say Mario & Luigi have an average of 31 STACHE, and are trying to buy a Bean B. Badge (78 coins, DG 1). The discount starts at 0x0400 for DG 1, and starts increasing at 19 STACHE, so the Bros. have 12 STACHE remaining. The first discount increase rate for DG 1 is 0x2CC, and it switches to the next at a total discount of 0xF33. Rather than counting until the discount exceeds 0xF33, the game divides the difference between 0x400 and 0xF33 (0xB33) by 0x2CC, and determine it takes 4 steps to get there. However, it determines that since 0xF33 isn't divisible evenly by 0x2CC, it adds an extra step, for a total of 5. (No idea why it checks that specifically, but that's indeed what it does.) So, after stepping up by 0x2CC 5 times, the total discount is 0x11FC, and the Bros. have 7 STACHE remaining. The next discount rate increment is 0x066, and it wants to switch to the next at 0x10CC. Dividing (0x10CC - 0x0F33) by 0x066 gives 4, and since 0x10CC isn't divisible by 0x066, it increases to 5. Stepping up by 0x066 5 times, the total discount is 0x13FA and the Bros. have 2 STACHE left. The next discount rate increment is 0x200, and it wants to switch at 0x24CC. Since (0x24CC - 0x10CC) / 0x200 is more than 2, we just increment twice. 0x13FA + 2 * 0x200 = 0x17FA, so the final discount is 0x17 = 23%. The buy price is then ceil(0.77 * 78) = 61, and the sell price is floor(1.46 * floor(78 / 4)) = floor(1.46 * 19) = 27. Hopefully this makes a bit more sense. Edit: Hm, the constants are definitely different in (J). I thought (E) and (J) were the same; I'll get those values and the items' DGs in a bit. Edit again: Added (J) constants to the file above. Here's the DG differences (should be all of them): - Max Nuts are in DG 4 in (J), 3 in the others. - 1-up Mushrooms are in DG 3 in (J), 4 in the others. - Red/Green Peppers are in DG 3 in (J), 5 in the others. - First-visit Fungitown gear / badges are in DG 2 in (J), 0 in the others. - #1 Trousers and Beanstar Pants are DG 5 in (J) rather than 2 and 4, respectively. (Apparently they realized 1st Strike is super good). - All non-shop gear / badges (excluding starting badge / gear) are DG 5 in (J).
jdaster64
He/Him
Experienced Forum User
Joined: 12/1/2012
Posts: 103
Location: New Donk City
OK, after stepping through a bunch of assembly (first time using VBA-SDL-H), I figured out how STACHE discounts work. Here's a link to a text file with some C-ish pseudo-code and the relevant constants (let me know I need to clarify something): https://dl.dropboxusercontent.com/u/64507723/mlss_stache_discount_code.txt The constants in this are from the (U) version, and the STACHE discount groups are in the stat guide linked on the Resources page, also from the (U) version. I can confirm the constants are the same in (E)/(J); not sure about the Discount Groups, but that should be easily testable in-game.
jdaster64
He/Him
Experienced Forum User
Joined: 12/1/2012
Posts: 103
Location: New Donk City
I never did any disassembly, my values were all calculated by fiddling with enemy and player POW/DEF to get the values to high precision. That formula above is correct for sure for Mario's jump (although using integer/256 values rather than floats; 102/256 for 0.4, etc.), but 0.4778*(Mario POW - 0.5*Enemy DEF) is a reasonable-enough approximation in 99.9% of cases, since barring stat modifiers, the formula always has a base of 102/256 * (Attacker POW - 1/2 * Defender DEF). That being said, I'd be interested in seeing disassembled formulas instead. EDIT: Wait, does the 'Lucky' modifier really apply before factoring in DEF? That doesn't sound right, especially since it's not even consistent (iirc) across attacks. I would imagine those modifiers are just for stat-raising/lowering statuses. Also, I can confirm that the stat progression on that page is from the US version, not sure if J is different.
jdaster64
He/Him
Experienced Forum User
Joined: 12/1/2012
Posts: 103
Location: New Donk City
Damage calculation would definitely be interesting. I could probably find some old notes on STACHE discount info if that were pertinent, but I don't recall if I or the Yoshi's Lighthouse guys ever figured it out to 100% accuracy (it's a piecewice function that differs per STACHE discount group, unlike PiT). The attack power constants I found out earlier should be accurate enough to work with, and enemy stats are known.
jdaster64
He/Him
Experienced Forum User
Joined: 12/1/2012
Posts: 103
Location: New Donk City
Upon looking at the data myself, it looks like that's actually four seperate byte values crammed in an int, like in TTYD; for example, Goomba's values are: Long 1: 5A645A64 (Four values: 90, 100, 90, 100) Long 2: 5F006401 (Four values: 95, 0, 100, 1) Not sure what each value represents since I'm just looking at the data in the editor, but that seems more likely. Maybe the rest are for other status effects? For comparison, TTYD's status values look like this (these are Bandit's, I believe): 50504664 50646446 64506450 645f5046 3c645064 645f0000
jdaster64
He/Him
Experienced Forum User
Joined: 12/1/2012
Posts: 103
Location: New Donk City
Weird that that's out of 100 x 2^24; why would those numbers need anywhere near that precision? Paper Mario: TTYD just uses integers from 0 to 100 (with some odd exceptions) for its status effect percentages.
jdaster64
He/Him
Experienced Forum User
Joined: 12/1/2012
Posts: 103
Location: New Donk City
Great work, loved seeing all of the work coming to fruition, especially what I was able to catch live! Just out of curiosity, was getting the Mega Rush badges to appear a matter of getting the RNG to specific values that you knew based on the drop rate, or was it just pure trial and error? If you just got the hold and drop rates from my guide, I'm not convinced that 1/200 and 1/300 are the actual bases, as it seems like I never got that many items to drop in practice when badge hunting casually for Flower Savers. Then again, the Twilight Trail battles might be a poor test case, as I know the last set of three Clefts can have the wrong item drops assigned to the enemies (Hyper Cleft, Crazy Dayzee, Amazy Dayzee's items on HC, HC, HC set).
jdaster64
He/Him
Experienced Forum User
Joined: 12/1/2012
Posts: 103
Location: New Donk City
IIRC, the final boss does the attack where it sets fire to the Shroob ships (with the fire/thunder effects), then sucks them into a hole instead of attacking directly, and they come back a few turns later and fly at the Bros. As for the stat wheels, they will get to only 1's/2's after only a couple of levels, and eventually even the 2's on the wheel will get you a 1. I want to say that if you alternate between two stats at that point, you'll be behind at most one point at any given time compared to what you'd have if you always chose the same one. This is all at least the case in the NA version, not sure about E/J.
jdaster64
He/Him
Experienced Forum User
Joined: 12/1/2012
Posts: 103
Location: New Donk City
For the record, a lot of these Nico videos are also being uploaded on YouTube by these guys: https://www.youtube.com/channel/UCu4xkM5S1cKXje6EXHuDLQA https://www.youtube.com/user/Perry1853108
jdaster64
He/Him
Experienced Forum User
Joined: 12/1/2012
Posts: 103
Location: New Donk City
Japanese values here (wow, a lot of them are considerably lower than US): SOLO ATTACKS (I'd assume the Lucky values are the same in US, I assumed it was a multiplier) Mario: Jump - 0.2381 failed, 0.4778 successful (Lucky 0.9151) Hammer - 0.1587 failed, 0.3175/4171/5167 (predetermined) successful (Lucky 0.8357) Hand - 0.1182 failed, 0.4575 successful (Crit x2) Counter - 0.1992 (both) First Strike - 0.1992 Luigi: Jump - 0.2381, 0.3984 (Lucky 0.7968) Hammer - 0.1587, 0.3175/4373/5571 predetermined (Lucky 0.9960) Hand - 0.1182, 0.4575 (Crit x2) Counter - 0.1992 First Strike - 0.1992 BROS. ATTACKS Splash Bros. None - 0.2390 First A - 0.4779 First A, miss, last A - 0.7168 A,B - 0.9557 A,B,A - 1.0975 A, Adv. A - 0.4779 A, Adv. A,B - 0.7168 A, Adv. A,B,A - 1.0509 Swing Bros. None / A w/missed release - 0.2390 A with timed release - 0.4779 ~ 0.7168 A, final B - 1.0751 ~ 1.9113 Adv. AB mashing - always 2 damage, apparently Chopper Bros. None - 0.2390 A - 0.4779 A,B - 0.7168 A,B,A - 0.5731 0.2389 0.1903 0.1418 0.0951 0.0466 0.0223... A, Adv. A - 0.7877 A, Adv. A,B - 0.7168 0.2855 0.2389 0.1903 0.1418 0.0951 0.0951 0.0466 0.0466 0.0466 0.0223... Fire Bros. None / Luigi miss w/o Adv. - 0.2187 Successful hammered fireball (per) - 0.1521 Successful Adv. fireballs, miss hammer (per) - 0.0478 Successful Adv. fireballs, miss last A (per) - 0.1094 Successful Adv. fireballs, hit last A (per) - 0.1965 Bounce Bros. None - 0.2390 First B - 0.4779 First B, miss, last B - 0.7168 B,A - 0.9557 B,A,B - 1.1703 Adv. A - 0.7168 Adv. A,B, miss last hits - 0.3584 each Adv. A,B, last hits - 0.6197 each Knockback Bros. None - 0.2390 First B / First B, Adv. A - 0.4779 B,B / B, Adv. A,B - 0.7168 B,B,A - 0.9557 B, Adv. A,B,A - 0.7634 0.2855 0.2389 0.1903 0.1418 0.1194 0.0951 0.0709 0.0466 0.0223... B, Adv. A,B,A, miss an A - 0.0131 Cyclone Bros. None - 0.2390 Per hit, after first B - 0.1419/1643/1867 predetermined Final Adv. B, miss A - 0.1195 Final Adv. B,A - 0.1904/2371/2838 predetermined Thunder Bros. None - 0.2584 B - 0.5168 B,B - 0.1030 to all B,B,B - 0.6197 to all B, Adv. A - 0.6197 B, Adv. A,A - 0.8256 B, Adv. A,A,B - 1.1364 Red Peppers give +50% POW to the user in the US version, I'll test to see if it affects Mush Badges. EDIT: Hmm, but only +25% in the Japanese version. And it does include Mush Badges in both cases.
jdaster64
He/Him
Experienced Forum User
Joined: 12/1/2012
Posts: 103
Location: New Donk City
Lucky hits always do 1.915x damage, I believe; I don't know if tested it on anything but jumps, though. I could give it a go for the Japanese version as well; I probably already have a copy of the ROM and some saves sitting around some place. The trick's going to be finding where the enemy DEF is in the ROM / memory, as it's probably different from the NA version; I always tested with 0 enemy DEF, although I suppose it's not strictly necessary since the DEF values are known. EDIT: Yep, I have an endgame save in 1283-MLSS(J). I'll try to get all the info within the next couple of days.
jdaster64
He/Him
Experienced Forum User
Joined: 12/1/2012
Posts: 103
Location: New Donk City
I do have data for failed hits on most of the moves, as well as the move's minimum power, and which bro's POW is used (although it's apparently not 100% accurate, as I have Mario as the bro used for all forms of Chopper Bros. except no buttons pressed). Here's a link to a txt file that has all this info and such; I guess I'd forgotten I was planning on doing a MLSS stat guide at some point. https://dl.dropboxusercontent.com/u/64507723/mlss_statguide.txt
jdaster64
He/Him
Experienced Forum User
Joined: 12/1/2012
Posts: 103
Location: New Donk City
https://www.youtube.com/watch?v=_O8ueLLmBK8 I made a TAS a while back with what I think is the highest score possible in 3-1 (using left+right). If you're precisely positioned, you can kick the shell and stop it in a single jump (like the staircase trick), cutting the iteration time down to 30 frames per hit; however, I think it's a pixel-perfect position, and you have a two-frame window to do the jumps (not a problem for TAS, at any rate). Last-frame hits are 8000 points every ~335 frames, IIRC, whereas perfect Koopa jumps are 500 points every 30 frames, so they are indeed more lucrative. Obviously, 5000-point Koopa jumps are worth a ton more, though.
jdaster64
He/Him
Experienced Forum User
Joined: 12/1/2012
Posts: 103
Location: New Donk City
So I did some investigating into damage formulas for various attacks a while back, and by mugg's request, here's a summary of some of the more pertinent info. Basically, all damage is calculated by (Attacker POW - Defender DEF / 2) * Attack Constant. Here are the Attack Constant values for all of the Bros.' solo attacks and successful Bros. attacks. Note that the values are not exact, as they're based on hexadecimal constants; for example, the global enemy Attack Constant is about 0.3984 = 102/256. Solo Attacks: Mario Jump - 0.4778 Luigi Jump - 0.3984 Jump Fail - 0.2381 Hand Attack - 0.4575 Hand Fail - 0.1182 Mario Hammer - 0.3175 / 0.4171 / 0.5167 (random) Luigi Hammer - 0.3175 / 0.4373 / 0.5571 (random) Hammer Fail - 0.1587 First Strike - 0.1992 Counterattack - 0.1992 Mario's Bros. Moves: Splash Bros. - 1.4318 Splash Adv. - 1.2596 Swing Bros. - 1.4318 when you let go of Luigi at the first possible moment, ~50% more at maximum speed? I didn't know there was a faster speed when I got this data... Swing Adv. - 0.2282 extra Chopper Bros. - 0.7167, 0.1903 x2, 0.0951 x2, 0.0466 x2, 0.0223 x inf? Chopper Adv. - 0.9556, 0.2855 x2, 0.1418 x2, 0.0951 x2, 0.0466 x4?, 0.0223 x inf? I think 0.223 is the minimum, I forget whether it's after 12 or 13 hits. Fire Bros. - 0.0996 per, 0.1992 for failed Luigi hit Fire Adv. - 1.789 per Luigi's Bros. Moves: Bounce Bros. - 1.1945 Bounce Adv. - 0.4778 Knockback Bros. - 1.1455 Knockback Adv. - 1.2596, 0.2282 x2, 0.1141 x2, 0.0559 x2, 0.0268 x inf? Cyclone Bros. - 0.1700 per Cyclone Adv. - 0.1431 extra Thunder Bros. - 0.2389 Thunder Adv. - 0.8361 As a side note, Luigi's Thunder Bros. normally makes enemies have a multiplier of 85/256 DEF (~1/3) or 72/256 (~3/10) POW for Advanced, but landing just the first two presses of the normal move multiplies all ground enemies' DEF by 48/256 (3/16), and landing just the first B press knocks the targeted enemy's DEF to 0.