Hey I was looking in the manual and came across the multifile section. From there I thought I could use it as a patch system for my game. I’m almost to that point where I need to get it to work but i’m having some problems understand how it works. As of right now I can add items but I cant seem to be able to take items out (extract) or read whats in the .mf file.
I know i’m doing it wrong but this is what I thought how to do it.
from pandac.PandaModules import Multifile
mf = Multifile()
mf.openRead("game.mf")
for i in mf.getNumSubfiles():
barIdx = mf.findSubfile(i)
if barIdx != -1:
print mf.readSubfile(barIdx)
mf.extractSubfile(i, mf.getSubfileName())
Usually you wouldn’t extract files out of it, rather mount it to a virtual dir (e.g. /mf/) and then directly load stuff out of it, e.g. using loadModel("/mf/model.egg").
The model won’t really be in the /mf/ location, but to Panda, it will be.