Posts: 20
Threads: 5
Joined: Aug 2021
Reputation:
1
08-29-2024, 08:07 PM
(This post was last modified: 09-02-2024, 01:56 PM by Vega.
Edit Reason: Fixed PAL, K and J ports offsets
)
CPU Bot (Online) v1.5 [marito_yo]
Change: Changed C2 hook to one liner. The C2 hook set it to 1 regardless of case.
Addition: Made "isCpu" bool true. This bool sets some important stuff that CPUs have and it fixes the respawn route issue. Also, it was modified in a way that it will only affect human players so it will not cause online players to have CPU stuff (example: turning).
Change and Addition by Ro
NTSC-U
0452AA1C 60000000
04721E4C 38600001
04589E4C 70030003
PAL
0452F564 60000000
0472627C 38600001
04590670 70030003
NTSC-J
0452EEE4 60000000
047258e8 38600001
0458FFF0 70030003
NTSC-K
0451D5BC 60000000
04714624 38600001
0457E6C8 70030003
Code creator: marito_yo
Code credits: Dea00 [ CPU bot[Dea]]
Code credits: Ro (isCPU fix)
Posts: 4
Threads: 1
Joined: Jun 2024
Reputation:
0
I wanna race/battle with cpu bot in offline multiplayer, possible?
Posts: 244
Threads: 106
Joined: Feb 2022
Reputation:
34
This code works offline too. I think marito put (Online) to tell that it works properly online unlike Dea's version.
Posts: 4
Threads: 1
Joined: Jun 2024
Reputation:
0
I know it works in offline, but I would like play against cpu bot.
Posts: 1
Threads: 0
Joined: Dec 2024
Reputation:
0
(08-29-2024, 08:07 PM)marito_yo Wrote: CPU Bot (Online) v1.5 [marito_yo]
Change: Changed C2 hook to one liner. The C2 hook set it to 1 regardless of case.
Addition: Made "isCpu" bool true. This bool sets some important stuff that CPUs have and it fixes the respawn route issue. Also, it was modified in a way that it will only affect human players so it will not cause online players to have CPU stuff (example: turning).
Change and Addition by Ro
NTSC-U
0452AA1C 60000000
04721E4C 38600001
04589E4C 70030003
PAL
0452F564 60000000
0472627C 38600001
04590670 70030003
NTSC-J
0452EEE4 60000000
047258e8 38600001
0458FFF0 70030003
NTSC-K
0451D5BC 60000000
04714624 38600001
0457E6C8 70030003
Code creator: marito_yo
Code credits: Dea00 [CPU bot[Dea]]
Code credits: Ro (isCPU fix) The gecko code is really cool to use, but when I did the test with a friend to put in 200 CC, I had the impression that the CPU was at 50 CC...
Posts: 408
Threads: 20
Joined: Jan 2020
Reputation:
10
01-01-2025, 11:23 PM
(This post was last modified: 01-01-2025, 11:24 PM by Zeraora.)
(12-30-2024, 02:21 PM)Exorcism Wrote: (08-29-2024, 08:07 PM)marito_yo Wrote: CPU Bot (Online) v1.5 [marito_yo]
Change: Changed C2 hook to one liner. The C2 hook set it to 1 regardless of case.
Addition: Made "isCpu" bool true. This bool sets some important stuff that CPUs have and it fixes the respawn route issue. Also, it was modified in a way that it will only affect human players so it will not cause online players to have CPU stuff (example: turning).
Change and Addition by Ro
NTSC-U
0452AA1C 60000000
04721E4C 38600001
04589E4C 70030003
PAL
0452F564 60000000
0472627C 38600001
04590670 70030003
NTSC-J
0452EEE4 60000000
047258e8 38600001
0458FFF0 70030003
NTSC-K
0451D5BC 60000000
04714624 38600001
0457E6C8 70030003
Code creator: marito_yo
Code credits: Dea00 [CPU bot[Dea]]
Code credits: Ro (isCPU fix) The gecko code is really cool to use, but when I did the test with a friend to put in 200 CC, I had the impression that the CPU was at 50 CC... Since the code is using the bot's parameters, I notice that the rubberband mechanic gets a bit confused as to what to do and will simply force a constant rubberband effect.
I use these codes when using the bot codes.
Disable CPU Rubberbanding Effect [b_squo]
Force Set CPU Difficulty [Vega]
Set CPU Soft Speed Limit [B_squo] (You might have to play around with the values on this code to up the speed limit to 200cc's)
~MarioKartWii.com #1~
Posts: 4
Threads: 1
Joined: Jun 2024
Reputation:
0
Yesterday, 09:41 AM
(This post was last modified: Yesterday, 09:56 AM by Womb.
Edit Reason: Wrong reply number
)
5 months later
Can it be modified like this?
https://mariokartwii.com/showthread.php?tid=1893&page=2
from Reply #14
Posts: 4,502
Threads: 915
Joined: Feb 2018
Reputation:
101
(Yesterday, 09:41 AM)Womb Wrote: 5 months later
Can it be modified like this?
https://mariokartwii.com/showthread.php?tid=1893&page=2
from Reply #14
Yes, I jimmy'd this up really quick.
Untested, might not work.
PAL
06001500 0000000C
LLNNPPQQ RRSSTTUU
VVXXYYZZ 00000000
C252F538 00000004
801E0018 3D608000
616B1500 7D6BD0AE
2C0B0000 41820000
38000001 00000000
C272625C 00000002
5460063E 7C0C0378
60000000 00000000
C272627C 00000002
3D608000 616B1500
7C6B60AE 00000000
C2590664 00000003
81830000 818C0000
898C0010 80630000
60000000 00000000
C2590670 00000002
3D608000 616B1500
7C6B60AE 00000000
String Wring Source:
Code: #Write Truth Table at 0x80001500
#0 = isCPU false
#1 = isCPU true
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
First ASM Source:
Code: #PAL 8052F538
#r26 = Slot code is hooked on
#r0 (after OG instruction) is 0 for Human, 1 for CPU, 3 for CPU???
#OG Instruction. The reason im leaving the OG instruction in instead of just directly loading truth table bool into r0 is because for possiblity of this 3 value being loaded. No idea what its for, let's not chance it
lwz r0, 0x0018 (r30)
#Set Truth Table addr
lis r11, 0x8000
ori r11, r11, 0x1500
#Use r26 slot to grab Truth Table bool
lbzx r11, r11, r26
cmpwi r11, 0
beq- end #if false allow OG instruction value just incase 3 was loaded
#Set isCPU
li r0, 1
Second ASM Source:
Code: #PAL 8072625C
#Original Instruction is useless because it calls a fuctino to get back a returned byte but it then uses a rlwinm to extract the byte. But we'll keep it cuz r0 needs the result anyway
#Make sure loaded Player/CPU ID is a byte
rlwinm r0, r3, 0, 24, 31
#Save Player/CPU ID in r12
mr r12, r0
Third ASM Source:
Code: #PAL 8072627C
#OG instruction of rlwinm r3, r0, 27, 5, 31 discarded
#Set Truth Table addr
lis r11, 0x8000
ori r11, r11, 0x1500
#Use r12 (slot code is hooked on) to load isCPU value from truth table
lbzx r3, r11, r12
Fourth ASM Source:
Code: #PAL 80590664
#Grab slot code is hooked on
lwz r12, 0 (r3)
lwz r12, 0 (r12)
lbz r12, 0x10 (r12)
#OG Instruction
lwz r3, 0 (r3)
Fifth ASM Source:
Code: #PAL 80590670
#OG Instruction of rlwinm r3, r0, 0, 31, 31 discarded
#Set Turth Table addr
lis r11, 0x8000
ori r11, r11, 0x1500
#Use r12 (slot code is hooked on) to load isCPU value from truth table
lbzx r3, r11, r12
Posts: 4,502
Threads: 915
Joined: Feb 2018
Reputation:
101
@Marito_Yo
I don't mean to start any drama, but I am curious. You have yourself as the Code creator, but which part of the Code was authored by you? Which line?
For context, the differences I see between this and Dea's OG version is.. (correct me If I'm wrong)
- First Hook was moved to a slightly different spot in the same responsible Func, which allows a nop of a stb. Thus no more C2 needed, can use a RAM Write (nop). This is a more optimized way to achieve the same effect as the previous version.
- Second Hook was changed to a RAM Write since it was hooked to a Func that returned a bool. Simply editing the bool return value is all that is needed. Code optimization.
- Third Line was added completely from scratch. This is for the other isCPU func as there are two isCPU funcs in the game. Dea's OG version was missing this.
--
So did you add the 3rd line? If not, then the rest would just be code optimizations which doesn't qualify as the Code creator, but does for Code credits. Unless the code optimization added a new feature I'm not recognizing or removed a limitation.
Once again, not trying to start any drama, just want to make sure credits are done correctly.
|