RhenaudTheLukark / CreateYourFrisk

Rhenaud The Lukark's Unitale fork
GNU General Public License v3.0
132 stars 56 forks source link

Linux build cannot run RTLGeno in CYF v0.6.5 #100

Closed LucasCTN closed 2 years ago

LucasCTN commented 2 years ago

Describe the bug When running RTLGeno in Linux, the battle screen appears, and in less than a second an error screen appears. It is possible to see the character and the UI very briefly before crashing.

The error is:

error in script RTLGeno
libfunc_require:(line 12, char 1-44): module 'Animations/lukark_anim' not found

The file /CYF.v0.6.5.-.Linux.64-bit/Mods/RTLGeno/Lua/Animations/Lukark_anim.lua exists in the folder, despite the error.

Running the Windows version on Linux through wine makes the mod work as intended.

This was tested in the v0.6.5, with the 64 bit version. It probably loads the encounter correctly, and crashes when the initial animation is about to play.

It looks like all other encounters bundled in CYF work correctly, including the Animation Example Encounter with Sans.

To Reproduce Steps to reproduce the behavior:

  1. Download CYF.v0.6.5.-.Linux.64-bit.zip
  2. Open CYF and select RTLGeno
  3. Error screen appears

Expected behavior The encounter should load.

Screenshots Captura de tela de 2021-10-10 15-59-04

Setup (please complete the following information):

DimitriBarronmore commented 2 years ago

This is actually a well-known difference between Linux and Windows and how each one deals with files. Filepaths in Linux are case-sensitive, whereas filepaths in Windows are case-insensitive. As such, when the mod searches for "lukark_anim.lua" Windows CYF is able to find the file Lukark_anim.lua but Linux CYF is not. Wine, for compatibility purposes, naturally retains the case-insensitive system.

The reason this issue with RTLGeno has never been fixed, I suspect, is simply because no one has paid any real attention to it in a very long time.

LucasCTN commented 2 years ago

This is actually a well-known difference between Linux and Windows and how each one deals with files. Filepaths in Linux are case-sensitive, whereas filepaths in Windows are case-insensitive. As such, when the mod searches for "lukark_anim.lua" Windows CYF is able to find the file Lukark_anim.lua but Linux CYF is not. Wine, for compatibility purposes, naturally retains the case-insensitive system.

The reason this issue with RTLGeno has never been fixed, I suspect, is simply because no one has paid any real attention to it in a very long time.

This makes a lot of sense, thank you. I wanted to solve the issue, but I'm kinda stumped in what would be the best solution:

I'm leaning on the second one. What do you all think?

RhenaudTheLukark commented 2 years ago

I'm fixing this as we speak, as well as giving RTLGeno a look over. My next commit should fix this problem!

RhenaudTheLukark commented 2 years ago

As for the other mods, I feel like forcing the case-sensitiveness of paths is the better idea, unless idea n°1 is easier to implement. Might as well force users to connect their paths right from the beginning if they plan to keep going with programming.