I would be able to browse models, but most do not have such knowledge.

.amt (textures)
.amo (meshes)
I will send you PM with sample.
Any help would be greatly appreciated.
Thanks,




Code: Select all
#Bakemonogatari PSP .amo splitter
idstring "#AMO"
goto 24
get MESHES long
goto 48
for i = 0 < MESHES
get offset1 long
get offset2 long
math size = offset2
math size -= offset1
string NAME p= "mesh%03d.amg" i
log NAME OFFSET1 SIZE
next i
Code: Select all
# Header
char[4] "#AMO"
int
int
int
int numBones?
int
int numMesh
int
int
int bone Offset?
byte[?] padding
#mesh offsets
int[numMesh] meshOfs
# bone related
???
# ok whatever just skip to meshes
numMesh Mesh
# then the bone offset from before
char[32] boneNames
struct Mesh {
idstring "#AMG"
int
int
int
int numBones?
int
int
int boneOfs? (relative to start of current chunk)
numBones {
80 bytes # ???
}
int
int
int
int
int
int unkOfs (past the vertex buffers)
byte[] padding
byte[32] some struct
byte[48] just skipping
int
int
short
int numGroups (number of vertex groups)
short
numGroups VertexGroup
# some more stuff after
}
struct VertexGroup {
int
int
int
short numVerts
short ?
numVerts Vertex {
float[8] ?
}
}

You'll need quickbms plus the cpk.bms script in here.epopoe wrote:hi alon, how can u extract cpk files

finale00 wrote:Code: Select all
# Header char[4] "#AMO" int int int int numBones? int int numMesh int int int bone Offset? byte[?] padding #mesh offsets int[numMesh] meshOfs # bone related ??? # ok whatever just skip to meshes numMesh Mesh # then the bone offset from before char[32] boneNames struct Mesh { idstring "#AMG" int int int int numBones? int int int boneOfs? (relative to start of current chunk) numBones { 80 bytes # ??? } int int int int int int unkOfs (past the vertex buffers) byte[] padding byte[32] some struct byte[48] just skipping int int short int numGroups (number of vertex groups) short numGroups VertexGroup # some more stuff after } struct VertexGroup { int int int short numVerts short ? numVerts Vertex { float[8] ? } }


