I was hoping to continue this project, but it would take away too much time from other projects. Anyways, here is an initial analysis.
Plasma animationa are just a child animations of ships, basically using phaser code. Unlike a torpedo, a plasma-'bolt' has no own ds:597864 entry (see below) nor a real position or trajectory (the plasma-bolt chases moving targets, even into warp) . The animation just shows a cosmetic pseudo trajectory based on the fired weapon slot & target position and a pseudo position based on the system time. But for an approximately correct display in all tactical camera object views (wrt alignment & scale) BotF apparently needs code for a missile aka torpedo.
Knowing about object codes and plasma marker, I activated / manipulated some unused plasma code resp. changed switches to use torpedo / phaser code - without significant results.
- Plasma switches:
0049E304 cmp dword ptr [ecx+4], 2 // phaser only switch to sub_4A1420
sub_49FBC4 object switch -> case 2 phaser, case 3 plasma (see below ds:5CAEC8 +4)
0049FC49... (vs. sub_4A1210 phaser code with VTX reference)
004A07B8 cmp edx, 2 // phaser only switch to sub_4A1210
a test sharing torpedo code with plasma = plasma zoom out scale a bit better
004A07D1 83FE 04 CMP ESI,4
004A07D4 0F8C 37010000 JL 4A0911
004A0B25 cmp dword ptr [eax+150h], 0 // ship slot +10h = plasma switch marker
004A0B32... plasma target code (behaves just like phaser code sub_ 4A1210)
- Some relevant files & code keys:
Please aware that some information is speculative/incorrect, since these are just hasty written (& partially outdated) notes.
The most important file in combat is ds:597864, containing entries for each ship, station & monster (-> value locations are confusing due to unneeded displacements) AND for each torpedo!
-> ds:597864 (3C8h per object) set in sub_520D7 (most addresses apply only to ships -> ship/station/monster displacement)
+38h 1 = cloaked
+58 bitmask or1=cloaked cf. +20C ?
+0EC 0 = uncloaked
+15C Scale set by 3D
+178 object type 1=ship / 5=station / 6=torpedo / 7=monster
+188 fed fer ship stuff ?
+1A4 in tactical combat ds:[5CAEC8] 3D entry
+1B0 or1 = torpedo & skip all? / or2=no shields?
+1B4 for torpedo -> 0xFFFFFFFF / ships start Gshiplist?
+1B8 for torpedoes 3C8h entry of firing ship
+1DC owner race ID
+1EC Shield Strength
+1FC given command
+206 shiplist.sst ID (for stations at +1E2)
+20C or 10h = lock weapons (or 1 = cloaked)
+228 plasma minimum distance?
+230 plasma max range
+25C plasma accuracy (+beam EPs)
+260 plasma shots
+264 plasma Multiplier
+268 plasma damage
+26C plasma Shield Penetration
+270 [4 - exp level] * 65536 / plasma shots
+280 min distance phaser?
+288 max distance phaser
+2B4 beam accuracy (+beam EPs)
+2B8 phaser shots
+2BC beam multiplier
+2C0 beam damage
+2C4 shield penetration?
+2C8 [4 - exp level] * 65536 / phaser shots
+2D0 phaser 3D sfx entry set marker (plasma +278)
+308 torpedo accuracy
+30C torpedo shots
+328 current Shield Strength
+32C nominal Shield Strength -> if nebular set to 0 -> +2D4 monster +2BC station
+330 shield level
+334 Shield Recharge
+338 current hull points
+33C nominal hull
+344 damage control
+358 Build Cost
+35C 2 = cloaked (ship -> +304 monster)
+390h -> or 2 = lock shields (due to cloak)
+3C4 ability bitmask (3th bit /4 = command, 4 /8 cloaked fleet?, )
The most important 3D sfx file is ds:5CAEC8, containing entries for each object, regardless if shown/used or not.
-> ds:[5CAEC8] 3D data 170h per object (address set in ds:+1A4 for ship/station/monster/torpedoes)
+4 object code:
0 ship/monster (& station in tech screen/screensaver), 1 photon, 2 phaser, 3 plasma, 4 explosion, 5 shields, 6 station, 7 stellar object, 8 scar & Gomtuu effect (wkk.hob)
+24 a scale float * exe scale ?
+44 -1 or object index -> ds:602B6C(2bytes/entry) -> ds:602B60(98h bytes/entry) child animations
+48 address of a list for weapons?
+4C shields stuff?
+70 shields stuff?
+7C a float
+98 scale (=hob*exe)
+9C object index flag -> skip if 0
+A0 an object code ?
+BC damage ratio
+C0 attacker entry for beams
+C8 target entry for beams
+100 ship entry for shields
+10C -> skip if 0
+118 cmp system_time_milliseconds
+120 attacking weapon entry for shields
+124 -1 or 1
+12C -1 remove object marker
+13? a float * -0.5 +1
+140-170 trek.exe slot for shiplist.sst objects
On the verge of a nervous breakdown? Try the relaxing tribble sounds.