• 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!

Code Guides

CT Chia

Smash Obsessed
Joined
Sep 4, 2007
Messages
24,416
Location
Philadelphia
The idea's been tossed around before, and it was brought up again recently in the new recruits thread.

We should make some kind of documentation for us back here (not public necessarily) for how to use certain codes so everyone can get in on testing codes. The more people working on things, also not to mention having more coders, helps us accomplish things quicker - especially since people are desiring a gold set hopefully in the near future.

What also jump started this again was leafgreens mini guide about how to use the frame speed mod here, so lets do that for all of them.
 

CT Chia

Smash Obsessed
Joined
Sep 4, 2007
Messages
24,416
Location
Philadelphia
-Post Reserved for Code Guides-

leaf edit: Fixed up the guide to be more readable.

Frame Speed Mod Code written by leafgreen386

The frame speed is in the format of WWXXYYYY ZZZZZZZZ. WW is the character ID, XX is the first frame the frame change takes place on (in hex, so if you wanted a modification on frame 10 you would put 0A here), YYYY is the action or animation ID (action IDs use 0 for the first digit and animation IDs use 8, so the action ID for a dtilt would be 0029), and the Zs are the frame speed multiplier, in 32 bit hex floating point.

You'll probably need this site for converting decimal into floating point: http://babbage.cs.qc.edu/IEEE-754/Decimal.html

Now, about the frame speed multiplier. A number greater than 1 will speed up the move, and a number less than 1 will slow it down. So at 3x speed, it would cause it to perform a frame, skip two frames, perform a frame, skip two frames, and so on, whereas at 0.5x speed it would cause every frame to repeat once.

Messing with frame speed during hitbox frames can be a bit tricky, since you risk skipping hitboxes. Now, a lot of times, you're only going to want to speed up or slow down a certain part of a move. If you're only messing with endlag, then you will only need one line, since the frame speed change goes on until the move finishes or a new frame speed change is loaded. But, if you want to edit something in the middle of the move, you will need two or more lines: one line for the frame speed change at where you want to edit, and then another to set it back to normal. Note that frame speed changes that occur LATER in the move will be placed ABOVE those that occur earlier in the code. So if you wanted to decrease the startup lag for something, you would first put the line of code that sets it back to normal at whatever frame you want the speedup to stop applying and THEN you would place your actual modification below that.

You can have as many frame speed changes on a move as you would like, but you should note that right now we are limited to 127 total lines for frame speed changes and going over that would be... bad, as then it starts spilling over into other codes. We're very close to the limit, and currently, we're waiting for almas to do his rewrite of the frame speed code to be far more memory efficient, effectively giving us unlimited lines.

Now, smashes have multiple IDs, which makes them even trickier to work with. I'm currently investigating this to figure out exactly how the game handles it, but all we know so far as that there is an ID for the charge animation and two other IDs for the smash. From what we've seen so far, the last smash ID is always used for the hitbox frames, so the middle ID is probably pre-charge. Note that this means you can't just put whatever frame of the full animation you want the speedup to occur on and expect it to work, since with each ID change, the frame count starts over.

Anyway, one last and very important thing for making frame speed changes: in order for the game to actually read all of the changes, you need to edit the byte count. The first line of the code reads 065A9400 0000XXXX. The Xs are where you place the byte count for the code. Basically, just count up all of the lines EXCEPT the first line and multiply that number by 8, then convert the result to hex. That will be the byte count.

