Skip to content

Developer instructions

snouz edited this page Aug 7, 2024 · 11 revisions

Build & Contribute

  • Use Visual Studio Community (2019 or above). Install .NET dev tools when prompted.
  • Install .NET Framework 4.7.2 SDK.
    • .NET Framework 3.5 SP1 SDK is available as a component of Visual Studio. See next step.
  • In Visual Studio, install ".NET Framework 3.5 Development Tools" & "Visual Studio Tools for Unity" (in Tools > Get Tools and Functionalities > Individual Components <>)
  • Make a fork of the project and download it locally.
  • Open Powershell as administrator and execute Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine
  • Change directory to your Memoria Fork download location and run powershell script .\SetupProjectEnvironment.ps1
  • Once you've committed your changes to your fork, make it a Pull Request to the main repository.
  • I recommend Github Desktop for easy push to repository.

Scripting

  1. Make a copy of an existing item from the "StreamingAssets\Scripts" folder.
  2. Change a namespace to your own.
  3. Make some changes.
  4. Run Memoria.Compiler.exe from the "Compiler".
  5. Run the game, test what you need and see Memoria.log and output_log.txt for errors.

Now you can change mechanics of battle actions. In the future, I will add more scriptable entries. Also, you can use a Visual Studio project from the "Project" folder. It will load every .cs file from the "Sources\Battle" folder. Be careful - future updates could remove your changes. Please make your own copies if it possible. https://www.youtube.com/watch?v=cU4T3GSIjxs

Restrictions

  1. Please don't change any data that can be sent to the game server! We don't want any trouble. (e.g. Saves sent to steam cloud, achievements)
  2. Don't change a serializable data that can be deserialized by the Unity Engine. The game will crash or corrupt.

Installing required tools to be able to Debug.

If your trying to run the game in debug mode you need to make sure you have the "Visual Studio Tools for Unity" installed,

  1. Open "Visual Studio Installer"
  2. Click "Modify" on the Visual Studio's version your using for the Memoria Project.
  3. Click "Individual components"
  4. Search for "Unity"
  5. Tick the checkbox for "Visual Studio Tools for Unity" & "Unity Hub"
  6. Click the "Install while downloading" or "Download All, Then Install" button in the bottom right.
  7. Wait for installer to complete.

Debug

  • After first running the game, you should see "Memoria.ini" in the game directory.
  • If something went wrong, there should be errors in "Memoria.log".
  • If you can't see "Memoria.log", try running the game with administrator rights.
  • "Sharing violation on path" error: close applications holding the file.
  • "at Memoria.CsvReader.Read" error: delete files in (game)\StreamingAssets\Data and patch again.
  • "at Memoria.ScriptsLoader.Initialize" error: delete files in (game)\StreamingAssets\Scripts and patch again.
  • If an error persists, check "\FINAL FANTASY IX\x64(or x86)\FF9_Data\output_log.txt".

Connect Debugger to Memoria

  • Launch Memoria via Steam
  • Check the "Debuggable" checkbox in the Launcher and press Play
  • You will get an notice box saying you can now attach
  • Attach to the game process:
    • In Visual Studios with Project open, select Debug > Attach Unity Debugger
    • Select the Process from the Table List View image
    • Click OK, it should request firewall access

If you have "Unity_data" missing popup error, or "access refused" console message:

  • in Visual Studio, right click on Memoria.debuggable project, compile it
  • Copy the content of \Output\Debuggable\x86 in \Final Fantasy IX\x86

Github best practice to contribute

Github best practice to contribute