Jump to content


Photo

structure of a gmmod file


  • Please log in to reply
4 replies to this topic

#1 michael pw

michael pw

    GMC Member

  • GMC Member
  • 1488 posts
  • Version:GM8.1

Posted 04 June 2011 - 12:22 PM

Ok, please can someone explain the structure of a gmmod file to me,i think ive got most of it

its lik e

100
2056
5 000.0 000.0 000.0 004.0 etc

and im pretty sure that is:

[unknown]
[vertece count]
[unknown] [x] [y] [z] [xtex] [ytex] [colour] [alpha]

i just need to know what the two unknown values are, and what kind of primitive do these use? trianglelist?

thanks for the help :P!
  • 0

Known as MishMash on the internet, If only my username could be changed :D?

Posted Image

Working on Sharp Edge, a 3D Level designer which exports to GMMOD and textures, with a vast toolset, and fancy GUI. ( So far, software is only going to be distributed with my game, in the future, it will be up for public use and with the ability to customise the software using the Plugin System to suite your games needs.)
Also working on 3D Multiplayer FPS Global Anarchy Denied Operations.


#2 skullnbones

skullnbones

    Light Bright

  • New Member
  • 104 posts
  • Version:GM8

Posted 04 June 2011 - 03:45 PM

The first # is always 100 (so far) and is an ID, possibly for versioning in the future.
I think the second was the number of lines to follow including the terminator:
1 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000

Edited by skullnbones, 04 June 2011 - 03:59 PM.

  • 0

#3 michael pw

michael pw

    GMC Member

  • GMC Member
  • 1488 posts
  • Version:GM8.1

Posted 04 June 2011 - 04:43 PM

i know what the center is but i just need to know what each number represents as im making a program and it requires we to break down a gmmod file into variables, change the variables and re-assemble the file.
  • 0

Known as MishMash on the internet, If only my username could be changed :D?

Posted Image

Working on Sharp Edge, a 3D Level designer which exports to GMMOD and textures, with a vast toolset, and fancy GUI. ( So far, software is only going to be distributed with my game, in the future, it will be up for public use and with the ability to customise the software using the Plugin System to suite your games needs.)
Also working on 3D Multiplayer FPS Global Anarchy Denied Operations.


#4 jsorgeagames

jsorgeagames

    GMC Member

  • GMC Member
  • 710 posts
  • Version:GM:Studio

Posted 04 June 2011 - 07:17 PM

I ran some tests in GM8.1 and got this:

block
10 x1 y1 z1 x2 y2 z2 hrep vrep 0 0
cylinder
11 x1 y1 z1 x2 y2 z2 hrep vrep closed steps
cone
12 x1 y1 z1 x2 y2 z2 hrep vrep closed steps
ellipsoid
13 x1 y1 z1 x2 y2 z2 hrep vrep steps 0
wall
14 x1 y1 z1 x2 y2 z2 hrep vrep 0 0
floor
15 x1 y1 z1 x2 y2 z2 hrep vrep 0 0

For primitives, the primitive_begin line comes first, then all of the model_vertex... lines, then the primitive_end line, just like in GML.

d3d_model_primitive_begin
0 type 0 0 0 0 0 0 0 0 0

type can be
pr_pointlist (1)
pr_linelist (2)
pr_linestrip (3)
pr_trianglelist (4)
pr_trianglestrip (5)
pr_trianglefan (6)

d3d_model_vertex
2 x y z 0 0 0 0 0 0 0
_color: 3 x y z color alpha 0 0 0 0 0
_texture: 4 x y z xtex ytex 0 0 0 0 0
_texture_color: 5 x y z xtex ytex color alpha 0 0 0
_normal: 6 x y z nx ny nz 0 0 0 0
_normal_color: 7 x y z nx ny nz color alpha 0 0
_normal_texture: 8 x y z nx ny nz xtex ytex 0 0
_normal_texture_color: 9 x y z nx ny nz xtex ytex color alpha

d3d_model_primitive_end
1 0 0 0 0 0 0 0 0 0 0

Edited by jsorgeagames, 04 June 2011 - 07:20 PM.

  • 1

#5 michael pw

michael pw

    GMC Member

  • GMC Member
  • 1488 posts
  • Version:GM8.1

Posted 04 June 2011 - 09:51 PM

Thanks very much!!
  • 0

Known as MishMash on the internet, If only my username could be changed :D?

Posted Image

Working on Sharp Edge, a 3D Level designer which exports to GMMOD and textures, with a vast toolset, and fancy GUI. ( So far, software is only going to be distributed with my game, in the future, it will be up for public use and with the ability to customise the software using the Plugin System to suite your games needs.)
Also working on 3D Multiplayer FPS Global Anarchy Denied Operations.