Also, I'm not really sure if this step is necessary or not, but given the problems we've been having lately, you should also place a line that reads 00000000 00000000 at the very end of the code (don't count it in the byte count). When the code was first released, spunit said that a line of full 0s like that ends the code, so it's something I try to follow when compiling codesets for myself, although the code seems to be working even without it, so... meh.

And that should completely cover it!

Hitbox Modifier Code written by goodoldganon

You guys are smart, so I'm not going into super advanced description of how the hitbox mod works. I'm also unsure why I am wasting my time since this might change in a week or two with the new engine. All of this is, of course, in hex. Also, you have to get Giza or PK to find you hitbox IDs (aka the first line of the code). So no, you can't just make changes willy nilly, you have to have all the information before you can start editing.

GGHHIIJJ KKLLLMMM
NNOOPPQQ RRRR0000
SSSSSSSS 00000000

GG character id
HH original damage
II original KB gain
JJ original Base KB
KK original Element
LLL original launch angle
MMM action id
NN new damage
OO new KB gain
PP new Base KB
QQ new Element
RRRR new launch angle
SSSSSSSS new SFX
00000000 new size

About angles:
  • 0 is straight out
  • 90 is straight up
  • 180 is behind
  • 270 is straight down

GGHHIIJJ KKLLLMMM

You will never touch this line...EVER. Only refer to it so you can see what kind of values the move originally had. Let's take a look at Marth's F-smash blade hit.

110E463C 0216902C

  • Marth ID
  • 14 damage
  • 70 growth
  • 60 base
  • Slash element
  • 361 angle (special 20)
  • Then the moves ID

Now let's look at the next line. This is the line you will primarily mod when tweaking moves.

NNOOPPQQ RRRR0000

I'll plug in my Roy blade hit F-smash to show you.

114C4102 00230000

  • I upped the damage to 17 damage
  • 76 growth
  • 65 base
  • kept the slash ID
  • Changed the angle to 35 degrees

And that's it. Just make the last line read:

FFFFFFFF 3F800000

And you won't have to worry about changing any sound effects and the size will stay the same.

In case anyone is interested, here is the attack ID and SFX Chart:

Code:
Hit type for all attacks

XX
00 hit
01 none
02 slash
03 electricity
04 Ice
05 Flame
06 Coin
07 Cape
08 Slip
09 Sleep
0A none
0B impale
0C Stun
0E Flower
0F none
10 none
11 slash 2
12 hit 2
13 Darkness
14 Stun
15 Aura
16 Impale 2
17 Down
18 No Flinch

(no, unfortunately the Aura effect doesn't make 
all characters get stronger with more damage.)

Sound effect for all attacks
 
06200000 slash
07A00000 slash
11B80000 Fire
27A00000 Frying Pan
2BA00000 Tennis Racket
2DA00000 Aura
44200140 hit
46200000 slash
47A00000 slash
49A00000 Coin
79A00000 Electricity
85A01000 Darkness
86800000 Slash
8A200000 Screech Attack
8F2009E8 Electricity
90A00000 Fire
Decimal to hex calculator
Hex to decimal calculator

That help guys?
Compensating knockback for damage changes written by leafgreen386

When using the hitbox mod, there are times when you want to change the damage while leaving the knockback of the move roughly the same. Although it's usually impossible to leave the move exactly as it was, you can get really close by following a few simple steps.

1) Make the new growth of the move equal to old growth * old damage / new damage. Rounding is at the editor's discretion. Sometimes, for some moves (ie. ones that are supposed to be used for combos) it's more appropriate to round down even if traditional rounding techniques say to round up, or vice-versa, if it would be more acceptable for the move to have more growth rather than less growth.
2) Subtract base equal to the damage you added (for damage buffs) or add base equal to the damage you subtracted (for damage nerfs). This part isn't perfect, but it usually works out about right for most moves, making it only a general guideline. Note that in general, this becomes less and less accurate as you make bigger damage changes, so if you're ever not sure, just use the following chart:

Code:
[I]original damage * original growth[/I]   |   Base equivalent per 1%
                    0515                    0.50
                    0685                    0.67
                    0770                    0.75
                    1025                    1.00
                    1280                    1.25
                    1365                    1.33
                    1535                    1.50
Simply use whichever value is closest to the move you're working with. Few moves operate outside of this spectrum, although there are some moves with extraordinarily low growth where say... 10% worth of damage is equivalent to 1 base (these moves are generally projectiles). If you run into one of these moves, simply use the formula original damage * original growth / 1025 to figure out what the base equivalent of 1% is to the move.

For the majority of damage changes, rounding makes it so it's about 1 base per 1%, but with more substantial changes (or more radical moves that shift toward one end or the other of the spectrum) you need to follow a slightly different pattern.
 

_Yes!_

Smash Hero
Joined
Sep 5, 2006
Messages
8,787
Location
WHERE AM I
Yeah that's pretty cool how you guys can change the game by adding different lines of codes and stuff. Do you need a special program to do it?
 

JCaesar

Smash Hero
Joined
May 28, 2004
Messages
9,657
Location
Project MD
NNID
JCaesar
Yeah I'd like that. I'm really interested to get in on the coding side, but it's a bit daunting and I don't have a whole lot of time atm to just jump right in and try everything. A guide would be very helpful.
 

Veril

Frame Savant
Joined
Jun 20, 2008
Messages
3,062
Location
Kent Lakes, New York
<3 Chibo.

I'm seriously behind on a lot of the technical code... stuff. I really want to mess around with the debug menu, as well as that frame speed mod which leafgreen was kind enough to explain.
 

CT Chia

Smash Obsessed
Joined
Sep 4, 2007
Messages
24,416
Location
Philadelphia
Added the frame speed mod explanation to the 2nd post

what about changing damage kb and kbg?

iv never heard that explained anywhere
 

Shell

Flute-Fox Only
Joined
Feb 7, 2007
Messages
2,042
Chibo, do you think you could post that in a format that's slightly easier on the eyes? If need be, put it in a new post and link to that post in the OP. Thanks.
 

goodoldganon

Smash Champion
Joined
Mar 17, 2008
Messages
2,946
Location
Cleveland, Ohio
You guys are smart, so I'm not going into super advanced description of how the hitbox mod works. I'm also unsure why I am wasting my time since this might change in a week or two with the new engine. All of this is, of course, in hex. Also, you have to get Giza or PK to find you hitbox IDs (aka the first line of the code). So no, you can't just make changes willy nilly, you have to have all the information before you can start editing.

GGHHIIJJ KKLLLMMM
NNOOPPQQ RRRR0000
SSSSSSSS 00000000

GG character id
HH original damage
II original KB gain
JJ original Base KB
KK original Element
LLL original launch angle
MMM action id
NN new damage
OO new KB gain
PP new Base KB
QQ new Element
RRRR new launch angle
SSSSSSSS new SFX
00000000 new size

About angles:
  • 0 is straight out
  • 90 is straight up
  • 180 is behind
  • 270 is straight down

GGHHIIJJ KKLLLMMM

You will never touch this line...EVER. Only refer to it so you can see what kind of values the move originally had. Let's take a look at Marth's F-smash blade hit.

110E463C 0216902C

  • Marth ID
  • 14 damage
  • 70 growth
  • 60 base
  • Slash element
  • 361 angle (special 20)
  • Then the moves ID

Now let's look at the next line. This is the line you will primarily mod when tweaking moves.

NNOOPPQQ RRRR0000

I'll plug in my Roy blade hit F-smash to show you.

114C4102 00230000

  • I upped the damage to 17 damage
  • 76 growth
  • 65 base
  • kept the slash ID
  • Changed the angle to 35 degrees

And that's it. Just make the last line read:

FFFFFFFF 3F800000

And you won't have to worry about changing any sound effects and the size will stay the same.

In case anyone is interested, here is the attack ID and SFX Chart:

Code:
Hit type for all attacks

XX
00 hit
01 none
02 slash
03 electricity
04 Ice
05 Flame
06 Coin
07 Cape
08 Slip
09 Sleep
0A none
0B impale
0C Stun
0E Flower
0F none
10 none
11 slash 2
12 hit 2
13 Darkness
14 Stun
15 Aura
16 Impale 2
17 Down
18 No Flinch

(no, unfortunately the Aura effect doesn't make 
all characters get stronger with more damage.)

Sound effect for all attacks
 
06200000 slash
07A00000 slash
11B80000 Fire
27A00000 Frying Pan
2BA00000 Tennis Racket
2DA00000 Aura
44200140 hit
46200000 slash
47A00000 slash
49A00000 Coin
79A00000 Electricity
85A01000 Darkness
86800000 Slash
8A200000 Screech Attack
8F2009E8 Electricity
90A00000 Fire
Decimal to hex calculator
Hex to decimal calculator

