Skip to content
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

New Flag - SkipIndexJSON || --web-skipindexjson #3308

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jetrotal
Copy link
Contributor

@jetrotal jetrotal commented Dec 5, 2024

Skip the validation from index.json when load images (Web Build).

Skip the validation from index.json when load images (Web Build).
@github-actions github-actions bot added the Settings All about customizable features, storing and applying them label Dec 5, 2024
@jetrotal
Copy link
Contributor Author

jetrotal commented Dec 5, 2024

After some testing

image
By disabling the json check, I can upload files to FS and load them.
Some DL errors appears, due to the confusion between whats inside JSON and what's inside FS.

As soon as easyRPG displays an image, its cached and can't be changed.
I wonder if a better approach would be learning what's the difference between loading pictures,
and loading text from the save folder

@Ghabry
Copy link
Member

Ghabry commented Dec 5, 2024

not a fan of this flag. Feels like a hack.

Instead how about checking if there is a file in the filesystem and when the file exists simply skip the download instead?

But this proper solution needs much much much more work:

  • The AsyncHandler does not know about the file type yet, so cannot execute FindFile yet to figure out the possible extensions
  • Needs a solution for translations: They work by clearing the cache and refetching stuff. The files are still in the filesystem. So checking first if they are in the filesystem breaks the fetching of different translations 🤔
  • Export the Invalidate FileSystem Cache function to emscripten so new files become visible
  • Create a function for deleting single items from the bitmap cache because you want to swap images...

@jetrotal
Copy link
Contributor Author

jetrotal commented Dec 6, 2024

@Ghabry I suspect a good system for loading external data already exists in string variable's .TXT files

Why it can load anything through the /Save/ folder? can I make something similar for other files?

@Ghabry
Copy link
Member

Ghabry commented Dec 6, 2024

The only reason why loading from Save works for Text is that Maniac Patch supports writing of text files and I'm against overwriting game files, so all write operations are redirected to the Save directory. So it must also read from the Save directory.

(of course protection is useless when Gamedir == Savedir)

@jetrotal
Copy link
Contributor Author

jetrotal commented Dec 6, 2024

A flag like this could work for me:
--Allow-assets-from-Save

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Settings All about customizable features, storing and applying them
Development

Successfully merging this pull request may close these issues.

2 participants