ROM Hack [Release] Sm4shCommand

Sammi Husky

Well-Known Member
OP
Member
Joined
Jul 6, 2014
Messages
312
Trophies
0
Age
28
XP
488
Country
United States
So, I have been waiting until the right time to get into modding smash 4, and decided on doing it now. Im trying to add an airdodge to luigi like I have seen in a video on youtube. Looking back at previous pages in the form, I saw someone tried to add it with the command: Add/Set_Momentum(Unknown=2,Unknown=-2,Unknown=0x1)
Im not sure if it worked out for them, because of marth not being able to edit. So, I decided to try it out on Luigi. Im using http://opensa.dantarion.com/s4/mastercore3/dump/0/luigi to find the airdodge command. I think it is ESCAPEAIR 1DDF4AA6, but I need confirmation. Would all I need to do is change 1DDF4AA6 from
Code:
Asynchronous_Timer(Frames=19)
Unknown_E74(Unknown=0x0)
Script_End()
to
Code:
Asynchronous_Timer(Frames=19)
Unknown_E74(Unknown=0x0)
Add/Set_Momentum(Unknown=2,Unknown=-2,Unknown=0x1)
Script_End()
then save it. and patch it? I tried doing this, but HANs says that the romfs is invalid when I try to load it.


EDIT: Just realized I would probably need to remove something from custom moves in order for the patcher to work successfully. Can I remove something from a effect.bin to accommodate for the added code in game.bin or does it need to be file specific? Also, can I be under the limit, or do I need to be exactly at the original amount?

The syntax for add set momentum is
Code:
 Add/Set_Momentum(Vertical=,Horizontal=,Mode=)
. This command doesn't exist in the tools events.cfg file in the current release though. Download the one from the repo if you want to use that command. Second, adding just one command is fine. There is a bit of leeway in the filesize in that it can be about 16 bytes. But that's max. Only enough for one maybe two extra commands. The filesize can be lower than the original just fine. The file that needs to be smaller is the one your editing, which is game.bin in this case
 

Cydget

Well-Known Member
Member
Joined
Oct 1, 2015
Messages
493
Trophies
0
Age
26
XP
250
Country
United States
The syntax for add set momentum is
Code:
 Add/Set_Momentum(Vertical=,Horizontal=,Mode=)
. This command doesn't exist in the tools events.cfg file in the current release though. Download the one from the repo if you want to use that command. Second, adding just one command is fine. There is a bit of leeway in the filesize in that it can be about 16 bytes. But that's max. Only enough for one maybe two extra commands. The filesize can be lower than the original just fine. The file that needs to be smaller is the one your editing, which is game.bin in this case
I was using the SM4SHCommand v1.2.2 Hotfix 2 from github, and it had the command in the events.cfg file with unknown instead of horizontal, vertical, and mode...(do I still need to update?) Also, I rebuilt the romfs and tried it with hans again, and it still says its invalid and wont load smash. I thought I was going crazy because I was sure I did everything right, so I tried to load the unedited romfs that I got with braindump, and that one is still invalid and wont load smash. Any Ideas?
 
Last edited by Cydget,

Sammi Husky

Well-Known Member
OP
Member
Joined
Jul 6, 2014
Messages
312
Trophies
0
Age
28
XP
488
Country
United States
I was using the SM4SHCommand v1.2.2 Hotfix 2 from github, and it had the command in the events.cfg file with unknown instead of horizontal, vertical, and mode...(do I still need to update?) Also, I rebuilt the romfs and tried it with hans again, and it still says its invalid and wont load smash. I thought I was going crazy because I was sure I did everything right, so I tried to load the unedited romfs that I got with braindump, and that one is still invalid and wont load smash. Any Ideas?

If hans is telling you it's invalid, then it's either in the wrong folder or the romfs is invalid. Check the folder it's telling you to put it in.
 

Cydget

Well-Known Member
Member
Joined
Oct 1, 2015
Messages
493
Trophies
0
Age
26
XP
250
Country
United States
I already did that with Luigi, and it worked. It needs to be the first line in the script. And it is indeed EscapeAir.
I usually just remove stuff from custom moves because I don't normally use them. What you remove needs to be from the file that you edited, in this case game.bin. And files under the limit are perfectly fine.
If I didnt add it to the first line, would it just wait 19 frames, make me invincible, and then do the thing?
 

Cydget

Well-Known Member
Member
Joined
Oct 1, 2015
Messages
493
Trophies
0
Age
26
XP
250
Country
United States
If hans is telling you it's invalid, then it's either in the wrong folder or the romfs is invalid. Check the folder it's telling you to put it in.
It has to be in the /hans/ folder on the root of the SD with a name of 000EDF00.romfs witch it is. When I renamed the unedited romfs it was originally called romfs.bin do I need a converter to chang it to 000EDF00.romfs instead of just renaming it? I know in the past that you used to need to remove the first 1000 bytes with a hex editor, but I thought smea fixed that.
 
Last edited by Cydget,

Trinitro21

Well-Known Member
Member
Joined
Oct 14, 2015
Messages
133
Trophies
0
Location
Userland
XP
196
Country
United States
It has to be in the /hans/ folder on the root of the SD with a name of 000EDF00.romfs witch it is. When I renamed the unedited romfs it was originally called romfs.bin do I need a converter to chang it to 000EDF00.romfs instead of just renaming it?
You're using the latest version of HANS, right? If not then you'll need to strip the first 0x1000 bytes.
Edit: Sorry, didn't read your edit.
 
Last edited by Trinitro21,

Sammi Husky

