-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loading bitmap files outside Data folder #193
Comments
I managed to load the external images by moving the mods directory to Data, but it is still an inconsistency between the engines. So I will leave the issue open. |
Can you isolate a test case where mkxp doesn't load a Bitmap correctly? |
Here it is: https://github.com/JoaoFelipe/mkxp-issue193 class Bitmap
alias_method :old_initialize, :initialize
def initialize(*args)
if args.size == 1
result = args[0]
if args[0] == "Graphics/Titles/TitleBG"
result = "#{Dir.getwd}/TitleBG.png"
end
args[0] = result
end
old_initialize(*args)
end
end It basically overrides the The |
I can reproduce it. It seems to be a bug (since you say it doesn't fail on Game.exe). For now, just remove # replace
result = "#{Dir.getwd}/TitleBG.png"
# with
result = "TitleBG.png" I think this is because PhysFS (or Filesystem object) is not searching in absolute paths. |
I haven't tested yet, but this is a strong contender for the issue. @JoaoFelipe Is there a reason you need to prefix the path with the absolute current directory? mkxp always resolves paths to assets (bitmaps, music) relative to the game directory, so it should work even if you're outside the |
Hi, I'm developing a translation system for Rakuen that replaces game images by translated images in a distinct directory (outside Data): https://github.com/JoaoFelipe/rakuen-translation/blob/f999882557bf085f2456fe6ca22c4f77f300fc40/mods/translation/languages.rb#L315
It works on rpg maker engine, but when I try to execute it with mkxp, it doesn't find the file, but states the right path. Is this a mkxp limitation? Any suggestions on a workaround?
The text was updated successfully, but these errors were encountered: