Posted By: binsky33333
Own File system - 04/27/09 22:10
Would it be possible to create your own file type in zip or rar format, then have the engine read it and use the files from it, which would be models and code?
Posted By: Ralph
Re: Own File system - 04/27/09 22:31
It is possible, but dont ask me how to do that.. if you have good scripting skills try it, but if you just beginning with scripting forget it!
Im actually working on something like this, but I cant find a good way to get the files back to the engine.....
Posted By: binsky33333
Re: Own File system - 04/27/09 22:38
Im guessing you just use file_open_read. Then somehow set it up so it can read models and code etc from it.
Posted By: Damocles_
Re: Own File system - 04/27/09 22:45
A simple way would be if you could write an external function, wich extracts all
the files at runtime to a folder where 3dgs can read it, and erases them after the game
exits.
Posted By: EvilSOB
Re: Own File system - 04/27/09 22:52
I cant remember where I found it, but do a DEEP search through these forums for
"super_simple_file_packer.zip" by "thomas oppl" or something similar. (maybe the wiki too?)
It uses a single 33k DLL called "zlib1.dll"
Sorry I cant remember better than that. I dont know what type of compression it uses,
but it is capable of multiple degrees of compression, and matching de-compression.
Password locking and/or encryption was in there, Im sure.
And, most importantly, comes with lite-c code to use it.
I remember the thread has quite a discussion about it, and varying ways of utilising it.
I think it was free-ware too.
Hope this is of some help...
Posted By: binsky33333
Re: Own File system - 04/27/09 23:00
Ok thanks a lot, ill do some looking around!
Posted By: binsky33333
Re: Own File system - 04/27/09 23:04
I found it, it is on this page
http://www.coniserver.net/wiki/index.php/Pluginssadly A7 is not supported.
Posted By: EvilSOB
Re: Own File system - 04/27/09 23:06
Kewl, Ive never actually used it, but Ive got it in my library of "useful stuff"
because I am pretty sure I'll want to use it.
Thanks for the link too.
Posted By: binsky33333
Re: Own File system - 04/28/09 00:00
Actually scratch it doesnt work with A7, i just got it to work!
nvm it doesnt.
Dang!
Posted By: Quad
Re: Own File system - 04/28/09 00:07
i remember that i played around with ventilators simple file packer, it was working pretty nice for me.
Posted By: binsky33333
Re: Own File system - 04/28/09 00:46
Any Links anyone?
Also it looks like i might be able to use file_cpy because it looks like it can use .pak files. Here is an example.
// unpack a packed a text database file from the game resource
file_cpy ("database.txt","database.pak");
Copies or unpacks the file "srcname" to the file"destname". The source file "srcname" will be searched first in the SAVEDIR folder, then in the game folder. If it isn't in both, but ends with ".pak", it will be also searched in the .wrs resource-files. This way a file within a resources can be unpacked and renamed with it's original file ending. If there already is a file with the name"destname" in the SAVEDIR folder, it will be written over.
Anyone know how i could do this?
Thanks!
Does anyone know, why the simple file packer dont run with A7?
Because i can pack with it many files. But if i want to unpack it, the engine says "Bad file format".
Sorry, i dont finde the original post of it.
Perhaps, Thomas Oppl can help on this?