• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

Crazy Hand v1.31 - Character editing program

tatatat0

Smash Journeyman
Joined
Jan 28, 2015
Messages
412
oh and one thing, when you update crazyhand, can you please make it not resize the window everytime you do pretty much anything??? Its really annoying.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
If you aren't already going to add it, here is some of pichu's article floating points.
Quick Attack:
362C: .05 momentum subtracted during ending frames 9-49
3630: 1 momentum cap from subtraction during endlag
3634: 20 ?? Read on startup
3638: 8 Travel distance ??? //(Pikachu's is 5)
363C: 0.02666 Momentum subtracted frames 11-13 during startup?
3640: .2618 model rotation traveling on ground
3644: .8 model width multiplier traveling on ground
3648: .8 Model height multiplier traveling on ground
364C: 1.2 Model length multiplier traveling on ground
3650: 0.2618 Model rotation traveling in air
3654: .8 Model with multiplier traveling in air
3658: .8 Model height multiplier traveling in air
365C: 1.2 Model lengt multiplier traveling in air
3660: 4 ?? (Pikachus is 2)
3664: 0.5 aiming sensitivity
3668: 2.2 Has to do with starting momentum
366C: 2.2 momentum added to 3668??
3670: 1 Second segment length multiplier
3674: .6 Horizontal momentum?
3678: 0x32 Unknown
367C: .6 Horizontal Momentum subtracted??
3680: 0x05 Unknown
3684: .4 Not Read
3688: 12 Landing Lag
Thunder:
368C: .66 vertical momentum on aerial thunder hit
3690: 0.016 something to do with rising from an aerial thunder hit?
3694: 4.5 something to do with vertical range for thunder self-hit?
3698: -5 Thunder travel speed
369C: 6.66 horizontal range for thunder self-hit?
36A0: 8 vertical range for thunder self-hit?
36A4: -18 vertical displacement of cloud graphic
36A8: 150 height of thunder creation
36AC: 0x04 Number of lightning bursts
36B0: 0x08 time between individual lightning
36B4: 0x52 unknown (Freezes if not 51 or 52)
I noticed they weren't on opensa.dantarion.com or in crazyhand so I just found them myself.
Item/Projectile ID's
0x51 = Pikachu's Thunder
0x52 = Pichu's Thunder

Good work.
 

TheDrewdaddy00

