Skip to content

qbane/ONI-Mods

 
 

Repository files navigation

About this fork

tl;dr. The author did some extreme trial-and-error to finally successfully port the mod to Linux. The hard work deserves a fork.
See the original discussion thread for details.

Instructions on building your own font asset bundles

Section 1: Generating a font asset

  1. Install Unity 2018.x (should be on Windows).
  2. Create a new project with TextMesh Pro (its version must be v1.2.x) package.
    The package manager can be found in Windows > Package Manager.
  3. Add your font file as an asset.
  4. Navigate to Windows > TextMesh Pro. Import the TMP Essentials and create a font asset there.

Section 2: Generating an asset bundle (OS-dependent)

  1. Depending on the operating system you are going to support:

    • Windows: Continue to use the project in Section 1.
    • Linux/macOS: Either (a) in Unity, install the OS X build support module, or (b) prepare a separate Unity 2018.x environment with the specified TextMesh Pro version on either Linux or macOS.
      The generated file seems to be interchangable at least for now, thus the generic named font file in this repository.
  2. Install Asset bundle browser (v1.7.0). Navigate to Windows > Asset bundle browser.

  3. Import the generated font asset in Section 1.

  4. (Optional) If on non-Windows OS, click the little triangle on your newly-created asset. Change the shader of its material to "TextMesh Pro/Mobile/Distance Field". This step is optional, since its shader will be dropped at runtime.

  5. Drag the asset to the Configure panel.

  6. In the Build panel, select the platform of the form "[YOUR_CURRENT_OS] Standalone 64" and build.

  7. The result will be at /Asset Bundles/[PLATFORM]/[ASSET_NAME] under your project directory.

Some (unsolved) caveats

  1. The chosen graphic API affects the build. Seems that OpenGLCore can generate a supported shader on Linux, it renders glyphs incorrectly with flooding error messages "OpenGL Error: Invalid texture unit!". Using mobile shader does not work either.
  2. In CS-469300, the same asset bundle can be used in all three platforms. This is no longer the case after A Breath Of Fresh Air Update.

Tested fonts

  1. Noto Sans CJK TC (NotoSansCJKtc-Regular): https://github.com/miZyind/ONI-Mods (Upstream)
  2. jf open 粉圓 (jf-openhuninn): https://github.com/dershiuan/ONI-Mods

The original README goes below.


miZyind's ONI Mods

ONI Unity Visual Studio .NET C#

🔮 Tested Game Version

  • FA-471883-B & EX1-S14-471883-S
  • CS-469300 & MD-469473 & EX1-S13-469473
  • CS-460672 & EX1-S10-461546
  • CS-455509 & EX1-S8-455425
  • CS-449460 & EX1-S6-449549
  • CS-444111
  • AP-410209
  • AP-399948

🙏 Thanks To

💠 Development Environment & Tools

  • ILRepack >= 2.0.x
  • PLib >= 4.2
  • Harmony >= 2.0.x
  • .NET Framework = 4.7.1
  • Unity = 2018.4.14f1
  • TextMesh Pro = 1.2.3
  • Visual Studio 2019
  • Asset Studio GUI
  • Asset Bundle Extractor
  • dnSpy

🗂 Mod List

Name Description
Traditional Chinese Adds Traditional Chinese translation and font.

🖋 Author

miZyind mizyind@gmail.com

📇 License

Licensed under the MIT license.

About

qbane's fork for miZyind's ONI Mod "正體中文字體用語翻譯包"

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 99.2%
  • Shell 0.8%