Well-Known Member
OP
Member
Joined
Jul 6, 2014
Messages
312
Trophies
0
Age
28
XP
488
Country
United States
What are you using to rebuild the romfs? And are you making sure that the directory for the romfs rebuild is exactly as it was beforehand? you don't want to rebuild it with the extracted data folder in it for example
 

Cydget

Well-Known Member
Member
Joined
Oct 1, 2015
Messages
493
Trophies
0
Age
26
XP
250
Country
United States
Haha, it was the fact that I was using an old version of hans. I guess I must have copied the wrong back up when upgrading SD cards lol. Ill fix the order of the commands later, im just glad it works.
 

Cydget

Well-Known Member
Member
Joined
Oct 1, 2015
Messages
493
Trophies
0
Age
26
XP
250
Country
United States
Will any of the custom movesets be available for download?
I not sure if you can host the game.bin file, and I know you can upload the romfs file. Although It would be really easy to tell people what files to edit because of the export as text function.
 

Damon_girl

Well-Known Member
Member
Joined
Oct 27, 2015
Messages
961
Trophies
0
Age
30
XP
533
Country
United States
I not sure if you can host the game.bin file, and I know you can upload the romfs file. Although It would be really easy to tell people what files to edit because of the export as text function.


Oh okay. So editing the movesets isn't really that hard? I have no knowledge of hacking or anything so I'm nervous about attempting it. I did manage to add custom music to my game though, so that's something, even if the CSS won't load when I play Smash through HANS.
 

Trinitro21

Well-Known Member
Member
Joined
Oct 14, 2015
Messages
133
Trophies
0
Location
Userland
XP
196
Country
United States
Oh okay. So editing the movesets isn't really that hard? I have no knowledge of hacking or anything so I'm nervous about attempting it. I did manage to add custom music to my game though, so that's something, even if the CSS won't load when I play Smash through HANS.
Only target blast, homerun contest, and the customs training room work on old 3DSs. You need a New 3DS to do anything else.
 

Megalegacy98

Well-Known Member
Member
Joined
Aug 11, 2015
Messages
505
Trophies
0
Location
United States
XP
420
Country
United States
I'm having a problem... DTLS pops up saying an error has occured and it says "Windows is trying to find a solution to the problem" or something like that. That happens when patching resource(us_en). I'm only patching the modded files.
 

Damon_girl

Well-Known Member
Member
Joined
Oct 27, 2015
Messages
961
Trophies
0
Age
30
XP
533
Country
United States
I'm having a problem... DTLS pops up saying an error has occured and it says "Windows is trying to find a solution to the problem" or something like that. That happens when patching resource(us_en). I'm only patching the modded files.

The same thing happens to me when I try to open it! It's so annoying.
 

darklordrs

Well-Known Member
Member
Joined
Aug 16, 2015
Messages
791
Trophies
0
Age
22
XP
424
Country
United States
So, I have been waiting until the right time to get into modding smash 4, and decided on doing it now. Im trying to add an airdodge to luigi like I have seen in a video on youtube. Looking back at previous pages in the form, I saw someone tried to add it with the command: Add/Set_Momentum(Unknown=2,Unknown=-2,Unknown=0x1)
Im not sure if it worked out for them, because of marth not being able to edit. So, I decided to try it out on Luigi. Im using http://opensa.dantarion.com/s4/mastercore3/dump/0/luigi to find the airdodge command. I think it is ESCAPEAIR 1DDF4AA6, but I need confirmation. Would all I need to do is change 1DDF4AA6 from
Code:
Asynchronous_Timer(Frames=19)
Unknown_E74(Unknown=0x0)
Script_End()
to
Code:
Asynchronous_Timer(Frames=19)
Unknown_E74(Unknown=0x0)
Add/Set_Momentum(Unknown=2,Unknown=-2,Unknown=0x1)
Script_End()
then save it. and patch it? I tried doing this, but HANs says that the romfs is invalid when I try to load it.


EDIT: Just realized I would probably need to remove something from custom moves in order for the patcher to work successfully. Can I remove something from a effect.bin to accommodate for the added code in game.bin or does it need to be file specific? Also, can I be under the limit, or do I need to be exactly at the original amount?

Leaving the 19-frame asynchronous timer would result in moving downward on frame 19, not frame 1. Oh, and use the stop momentum code from certain stall dairs to prevent the existing jump momentum from interfering.
 

Megalegacy98

Well-Known Member
Member
Joined
Aug 11, 2015
Messages
505
Trophies
0
Location
United States
XP
420
Country
United States
Am I stupid or something because I dont think anyone other than me and Damon_girl got this error...
help.png

Sorry if I'm really annoying you guys. I just want this to work really badly :[
 
Last edited by Megalegacy98,

Sammi Husky

Well-Known Member
OP
Member
Joined
Jul 6, 2014
Messages
312
Trophies
0
Age
28
XP
488
Country
United States
Am I stupid or something because I dont think anyone other than me and Damon_girl got this error...
help.png

Sorry if I'm really annoying you guys. I just want this to work really badly :[

Unfortunately there isn't much i can tell you from just that. I've been working on dtls lately (including adding error messages so i know where it failed) but for now it can be pretty much anything. Are you using the most recent version? If you're unsure i would re-download and try again. Are there resource(us_en)/resource(us_en).dec, or resource/resource.dec files in the the directory? If so, could you send them to me or open them (prefferebly resource(us_en) or resource(us_en).dec) in a hex editor and upload a screenshot?
 
General chit-chat
Help Users
    SylverReZ @ SylverReZ: @Veho, Are you trying to become Mario?