CC Tracker [JoshuaMK]
#1
CC Tracker [JoshuaMK]

Use this code when you want to have changes to the game be CC specific. Tested everywhere except online.



(Region Free)
C0000000 0000000A
3D808000 896C5F27
3D40809B 2C0B00EC
6149D728 41820024
2C0B0010 6149C788
41820018 2C0B0054
3D20809A 6129BD68
41820008 61498F68
81290000 2C090000
4D820020 81690B6C
996CXXXX 4E800020



XXXX = Offset from 0x80000000 to store byte (02FF = 0x800002FF)



Values to check for codes that use this for CC dependent changes:

0 = 50cc
1 = 100cc
2 = 150cc
3 = Battle
4 >= Invalid (Or maybe custom CCs if you want to pull of a MrBean35000vr and extend a key part of the game lol)



Code Creator: JoshuaMK
Super Mario Eclipse, what Super Mario Sunshine could've been.
Reply
#2
How would i specific make this track for 150cc? I'm very noobish with codes and want a faster bullet only for 150cc. I have gotten it to work with this code attached but, i dont know how to specify it.
c0000000 00000009
3d808000 896c5f27
3d40809b 2c0b00ec
6149d728 41820024
2c0b0010 6149c788
41820018 2c0b0054
3d20809a 6129bd68
41820008 61498f68
81690b6c 996c048b
4e800020 00000000
048b1138 43960000

This is right?
~MarioKartWii.com #1~
Reply
#3
(03-14-2020, 02:31 AM)TheNinjaKingOW Wrote: How would i specific make this track for 150cc? I'm very noobish with codes and want a faster bullet only for 150cc. I have gotten it to work with this code attached but, i dont know how to specify it.
c0000000 00000009
3d808000 896c5f27
3d40809b 2c0b00ec
6149d728 41820024
2c0b0010 6149c788
41820018 2c0b0054
3d20809a 6129bd68
41820008 61498f68
81690b6c 996c048b
4e800020 00000000
048b1138 43960000

This is right?

How you would do this in a non-ASM manner (with gecko codetypes) is you encapsulate the code you want to have be CC specific in an if-statement gecko codetype. More info on this can be found here: https://mkwii.com/showthread.php?tid=545&highlight=If+Codes

F
or now though, this is all you need to know for this use case, the 28 type means "if equal". With this in mind, we can set the if statement on the flag of the CC type, and have the faster bullet bill speeds be implemented if the cc is equal to the specified value, like so:



048B1138 43110000 <-Default value
2800048A 00000002 <-If CC is equal to 2 (150cc)
048B1138 43960000 <-"Poke" default value to be 43960000
E0000000 80008000 <-Final Terminator (Essentially ends the if block)



Lets deconstruct this shall we?

To start: 2800048A.

This is saying, if the halfword sized (<- VERY IMPORTANT) value at address 8000048A IS EQUAL: "poke" the value at address 808B1138 to be the new specified value of 43960000. It is extremely important to keep in mind that the value for the 28 type if-statement is ALWAYS halfword sized ("0123" for example), so to make a proper compare on the byte sized flag that the CC tracker code provides, you make the address for the compare be 1 less than the actual address of the byte to compare with (Also, make sure you have the byte storage be on an odd byte (which you do btw so don't worry about it this time, but for later times, odd bytes are: 1, 3, 5, 7, 9, B, D, F) because the codehandler will automatically "align" the if statement to be halfword aligned (so 28000005 would be translated to 28000004) which can cause the code to not ever access your value). So always keep this in mind.

Next is the 00000002.

This is the value to compare with, in this case, it is 2.
What is happening here is the value grabbed from above is compared to this value of 2. If they are equal, the code within the if statement executes.

Lastly, the E0000000 80008000.

Best thing to know what this is is to read up on Vega's well written post here: https://mkwii.com/showthread.php?tid=745




With these things in mind, this is the final code that only changes the bullet bill's speed when the flag is set to 2 (150cc):

C0000000 0000000A
3D808000 896C5F27
3D40809B 2C0B00EC
6149D728 41820024
2C0B0010 6149C788
41820018 2C0B0054
3D20809A 6129BD68
41820008 61498F68
81290000 2C090000
4D820020 81690B6C
996C0000 4E800020
048B1138 43110000
2800048A 00000002
048B1138 43960000
E0000000 80008000

I hope this has helped you understand how to create if-statements with gecko codes better Smile
Super Mario Eclipse, what Super Mario Sunshine could've been.
Reply
#4
(03-08-2020, 04:19 AM)JoshuaMK Wrote: CC Tracker [JoshuaMK]

Use this code when you want to have changes to the game be CC specific. Tested everywhere except online.



(Region Free)
C0000000 0000000A
3D808000 896C5F27
3D40809B 2C0B00EC
6149D728 41820024
2C0B0010 6149C788
41820018 2C0B0054
3D20809A 6129BD68
41820008 61498F68
81290000 2C090000
4D820020 81690B6C
996CXXXX 4E800020



XXXX = Offset from 0x80000000 to store byte (02FF = 0x800002FF)



Values to check for codes that use this for CC dependent changes:

0 = 50cc
1 = 100cc
2 = 150cc
3 = Battle
4 >= Invalid (Or maybe custom CCs if you want to pull of a MrBean35000vr and extend a key part of the game lol)



Code Creator: JoshuaMK

can you help me finding the file where i can change the codes cuz i make my own mario kart wii and i want to make 50cc to 100cc 100cc to 150cc and 150cc to 200cc i thought maybe i could use the code from 100cc copy it and paste it in 50cc so 50cc is 100cc and do the same with the 150cc code on 100cc then the code you gave us instead of the 150cc code so it speeds up (so basically i need the file name of the szs or whatever so i can change codes and if you could tell what programms i need for it would be good im on dophin emulator btw) thx
Reply
#5
BTW Checked this code online, it works fine.
~MarioKartWii.com #1~
Reply
#6
How would I make this code for 100cc?
Reply
#7
(04-06-2021, 06:11 PM)jawa Wrote: How would I make this code for 100cc?

You would need to set the XXXX value to whatever spot in the EVA you desire. Then on your own code that you are writing, you would load the byte from your EVA spot and check the value against the value that represents 100cc. What your code does based on this value is entirely up to you.

This is meant as a supplement code for other coders to use in making new codes.
Reply
#8
(04-07-2021, 12:59 AM)Vega Wrote:
(04-06-2021, 06:11 PM)jawa Wrote: How would I make this code for 100cc?

You would need to set the XXXX value to whatever spot in the EVA you desire. Then on your own code that you are writing, you would load the byte from your EVA spot and check the value against the value that represents 100cc. What your code does based on this value is entirely up to you.

This is meant as a supplement code for other coders to use in making new codes.
I am a big noob with codes, so I would just add a if statement to this code to make it execute when its 100cc?
048A12E4 42FF0000
048B1428 443B8000
048B1438 443B8000
048B1448 43340000
C2590400 00000005
48000009 40388000
7D8802A6 C14C0000
C1A3FF90 EDAD02B2
C03F0000 EC21682A
60000000 00000000
048B1418 3FC00000
Reply
#9
Ye you can use if-statements from Gecko Code type -> https://mkwii.com/showthread.php?tid=545
Reply
#10
I tried the code at the end, and it decreased the gravity by like 18 times. Do you know why?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)