Smash Rookie
Joined
Jun 20, 2015
Messages
3
After I load the ISO, the program crashes. I've extracted all files to the same folder, and am up to date with Java. I'm also running Windows 7 64bit. It really sucks, I wanted to start using it :(
 

Tater

Smash Journeyman
Joined
Apr 10, 2014
Messages
201
Location
Socal
NNID
Taternater
3DS FC
2406-5307-2936
After I load the ISO, the program crashes. I've extracted all files to the same folder, and am up to date with Java. I'm also running Windows 7 64bit. It really sucks, I wanted to start using it :(
Open up notepad, and paste this into it

@Echo on
java -Xmx1024m -Xms1024m -jar "Crazy Hand v1.22.jar"
pause

Hit save, and move to whatever folder you put Crazy Hand in. Name the file "run.bat", and click on the button that says "Text Documents (*.txt)" and click "all files", then click save.
Double-click run.bat, and a cmd window should open up along with the ISO selection GUI. Try opening your ISO again and see if that fixes it. If not, screenshot/write down what the cmd window says and we'll go from there.
 

Ampers

Smash Journeyman
Joined
Feb 2, 2015
Messages
237
Location
St. Louis, MO
Additionally, are you sure you're using a functional melee iso? Test it in dolphin just to be sure it boots up properly. If not, it's likely a corrupted iso.
 

TheDrewdaddy00

Smash Rookie
Joined
Jun 20, 2015
Messages
3
Okay, so I did run the ISO in Dolphin and it works fine. Then I tried the run.bat method and got the following with the same crash happening after I load the ISO into Crazy Hand:
 
Last edited:

QuickLava

Smash Journeyman
Joined
Nov 30, 2013
Messages
361
Location
Somewhere in the Aether....
So guys, quick question. If someone wanted to, for example, implement 64-esque hitstun on all moves, what would they change? I tried raising the base hitlag and max hitlag values in my PlCo, but I can't see any immediate difference. Is there something else I should be changing?
 

Tater

Smash Journeyman
Joined
Apr 10, 2014
Messages
201
Location
Socal
NNID
Taternater
3DS FC
2406-5307-2936
So guys, quick question. If someone wanted to, for example, implement 64-esque hitstun on all moves, what would they change? I tried raising the base hitlag and max hitlag values in my PlCo, but I can't see any immediate difference. Is there something else I should be changing?
The only thing that comes to mind is changing the value at 0xA178 (default value:0.333). It's damage multiplier for frames of hitlag.

Pretty sure hitlag is calculated with the following formula:

value at 0xA178(0.333) * damagetaken for normal moves
value at 0xA178(0.333) * damagetaken * value at 0xA184(1.5) for electric moves

So you could try bumping up the value at 0xA178 and see if that helps.

EDIT: I liked the idea so I've been playing around with it some.

Max. frames of hitlag: 80
Hitlag multiplier: 0.533000(Same as smash 64)
Base hitlag: 9

With those values, I've given combos a janky 64-esque feel. It's not perfect but it's a decent start.

One thing that's important though: In order to make the game play more like 64, a good amount of moves will need to have the delay before their IASA shortened.

For instance, at the end of Ness' down air:

-terminate collisions
-autocancel
-Asynchronous Timer(60 frames)
-IASA

Using down air in-game(Or any move, really) results in the janky psuedo-64 hitlag that I mentioned, but it applies to both characters because the attacker isn't allowed to do anything else until the subaction ends or IASA is called.

I changed the delay before down air's IASA(60 frames) to 44 frames. Ness was able to hit with down-air and then actually act out of it with a small window to attack again before hitstun finished for his opponent.

TLDR By shortening the delay between when a subaction terminates all its hitboxes and when it calls IASA you can allow the attacker to act before hitlag ends for whoever they hit. This makes combos a lot more viable, quick, and satisfying.
 
Last edited:

QuickLava

Smash Journeyman
Joined
Nov 30, 2013
Messages
361
Location
Somewhere in the Aether....
The only thing that comes to mind is changing the value at 0xA178 (default value:0.333). It's damage multiplier for frames of hitlag.

Pretty sure hitlag is calculated with the following formula:

value at 0xA178(0.333) * damagetaken for normal moves
value at 0xA178(0.333) * damagetaken * value at 0xA184(1.5) for electric moves

So you could try bumping up the value at 0xA178 and see if that helps.

EDIT: I liked the idea so I've been playing around with it some.

Max. frames of hitlag: 80
Hitlag multiplier: 0.533000(Same as smash 64)
Base hitlag: 9

With those values, I've given combos a janky 64-esque feel. It's not perfect but it's a decent start.

One thing that's important though: In order to make the game play more like 64, a good amount of moves will need to have the delay before their IASA shortened.

For instance, at the end of Ness' down air:

-terminate collisions
-autocancel
-Asynchronous Timer(60 frames)
-IASA

Using down air in-game(Or any move, really) results in the janky psuedo-64 hitlag that I mentioned, but it applies to both characters because the attacker isn't allowed to do anything else until the subaction ends or IASA is called.

I changed the delay before down air's IASA(60 frames) to 44 frames. Ness was able to hit with down-air and then actually act out of it with a small window to attack again before hitstun finished for his opponent.

TLDR By shortening the delay between when a subaction terminates all its hitboxes and when it calls IASA you can allow the attacker to act before hitlag ends for whoever they hit. This makes combos a lot more viable, quick, and satisfying.
Lol I used almost the exact same settings when I did it myself, only I used a base hitlag of 7. I think what I'm going to do is both quicken the IASA on a lot of moves and lower the character gravities universally. I think about 85 to 90% of Melee gravity would be perfect for something like this.
 
Last edited:

Ampers

Smash Journeyman
Joined
Feb 2, 2015
Messages
237
Location
St. Louis, MO
This doesn't really relate much to Crazy Hand, but I don't want to start a new thread for this:

Is there documentation somewhere regarding the memory locations for the elements in melee's default debug menu? I'm working on a project in which I want to be able to manipulate these options automatically. For instance, is it possible to make it so when you boot up melee, it instantly goes to a match on a predetermined stage, with predetermined characters, rules, etc...
I looked for research on this earlier but I couldn't find anything.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
This doesn't really relate much to Crazy Hand, but I don't want to start a new thread for this:

Is there documentation somewhere regarding the memory locations for the elements in melee's default debug menu? I'm working on a project in which I want to be able to manipulate these options automatically. For instance, is it possible to make it so when you boot up melee, it instantly goes to a match on a predetermined stage, with predetermined characters, rules, etc...
I looked for research on this earlier but I couldn't find anything.
[COLLAPSE="Menu IDs"]
From SypherPhoenix:

Tested for a bunch of different menu IDs on 1.00, idk if this lists exists elsewhere but I couldn't find it.


00 - Title Screen (Press Start)
01 - Reloads menu from language change? (brings to language change selection and saves)
02 - VS mode character select
03 - Classic Mode
04 - Adventure Mode
05 - All-Star Mode
06 - Debug Menu
07 - Master Sound Test
08 - Looks like regular VS mode, but actually cycles through many different character select screens
09 - Black Screen...?
0A - Camera Mode
0B - Trophy Gallery
0C - Trophy Lottery
0D - Trophy Collection
0E - Starts a match (with the debug menu configurations?)
0F - Target Test
10 - Super Sudden Death
11 - Invisible Melee
12 - Slo-Mo Melee
13 - Lightning Melee
14 - "A new foe has appeared!" (Ganon with sword, freezes if you try to progress, ID from debug?)
15 (0f) - Classic Mode trophy acquisition & credits (C.Falcon, ID from debug?)
16 - Adventure Mode trophy acquisition & credits (C.Falcon, ID from debug?)
17 - All-Star Mode trophy acquisition & credits (C.Falcon, ID from debug?)
18 - Intro video
19 - Cycles through Adventure Mode cinematics
1A - Character trophy acquisition (no credits) (uses All-Star trophy) (C.Falcon, ID from debug?)
1B - Tournament Menu
1C (28) - Training Mode
1D - Tiny Melee
1E - Giant Melee
1F - Stamina Mode
20 (32) - Home-Run Contest
21 - 10-Man Melee
22 - 100-Man Melee
23 - 3-Minute Melee
24 - 15-Minute Melee
25 - Endless Melee
26 - Cruel Melee
27 (39) - "Enable Progressive Scan Display?"
28 - Plays Intro Video
29 - Memory Card Overwrite Confirmation
2A - Fixed-Camera Mode
2B (43) - Loads Event Match 1 (Match ID from the debug menu?)
2C (44) - Single-Button Mode

2D and the next few crashed so I didn't bother testing past that.[/COLLAPSE]

Take the Boot to CSS code and change the ID from "02" to "0E".

There is a page on the SSBM Memory spreadsheet that Dan made a long time ago that maps out Debug Menu match configuration info locations. Assuming the match that the "0E" ID starts actually is from the debug menu config, then it should be just as easy as writing a code to force values into those addresses as well. I would start by modifying the boot to CSS code like I stated, then setting a breakpoint at that address . Then manually modify the debug info, resume game, and see if that is actually what controls the characters that are put in-game.
 
Last edited:

Ampers

Smash Journeyman
Joined
Feb 2, 2015
Messages
237
Location
St. Louis, MO
Thanks achilles, I didn't realize that spreadsheet existed. Very helpful. It didn't have all of the elements mapped out, but I should be able to locate the others on my own.

Also, fortunately using the code you said does boot to a match with the debug menu settings.
 
Last edited:

MrSquishy

Smash guy, I guess.
Joined
Dec 30, 2013
Messages
12
Hey guys, i think this tool might be able to help me accomplish a project i've been working on for a long time, but i'm not exactly sure how to make it do what i want.

Basically, my end goal is to get every possible animation of each character in some easy-to-work with format, like GIF or whatever. Sort of like the hitbox animations that have been built out for each character, but without the hitboxes/skeletons, and for every animation, not just attacks. The animation swapping feature must be able to locate each of these animations somehow, and I see in the source there are files like ms.anm that contain the names of each animation along with what look like hex addresses.

Does anyone have any tips as to how I can use this tool to extract all character animations? Any guidance whatsoever would be greatly appreciated.
 

Tater

Smash Journeyman
Joined
Apr 10, 2014
Messages
201
Location
Socal
NNID
Taternater
3DS FC
2406-5307-2936
Hey guys, i think this tool might be able to help me accomplish a project i've been working on for a long time, but i'm not exactly sure how to make it do what i want.

Basically, my end goal is to get every possible animation of each character in some easy-to-work with format, like GIF or whatever. Sort of like the hitbox animations that have been built out for each character, but without the hitboxes/skeletons, and for every animation, not just attacks. The animation swapping feature must be able to locate each of these animations somehow, and I see in the source there are files like ms.anm that contain the names of each animation along with what look like hex addresses.

Does anyone have any tips as to how I can use this tool to extract all character animations? Any guidance whatsoever would be greatly appreciated.
I'm a little confused by what you mean regarding your end goal(Though that could just be from lack of sleep on my part :p)

If you just want a GIF of every possible animation, it'll be tedious work but doable. The most convenient method I could think of would be to run melee in dolphin, then go to the debug menu and create a save state with player 1 being whatever character you want to record. Once that's done, use Crazy Hand to swap the character's "attack11" animation to whatever you want to record, then load the save state, start the match and jab while recording. I can go more in-depth if you're not familiar with dolphin/save states/the debug menu in Melee.

If you mean something along the lines of being able to read/edit animation data welcome to the club. I have some theories and some glitchy tools for poking around in the animation data if you'd like to collaborate on digging into the format.


Inter-dimensional Bowser still haunts my nightmares; I don't want to go back there alone.
 
Last edited:

MrSquishy

Smash guy, I guess.
Joined
Dec 30, 2013
Messages
12
Good lord that poor tortured Bowser...

It sounds like save states and repeated animation swapping is the way to do this. However, with 26 different characters and something like 400 different animations for each, I'm going to need to find a way to automate the majority of this process. I'll let you know what I come up with (tips appreciated as always), and if someday I get all those animation GIFs I'll find some place to upload them in case other people want them.

Thanks so much for your help!
 

SinsOfApathy

Smash Journeyman
Joined
Feb 24, 2015
Messages
474
NNID
Psion312
Good lord that poor tortured Bowser...

It sounds like save states and repeated animation swapping is the way to do this. However, with 26 different characters and something like 400 different animations for each, I'm going to need to find a way to automate the majority of this process. I'll let you know what I come up with (tips appreciated as always), and if someday I get all those animation GIFs I'll find some place to upload them in case other people want them.

Thanks so much for your help!
There's no easy way to do it with Dolphin. Dolphin's Lua module was removed forever ago, and Rachel Bryk was the only person that tentatively brought it back for Abahbob to use (so you can hit him up on Twitch). But that's gone with Rachel if he doesn't have it. Plus, Dolphin's devs also aren't planning anything till the Dolphin API is created post-5.0.

If all else fails, your options pretty much come down to an HWND hook (bleh) or modifying the double-buffered SI registers. And that's only inputs. You'd still need the HWND for Dolphin.

The rest is basically just doing what Crazy Hand does (or hooking the window and giving me cancer with how hacked together that'd be), plus restarting Dolphin and/or Crazy Hand. Every. ****ing. Time. And Dolphin at least has target args to make it load the same ISO every time it opens. Crazy Hand does that automatically, apparently.

TL;DR https://xkcd.com/1319/ You'd be better off just doing a 1 character every day manually to save your sanity.
 
Last edited:

Tater

Smash Journeyman
Joined
Apr 10, 2014
Messages
201
Location
Socal
NNID
Taternater
3DS FC
2406-5307-2936
Good lord that poor tortured Bowser...

It sounds like save states and repeated animation swapping is the way to do this. However, with 26 different characters and something like 400 different animations for each, I'm going to need to find a way to automate the majority of this process. I'll let you know what I come up with (tips appreciated as always), and if someday I get all those animation GIFs I'll find some place to upload them in case other people want them.

Thanks so much for your help!
I think I can help some in the automation department. @ SinsOfApathy SinsOfApathy gave me an idea when he mentioned using an HWND hook. Assuming that your save state is saved at the debug menu with the cursor over the "-----EXIT" option, I could make a small program for you that hooks into Dolphin and does the following via hotkeys/controls:

1:Loads a save state

2:Hits the 'A' button to start a match

3:Hits 'X' + D-pad down 3 times to set the stage background to black

4: (Only applicable if you're using Dolphin directly to record) Hit whatever your recording hotkey is

5:Wait a few seconds for the player to land on the ground and then hit the 'A' button

6: (Once again only applicable if you're using Dolphin directly to record)Hit the 'stop recording' hotkey.

You'd still have to manually change the character's animation in Crazy Hand and you'd still have to manually open Melee in Dolphin, but this could make it a little less tedious.

Hypothetically, I could automate even more but I'd need to see how much of a hassle it would be.

Let me know if you're interested c:
 
Last edited:

MrSquishy

Smash guy, I guess.
Joined
Dec 30, 2013
Messages
12
Wow this would be incredibly helpful... I was just starting to look into automating the stuff outside of Dolphin and I think it might be possible using applescripts. However, that does lead me to an important point, which is that I have a Mac, which in the past has not always played nicely with Dolphin. Granted, I was using it for modding and the Dolphin bugs were definitely compounded by the bugs in my code, so who really knows. I'm definitely very willing to give it a shot. This is still lightyears better than my previous idea, which was trying to put together TAS videos that somehow included every animation.
 

Brandondorf9999

Smash Cadet
Joined
Mar 6, 2012
Messages
71
[COLLAPSE="Menu IDs"]
From SypherPhoenix:

Tested for a bunch of different menu IDs on 1.00, idk if this lists exists elsewhere but I couldn't find it.


00 - Title Screen (Press Start)
01 - Reloads menu from language change? (brings to language change selection and saves)
02 - VS mode character select
03 - Classic Mode
04 - Adventure Mode
05 - All-Star Mode
06 - Debug Menu
07 - Master Sound Test
08 - Looks like regular VS mode, but actually cycles through many different character select screens
09 - Black Screen...?
0A - Camera Mode
0B - Trophy Gallery
0C - Trophy Lottery
0D - Trophy Collection
0E - Starts a match (with the debug menu configurations?)
0F - Target Test
10 - Super Sudden Death
11 - Invisible Melee
12 - Slo-Mo Melee
13 - Lightning Melee
14 - "A new foe has appeared!" (Ganon with sword, freezes if you try to progress, ID from debug?)
15 (0f) - Classic Mode trophy acquisition & credits (C.Falcon, ID from debug?)
16 - Adventure Mode trophy acquisition & credits (C.Falcon, ID from debug?)
17 - All-Star Mode trophy acquisition & credits (C.Falcon, ID from debug?)
18 - Intro video
19 - Cycles through Adventure Mode cinematics
1A - Character trophy acquisition (no credits) (uses All-Star trophy) (C.Falcon, ID from debug?)
1B - Tournament Menu
1C (28) - Training Mode
1D - Tiny Melee
1E - Giant Melee
1F - Stamina Mode
20 (32) - Home-Run Contest
21 - 10-Man Melee
22 - 100-Man Melee
23 - 3-Minute Melee
24 - 15-Minute Melee
25 - Endless Melee
26 - Cruel Melee
27 (39) - "Enable Progressive Scan Display?"
28 - Plays Intro Video
29 - Memory Card Overwrite Confirmation
2A - Fixed-Camera Mode
2B (43) - Loads Event Match 1 (Match ID from the debug menu?)
2C (44) - Single-Button Mode

2D and the next few crashed so I didn't bother testing past that.[/COLLAPSE]

Take the Boot to CSS code and change the ID from "02" to "0E".

There is a page on the SSBM Memory spreadsheet that Dan made a long time ago that maps out Debug Menu match configuration info locations. Assuming the match that the "0E" ID starts actually is from the debug menu config, then it should be just as easy as writing a code to force values into those addresses as well. I would start by modifying the boot to CSS code like I stated, then setting a breakpoint at that address . Then manually modify the debug info, resume game, and see if that is actually what controls the characters that are put in-game.
What about the ID for the "Game Over" screen?
 

QuickLava

Smash Journeyman
Joined
Nov 30, 2013
Messages
361
Location
Somewhere in the Aether....
Quick question, how would one go about transplanting bytes from one subaction to another? I've tried cutting and pasting the bytes from one place to another manually in HxD, but it doesn't seem to work.
 

Ampers

Smash Journeyman
Joined
Feb 2, 2015
Messages
237
Location
St. Louis, MO
@ QuickLava QuickLava , copy/paste should work fine as long as you keep a few things in mind:
1) The length of what your pasting must be less than or equal to the length of the subaction you are overwriting.Otherwise you spill into the next subaction.
2) When pasting, make sure you are overwriting, not inserting. I don't use HxD so I don't know what it defaults to, but make sure it overwrites.
3) This should go without saying, but make sure you are copying entire scripts. If you copy/paste half of a script, it will surely produce errors. Just be conscious of where scripts start and stop, and be sure to copy along those bounds.
 

QuickLava

Smash Journeyman
Joined
Nov 30, 2013
Messages
361
Location
Somewhere in the Aether....
@ QuickLava QuickLava , copy/paste should work fine as long as you keep a few things in mind:
1) The length of what your pasting must be less than or equal to the length of the subaction you are overwriting.Otherwise you spill into the next subaction.
2) When pasting, make sure you are overwriting, not inserting. I don't use HxD so I don't know what it defaults to, but make sure it overwrites.
3) This should go without saying, but make sure you are copying entire scripts. If you copy/paste half of a script, it will surely produce errors. Just be conscious of where scripts start and stop, and be sure to copy along those bounds.
Alright, that much works just fine. This brings up another question though, is it possible to redefine the region a given subaction occupies? Or to actually add bytes to a given subaction without overwriting anything?
 

