Users browsing this thread: 14 Guest(s)
Sonic Model Ripping Thread
Hey there, I'm Andrew75 from Retro,
I don't think anyone from Cult is doing any scripts, A friend of mine pointed out that cult hasn't had any major posts in months.
It's just our little team of 4 working on the script.
Besides the character ripping scripts, its also worth mentioning that Level ripping scripts are being worked on.
Thanked by:
@tuxmask75 dude could you help me with the generations models?
Thanked by:
(08-05-2011, 04:13 PM)ManikDX Wrote: Man, I've been trying to convert the Generations models. & Sonic Cult may have the converter? I'm gonna convert them!

If it's that easy, then I'll eat my pants.
Lloyd gives us some words of wisdom:
Thanked by:
No luck in finding it. I just got to study the format more
Thanked by:
Bleh, i only want the Official models to use for referance to make my own

im tired of seeing that sh*t on Facepunch
Thanked by:
Yea! They mostly use the models for a stupid recolors
Thanked by:
If i where given the scripts i'd probably use them... but not give them out
i'd wait for someone else to stupidly do it :/ i don't wanna be at fault for the ridiculous G-mod factor i just want them so i can make Custom models at great accuracy
Thanked by:
http://gameresearch.5d6d.com/archiver/tid-200.html

Can anyone Complie this code?

it looks like C, but im not sure
Thanked by:
I recently found a version of this for Generations I think
Thanked by:
(08-10-2011, 06:37 AM)ManikDX Wrote: I recently found a version of this for Generations I think

send i link thought im?
Thanked by:
(08-10-2011, 05:20 AM)Lugana Rysniq Wrote: http://gameresearch.5d6d.com/archiver/tid-200.html

Can anyone Complie this code?

it looks like C, but im not sure

That's Max Script.
[Image: BadassSigcopy.png]
Thanked by:
(08-10-2011, 02:42 PM)Azu Wrote:
(08-10-2011, 05:20 AM)Lugana Rysniq Wrote: http://gameresearch.5d6d.com/archiver/tid-200.html

Can anyone Complie this code?

it looks like C, but im not sure

That's Max Script.

