Game Engine Standalone: External Files?

Hello, I was hoping someone could help me with this:

I made a “character creator” game in Blender. Now I want to export the game as a standalone. However, there are some external paths in my code (For texture swap), and those don’t work in the standalone, so some of the textures don’t show up. Everything works fine in Blender, just not in the exported file, making my gryphon character look just a little scary. Does anyone know a solution/workaround? Is it possible to pack the external files/paths in the exported file?

Thanks in advance.

File->External Data->Pack into .blend

After, you should always use: Automatically pack into .blend.

Thank you, but this doesn’t help either, as i can’t pack the external images (which aren’t in the .blend, only in the code) like this…

Can you somehow use the texture slots instead of the direct image path? This would then allow you to pack the images into the .blend. Otherwise add your images as textures, pack them into the .blend and under each packed texture is the source to where it has been saved.

If you’re using a symlink it’s probably in the wrong working directory.
Try running this when the game starts before any images are loaded:

import os
import bge

os.chdir(bge.logic.expandPath('//'))

If that’s not it, there might be something wrong with the paths. In that case you might upload an example for us to dig through.