Giter VIP home page Giter VIP logo

ctr-tools / ctr-modsdk Goto Github PK

View Code? Open in Web Editor NEW
264.0 10.0 31.0 43.8 MB

ModSDK - a modding toolkit to create mods for Crash Team Racing in C. This repository also houses an effort to fully decompile and reverse-engineer CTR in C.

Home Page: https://discord.gg/WHkuh2n

Batchfile 0.08% Assembly 0.09% C 81.25% Python 0.06% C++ 18.30% CMake 0.07% HLSL 0.10% Nix 0.06% Shell 0.01%
crash-bandicoot crash-team-racing modding decompilation reverse-engineering decomp psx romhacking

ctr-modsdk's Issues

Splatoon bugs

  • Powerslide meter looks empty on the first frames, even though it isn't
  • Engine sounds are spamming, should just disable those
  • Collision breaks when going uphill

This is also just unfinished in general, need to make a way to "throw" paint, and a combat system, and swimming on walls.

RF Custom Textures

Retro Fueled textures are not compatible with SaveRAM, because they both take the same kernel memory.
This means RF textures can't be displayed when using CharacterRandomizer (newest version), and OxideFix (any version). RF textures also do not work in the japan version of CTR

Current issues with 60fps

Semi-functional patches

  • Particles are patched emitter-by-emitter, 231 emitters unpatched, should patch Particles_UpdateLists
  • Texture scrolling (turbo, waterfall, etc) run at 30fps
  • Bosses dont constantly spam weapons, but it's still not right
  • When opening Adv Hub door with key, zoom out should take 2 sec, not 1 sec
  • Blizzard Bluff + Sewer Speedway update hazards at 30fps
  • N Gin Labs barrel hazard runs at 30fps
  • Weapon roulette flashes too fast, but duration is correct
  • Shiled weapon shakes too much
  • Entering warp pad sometimes works right, and sometimes throws player upward
  • Blinking map UI, partly fixed and partly abandoned
  • AI animations
  • Player reverse, crash, jump animation
  • Spiders have a slightly-off cycle

Known issues

  • Steering angular acceleration isn't patched for 60fps (see Player_Steer_GetAngularVelocity)
  • Animations are half-working, half-fix
  • Flashing colors for player icons are too fast
  • Demo Mode only lasts half-time (even though it "should" be fixed???)
  • UI highlight (red/yellow) in menus is too fast
  • Demo Mode / End-Of-Race cameras sometimes are too fast
  • Adventure Garage camera is too fast
  • Adventure Hub Warp pad electric field
  • Lots of flashing text is flashing too fast
  • At end of Time Trial / Relic, high scores disappear halfway off-screen
  • AI acceleration from starting line
  • Screen fade transitions (fade to black, fade to white, etc.)
  • Red potion (fix disabled, freezes game)
  • Bubble particles fail to be culled by water surface (hits the top of the screen)
  • Still can't skip weapon roulette by pressing circle
  • Wumpa gets collected too quickly (code for this is in DrawHUD_Racing)

ModPack OxideFix and Everything Ever - Only USA Errors (no retrofueled)

Adventure mode is ubeatable due to errors in Rocky Road and Nitro Court purple token challenge, some nitros and every ? crates dont have collision, if you touch some nitros crashes the game or emulator, uncollectable multicolored crystal and invisible pits in the terrain, only in this modpack happens
image
image
image
one crate was breakable but the bomb crashed the game
image
Nitro Court
image
image
image
DED, not big surprise
image
this error date since Mod Collection Release 2 to the actual Mod Collection Release 11

How to build mods

After following all the steps from this, I placed the mod-builder tool inside the tools folder.

When I run (the build.bat command is wrong):

python ..\..\..\tools\mod-builder\main.py

it complains about not finding the settings.json:

DEBUG:_files:CWD Parent(x0): D:\asant\Desktop\CTR-ModSDK\mods\Modules\EngineSelect
DEBUG:_files:CWD Parent(x1): D:\asant\Desktop\CTR-ModSDK\mods\Modules
DEBUG:_files:CWD Parent(x2): D:\asant\Desktop\CTR-ModSDK\mods
DEBUG:_files:CWD Parent(x3): D:\asant\Desktop\CTR-ModSDK
DEBUG:common:FOLDER_DISTANCE: D:\asant\Desktop\CTR-ModSDK
DEBUG:common:CWD: D:\asant\Desktop\CTR-ModSDK\mods\Modules\EngineSelect
DEBUG:common:GAME_NAME: mods
ERROR:root:[Errno 2] No such file or directory: 'D:\\asant\\Desktop\\settings.json'
Traceback (most recent call last):
  File "D:\asant\Desktop\CTR-ModSDK\tools\mod-builder\main.py", line 207, in <module>
    main = Main()
           ^^^^^^
  File "D:\asant\Desktop\CTR-ModSDK\tools\mod-builder\main.py", line 33, in __init__
    self.nops.load_config()
  File "D:\asant\Desktop\CTR-ModSDK\tools\mod-builder\nops.py", line 17, in load_config
    with open(SETTINGS_PATH) as file:
         ^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'D:\\asant\\Desktop\\settings.json'

So I tried placing the EngineSelect folder inside the games/Example_CrashTeamRacing/mods folder inside the psx-modding-toolchain cloned repository but when I run the main.py and try to build I get the following errors:

WARNING:compile_list:directory D:\asant\Desktop\psx-modding-toolchain\games\Example_CrashTeamRacing\Patches\EurLibcrypt\src not found at line: 2: 1020, exe, 0x80031cc8, 0x0, ../../Patches/EurLibcrypt/src/libcrypt.s

ERROR:compile_list:Undefined symbol: DecalHUD_Arrow2D at line: 16: common, exe, DecalHUD_Arrow2D, 0x0, ../../Patches/FixAdventureModeCharacterSelectArrows/src/DecalHUD_Arrow2D.c


WARNING:compile_list:directory D:\asant\Desktop\psx-modding-toolchain\games\Example_CrashTeamRacing\Patches\FixAdventureModeCharacterSelectArrows\src not found at line: 16: common, exe, DecalHUD_Arrow2D, 0x0, ../../Patches/FixAdventureModeCharacterSelectArrows/src/DecalHUD_Arrow2D.c

ERROR:compile_list:Undefined symbol: CS_Garage_GetMenuPtr at line: 26: common, 233, CS_Garage_GetMenuPtr, -0x8, src/ES_hook233.s


ERROR:compile_list:Undefined symbol: CS_EndOfFile at line: 27: common, 233, CS_EndOfFile, 0x0, src/ES_233.c


ERROR:compile_list:Undefined symbol: MM_TrackSelect_Video_SetDefaults at line: 37: common, 230, MM_TrackSelect_Video_SetDefaults, -0x8, src/ES_hook230.s


ERROR:compile_list:Undefined symbol: MM_EndOfFile at line: 38: common, 230, MM_EndOfFile, 0x0, src/ES_230.c

Any help?

OverrideMPK breaks Pinstripe in Adventure Mode

When using OverrideMPK with AdvBosses or any other modpacks that have both, Pinstripe will fail to load the correct animation/model right after any podium and crash the game.

Pinstripe breaks after the first podium

Used just AdvBosses to play the first area, but Pinstripe with OverrideMPK will still breaks after podium in other areas too

So far I've only found this bug with Pinstripe, but it happens in all retail versions. The problem might lies with Pinstripes adventure mpk file.

2P Vertical Splitscreen bug

When using the warpball weapon, the weapon still moves on the horizontal midpoint, not the vertical midpoint

PracticeROM is broken

  • Crashes at main menu in NTSC-J
  • Save states don't work
    the latest commit (as of writing) changing PracticeROM was me trying to fix it failing to compile due to common.h changes, I guess I didn't entirely fix that

Oxide PAL bug

Oxide does not draw properly in the PAL character selection, but the rest of gameplay works fine

OnlineCTR: Less disconnections fix approach

Currently some people get disconnected "randomly" whether if the server is close or far away.

In my experience I even got disconnections from a localhost server, so most of the time it isn't ping related.

I edited the Client.exe to add a ping measurement to double-confirm this, and as seen here (and many more tests that I've made and also not published) I got disconnected without having a high ping:

image
Tested on MEX server

I got more disconnections adding some printfs() trying to simulate a little bit of slow down on the Client.exe behalf (in localhost).

Also started streaming something else while doing these tests and got even more disconnections (in localhost).

Despite these small hiccups that I added to the code and programs that consume some of my CPU, although this is the reason for the disconnections, it should not be.

It is the OnlineCTR mod that is too strict on the Client.exe on causing a disconnect if the game wasn't updated 4 frames:

This should at least make this less strict and make the game disconnect if it didn't get updated by the Client.exe for more than 4 frames, i.e. you can force a disconnection if it wasn't updated at least 30 frames.

60fps bugs

List of bugs is in a txt document, saved in the src folder of the 60fps mod.
Another txt document, list of fixes, describes some features "partially" fixed, that aren't perfect

Current issues with OxideFix

  • Oxide's character preview in the character select screen is displayed with
    the wheels that the other characters' karts have. These are to be removed in
    a future version of the mod.
  • Oxide's character icon in the character select screen flies into view from
    the left side of the screen as opposed to the bottom. It is yet unknown why
    this happens.
  • Oxide's model in the character select screen displays erroneously in the
    European version of the game. This is assumed to be due to how this
    functionality was achieved by a manual edit of Oxide's character model, and
    thus how model information may be read differently in the European version.
    More research on the game's model formats may be required to fix this issue.

Release 5

Must rebuild all XDELTAs for all mods that use:

  • character randomizer (now uses SaveRAM)
  • oxide fix (with updated SaveRAM)

RF mod packs were not updated, because the new SaveRAM breaks RF.
The only way to crash the game is something completely insane, like RF + 2P Arcade Cups + Randomizer all at once

Oxide all-region bugs

Mystery Caves can crash randomly, reason unknown

Purple Gem Cup podiums can run out of RAM, red screen of death, could be improper model loader

Download link on website just links to a discord instead of a download link

<a class="brz-a brz-btn brz-css-yBh2y brz-css-k0BVs" href="https://discord.gg/ZWaZhmzqJ5" target="_blank" rel="noopener" data-brz-link-type="external" data-brz-custom-id="jrYjTn0vXlsq">
   <span data-brz-translate-text="1" class="brz-span brz-text__editor" contenteditable="false">Download Patch</span>
</a>

If you look at the html for the website it only links a discord when you try and download the game.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.