This is just bugging me now......
here is info I have collected
phaser slots data in hobs files
the location will slightly vary depending on how many textures are used by model (scar texture are not listed in hob)
all slots are 48 bytes.
during model conversion of flt to hob,
only the location of polygon center and basic scale (1.0) is written to hob.
the slot number in creator is very important
slots 1 - 16 are main phaser slots (16 max)
slot 17 is 48 byte space between types
slots 16 - 30 I think are b.gif phaser slots or maybe plasma (12 max)
slot 31 is 48 byte space between types
slots 32 - 43 are for damage slots (12 max)
Note; a 1 vertex polygon is used 1 per slot. this is a special polygon
the location where data is written in hob depends on slot number
example my current test
I have slot 01 - 08 for phasers, but next slot is 32 - 35 for damage slots. this give a large space between last phaser and start of damage data (1104 bytes 23 slots @ 48 bytes each)
if I re-number damage slots to 09 - 12 (or any thing between 9 -31) this give a no space/wrong space between last phaser and start of damage slot and game will crash since damage slot are not in proper location for trek.exe to find them.
here is image of my test model
- oriantation.jpg (153.14 KiB) Viewed 7688 times
Z = front to back
X = side to side
Y = top to bottom
slot data
48 bytes
12 - float (4 bytes) type values
first value "location position" X- left to right from center of model to center of polygon used for slot.
second value "location position" Y- top to bottom from center of model to center of polygon used for slot.
third value "location position" Z- front to back from center of model to center of polygon used for slot.
with these 3 values it will locate the graphics for damage spot. (slot polygon is only used for location, shape or size does not matter).
note; these values can be found by running "getloc.exe" from conversion files.
here is info from getloc.exe for polygon below
0.452817, -0.053557, -0.000000
fourth value is a mystery, if set to 0.0 or negitive damage will not display but all positive values show no effect.
note; this value is set during conversion to 1.0, vanilla damage slot has varying values
the next 2 values look to have no effect
fifth value is unknown (set to 0.0 during conversion, vanilla damage slot has varying values)
sixth value unknown (set to 0.0 during conversion, vanilla damage slot has varying values)
The next 6 values are based on the center of damage spot using edges.
I will be mainly using images to explain them
here is the orientation (values unedited) after conversion.
- damage.jpg (73.11 KiB) Viewed 7688 times
I added green line when damage could not be seen from prospective.
keep in mind edges are moved parallel to center of damage not rotated.
value 7 set to 0.0 during conversion
value shown 1.0
if you could center on damage ft view damage would look unchanged
- value 7.jpg (65.48 KiB) Viewed 7688 times
value 8 set to 1.0 during conversion
value shown 2.0
if viewed from side damage would look unchanged
- value 8.jpg (28.68 KiB) Viewed 7688 times
value 9 set to 0.0 during conversion
value shown 1.0
if viewed from top damage would look unchanged
- value 9.jpg (30.1 KiB) Viewed 7688 times
value 10 set to 0.0 during conversion
value shown 1.0
if you could center on damage ft view damage would look unchanged
- value 10.jpg (25.02 KiB) Viewed 7688 times
value 11 set to 0.0 during conversion
value shown 1.0
if viewed from side damage would look unchanged
- value 11.jpg (30.14 KiB) Viewed 7688 times
value 12 set to 1.0 during conversion
value shown 2.0
if viewed from top damage would look unchanged
- value 12.jpg (34.36 KiB) Viewed 7688 times
I am thinking with a little geometry calculations this might be able to be automated?
also you can create list with the vertex locations (all 3 corners of polygon used) using the "GetCoord.exe" from conversion files.
here is info from GetCoord.exe for vertex of polygon used
{ 0.452817, -0.053557, -0.000000 },
{ 0.369722, -0.053557, -0.000000 },
{ 0.437387, -0.053557, -0.116025 }
anybody good at geometry?
thunderchero