Life is Feudal Forest Village (*.pak)

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Rokki
Posts: 15
Joined: Mon Jul 04, 2016 8:37 am

Life is Feudal Forest Village (*.pak)

Post by Rokki »

At the ending part of the file,it Looks like Unicode string,But how to analyze the other data?
Thanks in advance!


sample:
cfg.pak
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Life is Feudal Forest Village (*.pak)

Post by aluigi »

Rokki
Posts: 15
Joined: Mon Jul 04, 2016 8:37 am

Re: Life is Feudal Forest Village (*.pak)

Post by Rokki »

aluigi wrote:http://aluigi.org/bms/life_is_feudal.bms

Hi aluigi
Thank you for your reply.

How do you Analysis this file?
The results I get when using comtype_scan2 not what I want. Am I missing anything?
Anyway, thank you!
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Life is Feudal Forest Village (*.pak)

Post by aluigi »

comtype_scan2 is an advanced tool.
Regarding the analysis, 5d 00 00 is lzma (take a look here), unicode names are clearly visible at the end of the archive (as you noticed), the offset/zsize/size info were present in the information and that's all.
Rokki
Posts: 15
Joined: Mon Jul 04, 2016 8:37 am

Re: Life is Feudal Forest Village (*.pak)

Post by Rokki »

aluigi wrote:comtype_scan2 is an advanced tool.
Regarding the analysis, 5d 00 00 is lzma (take a look here), unicode names are clearly visible at the end of the archive (as you noticed), the offset/zsize/size info were present in the information and that's all.


Thank you! :D
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Life is Feudal Forest Village (*.pak)

Post by aluigi »

Ah, if you are interested about how and what fields are read by quickbms and the script, I suggest you to run quickbms from command-line with the -V (debug) and -l (no extraction) option. Highly suggested together with the "less" tool of cygwin:

Code: Select all

quickbms -l -V script.bms archive | less
Rokki
Posts: 15
Joined: Mon Jul 04, 2016 8:37 am

Re: Life is Feudal Forest Village (*.pak)

Post by Rokki »

aluigi wrote:Ah, if you are interested about how and what fields are read by quickbms and the script, I suggest you to run quickbms from command-line with the -V (debug) and -l (no extraction) option. Highly suggested together with the "less" tool of cygwin:

Code: Select all

quickbms -l -V script.bms archive | less

Aha, I am of course interested in the process, thank you for your advice. :D :D :D
x_hiro11
Posts: 61
Joined: Tue Nov 03, 2015 10:38 pm

Re: Life is Feudal Forest Village (*.pak)

Post by x_hiro11 »

Rokki wrote:
aluigi wrote:Ah, if you are interested about how and what fields are read by quickbms and the script, I suggest you to run quickbms from command-line with the -V (debug) and -l (no extraction) option. Highly suggested together with the "less" tool of cygwin:

Code: Select all

quickbms -l -V script.bms archive | less

Aha, I am of course interested in the process, thank you for your advice. :D :D :D




I try to modify cfg.pak inside houses.csv, change the value of construction time, but when I re-imported into cfg.pak. Houses.csv contents are restored to the original value. How to crack the file protection?

And I have to ensure that the modified original file size and file the same, but the process still prompt import file sizes like?
new size: 11634 (53241 uncompressed)
old size: 10996 (53241 uncompressed)


After my modification, I have confirmed that they are the same size. Import process still prompt file sizes like
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Life is Feudal Forest Village (*.pak)

Post by aluigi »

The file protection is long stuff depending by the protection applied (probably check crc and redownload the new package)

The size is referred to both the compressed and decompressed size, in that case you have the same decompressed size but when compressed it's bigger than the original and so it's not possible to place it where the original was located.
x_hiro11
Posts: 61
Joined: Tue Nov 03, 2015 10:38 pm

Re: Life is Feudal Forest Village (*.pak)

Post by x_hiro11 »

aluigi wrote:The file protection is long stuff depending by the protection applied (probably check crc and redownload the new package)

The size is referred to both the compressed and decompressed size, in that case you have the same decompressed size but when compressed it's bigger than the original and so it's not possible to place it where the original was located.



How successfully modified "Life is Feudal: Forest Village" of cfg.pak, make it work in the game?

I use WinHex and Notepad ++ modification, in order to ensure the file size unchanged.
Last edited by x_hiro11 on Sat Sep 03, 2016 8:42 am, edited 1 time in total.
x_hiro11
Posts: 61
Joined: Tue Nov 03, 2015 10:38 pm

Re: Life is Feudal Forest Village (*.pak)

Post by x_hiro11 »

I just change the following values

Red is the construction time, the blue is the number of construction materials.

House1 1000 546000 546000 12 36400 55 10920 11346 100 100 10 100
House1_2 1000 786000 786000 12 52400 79 15720 16139 100 100 100 100
House2 1000 546000 546000 12 36400 55 10920 11346 100 100 10 100
House2_2 1000 786000 786000 12 52400 79 15720 16139 100 100 100 100