SinsOfApathy

Smash Journeyman
Joined
Feb 24, 2015
Messages
474
NNID
Psion312
Last edited:

Ampers

Smash Journeyman
Joined
Feb 2, 2015
Messages
237
Location
St. Louis, MO
It is possible to change the size of a subaction. Essentially, melee has a list of pointers that say where the scripts should start. These can be set to point anywhere you want and it will attempt to read a subaction there. I've never personally tested this, but you should be able to reroute it to read a subaction from some arbitrary place in the .dol file that was previously empty and inject subaction code into there.

At one point I had planned to add a feature that would expand and shrink the subactions to accommodate for different sizes, but I eventually scrapped the idea simply because it would be a time consuming task with not enough reward in my opinion.
 
Last edited:

QuickLava

Smash Journeyman
Joined
Nov 30, 2013
Messages
361
Location
Somewhere in the Aether....
It is possible to change the size of a subaction. Essentially, melee has a list of pointers that say where the scripts should start. These can be set to point anywhere you want and it will attempt to read a subaction there. I've never personally tested this, but you should be able to reroute it to read a subaction from some arbitrary place in the .dol file that was previously empty and inject subaction code into there.

At one point I had planned to add a feature that would expand and shrink the subactions to accommodate for different sizes, but I eventually scrapped the idea simply because it would be a time consuming task with not enough reward in my opinion.
How exactly would I go about doing this? Never tried something like that before.
 
Last edited:

MagicScrumpy

Smash Journeyman
Joined
Feb 25, 2015
Messages
251
Location
Ann Arbor, Michigan
It is possible to change the size of a subaction. Essentially, melee has a list of pointers that say where the scripts should start. These can be set to point anywhere you want and it will attempt to read a subaction there. I've never personally tested this, but you should be able to reroute it to read a subaction from some arbitrary place in the .dol file that was previously empty and inject subaction code into there.

At one point I had planned to add a feature that would expand and shrink the subactions to accommodate for different sizes, but I eventually scrapped the idea simply because it would be a time consuming task with not enough reward in my opinion.
I tried doing this. It worked fine most of the time.
 

Ampers

Smash Journeyman
Joined
Feb 2, 2015
Messages
237
Location
St. Louis, MO
How exactly would I go about doing this? Never tried something like that before.
@Stratocaster explained things relating to this pretty nicely here:

Here is Fox's dash attack subaction and what it means.
In the game you will find:
0000073c000343800000203a000046a08000000100000000

Before I move on one thing worth noting is that the header to a dat file is 0x20 long. Which means offsets given within the game's code are 0x20 off from what the offset will be in your hex editor. That is:
Offset within game + 0x20 = Offset in hex editor
Or in other words add 0x20 to any offsets that you find in the game to find the actual location you are interested in using within the file since the game doesn't count the header.
Also in case you don't know "0x" means it is a hexadecimal number and not 20 but rather 32.

Here's the break down:
0000073c 1. String Offset
This one identifies the offset of the string used. In this case it points to AttackDash. Changing this is pointless as it doesn't have any effect on gameplay but it is useful as an identifier. You can use it to pull from the dat the name of the subaction so that you don't have to have all of that programmed in individually.

00034380 2. Animation Offset
This is a pointer to a location in the animation file. Swapping this with another one will swap the animations so you can make an item throwing animation into an attack or switch the animations for a smash and tilt.
0000203a 3. Unknown Offset
This doesn't seem to point to anywhere within the dat. I think it should be tied to the animation offset, but I don't think anyone knows exactly what this one does. I would just make it so that if you change the animation than you change this as well.

000046a0 4. Script Offset
This is a pointer to the script that is enacted which includes your state (invincibility), hitboxes, IASA frames, and has timers to indicate when these things start and finish. Flipping these generally works but is sloppy. This offset is useful for determining the location of the script and because if you want to add or subtract from scripts rather than change them then you will need to adjust these to match since the scripts are listed back-to-back. (More on this later)

80000001 5. Character ID and positional flag
This one is not an offset, but has two flags. The one at the end (01 in this case). Is the Character ID flag. For Fox it will always be 1. I think changing this will freeze, but maybe if you change it to Falco it will go to Falco's animations and offsets instead? I haven't really messed with it but that's what it is. The early flag (80 in this case) has to do with your position after the attack. It is usually 00 which means that after the subaction your position has not changed. If you changed this to 00 than after Fox did his dash attack then he would teleport back to where he started rather than staying where he finished it. I think there is in rare cases a use for changing. The only time I've changed it is when I wanted to switch a move from Marth's side B to one of his regular attacks. He moved a little in his side B where he didn't before and so not switching it made him teleport back awkwardly. As for what the actual value means, I'm not exactly sure.

