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: 7735
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 »

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 = ??? 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
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)
User avatar
Past Administrator
Past Administrator
Posts: 2341
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)

Re: updated slot info (trek and hob)

Post by Tethys »

Super interesting info here. I wonder what kind of stuff that Shield.hob has going on that was making it so crashy years ago (dxwnd seems to fix it and most other combat bugs)

Could it be that they were going to maybe do some different color shielding (like phasers and torpedoes) for the races but didnt have the time and resources to? Slap the old shield hob back on call it a day? Maybe they were going to check which race/phaser and apply the shield color depending on the incoming energy weapon type? Hmm. Perhaps something to look into.

I was planning on going back through the phaser hobs and testing all the values through once more; updating the info we have here. Since the phaser and torpedo per race have been unlocked, there has been a significant lack of beam types for minor races. We have a many torpedo types. But you know I don't deal with 3d modeling; a beast untamed.

With the shield hob I am not as knowledgeable however classic combat tests have shown there to be at least some degree of fault with that hob in particular. Mainly when a beam weapon interacts with it (I believe I tested torpedoes only vs hob and there was no issue?). I tested also removal of the shield hob which allowed the combat to play through without issue. Something to look into.
Not for the weak of heart...
Galaxies MOD v0.3.6x1 <--- GALM/Galaxies Mod latest version
Post Reply

Return to “Trek.exe Ship Slots”