This already has been posted in the Crew Experience topic:
Code is located in subroutine 46A3E8.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:
Task force Intercept value = 20 + cumulated experience bonuses of all shipsCode: Select all
00/scout +5 01/destroyer +20 02/cruiser +3 03/strike +2 04/command +1 05/colony +0 09/troop tr. +0
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.
(My 0x-offsets always referring to hex-editor except for prefixed asm, sub or loc)
Intercept base value:
0x697F1 default: 0x14
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