00000000 6. SubAction End
This just indicates the end of the subaction. It should always be just 0's
So basically in your situation, you'll just want to take the "Script Offset" pointer and point it to a free spot.

You can find a list of the subactions here. If you're looking for a specific offset though, you can find the offset in Crazy Hand. Just load the character/move you want, and the offset listed for the first script in the subaction is the one you're looking for.

Here are the important character offset (again thanks to Stratocaster):

Bowser:
OffsetIndex_0x009ab4
AttributeStart_0x003624
AttributeEnd_0x0037a8
SubactionStart_0x007b40
SubactionEnd_0x0098e0

Captain Falcon:
OffsetIndex_0x009a04
AttributeStart_0x003754
AttributeEnd_0x0038d8
SubactionStart_0x007a98
SubactionEnd_0x009868

Doctor Mario:
OffsetIndex_0x009148
AttributeStart_0x003520
AttributeEnd_0x0036a4
SubactionStart_0x007264
SubactionEnd_0x008ecc

Donkey Kong:
OffsetIndex_0x009fa8
AttributeStart_0x003990
AttributeEnd_0x003b14
SubactionStart_0x007e78
SubactionEnd_0x009e10

Falco:
OffsetIndex_0x0099d8
AttributeStart_0x0037c4
AttributeEnd_0x003948
SubactionStart_0x007804
SubactionEnd_0x0096ac

Fox:
OffsetIndex_0x0098f4
AttributeStart_0x0036f4
AttributeEnd_0x003878
SubactionStart_0x00771c
SubactionEnd_0x0095c4

Game and Watch:
OffsetIndex_0x009F1C
AttributeStart_0x0035f4
AttributeEnd_0x003778
SubactionStart_0x007c58
SubactionEnd_0x009aa0

Ganondorf:
OffsetIndex_0x0095a8
AttributeStart_0x0036fc
AttributeEnd_0x003880
SubactionStart_0x0075f0
SubactionEnd_0x0093c0

Jigglypuff:
OffsetIndex_0x009094
AttributeStart_0x00389c
AttributeEnd_0x003a20
SubactionStart_0x006f3c
SubactionEnd_0x008de4

Kirby:
OffsetIndex_0x00E250
AttributeStart_0x004cc8
AttributeEnd_0x004e6c
SubactionStart_0x00b280
SubactionEnd_0x00df68

Link:
OffsetIndex_0x009EDC
AttributeStart_0x0033dc
AttributeEnd_0x003560
SubactionStart_0x007d90
SubactionEnd_0x009b00

Luigi:
OffsetIndex_0x008e88
AttributeStart_0x003380
AttributeEnd_0x003504
SubactionStart_0x006f40
SubactionEnd_0x008c80

Mario:
OffsetIndex_0x008de4
AttributeStart_0x0032b8
AttributeEnd_0x00343c
SubactionStart_0x006f20
SubactionEnd_0x008b88

Marth:
OffsetIndex_0x009d6c
AttributeStart_0x003724
AttributeEnd_0x0038a8
SubactionStart_0x007cf0
SubactionEnd_0x009b98

Mewtwo:
OffsetIndex_0x0095ac
AttributeStart_0x003730
AttributeEnd_0x0038b4
SubactionStart_0x0075a0
SubactionEnd_0x009310

Nana:
OffsetIndex_0x006D84
AttributeStart_0x001168
AttributeEnd_0x0012ec
SubactionStart_0x004d30
SubactionEnd_0x006b48

Ness:
OffsetIndex_0x00995c
AttributeStart_0x0034c0
AttributeEnd_0x003644
SubactionStart_0x007674
SubactionEnd_0x009504

Peach:
OffsetIndex_0x00b37c
AttributeStart_0x003874
AttributeEnd_0x003a1c
SubactionStart_0x008680
SubactionEnd_0x00a450

Pichu:
OffsetIndex_0x009600
AttributeStart_0x003434
AttributeEnd_0x0035b8
SubactionStart_0x0075c8
SubactionEnd_0x0093c8

Pikachu:
OffsetIndex_0x00962c
AttributeStart_0x003564
AttributeEnd_0x0036e8
SubactionStart_0x0075f4
SubactionEnd_0x0093f4

Popo:
OffsetIndex_0x008FEC
AttributeStart_0x003284
AttributeEnd_0x003408
SubactionStart_0x006f98
SubactionEnd_0x008db0

Roy:
OffsetIndex_0x00a094
AttributeStart_0x00387c
AttributeEnd_0x003a00
SubactionStart_0x00800c
SubactionEnd_0x009eb4

Samus:
OffsetIndex_0x009A7C
AttributeStart_0x003464
AttributeEnd_0x0035e8
SubactionStart_0x0079a8
SubactionEnd_0x009700

Shiek:
OffsetIndex_0x0094a4
AttributeStart_0x0033f8
AttributeEnd_0x00357c
SubactionStart_0x007420
SubactionEnd_0x0091d8

Yoshi:
OffsetIndex_0x009318
AttributeStart_0x00333c
AttributeEnd_0x0034c0
SubactionStart_0x007320
SubactionEnd_0x009090

Young Link:
OffsetIndex_0x00A2D0
AttributeStart_0x003580
AttributeEnd_0x003704
SubactionStart_0x00813c
SubactionEnd_0x009eac

Zelda:
OffsetIndex_0x00a120
AttributeStart_0x0037d4
AttributeEnd_0x003958
SubactionStart_0x007cc8
SubactionEnd_0x0099f0
These can also be found by loading the files up in Master Hand. I can't remember if Crazy Hand displays these values to the user though.

Lastly, this spreadsheet here has a page that lists a few free memory locations in melee. You should be able to use these spots to redirect a subaction.



I hope this helps. If I did a crappy job explaining things, it might help to just read the first page of this thread. Stratocaster did an amazing job explaining everything. He was basically the only resource I used to make Crazy Hand haha.
 

Tater

Smash Journeyman
Joined
Apr 10, 2014
Messages
201
Location
Socal
NNID
Taternater
3DS FC
2406-5307-2936
I never looked at the subaction header details that Stratocaster wrote down. The unknown part possibly linked to animations is an interesting find.

Fairly certain you'd break the lookup tables that most the files have.

CrazyHand doesn't have that working yet, if I'm not mistaken. https://github.com/Crazy-Hand-Project/Crazy-Hand/blob/master/CrazyHand version 1.0/src/com/scripts/ScriptUtils.java#L95
Oh man, looking back at this code pains me. How the hell did I write that and have it work?
 

Ampers

Smash Journeyman
Joined
Feb 2, 2015
Messages
237
Location
St. Louis, MO
@ Tater Tater , have you ever looked back at code from when you first learned to program? I did for myself... It's painful
 
Last edited:

Tater

Smash Journeyman
Joined
Apr 10, 2014
Messages
201
Location
Socal
NNID
Taternater
3DS FC
2406-5307-2936
@ Tater Tater , have you ever looked back at code from when you first learned to program? I did for myself... It's painful

I taught myself Java by looking at minecraft's decompiled code way back in the day and making small edits to see what they did.. I can't look back at the code itself but I remember how bad it was. I didn't really understand what a method was/how it was structured for at least a week lmao.
 

QuickLava

Smash Journeyman
Joined
Nov 30, 2013
Messages
361
Location
Somewhere in the Aether....
@Stratocaster explained things relating to this pretty nicely here:



So basically in your situation, you'll just want to take the "Script Offset" pointer and point it to a free spot.

You can find a list of the subactions here. If you're looking for a specific offset though, you can find the offset in Crazy Hand. Just load the character/move you want, and the offset listed for the first script in the subaction is the one you're looking for.

