Weapon labels of ships/ Beams & Torpedoes

Weapon Labels of Ships (Beams & Torpedoes); support/discussion/questions

Moderator: thunderchero

Post Reply
User avatar
Code Master
Code Master
Posts: 723
Joined: Sun Apr 27, 2008 2:00 am

Weapon labels of ships/ Beams & Torpedoes

Post by Spocks-cuddly-tribble » Mon Aug 25, 2008 2:15 pm

Credit for all value locations; Gowron

The controlling race setting in shiplist.sst determinates the used lexicon.dic entries of weapon labels of ships. In addition it's predicted by the largest threshold, which shiptech.sst weapon tech build requirement reaches or exceeds.

1. "Controlling race" codes in shiplist (relative offset 0x118):

Code: Select all

00 Cardassian
01 Federation
02 Ferengi
03 Klingon
04 Romulan
05-23 Minor
24 Monsters (not recommended =>crashes)
:arrow: This can be changed with UE in upgrade screen of ship stats "behave as if built by". :idea:

Note: Will affect beam AND torpedo label.

Pay attention to side effects like the assault command for 03/Klingon colony ships and troop transports.

2. The default lexicon.dic entries and trek.exe locations of the corresponding thresholds:

(default value; 1 byte) / (*) = Available as of tech 0.


Phaser Banks (*)

Phaser Emitters
0x4A009 (0x03)

Phaser Arrays
0x4A012 (0x05)

Photon Torpedoes (*)

Quantum Torpedoes
0x49DE9 (0x06)


Phaser Banks (*)

Phaser Emitters
0x4A028 (0x03)

Phaser Arrays
0x4A02D (0x05)

Photon Torpedoes (*)

Quantum Torpedoes
0x49DFF (0x05)


Forced Plasma Beams (*)

Plasma Torpedoes I (*)

Plasma Torpedoes II
0x49E1E (0x04)

Plasma Torpedoes III
0x49E23 (0x07)


Disruptor Type I (*)

Disruptor Type II
0x4A097 (0x02)

Disruptor Type III
0x4A09C (0x04)

Disruptor Type IV
0x4A0A1 (0x06)

Ion Torpedoes (*)


Disruptor Type I (*)

Disruptor Type II
0x4A066 (0x03)

Disruptor Type III
0x4A06B (0x06)

Plasma Torpedoes I (*)

Plasma Torpedoes II
0x49E4F (0x03)

Plasma Torpedoes III
0x49E54 (0x06)


Phasers (*)

Merculite Torpedoes (*)

Note: German lexicon.dic default entries for Phaser Banks AND Phaser Arrays are "PhaserBänke".

Example: (Quantum Torpedoes)
Gowron wrote:You can change the thresholds manually, but it requires a Hex Editor.

Open trek.exe with a Hex Editor.

Go to the position of the corresponding threshold value and change it to whatever you want (as long as it's between 0x01 and 0x0A).

The Federation value is located at position
(1 byte, default value: 0x05)

The Cardassian value (they use Photon/Quantum Torpedoes as well) is located at position
(1 byte, default value: 0x06)

Cardassian/Federation ships will "use" Photon Torpedoes if they require a weapon tech level that is lower than the threshold value. Otherwise, they will "use" Quantum Torpedoes.

3. There is a trick to separate(& swap) phaser/torpedo labels (for empires only i.e. IDs 0-4 ):

Torpedo labels (sub_44A94C)

44A9E0 jmp 44A910+[edx*4] -> edx = emps ID from shiplist.sst+0x118

Emps. torpedo label jump table at 0x49D10:

Code: Select all

E7 A9 44 00 FD A9 44 00 1C AA 44 00 7E AA 44 00
4D AA 44 00
Phaser labels (sub_44AB6C)

44AC00 jmp 44AB30+[edx*4] -> edx = emps ID from shiplist.sst+0x118

Emps. phaser label jump table at 0x49F30:

Code: Select all

07 AC 44 00 26 AC 44 00 57 AC 44 00 95 AC 44 00
64 AC 44 00
For example if you change places of 26 AC 44 00 (fed) and 95 AC 44 00 (kling) then feds use kling beam weapon thresholds/entries and vice versa.

Everything else requires re-coding:
Gowron wrote:The weapon tech level of the ship is compared to those values like this:

if (weapon_tech_level < threshold) load_name(lower_torpedoes);
else load_name(higher_torpedoes);

To load the string (i.e. the name) of a torpedo type, the game loads its entry number in lexicon.dic and reads the string from there.
Nova86 wrote:I ask because I'm curious to know if its possible to change the weapons upgrades such that there are more photon upgrades (ie: photon I,II,III, quantum) by borrowing from other weapons (say merculite torpedo becomes photon I).
That would be possible, but you can't simply insert more "if...then...else" commands into trek.exe, because the lenghth of the code must stay the same. So you have to change the syntax to something like

load_name(lexicon_entry(100 + weapon_tech_level));

and use the respective lexicon slots (in this example: 101 through 110) for your weapon names.

But in order to change the syntax, you need some basic knowledge of assembler code (or object code).

The weapon graphics are always determined by current owner i.e. by default there's only one set per empire and only one for all minors/monsters.

=> Ship Specific Weapon Animations
On the verge of a nervous breakdown? Try the relaxing tribble sounds.

Post Reply

Return to “Weapon Labels of Ships (Beams & Torpedoes)”

Who is online

Users browsing this forum: No registered users