Illusion Games Modding Misc
IllusionGames [edit]
all characters are at least 18
|
Please edit
PP file format
Illusion pp file format.
- Uncompress mode(Normal)
ID 00000000 :5B 50 50 56 45 52 5D 00 : PP-FILE ID "[PPVER]" + EOS No encode
Header1 00000008 :6C 00 00 00 : Header mark >= 0x0000006C Encode First Key,Encode length=4
Header2 0000000C :01 : header mark Encode First Key,Encode length=1
Header3 0000000D :tc tc tc tc : Directory table count Encode First Key,Encode length=4
Tabel 00000011 :fn fn fn fn ... ... 00 : File name 0x103 byte + EOS 00000115 :ps ps ps ps : Packed file size 00000119 :sp sp sp sp : Start position,(=00000015+0x120*tc) 0000011D :yy yy : Timestamp(Year,2012=2012) 0000011F :mm mm : Timestamp(Month,1 to 12) 00000121 :ww ww : Timestamp(Day of week,Sun=0,Mon=1...) 00000123 :dd dd : Timestamp(Day,1 to 31) 00000125 :hh hh : Timestamp(Hour,0 to 23) 00000127 :mm mm : Timestamp(Minute,0 to 59) 00000129 :ss ss : Timestamp(Second,0 to 59) 0000012B :ss ss : Timestamp(milliSecond,0 to 999) 0000012D :os os os os : Original file size(=Packed file size) -- 00000011+0x120*1 :fn fn fn fn ... ... 00 : File name 0x103 byte + EOS 00000115+0x120*1 :ps ps ps ps : Packed file size 00000119+0x120*1 :sp sp sp sp : Start position 0000011D+0x120*1 :yy yy : Timestamp(Year,2012=2012) 0000011F+0x120*1 :mm mm : Timestamp(Month,1 to 12) 00000121+0x120*1 :ww ww : Timestamp(Day of week,Sun=0,Mon=1...) 00000123+0x120*1 :dd dd : Timestamp(Day,1 to 31) 00000125+0x120*1 :hh hh : Timestamp(Hour,0 to 23) 00000127+0x120*1 :mm mm : Timestamp(Minute,0 to 59) 00000129+0x120*1 :ss ss : Timestamp(Second,0 to 59) 0000012B+0x120*1 :ss ss : Timestamp(milliSecond,0 to 999) 0000012D+0x120*1 :os os os os : Original file size(=Packed file size) -- | -- 00000011+0x120*(tc-1):fn fn fn fn ... ... 00 : File name 0x103 byte + EOS 00000115+0x120*(tc-1):ps ps ps ps : Packed file size 00000119+0x120*(tc-1):sp sp sp sp : Start position 0000011D+0x120*(tc-1):yy yy : Timestamp(Year,2012=2012) 0000011F+0x120*(tc-1):mm mm : Timestamp(Month,1 to 12) 00000121+0x120*(tc-1):ww ww : Timestamp(Day of week,Sun=0,Mon=1...) 00000123+0x120*(tc-1):dd dd : Timestamp(Day,1 to 31) 00000125+0x120*(tc-1):hh hh : Timestamp(Hour,0 to 23) 00000127+0x120*(tc-1):mm mm : Timestamp(Minute,0 to 59) 00000129+0x120*(tc-1):ss ss : Timestamp(Second,0 to 59) 0000012B+0x120*(tc-1):ss ss : Timestamp(milliSecond,0 to 999) 0000012D+0x120*(tc-1):os os os os : Original file size(=Packed file size) Encode First Key,Encode length=0x120*tc
Footer 00000011+0x120*tc :ts ts ts ts : ID+Header+Table size,=0x11+0x120*tc Encode First Key,Encode length=4
Data 00000015+0x120*tc :dt dt dt dt ... ... dt : File data Encode Second Key,Encode length=Packed file size & 0xfffffffc -- 00000015+0x120*tc+sz :dt dt dt dt ... ... dt : File data Encode Second Key,Encode length=Packed file size & 0xfffffffc -- | -- ???????? :dt dt dt dt ... ... dt : File data Encode Second Key,Encode length=Packed file size & 0xfffffffc
- Compress mode(Wakeari wkar_00_00_??.pp)
ID 00000000 :5B 50 50 56 45 52 5D 00 : PP-FILE ID "[PPVER]" + EOS No encode
Header1 00000008 :6C 00 00 00 : Header mark >= 0x0000006C Encode First Key,Encode length=4
Header2 0000000C :01 : header mark Encode First Key,Encode length=1
Header3 0000000D :tc tc tc tc : Directory table count Encode First Key,Encode length=4
Tabel 00000011 :fn fn fn fn ... ... 00 : File name 0x103 byte + EOS 00000115 :ps ps ps ps : Packed file size 00000119 :sp sp sp sp : Start position 0000011D :yy yy : Timestamp(Year,2012=2012) 0000011F :mm mm : Timestamp(Month,1 to 12) 00000121 :ww ww : Timestamp(Day of week,Sun=0,Mon=1...) 00000123 :dd dd : Timestamp(Day,1 to 31) 00000125 :hh hh : Timestamp(Hour,0 to 23) 00000127 :mm mm : Timestamp(Minute,0 to 59) 00000129 :ss ss : Timestamp(Second,0 to 59) 0000012B :ss ss : Timestamp(milliSecond,0 to 999) 0000012D :os os os os : Original file size(!=Packed file size) -- 00000011+0x120*1 :fn fn fn fn ... ... 00 : File name 0x103 byte + EOS 00000115+0x120*1 :ps ps ps ps : Packed file size 00000119+0x120*1 :sp sp sp sp : Start position 0000011D+0x120*1 :yy yy : Timestamp(Year,2012=2012) 0000011F+0x120*1 :mm mm : Timestamp(Month,1 to 12) 00000121+0x120*1 :ww ww : Timestamp(Day of week,Sun=0,Mon=1...) 00000123+0x120*1 :dd dd : Timestamp(Day,1 to 31) 00000125+0x120*1 :hh hh : Timestamp(Hour,0 to 23) 00000127+0x120*1 :mm mm : Timestamp(Minute,0 to 59) 00000129+0x120*1 :ss ss : Timestamp(Second,0 to 59) 0000012B+0x120*1 :ss ss : Timestamp(milliSecond,0 to 999) 0000012D+0x120*1 :os os os os : Original file size(!=Packed file size) -- | -- 00000011+0x120*(tc-1):fn fn fn fn ... ... 00 : File name 0x103 byte + EOS 00000115+0x120*(tc-1):ps ps ps ps : Packed file size 00000119+0x120*(tc-1):sp sp sp sp : Start position 0000011D+0x120*(tc-1):yy yy : Timestamp(Year,2012=2012) 0000011F+0x120*(tc-1):mm mm : Timestamp(Month,1 to 12) 00000121+0x120*(tc-1):ww ww : Timestamp(Day of week,Sun=0,Mon=1...) 00000123+0x120*(tc-1):dd dd : Timestamp(Day,1 to 31) 00000125+0x120*(tc-1):hh hh : Timestamp(Hour,0 to 23) 00000127+0x120*(tc-1):mm mm : Timestamp(Minute,0 to 59) 00000129+0x120*(tc-1):ss ss : Timestamp(Second,0 to 59) 0000012B+0x120*(tc-1):ss ss : Timestamp(milliSecond,0 to 999) 0000012D+0x120*(tc-1):os os os os : Original file size(!=Packed file size) Encode First Key,Encode length=0x120*tc
Footer 00000011+0x120*tc :ts ts ts ts : ID+Header+Table size(=0x11+0x120*tc) Encode First Key,Encode length=4
Data 00000015+0x120*tc :ky : Run-length encode key 00000016+0x120*tc :os os os os : Original file size 0000001A+0x120*tc :dt dt dt dt ... ... dt : Run-length encode data No Encode -- 00000015+0x120*tc+sz :ky : Run-length encode key 00000016+0x120*tc+sz :os os os os : Original file size 0000001A+0x120*tc+sz :dt dt dt dt ... ... dt : Run-length encode data No Encode -- | -- 00000015+0x120*tc+sz :ky : Run-length encode key 00000016+0x120*tc :os os os os : Original file size 0000001A+0x120*tc :dt dt dt dt ... ... dt : Run-length encode data No Encode
- Example encode program
void FirstEncode(unsigned long len) {
unsigned long i; unsigned char NewKey,TempKey[16]; memcpy(TempKey,FirstKey,16); ResetFirstKey(); for (i = 0;i < len;i++) { NewKey = TempKey[i % 8] += TempKey[i % 8 + 8]; Data[i] ^= NewKey; }
}
void SecondEncode(unsigned long len) {
unsigned long i; len &= 0xfffffffc; for (i = 0;i < len;i++) { Data[i] ^= SecondKey[i % 32]; }
}
(by chie65536, http://www.hongfire.com/forum/showthread.php/416671p=3410936#post3410936)