w00t w00t     (Moderator: Hell Raiser) Previous Topic | Next Topic
Page 1 of 1
 Author 
 Post 
Hell Raiser
Site Developer
Post 09-Feb-2006 09:51        

All aboard the h4x0r train!

_ #
ő-ŏ> w00t w00t!

Quote:
From Sige, finding the thing array and related whatnots:

thing data: 668? bytes
68 (pointer...ends up at various tables with pointers)
88 surface pointer?
92 sector pointer
96
100
104
108
112
116 (int)
120 (pointer...to another thing relatively far away...original state?)
124
128
132
136 float rvec_x
140 float rvec_y
144 float rvec_z
148 float lvec_x
152 float lvec_y
156 float lvec_z
160
164
168 (float)
172
176
180
184 position_X?
188 position_y?
192 position_z?
196 (int)
200 pointer to model
216 (pointer)
228 (pointer to unfilled/unallocated)
232 (pointer)
236 (pointer)
264 (pointer to start of thing, or parent?)
292 pointer to .snd file
296 pointer to .pup file
300 (pointer...animation related?)
348 float pitch
372 minpitch?
376 maxpitch?
636 template string name
? is this in the thing struct, or just right after it?
?668 pointer to cog data struct for thing's cog (pointer to pointer to cog)


model data: 132 bytes
0 name string
36 meshes (geoset 1)
40 pointer to mesh data (geoset 1)
44 meshes (geoset 2)
48 pointer to mesh data (geoset 2)
52 meshes (geoset 3)
56 pointer to mesh data (geoset 3)
60 meshes (geoset 4)
64 pointer to mesh data (geoset 4)
68 geosets?
72 pointer to list of material pointers
76 materials
80
84 nodes
88 pointer to node structs
92 radius
96
100
104
108
112
116
120 float insertoffset_x
124 float insertoffset_y
128 float insertoffset_z


mesh data: 112 bytes
0 name string
36 int geometrymode
40 int lightingmode
44 texturemode ?
48 pointer to vertex position array, no intensity values
52 pointer to vertex texcoord array
56 pointer to vertex intensity array?
60 pointer to byte array (1 per vertex, starts filled with 0's?)
64 pointer to 3do surface array
68 pointer to vertex normal array
72 vertices?
76 texcoords?
80 int faces
84 float radius
the rest is unfilled


3do surface data: 64 bytes
0 int surface number
4 type?
8 int geo
12 int light
16 tex?
20 int vertices
24 pointer to list of vertex position indices?
28 pointer to list of vertex texcoord indices?
32 pointer to mat
36
40
44
48
52 float normal_x
56 float normal_y
60 float normal_z


node data: 180 bytes
0 name string
64
68 int node number
72 int type flags
76 int mesh number
80 pointer to mesh
84 int numchildren
88 pointer to child node
92 pointer to sibling
96 float pivot_x
100 float pivot_y
104 float pivot_z
108 float x
112 float y
116 float z
120 float pitch
124 float yaw
128 float roll
132 float 4x3 matrix


mat data: 180 bytes
0 u1
4 name string


surface data: 92 bytes
0 int surface number
4 u1
8 pointer to sector
12 pointer to adjoin?
16 int surfflags
20 int surface number again
24 u3
28 int faceflags
32 int light
36 int tex
40 int vertices
44 pointer to vertex position index list
48 pointer to vertex texcoord index list
52 pointer to mat
56 u5
60 u6
64 u7
68 u8
72 u9 (float)
76 u10
80 u11 (float)
84 pointer to vertex light array (floats)
88 u12


sector data: size = 152 bytes
0 int sector number
4 float ambient light
8 u1
12 pointer to colormap
16 u3
20 pointer to list of sector vertex indices
24 u5
28 int vertices
32 u6
36 int surfaces
40 pointer to surface list struct?
44 u8 (other pointer)
48 u9 (pointer to thing in sector?)
52 u10
56 float centerx
60 float centery
64 float centerz
68 u11
72 u12
76 u13
80 u14
84 u15
88 float collidebox0
92 float collidebox1
96 float collidebox2
100 float collidebox3
104 float collidebox4
108 float collidebox5
112 float boundbox0
116 float boundbox1
120 float boundbox2
124 float boundbox3
128 float boundbox4
132 float boundbox5
136 float radius


Last edited by Hell Raiser on 05-Apr-2006 03:57; edited 1 time in total
Post 09-Feb-2006 16:35        

Yes! This data looks awesome, give me a min to soak it all in. Look slike some things are missing from the player data list, like Uvec and such. And there has to be a reference to his ACSII name somewhere.
Post 09-Feb-2006 17:12        

This is great man. Looks like he not only mapped out the player data, but mapped out sector and surface too! That means it should be possible to make ALL KINDS of new verbs. I always thought a SetWallAdjoin() verb would be awesome.

If somebody could send me the software to print the values of these memory locations, i'd be happy to see if I could figure out some of those unknowns for you.
Hell Raiser
Site Developer
Post 09-Feb-2006 23:19        

Well, what he wound up discovering, was that the variable types (int, flex, Sector, thing, model, etc) had pointers to a structure or something, making it kind of easy to find out where most of the stuff is stored.

I kinda spaced out last night, and forgot to ask him how he got all this info, so I could help fill in the blanks.

I wrote him an email, but haven't gotten a reply.
Post 09-Feb-2006 23:27        

Do you think it'd be possible to find and change the position of a vertex? It would be very exciting if it's possible, but if I'm remembering right the rendering code may not be designed for that type of thing.
Well, if it's possible... I would love to be wrong.
Hell Raiser
Site Developer
Post 09-Feb-2006 23:32        

Well, judging from the info that Sige found out, anything that is listed above, can be retrieved, or set. So if you moved a vertex in a sector, or on a surface, you'd have to recalculate surface normals, texture UV, bounding box, etc and it should all be okey dokey.

A great example would be a water surface with multiple verticies, moving around to look like water.

'Tis a great new day for JK editors!
Post 10-Feb-2006 01:50        

This also should make it quite easy to add MotS verbs.

*switching topics slightly* Ya know, one verb I always wanted as SetAmmoBin() with -1 working for the - - - in the HUD.
*** Post commands are unavailable for guests. ***