House1 3000 546000 546000 12 36400 55 10920 11346 310 220 80 140
House1_2 3000 786000 786000 12 52400 79 15720 16139 450 320 110 190
House2 3000 546000 546000 12 36400 55 10920 11346 310 220 80 140
House2_2 3000 786000 786000 12 52400 79 15720 16139 450 320 110 190
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Life is Feudal Forest Village (*.pak)

Post by aluigi »

@x_hiro11
I have deleted your other new topic because already exists this one about the same topic. No need of N duplicates.
You can add new posts and info here in this topic.

I don't have the game but if a file is "restored" it means that a checksum is performed on the whole archive or on the single archived file and, if it's not the expected one (contained in a list), it gets redownloaded and replaced (except if it maintains local original copies).

You must NEVER force any reimporting, the feature works in a very simple way: everything is ok and you receive no error message or it fails.

Note that the archive format doesn't have CRC or hashes inside, the only DUMMY field is a sequence of 8 floats (1.00) for each file entry.
If there is a checksum/hash check it's performed by the game or the launcher (as I said, I don't have the game).
patmen
Posts: 2
Joined: Sat Sep 10, 2016 7:05 am

Re: Life is Feudal Forest Village (*.pak)

Post by patmen »

i post this error, solution?


Code: Select all

- open input file E:\steam\steamapps\common\Life is Feudal Forest Village\scripts.pak
- open script E:\steam\steamapps\common\Life is Feudal Forest Village\quickbms\life_is_feudal.bms.txt
- set output folder E:\steam\steamapps\common\Life is Feudal Forest Village\extracted

  offset   filesize   filename
--------------------------------------
  00000000 1053       scripts\bakery.lua

Error: the compressed LZMA input is wrong or incomplete (3)
       you must provide more input bytes
Info:  algorithm   16
       offset      00000000
       input size  0x00000201 513
       output size 0x0000041d 1053
       result      0xffffff99 -103

Error: the uncompressed data (-103) is bigger than the allocated buffer (1053)

Last script line before the error or that produced the error:
  18  clog NAME OFFSET ZSIZE SIZE

Press ENTER or close the window to quit
x_hiro11
Posts: 61
Joined: Tue Nov 03, 2015 10:38 pm

Re: Life is Feudal Forest Village (*.pak)

Post by x_hiro11 »

patmen wrote:i post this error, solution?


Code: Select all

- open input file E:\steam\steamapps\common\Life is Feudal Forest Village\scripts.pak
- open script E:\steam\steamapps\common\Life is Feudal Forest Village\quickbms\life_is_feudal.bms.txt
- set output folder E:\steam\steamapps\common\Life is Feudal Forest Village\extracted

  offset   filesize   filename
--------------------------------------
  00000000 1053       scripts\bakery.lua

Error: the compressed LZMA input is wrong or incomplete (3)
       you must provide more input bytes
Info:  algorithm   16
       offset      00000000
       input size  0x00000201 513
       output size 0x0000041d 1053
       result      0xffffff99 -103

Error: the uncompressed data (-103) is bigger than the allocated buffer (1053)

Last script line before the error or that produced the error:
  18  clog NAME OFFSET ZSIZE SIZE

Press ENTER or close the window to quit


Do not need to repackage, simply copy the files unpacked file to the folder and modified to the root directory of the game will be able to work in the game

I have completed the first mod, effective
http://lifeisfeudal.com/forum/1-seconds ... ri-t20569/

I most want to change is to shorten the 'Flatten the ground' construction time, you know how to modify it?
patmen
Posts: 2
Joined: Sat Sep 10, 2016 7:05 am

Re: Life is Feudal Forest Village (*.pak)

Post by patmen »

x_hiro11 wrote:
patmen wrote:i post this error, solution?


Code: Select all

- open input file E:\steam\steamapps\common\Life is Feudal Forest Village\scripts.pak
- open script E:\steam\steamapps\common\Life is Feudal Forest Village\quickbms\life_is_feudal.bms.txt
- set output folder E:\steam\steamapps\common\Life is Feudal Forest Village\extracted

  offset   filesize   filename
--------------------------------------
  00000000 1053       scripts\bakery.lua

Error: the compressed LZMA input is wrong or incomplete (3)
       you must provide more input bytes
Info:  algorithm   16
       offset      00000000
       input size  0x00000201 513
       output size 0x0000041d 1053
       result      0xffffff99 -103

Error: the uncompressed data (-103) is bigger than the allocated buffer (1053)

Last script line before the error or that produced the error:
  18  clog NAME OFFSET ZSIZE SIZE

Press ENTER or close the window to quit


Do not need to repackage, simply copy the files unpacked file to the folder and modified to the root directory of the game will be able to work in the game

I have completed the first mod, effective
http://lifeisfeudal.com/forum/1-seconds ... ri-t20569/

I most want to change is to shorten the 'Flatten the ground' construction time, you know how to modify it?


i not repack the pak file, this is output of unpack.
for flatten ground i don't know how to, i am new to mod, i learn now it.


UPDATE: solved, i don't know why, i unpack script.pak, after computer start and no error...