That help guys?
 

CT Chia

Smash Obsessed
Joined
Sep 4, 2007
Messages
24,416
Location
Philadelphia
il rewrite the leafgreen post sometime soon, maybe tomorrow
GoG that post was awesome lol

edit: i just tried to make a hitbox mod code and it didnt work

i made a gct file with just the same hitbox mod engine 2.0 code currently in the 4.1 release txt file
then another code with:
065A9800 00000018
00115A19 0516902C
1E783213 01690000
85A01000 3F800000

the first line being the same as the first line of the engine data from the 4.1 release with 18 instead for the data size
then a buffer mario fsmash (hit 2) being darkness type

the load codes (cause when i had the data size wrong initially my wii froze when i tried to load codes but its fine now) but the fsmash is no different
any ideas what im doing wrong?
 

Blank Mauser

Smash Champion
Joined
Jul 16, 2008
Messages
2,904
Location
Iowa
You also need to count the number of lines in the hitbox mod, subtract 1 (The first line) Multiply by 8, convert to hex and replace the last digits of the first line with the number you get.
 

shanus

Smash Hero
Joined
Nov 17, 2005
Messages
6,055
Everything is going to change soon with the new engine codes, so I think people should just wait a bit
 
D

Deleted member

Guest
GoG I think I've seen a larger list of SFX, lemme grab it.

EDIT: nvm it was the same list
 

shanus

Smash Hero
Joined
Nov 17, 2005
Messages
6,055
Its not radically different, but might as well train everybody when the codes are done
 

CT Chia

Smash Obsessed
Joined
Sep 4, 2007
Messages
24,416
Location
Philadelphia
You also need to count the number of lines in the hitbox mod, subtract 1 (The first line) Multiply by 8, convert to hex and replace the last digits of the first line with the number you get.
im pretty sure i had the line count thing corrent. just as in the official set the hitbox data code was 667 lines, i took 666 x 8 and found the hex to be the the number thats in the first line, and i did the same for mine with 3 x 8 convert to hex.

Everything is going to change soon with the new engine codes, so I think people should just wait a bit
yea im'a just wait for this then


Edit:
I'm fail, I can't get the Frame Speed Mod to work either
I've got a code file with the FSM Engine, and a data code with this:
065A9400 00000028
231D8066 40400000
23128066 3F800000
23008066 40200000
230D0114 40400000
23000114 3F800000
First line with a data size of 40 for the 5 following lines, then changes to ROBs dair and upB to make em crazy awesome lol. ROBs up to be 1x after frame 13 or 14, I forget which I used, then 3x iirc from 0-13 (the lag he has which he can't attack during when he first uses his upB)
I then made dair crazy OP giving it 2x cooldown I think, 3x faster startup time, and 1x during the hitbox.
 

leafgreen386

Dirty camper
Joined
Mar 20, 2006
Messages
3,577
Location
Playing melee and smash ultimate
Chibo: I'm not sure why you can't get the dair changes to work, since they seem legit. However, for upB, most B moves change IDs midway through the animation, so you're probably not modifying the correct IDs. It's also possible that ROB's dair goes through multiple IDs, although I haven't seen that before on an aerial.

Also, updated the second post with gog's hitbox mod guide and added a guide of my own for compensating kb for damage changes. The method I've been telling you guys to use is actually the lazy man's way to do it that just happens to usually work, but this is the full method.
 

VietGeek

Smash Hero
Joined
Mar 19, 2008
Messages
8,133
I would appreciate an explanation for the Conditional Action Modifier...

and the code too lol...where is it? xD
 
D

Deleted member

Guest
I'll bump up my code thread with all my recent work. (CAM, new hitbox, hitbox shift)
I'll also include a short explanation in it.
 

Shell

Flute-Fox Only
Joined
Feb 7, 2007
Messages
2,042
Any reason we can't move this to be public? Power to the people.
 
Top Bottom