Code: Select all
<bms games="'DragonBall and others'" platforms="'PS2'" ext="AMG">
ImpType Standard ;
Set F Long 04 ;
GoTo F 0 ;
Get S Long 0 ;
GoTo S 0 ;
SavePos S 0 ;
Set F Long 16 ;
GoTo F 0 ;
Get N Long 0 ;
Math N *= 80 ;
Math N += S ;
GoTo N 0 ;
SavePos S 0 ;
Math S += 16 ;
GoTo S 0 ;
SavePos S 0 ;
SavePos V 0 ;
Get qNumber Long 0 ;
Get qOffset Long 0 ;
Math qNumber -= 1 ;
Math S += qOffset ;
GoTo S 0 ;
SavePos S 0 ;
For T = 1 To qNumber ;
Get FO Long 0 ;
SavePos K 0 ;
Get CS Long 0 ;
Math CS -= FO ;
Set NUM long T ;
GoTo FO 0 ;
string QQ = SubAMG. ;
string QQ += NUM ;
Math FO += V ;
Log QQ FO CS 0 ;
GoTo K 0 ;
Next T ;
Set TT long qNumber ;
Math TT += 1 ;
Math qNumber *= 4 ;
Math qNumber += S ;
GoTo qNumber 0 ;
Get Start Long 0 ;
Math Start += V ;
Set L Long 28 ;
GoTo L 0 ;
Get L Long 0 ;
Math L -= Start
string VV = SubAMG. ;
string VV += TT ;
Log VV Start L 0 ;
</bms>Code: Select all
<bms games="'Dragonball'" platforms="'PS2'" ext="dbmesh">
open FDDE ? 1
GoTo 110 1 ;
For LS = 0 < 27768 ;
Put GG Long 1 ;
Put GG Long 1 ;
Put GG Long 1 ;
Next LS ;
Set TotalVertexCount long 1 ;
Get Z ASIZE 0 ;
GoTo 0 0 ;
Get Type Long 0 ;
If Type == 437 ;
set VertexType long 48 ;
Elif Type == 436 ;
set VertexType long 32 ;
Elif Type == 400 ;
set VertexType long 16 ;
Endif ;
GoTo 160 0 ;
SavePos Q 0 ;
set T long 0 ;
For T = 0 < Z ;
GoTo Q 0 ;
Math Q += 12 ;
GoTo Q 0 ;
Get H Long 0 ;
If H == 0 ;
CleanExit ;
EndIf
Math Q += 8 ;
GoTo Q 0 ;
Get SectionVertexes Long 0 ;
Math Q += 12 ;
GoTo Q 0 ;
SavePos VertexStart 0 ;
Math B = VertexType ;
Math B *= SectionVertexes ;
Math Y = SectionVertexes ;
Math Fox = VertexStart ;
Math AdjVertexTypeJump = VertexType ;
Math AdjVertexTypeJump -= 12 ;
For Deer = 1 < Y ;
GoTo Fox 0 ;
Get XVertex Long 0 ;
Get YVertex Long 0 ;
Get ZVertex Long 0 ;
GoTo AdjVertexTypeJump 0 SEEK_CUR ;
SavePos Fox 0 ;
Math PolarBear = TotalVertexCount ;
Math PolarBear *= 12 ;
Math Bear = Deer ;
Math Bear *= 12 ;
Math Bear += PolarBear ;
Math Bear += 110 ;
GoTO Bear 1 ;
Put XVertex Long 1 ;
Put YVertex Long 1 ;
Put ZVertex Long 1 ;
Next Deer ;
Math T = 0 ;
Math T += B ;
Math T += VertexStart ;
Math Q = T ;
Math TotalVertexCount += SectionVertexes ;
Next T ;
</bms>Code: Select all
<bms games="'DragonBall'" platforms="'PS2'" ext="#AMO">
ImpType Standard ;
Set F Long 04 ;
GoTo F 0 ;
Get S Long 0 ;
GoTo S 0 ;
SavePos S 0 ;
GoTo S 0 ;
SavePos Z 0 ;
Set F Long 24 ;
GoTo F 0 ;
Get N Long 0 ;
Math N -= 1 ;
GoTo S 0 ;
For T = 1 To N ;
Get FO Long 0 ;
SavePos K 0 ;
Get CS Long 0 ;
Math CS -= FO ;
Set NUM long T ;
GoTo FO 0 ;
Set QH Long 01 ;
Math QH += FO ;
GoTo QH 0 ;
GetDString QQ 3 0 ;
string QQ += . ;
string QQ += NUM ;
Log QQ FO CS 0 ;
GoTo K 0 ;
Next T ;
Set TT long N ;
Math TT += 1 ;
Math N *= 4 ;
Math N += Z ;
GoTo N 0 ;
Get N Long 0
Set J Long 36 ;
GoTo J 0 ;
Get J Long 0 ;
Math J -= N
GoTo N 0 ;
Set QH Long 01 ;
Math QH += N ;
GoTo QH 0 ;
GetDString QQ 3 0 ;
string QQ += . ;
string QQ += TT ;
Log QQ N J 0 ;
</bms>

In dragon ball this could be a vertex header:finale00 wrote:Furry: is there an article on ps23d that explains how the vertices are "typically" stored and how the faces are done?
LOL I think I've asked this before but I don't remember where to go back and look at what you might have written.


After this:finale00 wrote:ah right, ya I think I remember you said that before.
Did you get anything? The positions looked kind of weird so I didn't really try to add faces.
