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

@Dantarion & Almas

shanus

Smash Hero
Joined
Nov 17, 2005
Messages
6,055
Been chatting with PW, have some useful information:

Phantom Wings said:
Hmm... Well I once touched upon landing detection when I made the Stand In Midair/Fall on Ground code but I didn't go too deep into the assembly for that - just a simple ASM override. I'm almost finished another project that I'm currently working on, so after that's done I'll see about looking into it.

As for the variables, I know exactly where they're stored.;)

Hopefully you're familiar with the Character Root Address which was the basis for all the Super Codes and such. If not, message me back and I'll elaborate.

Anyways, use the P.O. to navigate along the following path:

[[80623320 + 4] + 60]

That will get you to the Field Accessor of the first character.

Next Navigate to:

[+70]

Which will get you to so Work Manage Module Impl, the module that handles all variables. (incidentally, the 12XXXXXX group of events in PSA directly access this module)

Now, I can't check at the moment, so I only remember how to access the Longterm variables but:

[[+20] + 0C] Longterm Basics
[[+20] + 14] Longterm Scalars
[[+20] + 1C] Longterm Flags

basics are stored as 32-bit Words, Scalars are stored in floating point (as opposed to the base 4000 that PSA runs off of) and flags are based on single bits, so you'll have to use the gecko register OR, AND and XOR commands to modify those.


I'm not sure if you're still using memory write codes or ASM codes, but in case you need it;

80000000 80623320
80000001 00000000
60000006 00000000
60000003 00000001
4A001000 00000000
4A101001 00000000
36000000 00000032
58010000 00000004
DE000000 80008180
58010000 00000060
DE000000 80008180


80100001 00000008
62000000 00000001
E200000F 00000000
80000001 00000000
80100000 00000244
62000000 00000000
E0000000 80008000

Anything in the middle section will execute with the P.O. equaling the Field Accessor of all currently active characters. From there, you could simply add something like:

58010000 00000070 < Work Manage Module
58010000 00000020
58010000 0000001C < Flags

to make the P.O. equal the start of the Longterm Flags section.



Keep in mind that I'm working out of memory here, so I could be mistaken in various places. I'll contact you tomorrow to confirm the addresses and offsets as well as provide you with the Random Access variables.
 

shanus

Smash Hero
Joined
Nov 17, 2005
Messages
6,055
Phantom Wings said:
Just confirming the addresses I gave you,

From the Work Module the pointers to access each variable category are:

[[0x20] + 0xC] LA-Basic
[[0x20] + 0x14] LA-Float
[[0x20] + 0x1C] LA-Bit

[[0x24] + 0xC] RA-Basic
[[0x24] + 0x14] RA-Float
[[0x24] + 0x1C] RA-Bit

Additionally, you can find the total number of variables available in each category at:

[[0x20] + 0x10] LA-Basic Count
[[0x20] + 0x18] LA-Float Count
[[0x20] + 0x20] LA-Bit Count

[[0x24] + 0x10] RA-Basic Count
[[0x24] + 0x18] RA-Float Count
[[0x24] + 0x20] RA-Bit Count

*The bit count is in sets of 32 bits so if RA-Bit Count = 3, bits = 96


Also, here's a couple of variables I've taken note of. I haven't tested them yet, so you might want to try them out in PSA

Code:
LA-Basic[1] Number of Jumps left
LA-Basic[13] Falling time
LA-Basic[25] Super Spicy Curry Remaining Time
LA-Basic[27] Hammer Remaining Time
LA-Basic[30] Star Remaining Time
LA-Basic[33] Mushroom Remaining Time
LA-Basic[37] Metal Block Remaining Time
LA-Float[3] Shield Charge([I]Can be overcharged for a larger than normal shield[/I])
LA-Float[7] Super Spicy Curry Angle
LA-Float[8] Super Spicy Curry Angle Variance
LA-Bit[0] Dead
LA-Bit[1] Cannot Die
LA-Bit[8] FS Is Available([I]Requires FS File or no articles in FS[/I])
LA-Bit[9] FS Aura Activator([I]Sets the FS Aura on or off according to LA-Bit[8][/I])
LA-Bit[10] Using Hammer
LA-Bit[14] Screw Attack
RA-Float[4] Running/Walking Velocity
Yeroc you might like that last item ;-)
 

Almas

Smash Lord
Joined
Jul 6, 2008
Messages
1,588
Interesting. Term ends the 24th... I PROMISE I'll do some work then =). Hopefully I can get light shielding done.
 

shanus

Smash Hero
Joined
Nov 17, 2005
Messages
6,055
so this is a way to acces the RA/LA values?
Yep. Thats how you can read them and modify them. So if you wanted to store a light press in a variable, you can, and then I can modify fighter.pac to allow the input into shields, air dodges, L-cancels, etc.
 

Dantarion

Smash Champion
Joined
May 21, 2007
Messages
2,492
Location
Santa Barbara, CA
This is good. Now, if only I could take a characters module and find out now many variables they have...or does it work that way?
 

shanus

Smash Hero
Joined
Nov 17, 2005
Messages
6,055
if i understand what he says, this should parse how many variables they have :-O
 

Eldiran

Smash Lord
Joined
Jan 8, 2008
Messages
1,707
Location
Pennsylvania
This sounds like excellent progress! I don't particularly follow the codes given, but those variables are delicious. I look forward to seeing what can be done with this knowledge...
 

Shell

Flute-Fox Only
Joined
Feb 7, 2007
Messages
2,042
Also, regarding landing detection... the character's also need to start their jump lower in addition to ending it lower. I solved this by making the character lower relative to TopN during Fall / other aerial animations. The problems occurred when I ran into certain transitions (from cliffHang to Fall) which redefine the location of the character without any intermediate animation, or some specials which are strangely resistant to being moved.

The code for this scenario would be "If character X was previously in animation Y, now Z, adjust location up/down U units."

However, if any of you have different approaches that'd be great, too.
 

shanus

Smash Hero
Joined
Nov 17, 2005
Messages
6,055
Can't we just adjust the first frame of Jump1 (not jump2)?
 

Shell

Flute-Fox Only
Joined
Feb 7, 2007
Messages
2,042
If you only adjust the first X frames, even if you build in a gradual transition from being X units lower back to 0 units, it will upset the parabolic motion... that is, feel off. It's not just about the first frame, it's about the whole jump being lower overall.
 
Top Bottom