Cross Compatibility Guide - theLeaxx/JaLoader GitHub Wiki

Introduction

You may want users to play with your mod, regardless if they use Jalopy 1.0 or 1.105. Starting with JaLoader 3.5.0, this is now possible!

Guide

1. Project Setup

Before getting to work, you should downgrade your game to 1.0. After that, you need to add a few extra references to your project. These are:

  • JaLoaderUnity4.dll
  • Assembly-UnityScript.dll
  • Assembly-UnityScript-firstpass.dll
  • UnityEngine.dll

You may need additional assemblies based on your mod, but these are usually mandatory.

2. Creating a new file/script

Mods for Jalopy 1.0 utilize a different script base class. To keep your code organized, you can make a new C# script, and inherit it from the ModUnity4 base class. The declarations (ModID, ModName, etc) and functions (EventsDeclaration, etc) are the same, so those can be copy-pasted from your normal mod.

3. Code Migration & Game Scripts Renaming

It's now time to adapt your existing code for 1.0:

  • Transfer your mod's logic: Move the core functionality of your mod from your existing script to the newly created one
  • Script reference adjustments: Pay close attention to script references. In Jalopy 1.0, script names differ slightly from the newer versions. Here's a general guide:
    • Remove the "C" suffix from script names (ex. MotelLogicC -> MotelLogic)
    • (sometimes) Convert the first letter to lowercase (ex. MainMenu -> mainMenu)

4. Error checking & testing

  • Compile and check for errors
  • In-Game testing: Load your mod in both Jalopy versions to verify its functionality and address any issues

Notes

  • AssetBundles are not cross-compatible! You will need to create new AssetBundles for Jalopy 1.0, with Unity 4. Unity 4 is not only hard to find, but also impossible to open nowadays, since it cannot connect to the license servers.
  • Harmony patches may not work correctly!