oh, well the fourm is codded weird with ramdom bits of giberish that you have to cut it and it dose not work in max unless is for a newer version then 9
Thanked by:
Code:
--filein (scriptsPath + "Fatduck\\Big_Endian.ms")
fn readBinString f nChar = (
  txt = ""
  for j = 1 to nChar do txt += bit.intAschar (readbyte f #unsigned)
  return txt
)--end fn readBinString

fn test f = (
  clearlistener()
  UVary = #()
  for i = 1 to 557 do (
   readlong f
   tu = readBEFloat f ; tv = readBEFloat f
   append UVary [tu,tv,0]
   tu = readBEFloat f ; tv = readBEFloat f
   --format "%   %   %   %\n" (readBEFloat f) (readBEFloat f) (readBEFloat f) (readBEFloat f)
  )
  format "Here @ [%]\n" (d2h8 (ftell f))
  mm = undefined
  do (
   f1 = readBEword f
   if f1 != 0xFFFF then mm = boundary mm f1  
  ) while (ftell f) < 0x34CC
  format "MM: %\n Here @ [%]\n" mm (d2h8 (ftell f))
  
  msh = mesh vertices:UVary faces:#([1,2,3])
)
fn test2 f debugmode = (
  ChunkID = readBEDword f  --0x200
  ChunkSize = readBEDword f
  ukn01 = readBEDword f
  ukn02 = readBEDword f
  ukn03 = readBEDword f
  ukn04 = readBEDword f
  ukn05 = readBEDword f
  ukn06 = readBEDword f
  nVerts = readBEDword f
  ukn08 = readBEDword f  --padding??
  ukn09 = readBEDword f  --padding??
  ukn10 = readBEDword f  --padding??
  ukn11 = readBEDword f  --padding??
  ukn12 = readBEDword f
  ukn13 = readBEDword f
  ofsUV = readBEDword f
  ofsFcIdx = readBEDword f
  ukn16 = readBEDword f  --padding??
  ukn17 = readBEDword f  --padding??
  ukn18 = readBEDword f  --padding??
  ukn19 = readBEDword f  --padding??
  ukn20 = readBEDword f  --padding??
  bx1 = readBEFloat f ; by1 = readBEFloat f ; bz1 = readBEFloat f
  bx2 = readBEFloat f ; by2 = readBEFloat f ; bz2 = readBEFloat f
  ukn27 = readBEDword f
  ukn28 = readBEDword f
  ofsName = readBEDword f
  ukn30 = readBEDword f
  ofsEndTerm = readBEDword f
  if debugmode==true then (
   format "ID:%   Size:%\n" (d2h8 ChunkID) (d2h8 ChunkSize)
   format "%   %   %   %\n" ukn01 ukn02 ukn03 ukn04
   format "%   %   VT:%   %\n" ukn05 ukn06 nVerts ukn08
   format "%   %   %   %\n" ukn09 ukn10 ukn11 ukn12
   format "%   ofsUV:%   ofsFC:%   %\n" ukn13 (d2h8 ofsUV) (d2h8 ofsFcIdx) ukn16
   format "%   %   %   %\n" ukn17 ukn18 ukn19 ukn20
   format "% - %\n" [bx1,by1,bz1] [bx2,by2,bz2]
   format "%   %   ofsName:%   %   ofsEnd:%\n" ukn27 ukn28 (d2h8 ofsName) ukn20 (d2h8 ofsEndTerm)
   format "Here @ [%]\n" (d2h8 (ftell f))
  )
)--end debugmode
struct Res (
  ofs, blacksize, len, ofsname, name, type
)

fn readVesperiaMan f fscale debugmode = (
  FPS4Start = ftell f
  xxx = (readBinString f 4)
  format "%\n" xxx
  if xxx != "FPS4" then (
   messagebox "Not a valid Tales of Vesperia file!"
   return undefined
  )--end if
  nRes = readBEDword f
  ofsTbl = readBEDword f
  ofsBaseData = readBEDword f
  if debugmode==true then (
   clearlistener()
   format "FPS4   Res:%   \tofs:%[%]\n" nRes ofsBaseData (FPS4Start+ofsBaseData)
  )--end debugmode
  fseek f (FPS4Start+ofsTbl) #seek_set
  
  RESary = #()
  for i = 1 to nRes do (
   ofsData = readBEDword f
   DataBlock = readBEDword f
   RealSize = readBEDword f
   ofsName = readBEDword f
   append RESary (Res ofs:ofsData blacksize:DataBlock len:RealSize ofsname:ofsName)
  )
  if debugmode==true then format "after Indices Table @ [%]\n" (d2h8 (ftell f))
  for r in RESary do (
   if r.ofsname > 0 then (
    fseek f (FPS4Start+r.ofsname) #seek_set
    r.name = readstring f
   ) else r.name = ""
   if r.len > 0 then (
    fseek f (FPS4Start+r.ofs) #seek_set
    r.type = readBEDword f
   ) else r.type = 0x0BAD0BAD
  )
  if debugmode==true then (
   for j = 1 to nRes do
      format "%   \tofs:%[%]   len:%   type:%   Name:%\n" j (d2h8 RESary[j].ofs) (d2h8 (FPS4Start+RESary[j].ofs)) (d2h8 RESary[j].len) (d2h8 RESary[j].type) RESary[j].name
  )--end debugmode
  
  
  
)--end fn readVesperiaMan

fn nouse = (
  fname = "C:\\GameFiles\\TaleOfVesperiaX360\\chara\\npc\\MM_C000\\HEAD\\MM_C000_HEAD_7"
  f = fopen fname "rb"
  clearlistener()
  fseek f 0x50 #seek_set
  test2 f true
  fseek f 0x8CC #seek_set
  test2 f true
  fseek f 0x1BB0 #seek_set
  test2 f true
  fseek f 0x2C6C #seek_set
  test2 f true
  fclose f
)
/*
  fname = "C:\\GameFiles\\TaleOfVesperiaX360\\Test\\AHO_C_01.DAT"
  f = fopen fname "rb"
  readVesperiaMan f 1 true
  fclose f
  */
[Image: BadassSigcopy.png]
Thanked by:
Code:
fseek f 0x28 #seek_set --
BoneCount = ReadBElong f
BoneTableOffset = ReadBElong f + 0x18
BoneTableOffset2 = ReadBElong f + 0x18
BoneTableOffset3 = ReadBElong f + 0x18
UnkCountt = ReadBElong f
MeshCount = ReadBElong f

fseek f BoneTableOffset#seek_set
struct BoneOffset (
BoneTOffset
)
Bone_Offset_array = #()
for i = 1 to BoneCount Do (
BoneTOffset = ReadBElong f + 0x18
append Bone_Offset_array (BoneOffset BoneTOffset:BoneTOffset)
)
print Bone_Offset_array
struct BoneData (
BoneID, BoneNameOffset, BoneName, BoneParentID
)
Bone_Data_array = #()
BoneID = -1
for k in Bone_Offset_array Do (
fseek f k.BoneTOffset#seek_set
BoneID += 1
BoneParentID = ReadBElong f
BoneNameOffset = ReadBElong f
BoneName = readstring f
append Bone_Data_array ( BoneData BoneID:BoneID BoneNameOffset:BoneNameOffset BoneName:BoneName BoneParentID:BoneParentID )
)F$?-\$vW&qiH
print Bone_Data_array

BNArr = #()

for i = 1 to BoneCount Do (
m11 = ReadBEfloat f; m12 = ReadBEfloat f; m13 = ReadBEfloat f; m14 = ReadBEfloat f
m21 = ReadBEfloat f; m22 = ReadBEfloat f; m23 = ReadBEfloat f; m24 = ReadBEfloat f
m31 = ReadBEfloat f; m32 = ReadBEfloat f; m33 = ReadBEfloat f; m34 = ReadBEfloat f
m41 = ReadBEfloat f; m42 = ReadBEfloat f; m43 = ReadBEfloat f; m44 = ReadBEfloat f
tfm = matrix3 [m11,m12,m13] [m21,m22,m23] [m31,m32,m33] [m41,m42,m43]
        
newBone = bonesys.createbone        \
                                  tfm.row4        \
                                  (tfm.row4 + 0.01 * (normalize tfm.row1))
                                  (normalize tfm.row3)
                        newBone.name   = Bone_Data_array[i].BoneName
                        newBone.width  = 0.01
                        newBone.height = 0.01
                        
                        pos = [m14,m24,m34]
                        pos = pos * tfm
                                          
                        newBone.pos.x = (-1)*pos.x
                        newBone.pos.y = (-1)*pos.y
                        newBone.pos.z = (-1)*pos.z
                                          
                        newBone.setBoneEnable false 0
                        newBone.pos.controller      = TCB_position ()
                        newBone.rotation.controller = TCB_rotation ()
                        if (Bone_Data_array[i].BoneParentID != -1) then
                                          newBone.parent = BNArr[Bone_Data_array[i].BoneParentID+1]
                        BNArr[i] = newBone
                                  )


fseek f 0x68#seek_set

for c = 1 to MeshCount Do (
Vert_array = #()    --define arrays for verts, normals, UV and Faces
Normal_array = #()
UV_array = #()
Face_array = #()
offsetstart = (ReadBElong f) + 0x18
tablestart = ftell f
        fseek f offsetstart#seek_set
Count1 = ReadBElong f
FaceCount = ReadBElong f        
Count3 = ReadBElong f        
VertCount = ReadBElong f        
VertSize = ReadBElong f
Count6 = ReadBElong f
Count7 = ReadBElong f
Count8 = ReadBElong f
Count9 = ReadBElong f
Count10 = ReadBElong f        
Count11 = ReadBElong f
FaceStart = ftell f
VerStart = (FaceCount * 2) + FaceStart


StartDirection = -1
f1 = (ReadBEword f) + 1
f2 = (ReadBEword f) + 1  
FaceDirection = StartDirection
Do (
f3 = (ReadBEword f)
if (f3==0xFFFF) then (
f1 = (ReadBEword f) + 1
f2 = (ReadBEword f) + 1
FaceDirection = StartDirection
) else (
f3 += 1
FaceDirection *= -1
if (f1!=f2)AND(f2!=f3)AND(f3!=f1) then (
if FaceDirection > 0 then append Face_array [f1,f2,f3]
else append Face_array [f1,f3,f2]
)
f1 = f2
f2 = f3
)
) while ((ftell f) != (VerStart + 2))
fseek f VerStart#seek_set
deleteitem Face_array Face_array.count
test = readshort f
if test != 0x0000 Do (
         fseek f -2 #seek_cur
)
for v = 1 to VertCount Do (
vx = ReadBEfloat f  --read xyz coordinates
vy = ReadBEfloat f
vz = ReadBEfloat f
fseek f 0x8 #seek_cur
nx = ReadBElong f    --read Normal ??
ny = ReadBElong f
nz = ReadBElong f
tu = ReadBEHalfFloat f   --read UV float value
tv = ReadBEHalfFloat f * -1
fseek f 0x8 #seek_cur

append Vert_array [vx,vy,vz] --save verts to Vert_array
append Normal_array [nx,ny,nz] --save normals to Normal_array
append UV_array [tu,tv,0]  --save UVs to UV_array
)
fseek f tablestart#seek_set
msh = mesh vertices:Vert_array faces:Face_array   --build mesh
msh.numTVerts = UV_array.count
buildTVFaces msh    
for j = 1 to UV_array.count  do setTVert msh j UV_array[j]
for j = 1 to Face_array.count  do setTVFace msh j Face_array[j]
for j = 1 to Normal_array.count do setNormal msh j Normal_array[j]
)

I Get this but i jsut an unexpeced End-of-file when i try to run it in max
Thanked by:
Quote:Hey there, I'm Andrew75 from Retro,
I don't think anyone from Cult is doing any scripts, A friend of mine pointed out that cult hasn't had any major posts in months.
It's just our little team of 4 working on the script.
Besides the character ripping scripts, its also worth mentioning that Level ripping scripts are being worked on
.

Yeah thats true.

Well you could always wait till me and my friends finish up the script since that script is very old and outdated. And we are just waiting till all models work and is easy for Idiots I mean noobs to use. Without people complaining how to use it. Since we don't want headaches haha.

But you can go on ahead and keep trying or you can wait till Generations releases since you guys clearly want these models so badly willing to do anything just to get a hold of them in your grubby little hands and play with them all day long and stare at there beautiful bodies or something like that.

We are planning to release the scripts. If your that impatient continue on with what your doing. No problem with that just thought I'd inform you all thats all.

Plus most of the thanks goes to my friend who's been working hard on it. He's improved a lot.
Thanked by:


Forum Jump: