Current (instead of nominal) Hull as Damage to Opponent

Ramming possiblities -> (ramming ship always destroyed); support/discussion/questions

Moderator: thunderchero

Post Reply
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1926
Joined: Sun Apr 27, 2008 2:00 am

Current (instead of nominal) Hull as Damage to Opponent

Post by Spocks-cuddly-tribble »

Mentat wrote:
Spocks-cuddly-tribble wrote:As Gowron pointed out, in fact there is no bug - we just misinterpreted the functionality of the ram feature in BotF. Ram damage, applied to both ships, is determined by the lower nominal hull of the both ships.

And IMHO this feature makes sense, since even a major-damaged ship still holds its mass. So ramming a ship with a higher(or equal) nominal hull (i.e. mass/armour) than the own, is always a suizidal ramming regardless of higher current hull (which is not a indicator of the current mass of a ship, but just its damage status).

While I greatly agree with SCTs last post, at least from a realistic viewpoint, I think the perfect solution would be, that the actual hull value is used when computing the damage on the rammed/ramming ships, not the total/nominal hullpoints as it is done now.

I had an fresh inspiration and it seems to work. :)

Note: tevent still displays the old damage values, but without any real effect.

Code: Select all

trek.exe at 0x12933D

change:
82 2C FF FF FF 0F 87 CF 00 00 00 69 06 C8 03 00 00 8B 1D 64 78 59 00 8D 14 03 89 54 24 30 69 46 04 C8 03 00 00 01 C3 8B 44 24 30 8A 88 B0 01 00 00 89 74 24 3C F6 C1 01 0F 84 FA FE FF FF F6 83 B0 01 00 00 01 0F 84 ED FE FF FF E8 13 EC FF FF 8B 56 08 89 C7 E8 49 18 00 00

to:
85 D5 00 00 00 69 06 C8 03 00 00 8B 1D 64 78 59 00 8D 14 18 89 54 24 30 69 46 04 C8 03 00 00 03 D8 89 74 24 3C F6 82 B0 01 00 00 01 74 07 F6 83 B0 01 00 00 01 0F 84 FD FE FF FF 8B C3 E8 21 EC FF FF 8B 50 10 8B 44 24 30 E8 15 EC FF FF 8B F8 8B 48 10 E8 4B 18 00 00 8B D1

at 0x1293DD
change:
8B 54 24 3C
to:
90 90 90 90

and at 0x1293E6
change:
8B 52 0C
to:
90 90 90


529F3C    0F85 D5000000       JNZ 52A017
529F42    6906 C8030000       IMUL EAX, [ESI], 3C8
529F48    8B1D 64785900       MOV EBX, [597864]
529F4E    8D1418              LEA EDX, [EAX+EBX]
529F51    895424 30           MOV [ESP+30], EDX
529F55    6946 04 C8030000    IMUL EAX, [ESI+4], 3C8
529F5C    03D8                ADD EBX, EAX
529F5E    897424 3C           MOV [ESP+3C], ESI
529F62    F682 B0010000 01    TEST BYTE PTR [EDX+1B0], 1
529F69    74 07               JE SHORT 529F72
529F6B    F683 B0010000 01    TEST BYTE PTR [EBX+1B0], 1
529F72    0F84 FDFEFFFF       JE 529E75
529F78    8BC3                MOV EAX, EBX
529F7A    E8 21ECFFFF         CALL 528BA0
529F7F    8B50 10             MOV EDX, [EAX+10]
529F82    8B4424 30           MOV EAX, [ESP+30]
529F86    E8 15ECFFFF         CALL 528BA0
529F8B    8BF8                MOV EDI, EAX
529F8D    8B48 10             MOV ECX, [EAX+10]
529F90    E8 4B180000         CALL 52B7E0
529F95    8BD1                MOV EDX,ECX

529FDD    90909090            NOP

529FE6    909090              NOP

But I wasn't able to solve the swapped ship display-bug, if only the ramming (i.e. attacking) ships survive.
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1926
Joined: Sun Apr 27, 2008 2:00 am

Infamous bug displaying the wrong ships after successful ramming finally fixed

Post by Spocks-cuddly-tribble »

Spocks-cuddly-tribble wrote: Fri Jan 29, 2010 2:49 pmI wasn't able to solve the swapped ship display-bug, if only the ramming (i.e. attacking) ships survive.
NAME: Wrong Ship displayed after Successful Ramming (Fix)
DESC: Corrects the wrong displayed ships when ramming/attacking ships destroy the target and survive the impact.
AUTHOR: Spocks-cuddly-tribble
URL: viewtopic.php?p=54579#p54579

>> 0x98928 87
<< 0x98928 85

# 499527    8B85 A4010000   MOV EAX, [EBP+1A4]

# UPDATE
# Same register glitch (EDI/attacker instead of EBP defender) for animation if defender survives with shields down
# 4996C3    8B85 A4010000   MOV EAX, [EBP+1A4]

>> 0x98AC4 87
<< 0x98AC4 85
Last edited by Spocks-cuddly-tribble on Sat Jul 31, 2021 6:33 am, edited 2 times in total.
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7932
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Infamous bug displaying the wrong ships after successful ramming finally fixed

Post by thunderchero »

nice find will test soon
Post Reply

Return to “Ramming possiblities -> (ramming ship always destroyed)”