Drift Type Modifier
#1
Question 
Currently only in NTSC-U, have been searching for over a week for this value and finally found it. I have found what determines inside/outside drifting.

The only issue is I can't seem to get inside drift forced into outside drift to function right... It has all the animations, effects, and camera angles acting like they should for outside drift, but the drift itself performs like inside drifting. This makes me think there is still some missing value I need to find.

Outside drifting doesn't have this issue. It seems to work flawlessly.

Anyways, here is the code as is:

(NTSC-U)
C258B7C4 00000007
3D808034 618C3E80
A18C0000 280C0082
41820014 280C0081
40820014 38A00001
48000010 38A00002
48000008 80A40004
60000000 00000000


#ASM
lis r12, 0x8034
ori r12, r12, 0x3E80
lhz r12, 0 (r12)
cmplwi r12, 0x0082
beq force_in
cmplwi r12, 0x0081
bne normal
li r5, 1     #1 = Outside Drift
b the_end
force_in:
li r5, 2     #2 = Inside Drift
b the_end
normal:
lwz r5, 0x0004 (r4)     #If no controller input matches, load normal value (Depends on chosen vehicle type)
the_end:
Super Mario Eclipse, what Super Mario Sunshine could've been.
Reply
#2
There may be a part of the game that reads drift types as 0 and 1, instead of 1 and 2. The game likes to start its default values at 0. For example, there's a function in the StaticR.rel that checks your friend list amount. There's an instruction in the function - cmplwi rX, 29. It starts as 0 and ends at 29, instead of 1 to 30.
Reply
#3
So I just went and reverse engineered my way through until I finally hit the source of where the drift type value is loaded from, and it was still a 1 and 2 type flag. I set it to 1 from there to see if because it was the source, that maybe it would fix the issue... nope. Now I really do believe that there is another value somewhere...
Super Mario Eclipse, what Super Mario Sunshine could've been.
Reply
#4
Any update on this? Btw you can switch the branches a bit on this by placing the default instruction before the branches

lwz r5, 0x0004 (r4)

lis r12, 0x8034
ori r12, r12, 0x3E80
lhz r12, 0 (r12)

cmpwi r12, 0x0082
beq- force_in
cmpwi r12, 0x0081
bne- end

li r5, 1 #Outside Drift
b end

force_in:
li r5, 2 #Inside Drift

end:
Reply
#5
Yeah, I never found a "true" fix for this, but lost somewhere in my notes was a way to disable the limit on how far your vehicle could pivot during a drift, which I used as a temporary fix. I may try to find it later.
Super Mario Eclipse, what Super Mario Sunshine could've been.
Reply
#6
Not entirely sure if this will help or not but https://mkwii.com/showthread.php?tid=1241 actually makes all outside drifting bikes inside drift for whatever reason. If you do come back to work on this code good luck.
Reply
#7
That's because the code turned out to actually modify a lot of trig calculations.
Super Mario Eclipse, what Super Mario Sunshine could've been.
Reply
#8
interesting
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)