GenHex
Would you like to react to this message? Create an account in a few clicks or log in to continue.

GenHex

Home of Generation Hex
 
HomeCalendarLatest imagesFAQSearchMemberlistUsergroupsRegisterLog in

 

 Distance Mods tutorial

Go down 
AuthorMessage
KWG
Admin
KWG


Posts : 192
Reputation : 2
Join date : 2019-12-18

Distance Mods tutorial Empty
PostSubject: Distance Mods tutorial   Distance Mods tutorial I_icon_minitimeWed Dec 18, 2019 10:51 pm

Now I believe that Matty made a distance mods tutorial, but I never got a chance to see it, and I know that Pimp made his tutorial, but I thought that it needed a little more explanation, so all that I'm doing is a distance mods faq, but it might end up being a short tutorial... if you want to think of it like that.

I made this a while ago and it has made my life a lot easier and a lot lazier. Basically it's Pimp's initial post with a four player conversion on the addys and a little explanation on which direction each addy goes in. Credit goes to jamstubbs for finding the addys, Pimp for figuring out how to use them, and me for just doing the four player conversion and giving a little better explanation on what each one does:

===========================================

Four Player Conversion

player 1
8106B498 - left/right of starting point
8106B49C - height from starting point
8106B4A0 - distance away from starting point

player 2
8106B558 - left/right of starting point
8106B55C - height from starting point
8106B560 - distance away from starting point

player 3
8106B618 - left/right of starting point
8106B61C - height from starting point
8106B620 - distance away from starting point

player 4
8106B6D8 - left/right of starting point
8106B6DC - height from starting point
8106B6E0 - distance away from starting point


How exactly do these work?

-------------------------
The default value for all of these addys is 3F80. This means that by the end of your code you must have reset the final value to 3F80.
-------------------------
All values are relative to the player's starting position.
-------------------------
offset between players is C0

want player 2's left/right movement?
add C0 to player 1's left/right movement addy. easy as that.

*If you go to the 'Four Player Conversion' section you will notice that this has all ready been done for all players*
-------------------------

Starting from 3F80 and going up turns one direction (any value greater than 3F80 will turn it one way).

Starting from BF80 and going up turns the other direction (any value greater than BF80 will turn it the opposite direction of any value greater than 3F80).

-------------------------

What Each Mod Does

Now all of these values (and the explanation of them) were taken from the default camera view in the SD! mall and then tested in match. What each of these mods do is what they say. If P1 is facing to the right (a standard front grapple move in the SD! Mall) then if the value that you use for the distance addy is greater than 3F80 then it will pull P1 in that direction, otherwise any value greater than BF80 will pull it in the opposite direction. It takes some getting used to, but I have faith that you'll be able to get it.

Left/Right:

