Skip to content

Instantly share code, notes, and snippets.

@jonathan-irvin
Created June 19, 2023 00:24
Show Gist options
  • Save jonathan-irvin/2d72a19ee833973dbb60c0e15513f688 to your computer and use it in GitHub Desktop.
Save jonathan-irvin/2d72a19ee833973dbb60c0e15513f688 to your computer and use it in GitHub Desktop.
Dinkum Assets

Tools Required

  1. Unity 2020.3.17f1 - Loads the project for viewing.
  2. Asset Ripper - Rips the game's assets.

Instructions

  1. Download and install the above tools.
  2. In Asset Ripper, open your Dinkum installation folder and export all files to an empty folder.
  3. Once exporting is complete, open Unity 2020.3.17f1 and load the "ExportedProject" folder created by Asset Ripper.
    • If prompted to enable "Safe Mode", choose "Ignore".
  4. Once fully loaded, open the "Assets\Monoscript" folder in the project explorer, and delete the "Unity.Input System" folder.
  5. At the top of Unity's interface, open Window -> Package Manager.
    • Near the top left of the window that opens, make sure "Packages" is set to "Unity Registry".
    • Click refresh at the bottom.
    • Select and install the "Input System"
    • Select and remove the "TextMeshPro" and "Timeline" packages.
  6. Close and re-open Unity to fix some reference errors. (Ignore safe mode)
  7. Make sure the console is visible on the bottom left of the Unity interface, and fix the following errors in order:
    • Double click on an error to have that file open in your IDE.
    • Use the given line# inside the parenthesis for reference.
    • Save each file and return to Unity after each change to allow errors to update.

Code Modification

  1. Remove lines of code containing "002Ector" that are causing errors. (x2)
  2. Remove the TextMeshPro function that is causing an error. (5 lines, starting with [SpecialName])
  3. Remove "{IsReadOnly]" lines of code that are causing errors. (x5)
    • More errors will appear as you do this, keep scrolling through them and removing the IsReadOnlyAttribute ones.
  4. There are many methods where "public override" needs to be changed to "protected override".
    • You can do this quickly using regex find and replace through your IDE.
    • In Visual Studio, for example:
      • From the start page, Open a local folder
      • Choose the ExportedProject folder
      • Press Ctrl-Shift-F to open the Find and Replace window
      • Choose Replace in Files tab
      • In the Find field, type: (public) (override \w+ (?:Serialize|Deserialize)SyncVars)
      • In the Replace field, type: protected $2
      • Tick the "Use regular expressions" checkbox
      • Click the "Replace All" button (Mine found 72 occurrences that got replaced.)
      • Click Ok, close the Find and Replace window, and save all files.
  5. When told there is an API update required, choose "I made a backup. Go ahead!"
    • Wait for a moment for it to process.
  6. The next error is "The operation overflows...", in the GetHashCode method.
    • This can be fixed by wrapping the multiplication inside unchecked: return (unchecked(237921948 * -1521134295) + ...
  7. Allow Unity to finish updating the API, and loading the rest of the assets.
  8. Go to File -> Open Scene and open scene1.unity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment