tipforeveryone Posted October 14, 2019 Share Posted October 14, 2019 I use ifstream to read a file which I used to save some configuration data ifstream weaponData("Data/Weapons.dat"); while (weaponData >> configVariable1 >> configVariable2 > ...){ //Some code } I included *.dat files in to publish process and I got them in data.zip succesfully. But it seems published game can not read those files. But if I create a same folder structure outside zipped package, my game can read it normally How can I use ifstream to read files in zipped package ? Quote Link to comment Share on other sites More sharing options...
Josh Posted October 14, 2019 Share Posted October 14, 2019 You cannot read files from encrypted zip files. Otherwise the encryption would be pointless because you could just read anyone's game data! Keep those files in your game folder instead of in a zip package. 1 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
reepblue Posted October 14, 2019 Share Posted October 14, 2019 I had a similar issue once. I even thought of I used the engines stream functions, it would allow me to access my files within the zip files, but nope. You could try to rename the file as a Lua file and phrase it as a standard text file. I did something like this in Luawerks. Josh, hopefully you are thinking about this when it comes to the new engine. I'm sure people would want to package file formats that they are using with the new plugin feature. Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Josh Posted October 14, 2019 Share Posted October 14, 2019 You could also just put the files in an unencrypted zip. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
gamecreator Posted October 14, 2019 Share Posted October 14, 2019 I thought you could also put them into and encrypted (password-protected) zip and read them (your own, not one Leadwerks creates): https://www.leadwerks.com/community/topic/17491-loading-from-the-encrypted-data-file/?do=findComment&comment=113628 Quote Link to comment Share on other sites More sharing options...
Josh Posted October 15, 2019 Share Posted October 15, 2019 15 hours ago, gamecreator said: I thought you could also put them into and encrypted (password-protected) zip and read them (your own, not one Leadwerks creates): https://www.leadwerks.com/community/topic/17491-loading-from-the-encrypted-data-file/?do=findComment&comment=113628 Yes, that is correct. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.