Grouflon/3rd_training_lua

[Bug?] Dummy does not block when using Street Fighter III: 4rd Strike Arranged Edition

speedmccool25 opened this issue · 13 comments

I don't know if this can be fixed in any way, but I have been using this script for Street Fighter III: 4rd Strike Arranged Edition. Every other feature works perfectly, except for blocking. For some reason, the dummy does not block, parry, or red parry at all, even when set to do so.

I don't know if this can be fixed, but I would be extremely happy if it could.

Hello ! That's funny that you have tested that :)
The mod is exclusively built and tested on the 3rd strike rom v990512 so I'm not really surprised it does not work on modified roms.
I think that there are two things possibly at work here, the first is that I don't really know how the rom is actually modified, so there may be some assumptions that I do regarding the memory locations that may not be true on the modified rom, but the fact that a lost of features still work would suggest that it is mostly similar.
The other one is that the blocking system is based on a big database of frame data that I built by recording all the moves of the different characters, and I think this one is mostly invalid on 4rd strike, and I admit that considering the amount of work that it was for 3rd strike, I don't really plan to do it again.
If this is just a matter of reproducing this database, I guess it's technically feasible but I already have so much work on the 3rd strike version that it is not really something I intend to do.
You could try to do it though if you want, I can give you insight on how the thing works if you'd like

That would be really helpful actually, I’d be willing to slog through all the frame data to help people out (cause I don’t have much else to do anyway, and it may be a fun side project).

Edit: I’m also fairly certain it’s just the database issue, because the script even picks up on Sean’s 4 bar SA1, which doesn’t even exist in 3rd Strike. Very good programming :)

Thank you :)
I have to think about this a little bit, There can only be one set of data currently, which means that if you record new frame data, you will erase the previous ones and I think it would be a shame to fork the codebase just because of that. It's probably feasible to have several sets and make the script select the correct one depending on the loaded rom.
If you want to start making tests, you can start by enabling the developer_mode, by setting the corresponding boolean to true at the top of the script. That will give you access to the frame recording options in the menu.
I think it is best that you remove all the frame data files in data/frame_data before starting the recording work, that way we will be sure that every frame data that is in your folder is now from 4rd strike.

It's not made to be a super user friendly tool, so it may be a hassle without messing with the code, but basically, in order to record frame data, you have to enable the frame data recording mode to in the new menu, and then make the P1 whiff the move you want to record. If the move is recorded correctly or incorrectly it will display it in the log. Once you are happy with what you've recorded, you can save it to the character's database file by hitting "save frame data" in the same menu.

Once a save data is recorded, the move should then be blocked by the dummy. The recording feature can't now right now if a hit is overhead or low, so this is meta information that must be entered by hand but this is becoming more complex, maybe you can start just by trying out what I described above on simple move and see if it works ?

By the way, what's your experience with lua and/or git ? no good or bad answer here, it is just so I can adapt my explanations :)

From what I just recorded, it seems the script isn't able to actually make everything correct. Movement all over the place, storing the frames of the idle (? I think?), stuff like that. That sucks, I've been manually entering framedata for Sean for the last few days using a modified version of your script that printed animation IDs and sprite IDs in the console, and changing the parameters in the file to match it. So far, working very well, albeit a bit tedious :')
I don't have a ton of experience with lua, but from digging through your script, I've learned a little bit about parameters and stuff.

Edit: Apparently the script is actually recognizing the changed IDs of the moves...? But the framedata is completely wrong...
Edit 2: Looking through the framedata... all the IDs were changed to their proper ones... and the framedata is correct?! What is happening?!?
Edit 3: All the framedata is correct! When I record the move, all the data is changed successfully. What a relief! Thank you so much!

Update: All framedata is being successfully recorded. So far, I'm up to Gouki, and adjusting his metadata to make the moves that are lows and overheads actually lows and overheads. But I've run into a slight problem, playing as Gill crashes the script entirely! What's stranger is that Ultra Sean, who replaced Shin Akuma, does work, and his framedata can be recorded. Is there any way to fix this error?

Super cool :) I'm really glad that it works !
I think that currently Gill is in the characters list, but not Shin Akuma, so maybe in this version Gill's Id is in fact ultra sean, but that seems really circonvolute. It is more likely that I've mistaken Gill's Id for Shin Akuma's Id, since I've never tested any of them.

When you record frame data for Ultra Sean, in what file does it goes ?

If it goes into Gill, then this is probably just a matter of missing indices, maybe you could just try replacing gill by shinakuma (you should write it without spaces, since it will endup in filenames, it will be simpler for a lot of things that way) and adding gill at the end of the character list around line 645

also can you send me the rom somehow ?

Ultra Sean goes under Gill, which I found kind of funny.

Also, here's a link to the rom.
https://mega.nz/file/gaxQXJCD#wkzJZXN8XHpBwEh73TPYJGB5jDuGdnoQ8TLTV0pTn9g

Yeah so that's what I thought, it's very likely that gill then goes to a new index at the end of the list. Does it still crash if you add it to the characters list ?

Yes, it does.
Also, a quick thing to note, in 4SAE, there are some moves that inflict a Guard Crush, as in they can't be blocked. Is it possible to somehow make a flag for these unblockable moves?

Edit 1: There's also a few moves that aren't being blocked correctly, specifically Sean and Ken's EX DPs. It's on the hit as soon as they leave the ground. I suspect it's because maybe the dummy doesn't think it's going to hit them, but it does anyway?

So a little update about what I’ve been doing, the framedata recording is going well, apart from a few moves that need to be fixed a little bit. I’d like to note that I’ve recorded all the target combo normals individually, so those will be in the framedata, not in the metadata.
Additionally, I’ve recorded a few of the supers as well, but not a lot of them work. Maybe they can be fixed somehow? It’s mainly just that the dummy doesn’t block or parry the supers sometimes during the animation, but in some other cases it just... crashes the script. Makoto’s LK and MK SA2 crash the script when attempting to record the initial diving kick hit. I couldn’t figure out why it wasn’t working though...

Edit 1: I’m going to be adding a few actions to the “recovery action” section to cover some supers with strange or changed motions. I also corrected one spelling error, because it bugged me a little bit, haha. Just letting you know!

Framedata recording is almost done! Well, for the characters I can actually record right now. Still waiting for the Gill fix, but I’m not too worried about it ^^
I have a few moves that I need some assistance with, because the dummy properly block or parry them, and I’ll list them in here when I can make a full list of them.

Edit 1: I also saw a few bugs on the Trello page regarding Ibuki’s Target Combos, specifically the LP > MP > F+LK, I made a fix for it, and it was just to record the framedata of it by having an Akuma red parry the second hit of the TC, doing a teleport backward, and then whiffing F+LK as late as possible. It works fine now!

All framedata recording is now complete! I do need some help on a few moves though.

Alex's Air Stampede (dummy does not parry or block in time, I know it's because of the hitbox being frame 1 of the animation)
Ibuki's Hien (dummy drops parry on 2nd hit)
Sean's EX Dragon Smash (dummy drops block on 3rd hit)
Twelve's 2HP (dummy drops block on 2nd hit)
Twelve's MP, HP, and EX A.X.E. (dummy drops parry on 3rd hit, drops block on 2nd hit)

There's probably some others, but I'm a little burnt, and it seems some of these don't even work in the regular script. I can just upload the framedata here, and you might be able to know what's going on, now that you have the ROM as well, if that's ok?