Here are the important character offset (again thanks to Stratocaster):



These can also be found by loading the files up in Master Hand. I can't remember if Crazy Hand displays these values to the user though.

Lastly, this spreadsheet here has a page that lists a few free memory locations in melee. You should be able to use these spots to redirect a subaction.



I hope this helps. If I did a crappy job explaining things, it might help to just read the first page of this thread. Stratocaster did an amazing job explaining everything. He was basically the only resource I used to make Crazy Hand haha.
You guys are awesome, thanks for this. Also, is it possible that "Unknown" scripts are actually scripts that call for texture changes? I've seen this with Sheik in particular in editing her taunt. Her taunt has her close her eyes, then open them again. This seems to be done by calling for different textures, one of her eye closed, one with it open. This is represented within subaction as two unknown scripts seperated by an asynchronous timer.

Edit: Ok, pointing the script offset somewhere else is fine, it's working perfectly. But what I don't understand is how I'd go about pointing to the free space listed in the spreadsheet if it's a part of a different file. How do I do that?
 
Last edited:

Ampers

Smash Journeyman
Joined
Feb 2, 2015
Messages
237
Location
St. Louis, MO
@ QuickLava QuickLava
I know @ Tater Tater and also @Itaru have both done some research on the unknown scripts. I think I remember Tater finding out something relating to these texture changes you mentioned but I don't remember exactly what he found.


As for the free space issue... I think that the spaces shown in the spreadsheet should all be located in Start.dol. The issue is that the values displayed there are the RAM locations as displayed in Dolphin's debug mode. You would need to find out where those locations are in the Start.dol file. There may be a better way to do this, but I've just used a brute force method to find where they are. Basically, I would just find the data in/around the area you are looking for from dolphin and copy/paste that into the search function of your Hex editor. This should point you to where that location is in the Start.dol.

There's a very good chance that there's an easier way to do this, but I don't know what it would be. If anybody knows, I'd love to hear.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
You guys are awesome, thanks for this. Also, is it possible that "Unknown" scripts are actually scripts that call for texture changes? I've seen this with Sheik in particular in editing her taunt. Her taunt has her close her eyes, then open them again. This seems to be done by calling for different textures, one of her eye closed, one with it open. This is represented within subaction as two unknown scripts seperated by an asynchronous timer.

Edit: Ok, pointing the script offset somewhere else is fine, it's working perfectly. But what I don't understand is how I'd go about pointing to the free space listed in the spreadsheet if it's a part of a different file. How do I do that?
You can't directly point to free space (outside of the player file) by only modifying the player file itself. You would have to write ASM code to do that because the character files are not always loaded into the same place in the RAM. So making it point back a specific amount of bytes will not make the address it is pointing to the same everytime. Anything added to the DOL free space is in the same place in the RAM at all times.
 

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,179
Location
Sacramento, CA
@ QuickLava QuickLava
I know @ Tater Tater and also @Itaru have both done some research on the unknown scripts. I think I remember Tater finding out something relating to these texture changes you mentioned but I don't remember exactly what he found.


As for the free space issue... I think that the spaces shown in the spreadsheet should all be located in Start.dol. The issue is that the values displayed there are the RAM locations as displayed in Dolphin's debug mode. You would need to find out where those locations are in the Start.dol file. There may be a better way to do this, but I've just used a brute force method to find where they are. Basically, I would just find the data in/around the area you are looking for from dolphin and copy/paste that into the search function of your Hex editor. This should point you to where that location is in the Start.dol.

There's a very good chance that there's an easier way to do this, but I don't know what it would be. If anybody knows, I'd love to hear.
Yeah, there's a much easier way. I have a tool to do it which I'm trying to release soon with the next version of my DOL manager program. Hopefully in a week or so, assuming I can sit down with a little time.
 

Ampers

Smash Journeyman
Joined
Feb 2, 2015
Messages
237
Location
St. Louis, MO
@ Achilles1515 Achilles1515 Whoopsies! I dumbed there for a second, for some reason I was thinking those character offsets were found in start.dol.

@ DRGN DRGN that's good to know. Just out of curiosity, before your program existed was there a better method than what I did to find the location in a hex editor? I only had to do this like twice so I never really looked into a better method but I'm curious now.
Also unrelated: Your name is pronounced Durgan? I always thought it was Dragon...
 

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,179
Location
Sacramento, CA
I don't know of any method besides searching like you described that existed before. I'm pretty sure that's how everyone else does it.

Heh, yeah. My alias from ages ago, before Melee came out, was Dragon7, but only 4 characters fit in Melee, so it turned into DRGN. And then "Durgan", what most people call me, evolved from how it looks phonetically.
 

Absolome

Smash Cadet
Joined
Jan 3, 2014
Messages
68
Location
Asheville, NC
Is there any way that I could add a sweetspot to a move that doesn't already have one? It seems like I would have to copy every single hitbox in the move and then also add a timer, and that seems like it would take far too many bytes.
 
Top Bottom