Page 1 of 1

shiplist.sst info needed

Posted: Fri Jun 14, 2013 5:38 pm
by thunderchero
Hi Everyone,

I was looking at the shiplist.sst and noticed some areas are not list/explained. So I created a new table with all the info I could find.

I hope to find/get some help with the unknown lines in image below.

I know some of the hex type is not exactly described correctly (1 byte unsigned ect) I just used term from UE.

old image ... iplist.png


Re: shiplist.sst info needed

Posted: Thu Jul 18, 2013 4:08 pm
by Dr_Breen
offset 0xc8:
Did you notice that the Galaxy II (command cruiser II) is the only ship that has a 01 in the first byte (followed by 11 bytes with 00). all the other ships have 12 bytes filled with 00. perhaps they planed something there but never used it. or is there anything special about the Galaxy II?

Re: shiplist.sst info needed

Posted: Thu Jul 18, 2013 4:56 pm
by thunderchero
Dr_Breen wrote: or is there anything special about the Galaxy II?
yup there is
Spocks-cuddly-tribble wrote:-GalaxyII 640points beam bug (DCER)

shiplist.sst - relative offsets of GalaxyII (replace the following values with zeros):

+0xB4 (01), +0xB8 (96), +0xBC (08 ), +0xC0 (50), +0xC4 (0C), +0xC8 (01)
and at +0x101-103 (E0 75 40)
just +0xC8 (01) was never explained.


Re: shiplist.sst info needed

Posted: Wed Jun 03, 2015 12:46 am
by Raider Echo3
Since the min plasma range is missing maybe +0xC8 is min range for plasma weapon? ;)

Re: shiplist.sst info needed

Posted: Fri Dec 13, 2019 4:01 pm
by Spocks-cuddly-tribble
thunderchero wrote:
Fri Jun 14, 2013 5:38 pm
I hope to find/get some help with the unknown lines in image below.
Better late than never.... :wink:

Shiplist.sst [+9Ch](dword) gets tested for AI Colony & TT ships to set combat ability bit for AI taskforces i.e. unlock 'Engage' (sub_42B988).

Sub_479D10 reads shiplist.sst [+9Ch] and [+A0h] for some funny AI combat calculations. See also 'Combat.bin bug': viewtopic.php?f=272&t=566#p19075

Compare unkonwn shiplist.sst values i.e. sort ships first by value from sub_4797C0 and subordinate by:

([+9Ch] * 100 / 15868) + 10 * crew experience level

([+A0h] * 100 / 5862) + 10 * crew experience level

And of course the code has a bug...

Sorting / Selection of AI Ships (Task Forces) Crew Experience Bug-Fix

Code: Select all

0x791CF change 01 C2 89 94 -> 8B F8 01 84

0x7921A change 08 -> 38

00479DCF   8BF8              MOV EDI, EAX             // store 10 * crew experience level ship 1
00479DD1   018424 40020000   ADD [ESP+240], EAX

00479E18   8D1C38            LEA EBX, [EAX+EDI]       // use for ship 1 [+A0h]

shiplist.sst Beam Minimum 'Range?' Firing Arc in Degrees & Trek.exe Phaser Slots

Posted: Sun May 31, 2020 4:17 pm
by Spocks-cuddly-tribble
Gowron wrote:During combat, a ship is designated as "unarmed" if its minimum beam range is equal to zero.

Apart from this are we sure the 'beam minimum range?' at shiplist.sst +0xDC is actually used?

Same question arises for shield penetration (only on paper in tevent.txt), agility (overridden by combat group?), torpedo min range...

The 'minimum range?' for beam-weapons of space stations is not read from shiplist.sst but fixed in trek.exe (default -1):

Code: Select all

005224B5                 mov     dword ptr [eax+210h], 0
005224BF                 mov     dword ptr [eax+214h], 0BFF00000h
Since -1 is cosine of pi (fcos function interprets values as radians) this would be 360.0 degree in shiplist.sst.

'Minimum range?' for beam-weapons of ships & monsters from shiplist.sst gets coverted into radians via *pi/360 (stations & 'plasma?' not):

Code: Select all

584CEC BeamMinRange_x_0_5     // * 0.5 = /2
584CF4 BeamMinRange_x_pi      // * pi
584CFC BeamMinRange_x_0_005p  // * 5/900 = /180
Unlike stations the fcos function is applied before storing.

'Minimum range?' for 'plasma?'-weapons of ships in trek.exe at:

Code: Select all

584D04 PlasmaMinRange_0_3926990816987238 // radian for fcos function equals 45.0 degree in shiplist.sst
Note that all shiplist.sst values mistakenly referred to with 'plasma'(they are not connected with plasma.hob files) are only used for ships (not stations & monster).

Phaser/plasma switch is in the trek.exe ship slot at +0x10 (0 = use phaser / 1 = use plasma). The info here is false: viewtopic.php?f=150&t=3321#p44235

1. Shiplist.sst +0xDC is an angular degree, converted into radians for fcos function (e.g. degrees/cos = 0/1 180/0 360/-1).
2. The calculated cosine values don't seem to be used but instead values depending on trek.exe phaser-slots.

Trek.exe Phaser Slot values

Sub_52C548 assigns each slot four values depending on set bits:

for C0 (Turret?) set values 1-4 to 1 / 0 / 0 / -1 (360 degree) and exit

for all other calculate values 1-3 using radians A & B:

(remove bits 7-8)

only bit 5 set radian A = 0 & radian B = 0.5pi
only bit 6 set radian A = 0 & radian B = -0.5pi

else (remove bits 5-8) and set radian A for:

0h = not set
1h = 0
2h = pi
3h = not set
4h = 1.5pi
5h = 1.75pi
6h = 1.25pi
7h = not set
8h = 0.5pi
9h = 0.25pi
Ah = 0.75pi
B-F= not set

then check bits 5 & 6 for radian B:

0 or both -- radian B = 0
only bit 5 - radian B = 0.25pi
only bit 6 - radian B = -0.25pi

Calculate values 1-3:

1 = cosine radian A * cosine radian B
2 = sine radian A * cosine radian B
3 = sine radian B

then check bits 7 & 8 for value 4 (firing arc):

0 or both set 0.5 = 120 degree (Beam/Emitter Banks?)
only bit 7 set 0.866 = 60 degree (Dual & Heavy Cannons?)
only bit 8 set 0 = 180 degree (Beam/Emitter Array?)

Have the phaser slots in hob.files a direction value (e.g. rear/aft-mounted or up/down) or is the direction set by radians A & B?

Bits 1-8 (read from right to left): ... ecimal.htm

Code: Select all

1 - forward
2 - rear
3 - left
4 - right
5 - up
6 - down
7 - narrow firing arc
8 - wide firing arc

In theory one could use different firing arcs for Heavy Cannons, Beam Banks, Arrays or Turrets on the same ship.

Unfortunately the game development stopped before different weapon types, strengths and animations could get assigned to specific weapon slots of the ship model.

- no torpedo and/or unkown ship hob slots
- phaser & plasma hob are mutually exclusive and share same ship hob & trek.exe slots
- the second energy weapon (galaxy class 2 default) has no ingame display for stats, issues when paired with main phasers and shares the phaser/plasma setting