I just wanted to get some of my thoughts here.
at 0x18f7fc of trek.exe is the start of slot data
slot data has 3 slots types,
trek.exe ship slot data
Code: Select all
+0x0 = name of Hob file +0x4 = ??? most 1; CS, TT, rom: Warbird HCII, YS & CalCryGoTaCho=0; defiant EdoGod=2; sovy=4, outpost=7, starbase=0,1, 3 or 4 +0x8 = ??? most 0, some card fer kling rom & Gal-X Sovy Defiant = 1 +0xC = number of weapon slots (phaser, plasma or Gomtuu effect) +0x10 = plasma switch marker 0 = phaser 1 = plasma +0x14 = number of damage spots -> for scar1.hob & explosions +0x18 = special damage texture switch marker for starbases -> d*s_b.gif (a bit bugged) 0 = scar1.gif 01 = damage gif (d*s_b.gif for vanilla starbases only) +0x1C = exe scale +0x20 = phaser/plasma slots (16 max) -> meaning of different default values? I am still very interested in what the different values used at 0x20 do. [quote="Spocks-cuddly-tribble"]These values are used in sub_52C548(input eax), which is part of two loops over all weapon slots, thus they could be modifiers for selection of weapon slots and/or distance calculations. 0 should break the switch due to dec = -1. Maybe the following check reads 0xFFFFFFFF as unsigned und jumps to loc_52C58F. [code]AUTO:0052C578 dec eax AUTO:0052C579 cmp eax, 9 ; switch 10 cases AUTO:0052C57C ja short loc_52C58F ; default
Code: Select all
0052C551 cmp eax, 0C0h
thunderchero wrote:I guess I was right in my guess and SCT thought the same. I did some tests with hl2 model it had 6 slots
test 1 vanilla bytes after scale it fired from 1 phaser slot
test 2 all bytes after scale set to "00" it fired from 4 phaser slots
test 3 first 6 bytes after scale set to "01" it fired from 4 phaser slots
test 4 only first bytes after scale set to "C0" it fired from 3 phaser slots
(many more combos need to be tested) but the phaser slots are so close to each other it would be tough to tell what slot it fires from.
in every test I used same attack command (charge) (other command may react differently)
So I would think the bytes after scale is used but still not fully understood and is some kind of modifiers for selection of weapon slots.
Note values 0x4 and 0x8 is disabled since plasma weapons was not part of released version, but most of the code is still present.Spocks-cuddly-tribble wrote:I just tested a Brel / kl1 with 0xC0 and and it was able to fire 180 degrees backwards. So the values have a major importance for tactical battles, not only for cosmetic aspects. Since e.g. the ship scale is affected by hob and trek.exe slots (with different side-effects), figuring the whole mechanism could be very intricate...
so editing those values have no current effect.
Note: trek.exe does not even check total number of plasma slots or if switch is on or off.
But this explains a question by QD awhile ago
during convertion of models, slots need to be added.QuasarDonkey wrote: Actually, what's more of interest to me now are the *other* slots (not phasers and not scars):
<'HH2', 1, 1, 14, 0, 12, 0, scale=1.0, 17, 21, 25, 20, 24, 22, 26, 33, 37, 41, 36, 40, 38, 42, 0, 0>
You can't really see all 14 red ones in the pic, but there's 7 on top of the disc, and 7 on the bottom. Likewise, there are 12 damage spots.
What are the two yellow ones for?
working on damage/scar slots I found out how important the "number" for slots are.
example; if I named my first plasma slot "slot17" it would be ignored since this is space between slot types. So first plasma slot must be named "slot18"
This is what happened to hh2 model above.
hob slot data starts after the gif marker for palette and texture (except starbase that have strange data for special damage textures only used by starbases)
slots are a 1-vertex polygon to mark postion on model for slots (damage slots have matrix data phaser and plasma do not)
each slot is 48 bytes long (space between types is also 48 bytes long)
Code: Select all
slots 1 - 16 are main phaser slots (16 max) slot 17 is 48 byte space between types slots 18 - 30 plasma slots (12 max) slot 31 is 48 byte space between types slots 32 - 43 are for damage slots (12 max)