Difference between revisions of "Conditional Out of Bounds (kHacker35000vr)"
m |
(v1.1) |
||
Line 2: | Line 2: | ||
This is a [[cheat code]] created by [[kHacker35000vr]]. This makes it easier for track authors to implement intersections without having to worry about unintended fall boundaries being triggered when someone on the lower part of the track gets too much air. It makes use of the unused [[AREA type#AREA type 0x0A (Fall Boundary)|AREA type 10]], which will serve as the conditional out of bounds. | This is a [[cheat code]] created by [[kHacker35000vr]]. This makes it easier for track authors to implement intersections without having to worry about unintended fall boundaries being triggered when someone on the lower part of the track gets too much air. It makes use of the unused [[AREA type#AREA type 0x0A (Fall Boundary)|AREA type 10]], which will serve as the conditional out of bounds. | ||
− | Track authors can implement a conditional out of bounds by changing setting 1 of the AREA to either 1 | + | Track authors can implement a conditional out of bounds by changing setting 1 of the AREA to either 0 or 1. Value 0 will only enable the AREA if the condition is met, while value 1 will disable the AREA if the condition is met. Setting 2 of the AREA defines a key checkpoint region. If a player is currently inside the given key checkpoint region, the condition is true. Due to how it is recommended to never place key checkpoints on intersections, as this may cause [[Position Jump Bug]]s, the code does not require specific checkpoint setups to work properly and authors can freely alter checkpoints without having to worry too much. |
+ | |||
+ | The code has to be activated by changing the route setting of AREAs to 1. Other values disable the code completely. | ||
== C code == | == C code == | ||
Line 8: | Line 10: | ||
<pre> | <pre> | ||
− | if (area->setting1 == | + | if (area->setting1 == 0 && playerInfo->currentKcp == area->setting2) //Activator |
return areaId; | return areaId; | ||
− | else if (area->setting1 == | + | else if (area->setting1 == 1 && playerInfo->currentKcp != area->setting2) //Deactivator |
return areaId; | return areaId; | ||
else | else | ||
Line 17: | Line 19: | ||
== Cheat Codes == | == Cheat Codes == | ||
− | <spoiler text="Conditional OoB, PAL"> | + | <spoiler text="Conditional OoB v1.1, PAL"> |
<pre> | <pre> | ||
Conditional OoB, PAL [KHacker35000vr] | Conditional OoB, PAL [KHacker35000vr] | ||
− | c2516a5c | + | c2516a5c 00000016 |
2c030000 4d800020 | 2c030000 4d800020 | ||
3d40809b 5469103a | 3d40809b 5469103a | ||
Line 27: | Line 29: | ||
7d2a482e 81490004 | 7d2a482e 81490004 | ||
892a0001 2f89000a | 892a0001 2f89000a | ||
− | 4c9e0020 | + | 4c9e0020 892a002c |
2f890000 4d9e0020 | 2f890000 4d9e0020 | ||
− | 3d00809b | + | 3d00809b a12a0028 |
6108d730 80e80000 | 6108d730 80e80000 | ||
− | 391f0004 81080000 | + | 2f890000 391f0004 |
− | + | 81080000 81080000 | |
− | + | 89080010 80e7000c | |
− | 7d07402e | + | 5508103a 7d07402e |
− | + | 409e001c 89280027 | |
− | |||
− | |||
− | |||
a14a002a 7f895000 | a14a002a 7f895000 | ||
4d9e0020 3860ffff | 4d9e0020 3860ffff | ||
− | 4e800020 00000000 | + | 4e800020 2b890001 |
+ | 40befff4 89280027 | ||
+ | a14a002a 7f895000 | ||
+ | 4cbe0020 4bffffe0 | ||
+ | 60000000 00000000 | ||
</pre></spoiler> | </pre></spoiler> | ||
− | <spoiler text="Conditional OoB, NTSC-U"> | + | <spoiler text="Conditional OoB v1.1, NTSC-U"> |
<pre> | <pre> | ||
Conditional OoB, NTSC-U [KHacker35000vr] | Conditional OoB, NTSC-U [KHacker35000vr] | ||
− | c25125e8 | + | c25125e8 00000016 |
2c030000 4d800020 | 2c030000 4d800020 | ||
3d40809b 5469103a | 3d40809b 5469103a | ||
Line 53: | Line 56: | ||
7d2a482e 81490004 | 7d2a482e 81490004 | ||
892a0001 2f89000a | 892a0001 2f89000a | ||
− | 4c9e0020 | + | 4c9e0020 892a002c |
2f890000 4d9e0020 | 2f890000 4d9e0020 | ||
− | 3d00809b | + | 3d00809b a12a0028 |
61088f70 80e80000 | 61088f70 80e80000 | ||
− | 391f0004 81080000 | + | 2f890000 391f0004 |
− | + | 81080000 81080000 | |
− | + | 89080010 80e7000c | |
− | 7d07402e | + | 5508103a 7d07402e |
− | + | 409e001c 89280027 | |
− | |||
− | |||
− | |||
a14a002a 7f895000 | a14a002a 7f895000 | ||
4d9e0020 3860ffff | 4d9e0020 3860ffff | ||
− | 4e800020 00000000 | + | 4e800020 2b890001 |
+ | 40befff4 89280027 | ||
+ | a14a002a 7f895000 | ||
+ | 4cbe0020 4bffffe0 | ||
+ | 60000000 00000000 | ||
</pre></spoiler> | </pre></spoiler> | ||
<spoiler text="Conditional OoB, NTSC-J"> | <spoiler text="Conditional OoB, NTSC-J"> | ||
<pre> | <pre> | ||
− | Conditional OoB, NTSC-J [KHacker35000vr] | + | Conditional OoB v1.1, NTSC-J [KHacker35000vr] |
− | c25163dc | + | c25163dc 00000016 |
2c030000 4d800020 | 2c030000 4d800020 | ||
3d40809b 5469103a | 3d40809b 5469103a | ||
Line 79: | Line 83: | ||
7d2a482e 81490004 | 7d2a482e 81490004 | ||
892a0001 2f89000a | 892a0001 2f89000a | ||
− | 4c9e0020 | + | 4c9e0020 892a002c |
2f890000 4d9e0020 | 2f890000 4d9e0020 | ||
− | 3d00809b | + | 3d00809b a12a0028 |
6108c790 80e80000 | 6108c790 80e80000 | ||
− | 391f0004 81080000 | + | 2f890000 391f0004 |
− | + | 81080000 81080000 | |
− | + | 89080010 80e7000c | |
− | 7d07402e | + | 5508103a 7d07402e |
− | + | 409e001c 89280027 | |
− | |||
− | |||
− | |||
a14a002a 7f895000 | a14a002a 7f895000 | ||
4d9e0020 3860ffff | 4d9e0020 3860ffff | ||
− | 4e800020 00000000 | + | 4e800020 2b890001 |
+ | 40befff4 89280027 | ||
+ | a14a002a 7f895000 | ||
+ | 4cbe0020 4bffffe0 | ||
+ | 60000000 00000000 | ||
</pre></spoiler> | </pre></spoiler> | ||
[[Category:Cheat Codes]] | [[Category:Cheat Codes]] |
Revision as of 12:51, 13 July 2020
This is a cheat code created by kHacker35000vr. This makes it easier for track authors to implement intersections without having to worry about unintended fall boundaries being triggered when someone on the lower part of the track gets too much air. It makes use of the unused AREA type 10, which will serve as the conditional out of bounds.
Track authors can implement a conditional out of bounds by changing setting 1 of the AREA to either 0 or 1. Value 0 will only enable the AREA if the condition is met, while value 1 will disable the AREA if the condition is met. Setting 2 of the AREA defines a key checkpoint region. If a player is currently inside the given key checkpoint region, the condition is true. Due to how it is recommended to never place key checkpoints on intersections, as this may cause Position Jump Bugs, the code does not require specific checkpoint setups to work properly and authors can freely alter checkpoints without having to worry too much.
The code has to be activated by changing the route setting of AREAs to 1. Other values disable the code completely.
C code
The following code snippet demonstrates how the current key checkpoint and the AREA settings determine if a fall boundary is active.
if (area->setting1 == 0 && playerInfo->currentKcp == area->setting2) //Activator return areaId; else if (area->setting1 == 1 && playerInfo->currentKcp != area->setting2) //Deactivator return areaId; else return -1;