fifa ea game fsh file [SHPI, G359, SKIN, hifa]

Textures, recreate headers, conversions, algorithms and parsing of image files
daffa17
Posts: 31
Joined: Wed Sep 06, 2017 12:37 pm

Re: fifa ea game fsh file [SHPI, G359, SKIN, hifa]

Post by daffa17 »

How to same pvr mod to original ? Bro?
daffa17
Posts: 31
Joined: Wed Sep 06, 2017 12:37 pm

Re: fifa ea game fsh file [SHPI, G359, SKIN, hifa]

Post by daffa17 »

Your edited my fsh is work , but how same pvr mod to pvr original
Please help bro
episoder
Posts: 123
Joined: Fri Oct 27, 2017 7:36 pm

Re: fifa ea game fsh file [SHPI, G359, SKIN, hifa]

Post by episoder »

i don't speak gibberish. sorry sissy. :)

/thread2
daffa17
Posts: 31
Joined: Wed Sep 06, 2017 12:37 pm

Re: fifa ea game fsh file [SHPI, G359, SKIN, hifa]

Post by daffa17 »

You ready aplication whats up bro
wolftatoo
Posts: 49
Joined: Mon Nov 07, 2016 5:49 am

Re: fifa ea game fsh file [SHPI, G359, SKIN, hifa]

Post by wolftatoo »

This is what we did:
After saving modded pvr,we replaced original 1 with the edited lowj.pvr(now folder only contains original fsh and edited pvr)
we run repack script but 0 file reimported!
episoder
Posts: 123
Joined: Fri Oct 27, 2017 7:36 pm

Re: fifa ea game fsh file [SHPI, G359, SKIN, hifa]

Post by episoder »

any errors printed in the console? use this if you don't see it. i can't make it red blinking signs sorry. lol

Code: Select all

log memory_file 0 0

get fsize asize 0
log memory_file 0 fsize 0

set rmpd 0
set skpd 0

get oname filename 0
get fsig long memory_file
if fsig != 1229998163
   print "\nERROR %oname% is not a fsh file"
   print "\nUsage: input the fsh file you wanna repack"
   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 "\nERROR %iname% not present in input folder - skipped"
         math skpd + 1
      else
         get psig long 1
         if psig != 55727696
            print "\nERROR %iname% is not a valid pvr file - skipped"
            math skpd + 1
         else
            goto 0x2c 1 seek_cur
            get size_meta long 1
            goto size_meta 1 seek_cur
            savepos ipoint 1
   
            get isize asize 1
            xmath fit "isize - ipoint"
            math size_payload - 0x10
            if fit <= size_payload
               math fit >> 2
               for transfer = 1 to fit
                  get data long 1
                  put data long memory_file
               next transfer
               math rmpd + 1
            else
               print "\nERROR %iname% too large. %fit% > %size_payload%"
               math skpd + 1
            endif
         endif
      endif
      goto fpoint memory_file
   next file

   print "\n%skpd% file(s) skipped - eventually check for ERRORs"

   if rmpd > 0
      string oname -= 4
      string oname += _repack.fsh
      print "\n%rmpd% file(s) imported"
      print "\n"
      log oname 0 fsize memory_file
   else
      print "\n0 files imported - check for ERRORs"
   endif

endif


if it doesn't write any file at all, i'm sure you missing the concept of it. you just execute the script. no bms reimport. and you gotta select the fsh as the input file.
Last edited by episoder on Fri Nov 10, 2017 6:34 pm, edited 1 time in total.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: fifa ea game fsh file [SHPI, G359, SKIN, hifa]

Post by aluigi »

Please note that it's not possible to "reimport" something which is not dumped from a file like a MEMORY_FILE input (for example a file built or edited in such MEMORY_FILE).
episoder
Posts: 123
Joined: Fri Oct 27, 2017 7:36 pm

Re: fifa ea game fsh file [SHPI, G359, SKIN, hifa]

Post by episoder »

aluigi wrote:Please note that it's not possible to "reimport" something which is not dumped from a file like a MEMORY_FILE input (for example a file built or edited in such MEMORY_FILE).


does that mean if i'd just log the raw payloads when extracting, it would reimport backwards? in a loop too?

means that'd need a second and third script to header and strip the raw dump to/from pvr. right?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: fifa ea game fsh file [SHPI, G359, SKIN, hifa]

Post by aluigi »

For example this is ok for reimporting: log "out.dat" 0 SIZE
While this is not valid and completely ignored during the reimport process: log "out.dat" 0 SIZE MEMORY_FILE
That's because the reimport mode is nothing else than a reverse operation that works when you have a file input and a direct file output.

I quickly checked your script and it looks like you just edit one field in the input file through the "put" command, right?
There is not a dump/extraction process, it's an editing.

Honestly I don't know what to suggest except writing another script/tool.
episoder
Posts: 123
Joined: Fri Oct 27, 2017 7:36 pm

Re: fifa ea game fsh file [SHPI, G359, SKIN, hifa]

Post by episoder »

yep. i think i got this. reimports only direct logs as a form of copy with offset and size. ofc can't be done if the offset and size are computed or logged from a memory buffer. can't write backwards into a memory buffer. it won't reconstruct the file.

and, no, i'm not writing into the input file anymore. in the first version i did that, but hardrock complained about the -w option .bat not working. not sure what the issue was. doen't matter tho.

it seems all working now.
wolftatoo
Posts: 49
Joined: Mon Nov 07, 2016 5:49 am

Re: fifa ea game fsh file [SHPI, G359, SKIN, hifa]

Post by wolftatoo »

XD u both confused my humble little 2 no knowledge bout scripts!
(in a Smeagol voice): Pls episoder,master of script elements, wizard of binaries, pls explain to me the ez steps to repack these damned maleficient pvr's into beautiful fsh's!
Ex: 1. open xprogram
2. Select......
3. Press...
Etc....
Sry, im a gfx designer, aluigi already knows that i have very limitted knowledge bout scipts xD :lol:
episoder
Posts: 123
Joined: Fri Oct 27, 2017 7:36 pm

Re: fifa ea game fsh file [SHPI, G359, SKIN, hifa]

Post by episoder »

since you got all in one folder just open quickbms. select the fsh_repack.bms (the last one i posted on this page). select the fsh file you wanna repack (the script will copy this file and load and import the modifed pvr data into this copied file). select the output folder.

if no _repack.fsh is written read the ERROR messages in the console. fix eventual errors, then try again. there's not a lot you could do wrong. you just gotta have same size pvr files with etc compression and mipmaps.

i mean it's not rocket science.
wolftatoo
Posts: 49
Joined: Mon Nov 07, 2016 5:49 am

Re: fifa ea game fsh file [SHPI, G359, SKIN, hifa]

Post by wolftatoo »

Anyway...thank you; episoder 4 ur Valuable help!
I had just 2 fresh install latest Qbms! It works now!
I can reimport! But still didnt test if it doesnt crash ingame! XD
And thanks Aluigi, cant say it enough bro!
daffa17
Posts: 31
Joined: Wed Sep 06, 2017 12:37 pm

Re: fifa ea game fsh file [SHPI, G359, SKIN, hifa]

Post by daffa17 »

Tread closed tanks to all master
daffa17
Posts: 31
Joined: Wed Sep 06, 2017 12:37 pm

Re: fifa ea game fsh file [SHPI, G359, SKIN, hifa]

Post by daffa17 »

Sorry master help me one question this file
https://mega.nz/#!e4YD3YrJ!i5CG6iG2rvp1 ... PXPAqmR0hc
episoder
Posts: 123
Joined: Fri Oct 27, 2017 7:36 pm

Re: fifa ea game fsh file [SHPI, G359, SKIN, hifa]

Post by episoder »

can you stop this master thing? that is stupid. a brown nose will get you nowhere. stay away from me.

and what about this file? it's obviously a completely different file type. it's lzma compressed. that is stated in the header. i don't fux with compression tokens tho. find somebody else.
wolftatoo
Posts: 49
Joined: Mon Nov 07, 2016 5:49 am

Re: fifa ea game fsh file [SHPI, G359, SKIN, hifa]

Post by wolftatoo »

X/
Man he is clearly trying to be polite,he is just bad at english just like me!
He just thinks "master" is same as "sir" !
Chill bruh !
daffa17
Posts: 31
Joined: Wed Sep 06, 2017 12:37 pm

Re: fifa ea game fsh file [SHPI, G359, SKIN, hifa]

Post by daffa17 »

Yes true wolftatoo ,,, how are you doing ?
daffa17
Posts: 31
Joined: Wed Sep 06, 2017 12:37 pm

Re: fifa ea game fsh file [SHPI, G359, SKIN, hifa]

Post by daffa17 »

Hello brother episoder you is very smart ,please help to me this unpacked rx3 https://mega.nz/#!3lhGVKaY!3m0kIg6XkTnM ... yMWDPmNrBQ
episoder
Posts: 123
Joined: Fri Oct 27, 2017 7:36 pm

Re: fifa ea game fsh file [SHPI, G359, SKIN, hifa]

Post by episoder »

daffa17 wrote:Hello brother episoder you is very smart ,please help to me this unpacked rx3 https://mega.nz/#!3lhGVKaY!3m0kIg6XkTnM ... yMWDPmNrBQ


there's a bms script for rx3 files somewhere here in the forum. a thread you posted on. why ask again?

and the files have some 'obvious' compression. i'm not familiar with compression tokens. i'd rather not try to guess this. so...