GameWatching
New member
D:
>:3
http://smashbrosfiles.blogspot.com/p/technical-file-information-melee.html
colored oO
how can i understand ?
[COLOR=gray]#!BPY[/COLOR]
[COLOR=gray]""" [/COLOR]
[COLOR=gray]Name: 'SSBM (.dat)...'[/COLOR]
[COLOR=gray]Blender: 249[/COLOR]
[COLOR=gray]Group: 'Import'[/COLOR]
[COLOR=gray]Tooltip: 'Import a Melee player or trophy file (.dat)'[/COLOR]
[COLOR=gray]"""[/COLOR]
[COLOR=gray]__author__= ['Tcll'][/COLOR]
[COLOR=gray]__url__ = ("smashbrosfiles.blogspot.com")[/COLOR]
[COLOR=gray]__version__= '0.996'[/COLOR]
[COLOR=gray]__bpydoc__= '''\[/COLOR]
[COLOR=gray]dat Importer[/COLOR]
[COLOR=gray]'''[/COLOR]
[COLOR=gray]# --------------------------------------------------------------------------[/COLOR]
[COLOR=gray]# Importing modules[/COLOR]
[COLOR=gray]import Blender[/COLOR]
[COLOR=plum]i[/COLOR][COLOR=purple]mport[/COLOR] struct [COLOR=purple]as[/COLOR] S
[COLOR=olive]def[/COLOR] HexToDec(v):
[COLOR=purple]return[/COLOR] float(S.unpack([COLOR=darkred]"<h"[/COLOR], S.pack([COLOR=darkred]"<H"[/COLOR], int((v.encode([COLOR=darkred]'hex'[/COLOR])), [COLOR=blue]16[/COLOR])))[[COLOR=blue]0[/COLOR]])
[COLOR=olive]def[/COLOR] vert(v):
[COLOR=purple]return[/COLOR] (HexToDec(v)* [COLOR=blue]0.001[/COLOR])[COLOR=green]#.__str__()[/COLOR]
[COLOR=olive]def[/COLOR] import_dat(path):
[COLOR=gray]Blender.Window.WaitCursor(1)[/COLOR]
[COLOR=gray]name = path.split('\\')[-1].split('/')[-1][/COLOR]
[COLOR=gray]mesh = Blender.NMesh.New( name ) # create a new mesh[/COLOR]
[COLOR=gray]# parse the file[/COLOR]
file = open(path, [COLOR=darkred]'rb'[/COLOR])
a = [COLOR=blue]0[/COLOR]
t = file.read([COLOR=blue]32[/COLOR])
[COLOR=purple]while[/COLOR](a==[COLOR=blue]0[/COLOR]):
x, y, z = vert(file.read([COLOR=blue]2[/COLOR])), vert(file.read([COLOR=blue]2[/COLOR])), vert(file.read([COLOR=blue]2[/COLOR]))
[COLOR=purple]if[/COLOR] (x == [COLOR=blue]0.0[/COLOR] [COLOR=purple]and[/COLOR] y == [COLOR=blue]0.0[/COLOR] [COLOR=purple]and[/COLOR] z == [COLOR=blue]0.0[/COLOR]):
a = [COLOR=blue]1[/COLOR]
mesh.verts.append(Blender.NMesh.Vert(x, y, z))
[COLOR=gray]# link the mesh to a new object[/COLOR]
[COLOR=gray]ob = Blender.Object.New('Mesh', name) # Mesh must be spelled just this--it is a specific type[/COLOR]
[COLOR=gray]ob.link(mesh) # tell the object to use the mesh we just made[/COLOR]
[COLOR=gray]scn = Blender.Scene.GetCurrent()[/COLOR]
[COLOR=gray]for o in scn.getChildren():[/COLOR]
[COLOR=gray]o.sel = 0[/COLOR]
[COLOR=gray]scn.link(ob) # link the object to the current scene[/COLOR]
[COLOR=gray]ob.sel= 1[/COLOR]
[COLOR=gray]ob.Layers = scn.Layers[/COLOR]
[COLOR=gray]Blender.Window.WaitCursor(0)[/COLOR]
[COLOR=gray]Blender.Window.RedrawAll()[/COLOR]
[COLOR=gray]Blender.Window.FileSelector(import_dat, 'Import')[/COLOR]
programmers ... 0.0
how can i learn programming ?
i know some GML that's all but i don't i think that's enough to hack a game.
and GML is used only for Game Maker >.>
I edited SSBM Collision D:
![]()
Still dunno how to remove models D:
i only started about one week ago for melee
so i have all my time to discover
///////////////////////////////////////
All that aside, I'm back.
(i m 15, i didn't learn programming yet >.>)
can anyone help me??
this is the blender importer for player files...
but I've only got it importing verts right now...
this is because I don't want to brute force it like I'm doing in the code below:
Code:[COLOR=gray]#!BPY[/COLOR] [COLOR=gray]""" [/COLOR] [COLOR=gray]Name: 'SSBM (.dat)...'[/COLOR] [COLOR=gray]Blender: 249[/COLOR] [COLOR=gray]Group: 'Import'[/COLOR] [COLOR=gray]Tooltip: 'Import a Melee player or trophy file (.dat)'[/COLOR] [COLOR=gray]"""[/COLOR] [COLOR=gray]__author__= ['Tcll'][/COLOR] [COLOR=gray]__url__ = ("smashbrosfiles.blogspot.com")[/COLOR] [COLOR=gray]__version__= '0.996'[/COLOR] [COLOR=gray]__bpydoc__= '''\[/COLOR] [COLOR=gray]dat Importer[/COLOR] [COLOR=gray]'''[/COLOR] [COLOR=gray]# --------------------------------------------------------------------------[/COLOR] [COLOR=gray]# Importing modules[/COLOR] [COLOR=gray]import Blender[/COLOR] [COLOR=plum]i[/COLOR][COLOR=purple]mport[/COLOR] struct [COLOR=purple]as[/COLOR] S [COLOR=olive]def[/COLOR] HexToDec(v): [COLOR=purple]return[/COLOR] float(S.unpack([COLOR=darkred]"<h"[/COLOR], S.pack([COLOR=darkred]"<H"[/COLOR], int((v.encode([COLOR=darkred]'hex'[/COLOR])), [COLOR=blue]16[/COLOR])))[[COLOR=blue]0[/COLOR]]) [COLOR=olive]def[/COLOR] vert(v): [COLOR=purple]return[/COLOR] (HexToDec(v)* [COLOR=blue]0.001[/COLOR])[COLOR=green]#.__str__()[/COLOR] [COLOR=olive]def[/COLOR] import_dat(path): [COLOR=gray]Blender.Window.WaitCursor(1)[/COLOR] [COLOR=gray]name = path.split('\\')[-1].split('/')[-1][/COLOR] [COLOR=gray]mesh = Blender.NMesh.New( name ) # create a new mesh[/COLOR] [COLOR=gray]# parse the file[/COLOR] file = open(path, [COLOR=darkred]'rb'[/COLOR]) a = [COLOR=blue]0[/COLOR] t = file.read([COLOR=blue]32[/COLOR]) [COLOR=purple]while[/COLOR](a==[COLOR=blue]0[/COLOR]): x, y, z = vert(file.read([COLOR=blue]2[/COLOR])), vert(file.read([COLOR=blue]2[/COLOR])), vert(file.read([COLOR=blue]2[/COLOR])) [COLOR=purple]if[/COLOR] (x == [COLOR=blue]0.0[/COLOR] [COLOR=purple]and[/COLOR] y == [COLOR=blue]0.0[/COLOR] [COLOR=purple]and[/COLOR] z == [COLOR=blue]0.0[/COLOR]): a = [COLOR=blue]1[/COLOR] mesh.verts.append(Blender.NMesh.Vert(x, y, z)) [COLOR=gray]# link the mesh to a new object[/COLOR] [COLOR=gray]ob = Blender.Object.New('Mesh', name) # Mesh must be spelled just this--it is a specific type[/COLOR] [COLOR=gray]ob.link(mesh) # tell the object to use the mesh we just made[/COLOR] [COLOR=gray]scn = Blender.Scene.GetCurrent()[/COLOR] [COLOR=gray]for o in scn.getChildren():[/COLOR] [COLOR=gray]o.sel = 0[/COLOR] [COLOR=gray]scn.link(ob) # link the object to the current scene[/COLOR] [COLOR=gray]ob.sel= 1[/COLOR] [COLOR=gray]ob.Layers = scn.Layers[/COLOR] [COLOR=gray]Blender.Window.WaitCursor(0)[/COLOR] [COLOR=gray]Blender.Window.RedrawAll()[/COLOR] [COLOR=gray]Blender.Window.FileSelector(import_dat, 'Import')[/COLOR]
I want to go through the relocation table to find these offsets...
but I'm not sure how to go about doing that...
@ revel8n or Milun
I know you guys are programmers...
how would I determine the data types based on the relocated offsets??
please reply soon...
just taking notes here...
to get to relocation table:
offset = 0
Datablock Size + header + offset (## + 32 + 0)
read first value (read 4)
go to offset (value + Header (## + 32))
determine offset data (will be figured out)
restart...
add 4 to offset (0 + 4)
Datablock Size + header + offset (## + 32 + 4)
read next value (read 4)
go to offset (value + Header (## + 32))
determine offset data
continue loop until last offset is reached