Possibility of a function to scan for a specific file placed next to game's exe

Godot Version

4.3

Question

Hello! So I am currently interested in modding a game that is made in Godot 4.3, but does not have mod support. Therefore, the modded game would have to be compiled as it’s own seperate exe. I spoke to the developer of the game to ask if he was okay with this, and he said if I was able to find a way to have the modded game scan for files relating to the original game, he would be okay with it. So I am here to ask, is this something that is currently possible with Godot? Would I maybe be able to ask the game to scan for the original game’s exe on launch, and only launch if said exe is confirmed to exist within the same folder? Thank you!

1 Like

Yes you can use OS.get_executable_path() to find the global path of the game executable, this doesn’t work well in-editor as it will return the editor’s path. It’s inteded to work for exported games.