A Guide to Sm4shCommand

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by Yudowat, Nov 7, 2016.

  1. Yudowat
    OP

    Yudowat That one guy that shows up occasionally

    Member
    542
    168
    Jun 12, 2015
    Australia
    In this guide, we will make a moveset mod together. You can then use the knowledge gained to make your own!

    Sm4shCommand (Soon to be replaced by FITX, I will update the Guide when it becomes the standard.) by @Sammi Husky is an application that lets you edit fighter ACMD files, and that's what we're using today! Download the latest nightly version

    Setup
    1. Open Sm4shCommand, then select File>Open>Fighter (Or press CTRL+ALT+O)
    2. Open "animcmd\fighter\purin" in your dump and click Select Folder (Backup the files in this folder before starting, or alternatively, Select the folder with the copied files, leaving the original dump untouched.)
    3. In the workspace panel on the right, expand "ACMD". You should now be able to see every script for Jigglypuff, as she was the character we opened in step 2.
    4. Click "Tools>Parse Animations" and open "motion\fighter" in your dump, then click Select Folder. The application will take a moment to parse the animations, and it may seem to be unresponsive, but just wait a moment and some scripts (but not all) will be labelled differently, from 0xXXXXXXXX to something like AttackAirF or ThrowHi.
    Editing (Hitbox data)
    We'll be editing a few of Jigglypuff's moves to expand our knowledge of ACMD. I recommend reading each of these spoilers as some slightly different information is covered in each.
    Neutral Air
    We're going to change neutral air to meteor smash the opponent, simply because it's fun.
    1. Find and open the script for Neutral Air, it will be labelled as AttackAirN. (Attack Air Neutral) Then switch to the tab labelled game instead of effect.
    2. Now we're going to explain some terms in ACMD:
      Asynchronous_Timer - This makes the game wait until the specified frame to perform an action.
      Synchronous_Timer - This makes the game wait the specified number of frames since the last timer (Synchronous or Asynchronous) to perform an action​
    3. Using that information we can work this out:
      Asynchronous - ON frame 6, Hitbox comes out (there are actually 2 in this example)
      Synchronous - AFTER 2 frames (frame 8), a hitbox is replaced, and one is removed.
      Hitbox - Pretty Self-Explanitory​
    4. We can check with KuroganeHammer, and the site says we're correct!
    5. So let's look into the parts of the first 2 hitboxes.
      Code:
      Hitbox(ID=0x0, Part=0x0, Bone=0xA, Damage=9, Angle=0x60, KBG=0x78, FKB=0x0, BKB=0x28, Size=4, Z=0, Y=0, X=0, Effect=0x0, Trip=0, Hitlag=1, SDI=1, Clang=0x1, Unknown=0x1, ShieldDamage=0x0, SFXType=0x2, Ground/Air=0x2, Direct/Indirect=0x3, Unknown=0x1, Unknown=0x6)
      Parts of the Hitbox command
      So using that information we will make puff's nair hit the opponent downwards. Be sure to edit both hitboxes!
    6. Change the angle to 270 in hex, this website tells me to input 10E.
    7. Why not add some extra damage? Change Damage=11 to Damage=15
    8. We want it to be able to meteor early, so change BKB=0x1E to BKB=0x80. (BKB stands for "Base knockback", which is the amount of kb an attack with deliver before being influenced by percents (KBG, or knockback growth))
    9. To tack on some extra damage if they survive, we'll give both hitboxes the flower effect, slowly dealing damage. (the same effect as Rest) Change Effect=0x0 to Effect=0xE

      And with that, Neutral Air is done! Click the X on the AttackAirN Tab (Don't close the Sm4shCommand window! Just close the tab!) Then select File>Save (Save As... is buggy in my experience, this is why we backed up the files beforehand)
    Down Special - Rest
    We're going to make Rest similar to melee, but with some changes.
    1. Open the Script called SpecialLwL (SpecialLwR just tells the game to use the script called SpecialLwL, so by editing SpecialLwL we edit them both technically) then go to the game tab like last time.
    2. We can see on frame 2, the rest hitbox comes out, and on frame 3, the hitboxes are removed. Instead of that, we will change the first Asynchronous Timer to frame 1 to make rest a frame 1 attack.
    3. Next, we'll change the effect from 0xE (flower) to 0x5 (fire).
    4. Then we'll adjust the angle from 0x58 (88, almost directly upwards) to 0x169 (361, the sakurai angle.)
    5. Now we increase the damage from 20 to 28
    6. Now we decrease the BKB, 0x64 to 0x4E, but significantly increase the KBG (0x42 to 0x78), allowing it to kill at very early percents due to the damage buff.
    7. For fun, we're going to make this move cancellable on frame 20. After the "Remove_All_Hitboxes()", make a new line and type
      Code:
      Asynchronous_Timer(Frames=20)
      followed by another newline and
      Code:
      Allow_Interupt()
      (Make sure the Script_End() is still the only code in the last line! Without it being there, the entire moveset will become corrupt!)
      And with that, we're done! Save the file with the same method as last time
    Now that the files are saved, put the edited game.bin, expression.bin, effect.bin, sound.bin and motion.mtable onto your SD (SaltySD/smash/animcmd/fighter/purin) and try it out!

    This guide is very much a WIP. If there's something you want me to cover in this guide or if something is incorrect/missing, please let me know :D
     
    Last edited by LinkSoraZelda, Nov 8, 2016
    Jayster_2 and craftsygaming like this.
  2. Jayster_2

    Jayster_2 Advanced Member

    Newcomer
    67
    121
    Sep 21, 2015
    United States
    Thanks!
     
  3. DestroyedClone

    DestroyedClone Newbie

    Newcomer
    3
    0
    Oct 13, 2016
    United States
    California
    I'm trying to make all of this guide work, but I'm not sure where I'm going wrong. Whenever I tried to save using either "X, File>Save" or "File>Save,X", it would show up in the program as saved. However when I revisited it after closing smash command, none of the changes saved.

    So I just did "hit X, file>Save" after each step, then I did Save As to a folder (result #4).
    Then I assumed that some things don't save right when closed, so I kept both tabs open, saved and Saved As (result #5)

    Result #1: Attacks the same, Specials dont work
    Result #2 and 3: Attacks the same, Specials the same
    Result #4: Nair can finally spike, all specials are broken.
    Result #5: Attack is the same, Specials broken

    Am I doing something wrong? Sorry in advance.
     
  4. Yudowat
    OP

    Yudowat That one guy that shows up occasionally

    Member
    542
    168
    Jun 12, 2015
    Australia
    Hm, everything seems fine actually. I can't say I know exactly what's going on, sorry man :(
     
  5. DestroyedClone

    DestroyedClone Newbie

    Newcomer
    3
    0
    Oct 13, 2016
    United States
    California
    I went over the guide again today, and recorded the process I went through (along with some music because I was bored). This attempt did nothing for the Neutral Air, but broke the specials.
    This is the process (music is playing):
     
  6. LegendaryOutcast

    LegendaryOutcast Advanced Member

    Newcomer
    61
    7
    May 3, 2016
    United States
    Nice tutorial, is it possible to replace Rolling (block+side) with fox's or falco's Side-B ? i would love to do this for all my characters if it's possible lol
     
  7. benCat07

    benCat07 Newbie

    Newcomer
    2
    0
    Mar 9, 2017
    Gambia, The
    Sorry for being late mate, it is because you entered the Angle wrong. The angle has to be 0x10E and not 10E
    by the way, save as works better then save actually.

    — Posts automatically merged - Please don't double post! —

    Probably Veeeeery late, but whatever
    (MODDING IN 2k17 LUL)
    , I tried it myself and it broke for me too somehow
     
    Last edited by benCat07, Mar 21, 2017
  8. Alex119098

    Alex119098 GBAtemp Regular

    Member
    119
    10
    Dec 6, 2015
    United States
    Deep Space
    This probably will be unanswered, but is there a solution to the Specials not working?
     
  9. Yudowat
    OP

    Yudowat That one guy that shows up occasionally

    Member
    542
    168
    Jun 12, 2015
    Australia
    I don't know what you're talking about. If you're having old issues, upgrade to the latest SmashCommand or use FITX instead.
     
  10. Alex119098

    Alex119098 GBAtemp Regular

    Member
    119
    10
    Dec 6, 2015
    United States
    Deep Space
    Alright, I'll switch to FITX instead
     
  11. Alex119098

    Alex119098 GBAtemp Regular

    Member
    119
    10
    Dec 6, 2015
    United States
    Deep Space
    Ok, so when I edit the specials (specifically Jigglypuff's side b) the game crashes. I'm using FITX btw. Did I do something wrong?
     
  12. Alex119098

    Alex119098 GBAtemp Regular

    Member
    119
    10
    Dec 6, 2015
    United States
    Deep Space
    Never mind, I figured out what I did wrong. It would always compile with the Wii U endians, so I just used A FTIX Helper GUI to change it. Thanks for the tutorial anyways!