updated slot info (trek and hob)

Trek.exe Ship Slots; support/discussion/questions

Moderator: thunderchero

Post Reply
User avatar
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 6048
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

updated slot info (trek and hob)

Post by thunderchero » Fri Feb 13, 2015 8:41 pm

Hi Everyone

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 = number of plasma slots
+0x8 = plasma slot switch on = 0 off = 1
+0xC = number of phaser slots
+0x10 = phaser slot switch on = 0 off = 1
+0x14 = number of damage spots
+0x18 = damage spot switch on = 0 off = 1
+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.
Spocks-cuddly-tribble wrote: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: Select all

AUTO:0052C578                 dec     eax
AUTO:0052C579                 cmp     eax, 9          ; switch 10 cases
AUTO:0052C57C                 ja      short loc_52C58F ; default
0xC0 looks especially interesting:

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.
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...
Note values 0x4 and 0x8 is disabled since plasma weapons was not part of released version, but most of the code is still present.
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
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?
during convertion of models, slots need to be added.
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)

Post Reply

Return to “Trek.exe Ship Slots”

Who is online

Users browsing this forum: No registered users