Jump to content

Exploring of SetZipStreamPassword()


VeTaL
 Share

Recommended Posts

I saw some threads about this problem, but still cant find clear solution.

 

Okay, lets rock:

1) Created new project with Project Wizard in "Z:/fps", launched - thats ok.

 

2) Change AbstractPath to

RegisterAbstractPath("Z:/fps");

Launched - get a crach - thats ok.

 

3) Moved shaders.pak to Z:/fps - now i get level without textures - thats ok.

1308481623-clip-32kb.jpg

 

4) Created folder Z:\fps\Content\ and moved there

cobblestones.dds

cobblestones.mat

cobblestonesdot3.dds

Now i got normal level... you saw that picture hundreds time, so i wouldnt post it here :rolleyes:

 

5) Now i zipped Content folder with "Store" method (also tested "Normal" and "Best" they all works fine) and without passwords. Important thing is to check ZIP format to archive. Rename Content.zip to Content.pak - this works nice.

 

6) Last step is to make new Content.pak with password. I made it with password "12345", then i add in engine

SetZipStreamPassword("Content.pak","12345");

And it works ok again.

 

7) Last step is to test different passwords for different archives.

I make pak1.pak with cobblestones.dds and cobblestones.mat with password "12345"

and pak2.pak with cobblestonesdot3.dds with password "123456"

Next is to add

SetZipStreamPassword("pak1.pak","12345");
SetZipStreamPassword("pak2.pak","123456");

And it works ok.

 

PS: this post is written in step-by-step style, i hope this will clear up for others in a future(when this "manual" will be finished), how to work with packages.

 

PPS: ONE MORE IMPORTANT THING: path should be "../Content", not "..\Content"

Working on LeaFAQ :)

Link to comment
Share on other sites

You must select ZIP format in WinRAR.

If you open your Content.pak with WinRAR and press in the Info button it says that your pak file is a RAR archive, and LE2 can only read ZIP archives.

You can select ZIP + Best packing, no need to use store.

And then abstract::cobblestones.mat works.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

  • 3 weeks later...

Again the same trouble...

 

Added usual Light folder to Content.pak which is renamed ZIP-file. Password is 12345

 

Got in console

Loading model "zip::z:/fentinor/content/content.pak//light/directional/light_directional.gmf"...

Loading mesh "zip::z:/fentinor/content/content.pak//light/directional/light_directional.gmf"...

Zip data error

 

Added

SetZipStreamPassword("Content.pak","12345");

to different places in code - no effect :)

 

wth...

Content.pak

Working on LeaFAQ :)

Link to comment
Share on other sites

i have 5 folders: Models, Maps, Sounds and so on... wanted to compress them in one pak - get "zip error"

Wanted at least to compress Models - the same error again 0_0

 

tried to rename to

SetZipStreamPassword("Models.pak","12345");

all the same :)

Working on LeaFAQ :)

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...