Default Facing Direction (P1's facing the right)

3F80 > Towards the Camera (the up direction)
BF80 > Away from the Camera (the down direction)

Opposite Facing Direction (P1's facing the left)

3F80 > Away from the Camera (the down direction)
BF80 > Towards the Camera (the up direction)


Height:

3F80 > Towards the Ceiling
BF80 > Towards the Ground Floor


Distance:

Default Facing Direction (P1's facing the right)

3F80 > Towards the Left
BF80 > Towards the Right

Opposite Facing Direction (P1's facing the left)

3F80 > Towards the Right
BF80 > Towards the Left


OK So How do I Use the Distance Addys?

There are two ways to use distance mods. One way is the way that I like to use. This way has us using the addys for P1s value and frame (the first two addys that you would use in any normal hack - D106B454 (P1's value addy) and D106B456 (P1's frame addy)). Normally this would be the format for a standard hack:

D106B454 **** (P1's value)
D106B456 **** (P1's frame)
8106B460 **** (P1's animation)
D106B454 **** (P1's value)
D106B456 ****(P1's frame)
8106B462 **** (P1's frame in the animation)

So if you think about it what exactly are we doing here? We are saying what move we want to hack, where we want to hack it, and what move and what frame in that move we want to use to create our hack, and in short, this is what we are going to be doing with the distance mods. For the distance mods all we are saying is what move we want to use distance mods for, where we want them to start, and what final position we want them to be in. That is it. So let's do it using the method that I prefer first, then we'll take a look at an alternate method. Using the value and frame addys for P1 we can use the distance mods. This is what the typical format for distance addys will be:

D106B454 **** (P1's value)
D106B456 **** (P1's frame)
8106B498 **** (P1's distance using the left/right mods)

Now if you want to use the height mods it will be the same format, just a different distance mod addy:

D106B454 **** (P1's value)
D106B456 **** (P1's frame)
8106B49C **** (P1's distance using the height mods)

And finally if you want to use the distance away from starting point mods it will be the same format as the previous two examples:

D106B454 **** (P1's value)
D106B456 **** (P1's frame)
8106B4A0 **** (P1's distance using the distance from starting point mods)


And that's it! All you do is put in the value of the move you will be replacing, the frame that you want to have the distance mod at, and the value for the direction that you want the addy to go in. Typically a good value to start at is about 4200 or C200 and then you can just add or subtract from that in order to move the move in either direction.

The advantages of this method is that it not only can you use it in match, but most importantly you can view these mods in action in the SD! mall, making it a whole lot easier to fix the distance mods and edit your code.

Now the other method uses activators in order to make it such that you can only view the distance mods in match. This is a good method for final versions of code that you only want to be visible in match. In order to use this method you will need these addys:

P1
D115AF56 **** (P1's value)
D115AF58 **** (P1's frame)

P2
D115B2AE **** (P2's value)
D115B2B0 **** (P2's frame)

P3
D115B606 **** (P3's value)
D115B608 **** (P3's frame)

P4
D115B95E **** (P4's value)
D115B960 **** (P4's frame)

So to use these for P1 just do the same thing as before (except swap the value and frame addys between players):

D115AF56 **** (P1's value)
D115AF58 **** (P1's frame)
8106B498 **** (P1's distance using the left/right mods)

Now if you want to use the height mods it will be the same format, just a different distance mod addy:

D115AF56 **** (P1's value)
D115AF58 **** (P1's frame)
8106B49C **** (P1's distance using the height mods)

And finally if you want to use the distance away from starting point mods it will be the same format as the previous two examples:

D115AF56 **** (P1's value)
D115AF58 **** (P1's frame)
8106B4A0 **** (P1's distance using the distance from starting point mods)

And that's it! You should now be able to use distance mods correctly.

So Where Exactly Do I Put Them?

Well that's really up to you. Try putting them where they make the most sense to you. In my codes I usually put them right before the toki mods and right after the hack, but sometimes if the hack is too long or if the distance mods are too long then I just make a separate entry in my PJ64 cheat file for the distance mods. Usually it's something like this:

my hack\distance

D106B454 3860
D106B456 0005
8106B4A0 4200
D106B454 3860
D106B456 0020
8106B4A0 3F80
... etc.

A Few Notes to Leave On

Now when you are doing a front grapple move then P1 will be facing the right and P2 will be facing the left and when you do a back grapple move then both P1 and P2 will be facing the right. Know that and you basically know how to use distance mods.

And always remember that your last distance mod value will be 3F80. Also if you plan on ending the move at a different spot other than the default value (3F80) then you need to have the last distance mod value of 3F80 to be either 1 or 2 frames from the end. Typically you can get away with ending it one frame from the end but sometimes it takes more than two frames in order to not jack up your game. If you end on the very last frame, or sometimes one frame from the end, then you will not only mess up your grapple system but all distances between players will be thrown off until you fix it. This is how your move should end if you decide that you don't want it to end in the default position:

D106B454 **** (P1's value)
D106B456 **** (P1's ending frame - 1 frame/2 frames)
8106B498 3F80 (P1's default value for distance mods)

Or if you decide to use the other method:

D115AF56 **** (P1's value)
D115AF58 **** (P1's ending frame - 1 frame/2 frames)
8106B498 3F80 (P1's default value for distance mods)

Also if you want to change use distance mods for P2, P3 or P4 then use these addys:

P2:
D106B514 **** (P2's value)
D106B516 **** (P2's frame)

P3:
D106B5D4 **** (P3's value)
D106B5D6 **** (P3's frame)


P4:
D106B694 **** (P4's value)
D106B696 **** (P4's frame)


Instead of this addy for P1:

P1:
D106B454 ****
D106B456 ****

Like wise if you want to do it the other way then use these addys for P2, P3, and P4:

P2
D115B2AE ****
D115B2B0 ****

P3
D115B606 ****
D115B608 ****

P4
D115B95E ****
D115B960 ****

Instead of using this addy for P1:

P1
D115AF56 ****
D115AF58 ****

I'll add more on how to make glitches less noticeable in the time to come.

Hope this makes your lives easier!


edit:

I was messing around with the memory editor (looking for relative facing addys) and I figured something out. The "true" default values for these mods is really 0000 when you end the code you are changing it from '0000' to '3F80' for the remainder of the game. Now there is nothing wrong with this, and I'm looking into this more, but it looks like you can also end the move by changing the default back to '0000' instead of '3F80'. I just figured that since the game starts with those addys at '0000' you might as well end it with '0000'. I don't know I just thought it might be something you guys might want to mess with.
Back to top Go down
 
Distance Mods tutorial
Back to top 
Page 1 of 1
 Similar topics
-
» Wolfpac_69's - Attire Hacking Tutorial
» Loco's AKI Tutorial
» ASM Hacking Tutorial
» HIW's Texture Modding Tutorial
» Facing Modifiers Tutorial

Permissions in this forum:You cannot reply to topics in this forum
GenHex :: AKI Library :: WWF No Mercy - Tutorials-
Jump to: