Intercept percentage

Intercept percentage; support/discussion/questions

Moderator: thunderchero

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

Intercept percentage

Post by Spocks-cuddly-tribble »

Not a particularly interesting subject but here is how to mod intercept percentages for taskforces.


This already has been posted in the Crew Experience topic:
Spocks-cuddly-tribble wrote:Task force INTERCEPT value

Intercept base value is always 20. Thus, I'm not sure how it is determined.

The bonus per experience level(beginning with Green!) depends on ship function:

Code: Select all

00/scout         +5
01/destroyer    +20
02/cruiser       +3
03/strike        +2
04/command       +1
05/colony        +0
09/troop tr.     +0
Task force Intercept value = 20 + cumulated experience bonuses of all ships

03/strike and 04/command do support Intercepting task-forces, but cannot Intercept alone -> button disabled.
Note: As suspected, AI controlled ships do it even so.

Colony ships and troop transports don't support Intercept.
Code is located in subroutine 46A3E8.

(My 0x-offsets always referring to hex-editor except for prefixed asm, sub or loc)


:arrow: Intercept base value:

0x697F1 default: 0x14


:arrow: Intercept experience bonus values:

01/destroyer -> 0x69849 default: 0x14


The other values aren't explizite stored, i.e. modding requires code altering.

However this can be done easiely:

00/scout ------->0x697C0 ->(default: 2E)
01/destroyer -->0x697C4 ->(default: 47)
02/cruiser ----->0x697C8 ->(default: 4C)
03/strike ------>0x697CC ->(default: 51)
04/command ->0x697D0 ->(default: 31)


Just replace the desired values with one of the following:

33 = 0 (no experience bonus)
31 = 1
51 = 2
4C = 3
2E = 5
47 = value at 0x69849 (see above)


---

Code: Select all

NAME: Intercept Fix for Ally Ships
DESC: A feature bug intercepts friendly ships, without combat but with AI sympathy loss.
AUTHOR: Spocks-cuddly-tribble
URL: https://www.armadafleetcommand.com/onscreen/botf/viewtopic.php?p=10789#p10789

>> 0x695FA 31 C0 31 D2 66 8B 46 34 66 8B 53 34 39 D0 0F 84 73 01 00 00
<< 0x695FA 8B 46 34 8B 53 34 3B C2 74 45 E8 77 20 FD FF 85 C0 75 3C 90

#0046A1FA   8B46 34        MOV EAX,[ESI+34] // other TF race ID
#0046A1FD   8B53 34        MOV EDX,[EBX+34] // own TF race ID
#0046A200   3BC2           CMP EAX,EDX
#0046A202   74 45          JE SHORT 46A249 // same owner skip Intercept
#0046A204   E8 7720FDFF    CALL 43C280 // if treaty...
#0046A209   85C0           TEST EAX,EAX
#0046A20B   75 3C          JNZ SHORT 46A249 // ...skip Intercept
#0046A20D   90             NOP
Last edited by Spocks-cuddly-tribble on Sun Jun 19, 2022 8:49 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
DCER
Code Master
Code Master
Posts: 683
Joined: Sat Apr 26, 2008 2:00 am

Post by DCER »

Thank you! This is very useful actually :)
Post Reply

Return to “Intercept percentage”