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

Handling imported files #7

Closed
1 task done
KANAjetzt opened this issue Jan 3, 2023 · 2 comments
Closed
1 task done

Handling imported files #7

KANAjetzt opened this issue Jan 3, 2023 · 2 comments
Labels
refactor / cleanup Improves readability or maintainability

Comments

@KANAjetzt
Copy link
Collaborator

  • Try out the .import folder at root of mod folder approach
    • That would save use from rewriting the .import files

image

  • Works fine 👌

image

  • Now do we want to add the mods import files right into the games .import folder.
    Or keep it separated and close to the mod folder?
  • I think it’s fine to copy them in the base .import folder
    • It’s the default spot for imported files
    • The files are hashed so there should be no overwrite issues?
    • Whit that we just need to copy the files into the mods .import and don’t have to mess with rewriting the .import file of each import.
@KANAjetzt
Copy link
Collaborator Author

Just for reference here is the first / current approach
  • Check if there is a _import folder in the root of the mod folder

  • Copy everything inside the import folder into res://.import

  • I forgot about this part 😅

This file system is read-write only when running the project locally from the editor. When exported or when running on different devices (such as phones or consoles, or running from DVD), the file system will become read-only and writing will no longer be permitted.
[*https://docs.godotengine.org/en/stable/tutorials/scripting/filesystem.html#resource-path*](https://docs.godotengine.org/en/stable/tutorials/scripting/filesystem.html#resource-path)

  • So the only option then is to rewrite the .import files?

Rewriting the .import files

[remap]

importer="texture"
type="StreamTexture"
path="res://.import/CheckedBox.png-2de33354470b091a4ff1e85a8aa8163f.stex"
metadata={
"vram_texture": false
}
  • Search mod directory for .import files
  • Open File
  • Replace path with “res://modFolderName/_import/filename.something”
  • Save File
  • ez

@KANAjetzt
Copy link
Collaborator Author

Closed by #10

@ithinkandicode ithinkandicode added the refactor / cleanup Improves readability or maintainability label Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor / cleanup Improves readability or maintainability
Projects
None yet
Development

No branches or pull requests

2 participants