Reference: Unlock all characters + Nitros Oxide in character select grid - #27
Conversation
All changes are gated behind #ifdef CTR_NATIVE so the original PSX
codepath is untouched.
Summary of changes:
1. Unlock all characters on boot (MainMain.c)
- Set gameProgress.unlockFlags |= UNLOCK_CHARACTERS after
GAMEPROG_NewGame_OnBoot() so all secret characters appear with
their proper cyan selection borders from the start.
2. Add Nitros Oxide as 16th character in the selection grid (D230.c,
ovr_230.h, MM_Characters.c)
- Expand CharacterSelectMeta arrays from [0xF] to [0x10]
- Expand TransitionMeta arrays from [0x15] to [0x16]
- Add Oxide entry at bottom-right of grid (0x160, 0xAE) with
proper D-pad navigation links
- Update Fake Crash (right→Oxide) and Papu (down→Oxide) nav
- Bump NUM_ICONS from 0xF to 0x10
3. Load Oxide's 3D preview model at runtime (MM_Characters.c)
- The main menu .lev only contains 15 character models; Oxide's
model is stored separately in BIGFILE as BI_RACERMODELHI+15.
- On first access, synchronously load and relocate his model via
LOAD_DramFile, then cache the pointer for subsequent frames.
4. Asset extraction script (extract_assets.sh)
- Supports .bin/.cue and .iso input
- Extracts XA audio as raw 2352-byte sectors (required for voices)
- Builds bchunk from source if not installed
5. Convenience run script (run.sh)
|
well my intention is not to sound harsh or anything, but we already have mods doing what you are describing publicly on CTR-ModSDK repo, for oxide and for unlocking everything custom track mods already documented how |
Oh yeah I am quite outside of this loop. I just saw this repo (https://github.com/CTR-tools/ctr-native) on youtube as the first project fully porting CTR to PC, came here and started toying with it. I barely have context. Do we still need that ModSDK given that ctr-native exists now? Btw the link in the README for the ghidra folder is broken (https://github.com/CTR-tools/CTR-ModSDK/tree/main/psx-modding-toolchain/games/CrashTeamRacing/ghidra) |
|
for now aalhendi actively works on the massive refactoring, so you better wait for a more stable version before proposing any functional changes. also the philosophy of this fork so far is to recreate the original experience rather than expanding too far beyond. i assume it will be considered whether this belongs to this project or not much later.
that's fine, there is a history of CTR modding prior to the full decomp, so a lot of mods were already made for PSX version of the game in C.
the idea of ModSDK is to replace a specific function in the original compiled binary. this way you can write simple mods and you don't need to recompile the entire game. decomp started as a "mod" that doesnt modify anything, but recreates the original code instead. ctr-native takes the result of the efforts and now compiles it separately without ModSDK.
fixed links, thanks for reporting. |
|
I perused a little bit of those repos, so currently the situation is that the modSDK is still just for PSX, but that mod support for the native version and having the mod SDK for native is in the works? Is the intention that "CTR native" supposed to stay completely original, and then it'd have mod support through which all kinds of mods could be added? That sounds great, if thats the case. |
Summary
All changes are gated behind
#ifdef CTR_NATIVE— the original PSX codepath is completely untouched.1. Unlock all characters on boot (
MainMain.c)Sets
gameProgress.unlockFlags |= UNLOCK_CHARACTERSimmediately afterGAMEPROG_NewGame_OnBoot(), so all secret characters appear with their proper cyan selection borders from the start.2. Nitros Oxide as 16th selectable character (
D230.c,ovr_230.h,MM_Characters.c)CharacterSelectMetaarrays from[0xF]to[0x10]TransitionMetaarrays from[0x15]to[0x16](0x160, 0xAE)with D-pad navigation:NUM_ICONSfrom0xFto0x10csm_1P2P,csm_1P2P_limited,csm_3P,csm_4P3. Runtime model loading for Oxide's preview (
MM_Characters.c)The main menu
.levonly ships 15 character models. Oxide's hi-res racing model lives in BIGFILE atBI_RACERMODELHI + NITROS_OXIDE. On first access inMM_Characters_GetModelByName, the code:LOAD_DramFile(..., -1)struct Model *for subsequent framesThis gives a proper 3D preview in the character select window without modifying any binary assets.
4. Asset extraction script (
extract_assets.sh)Robust script for extracting game assets from a retail NTSC-U disc image:
.bin/.cueand.isoinputbchunkfrom source if not installedGrid layout
Screenshots
Oxide appears in the grid with proper icon + borders, and his 3D kart model renders in the preview window.
Test plan