ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Fri Dec 15, 2017 12:12 pm

All times are UTC




Post new topic  Reply to topic  [ 63 posts ]  Go to page Previous 1 2 3 4 Next
Author Message
PostPosted: Mon Nov 06, 2017 3:39 pm 

Joined: Sun Nov 05, 2017 2:06 am
Posts: 20
..


Last edited by hardrock on Thu Nov 09, 2017 1:33 am, edited 1 time in total.

Top
   
PostPosted: Mon Nov 06, 2017 5:59 pm 

Joined: Fri Oct 27, 2017 7:36 pm
Posts: 34
heck. redone.


Last edited by episoder on Tue Nov 07, 2017 6:01 pm, edited 2 times in total.

Top
   
PostPosted: Tue Nov 07, 2017 2:50 am 

Joined: Sun Nov 05, 2017 2:06 am
Posts: 20
can you zip that & upload pls...
when i drag & drop it close without showing anything in cmd..& it doesn't get imported


Top
   
PostPosted: Tue Nov 07, 2017 3:03 am 

Joined: Sun Nov 05, 2017 2:06 am
Posts: 20
i know it'sdrag & drop but nothing happening..
when i double click qbms.bat it says ~p1 doesn't exist.
Do you want to create it from scratch(y/N)?


Top
   
PostPosted: Tue Nov 07, 2017 3:18 pm 

Joined: Fri Oct 27, 2017 7:36 pm
Posts: 34
no. or... yes i should maybe scratch that thread here. if it doesn't execute at all make sure the bat-file and quickbms are all in that file folder. i don't search for any pathes or files. and... the script works that way that it reads the internal filenames from the fsh you drag. and imports only existing mofidied files in that folder and writes those in this fsh file if they are compliant. and no new file is generated. that is functioning correct. i found no better way without rewriting and renaming all that files (can modify the opened and read locked source file?). to check if it overwrote something you can read the file modification date of the fsh.

or should i really make it idiot proof. do everything for you? wtf. you sound like an authist or a total idiot. sorry. :D


Top
   
PostPosted: Tue Nov 07, 2017 4:49 pm 

Joined: Sun Nov 05, 2017 2:06 am
Posts: 20
everything works except the importing part, when i drag drop, nothing happens, no errors, no success report., it opens & close..files are in same folder.
this is last one,,
pls just upload the script and qbms.bat....
you have my file you can check and upload the script and .bat for me, once and for all,.
you're clever guy, I'm not that much, that is why I'm asking for help..everyone ain't like you.


Top
   
PostPosted: Tue Nov 07, 2017 5:37 pm 

Joined: Fri Oct 27, 2017 7:36 pm
Posts: 34
yeh. i refuxed it. you gotta choose the fsh file you wanna repack and it outputs a _repack.fsh now. renaming the output is your problem.

input and modified pvrs all gotta be in the same input folder - no way around that found. output folder can be different.

fsh_repack.bms

Code:
log memory_file 0 0      ; reout

get fsize asize 0
log memory_file 0 fsize 0   ; copy input

get fsig long memory_file
if fsig != 1229998163
   print "not a fsh file"
   exit
else
   get osize long memory_file
   get files long memory_file
   get gsig long memory_file

   for file = 0 < files
      getdstring iname 4 memory_file
      get offset long memory_file
      savepos fpoint memory_file
      goto offset memory_file
      get nn byte memory_file
      get size_payload threebyte memory_file
      goto 0xc memory_file seek_cur

      string iname + .pvr
      open fdse iname 1 exists
      if exists = 0
         print "%iname% missing - skipped"         ; noexit skip
      else
         get psig long 1
         if psig != 55727696
            print "%iname% is not a valid pvr file"      ; noexit skip
         else
            goto 0x2c 1 seek_cur         ; skip pvr header
            get size_meta long 1
            goto size_meta 1 seek_cur      ; skip meta
            savepos ipoint 1
   
            get isize asize 1
            xmath fit "isize - ipoint"
            math size_payload - 0x10         ; minus header
            if fit <= size_payload
               math fit >> 2            ; speed. blocks align @long
               for transfer = 1 to fit         ; source dependant. fsh payload
                  get data long 1         ; got a 0x10 padded 'safe zone'
                  put data long memory_file
               next transfer
            else
               print "%iname% is too large to inject"   ; noexit skip
               print "%fit% > %size_payload%"
            endif
         endif
      endif
      goto fpoint memory_file                  ; next file
   next file

   get oname filename 0
   string oname -= 4
   string oname += _repack.fsh
   log oname 0 fsize memory_file
endif


tell me that this works now. :)


Top
   
PostPosted: Wed Nov 08, 2017 1:18 am 

Joined: Sun Nov 05, 2017 2:06 am
Posts: 20
..


Last edited by hardrock on Thu Nov 09, 2017 1:34 am, edited 1 time in total.

Top
   
PostPosted: Wed Nov 08, 2017 2:29 am 

Joined: Sun Nov 05, 2017 2:06 am
Posts: 20
Thank YOu!!!1

We can End this now!!!!


Last edited by hardrock on Thu Nov 09, 2017 1:34 am, edited 1 time in total.

Top
   
PostPosted: Wed Nov 08, 2017 7:15 pm 

Joined: Wed Sep 06, 2017 12:37 pm
Posts: 29
How pvr to fsh again ? Please script please


Top
   
PostPosted: Thu Nov 09, 2017 12:25 pm 

Joined: Wed Sep 06, 2017 12:37 pm
Posts: 29
episoder wrote:
yeh. i refuxed it. you gotta choose the fsh file you wanna repack and it outputs a _repack.fsh now. renaming the output is your problem.

input and modified pvrs all gotta be in the same input folder - no way around that found. output folder can be different.

fsh_repack.bms

Code:
log memory_file 0 0      ; reout

get fsize asize 0
log memory_file 0 fsize 0   ; copy input

get fsig long memory_file
if fsig != 1229998163
   print "not a fsh file"
   exit
else
   get osize long memory_file
   get files long memory_file
   get gsig long memory_file

   for file = 0 < files
      getdstring iname 4 memory_file
      get offset long memory_file
      savepos fpoint memory_file
      goto offset memory_file
      get nn byte memory_file
      get size_payload threebyte memory_file
      goto 0xc memory_file seek_cur

      string iname + .pvr
      open fdse iname 1 exists
      if exists = 0
         print "%iname% missing - skipped"         ; noexit skip
      else
         get psig long 1
         if psig != 55727696
            print "%iname% is not a valid pvr file"      ; noexit skip
         else
            goto 0x2c 1 seek_cur         ; skip pvr header
            get size_meta long 1
            goto size_meta 1 seek_cur      ; skip meta
            savepos ipoint 1
   
            get isize asize 1
            xmath fit "isize - ipoint"
            math size_payload - 0x10         ; minus header
            if fit <= size_payload
               math fit >> 2            ; speed. blocks align @long
               for transfer = 1 to fit         ; source dependant. fsh payload
                  get data long 1         ; got a 0x10 padded 'safe zone'
                  put data long memory_file
               next transfer
            else
               print "%iname% is too large to inject"   ; noexit skip
               print "%fit% > %size_payload%"
            endif
         endif
      endif
      goto fpoint memory_file                  ; next file
   next file

   get oname filename 0
   string oname -= 4
   string oname += _repack.fsh
   log oname 0 fsize memory_file
endif


tell me that this works now. :)


Top
   
PostPosted: Thu Nov 09, 2017 12:28 pm 

Joined: Wed Sep 06, 2017 12:37 pm
Posts: 29
Pvr to repack fsh not work bro , 0 reimport this description


Top
   
PostPosted: Thu Nov 09, 2017 1:54 pm 

Joined: Fri Oct 27, 2017 7:36 pm
Posts: 34
what's not working?

i posted already: the fsh file you wanna repack and the modified pvr gotta be in the same folder. the pvr files gotta have the same name as the ones you extracted and gotta be valid pvr files ofc. then just run the script.

if something is not working correct you can read in the console what the problem is.


Top
   
PostPosted: Thu Nov 09, 2017 2:11 pm 

Joined: Wed Sep 06, 2017 12:37 pm
Posts: 29
Waiting i send my fsh and pvr


Top
   
PostPosted: Thu Nov 09, 2017 2:13 pm 

Joined: Wed Sep 06, 2017 12:37 pm
Posts: 29
This master help me https://mega.nz/#!71QCxIBB!Ds9soNryNSqf ... _i56qXP2hg


Top
   
PostPosted: Thu Nov 09, 2017 3:23 pm 

Joined: Fri Oct 27, 2017 7:36 pm
Posts: 34
yeh. okay. i dunno what you didn't get done with the script. but you made a mistake with the texture. you gotta encode the texture in opengl_es etc1 format and tick generate mimmaps. i have no idea if any other format might work in this game engine. i could rewrite the replaced payload size, but well... i dunno if the engine would accept that. so i can't do that. just identical payload replacement.

anyway... there's your fsh -> http://www.mediafire.com/file/1udgrmnxjk21mue/k0.rar

/thread


Top
   
PostPosted: Thu Nov 09, 2017 3:40 pm 

Joined: Wed Sep 06, 2017 12:37 pm
Posts: 29
Ok testing bro ,,what save setting pvr on photoshop


Top
   
PostPosted: Thu Nov 09, 2017 4:00 pm 

Joined: Wed Sep 06, 2017 12:37 pm
Posts: 29
Please seting before save pvr , this https://mega.nz/#!ypoAwJDQ!U-WnLJJBNBwX ... QSRHUUWBDk


Top
   
PostPosted: Thu Nov 09, 2017 4:27 pm 
User avatar

Joined: Mon Nov 07, 2016 5:49 am
Posts: 40
Dear episoder,me and my friend daffa are sm how confused,
Its when reimporting the pvrs that errors occures.
Would u provide a "boring" step by step how to reimport pvr to fsh,and upload the .bms script too,please, its been months we r working on this and u cant imagine how frustrating it can get when u r so close..
Thank u for ur understanding bro!


Top
   
PostPosted: Thu Nov 09, 2017 5:33 pm 

Joined: Fri Oct 27, 2017 7:36 pm
Posts: 34
i don't use photoshop. but... you obviously gotta choose ETC as the format. the resulting pvr file with all mipmaps should be almost the same size as the original pvr you extracted.

and no need to upload the script. you can copy-paste the script text from up there and save as .bms file. or not?!? really?!?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 63 posts ]  Go to page Previous 1 2 3 4 Next

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited