the Cardassian bonus for manned intel

the Cardassian bonus for manned intel; support/discussion/questions

Moderator: thunderchero

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

the Cardassian bonus for manned intel

Post by Spocks-cuddly-tribble »

The cardassian union get a bonus of 15% (rounded down) for manned intel building output, but only if race on system is cardassians (inhabitants).


Thanks to DCERs hint
DCER wrote:Cardassians are actually the only empire that gets this kind of bonus to intel
and Gowrons trek.exe multipliers topic I've detected location of percentage calculation:


:arrow: 0x409CD (0F) -> Bonus Percentage

0x409C1 (00) -> compared with Controlling race ID
0x409C8 (00) -> compared with Inhabitants ID

(followed each by jump if not zero)



The corresponding popup however is shown on all systems controlled by cardassians.
DCER wrote:The popup is displayed if you put your cursor over the bottom left intel output number (the one where credits food etc are listed).
:arrow: Lexicon entry 314 "Loyal Cardassians contribute extra intelligence"

My guess was BotF mistakenly checks twice for controlling race (i.e. owner) instead of inhabitants, or the second check is somehow skipped. But that isn't the case. As soon as first time on a F2 screen both requirements are meet, popup will show up on ALL systems till game is reloaded. That in combination with the popup term "loyal" leads to the wrong conclusion the bonus may depend on moral.


Popup checks:

0xF50AF (00) -> compared with player empire ID
0xF50BE (00) -> compared with Inhabitants ID

(followed each by jnz)

NOTE: For some odd reason the popup works properly only for player empire IDs 00 & 01.
I got strange crashes during my tests with the other empires right up to a complete system freeze. :?
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
Gowron
Code Master
Code Master
Posts: 304
Joined: Sat Apr 26, 2008 2:00 am
Location: 50° N, 11° E

Re: the Cardassian bonus for manned intel

Post by Gowron »

Great work, this is a very interesting feature :)
Spocks-cuddly-tribble wrote:NOTE: For some odd reason the popup works properly only for player empire IDs 00 & 01.
I got strange crashes during my tests with the other empires right up to a complete system freeze. :?
Since different empires use different fonts, maybe it's the length of the text?

I tried changing the popup text to "intel", and it worked with all empires (I changed the Controlling Race check, but not the Inhabitants check, so I conquered a Card. system with each other empire).
A discovery consists in seeing something everybody has seen and at the same time thinking something nobody has thought yet.
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1884
Joined: Sun Apr 27, 2008 2:00 am

Re: the Cardassian bonus for manned intel

Post by Spocks-cuddly-tribble »

Good to hear it works at all, but entry lenght doesn't seem to matter for me :? (tested multi 1.0.2 german)

Check at 0xF50AF set to:

00 & 01 -> Ok
02 & 03 -> No popup (regardless of meet requirements)
04 -> crash as soon as I enter ANY F2 screen (regardless of played empire or meet requirements/ no crashlog).

Also if popup check fails there is a third cmp 0 (jz) check, subject I wasn't able to determine.


I hope someday there will be a way to insert AI only affecting (&race specific) multipliers for at least credits & research, since AI is unable to adapt race specific advantages. Either by accessing of difficulty mecanics or using checks in the fashion of this bonus.



EDIT:

I think we can use the potential of this feature in a more efficient way. :wink:


For example the following code leads to a 30% deduction of manned intel building output for none-native systems:

Code: Select all

trek.exe at 0x409BE
change:
80 78 4C 00 75 0A 66 83 78 44 00 75 03 83 C6 0F
to:
8B 68 4C 3B 68 44 90 90 90 90 90 74 03 83 EE 1E


asm 4415BE:

mov     ebp, [eax+4Ch]
cmp     ebp, [eax+44h]
nop     (5x)
jz      short loc_4415CE
sub     esi, 1Eh        => 1E = deduction value
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
QuasarDonkey
Code Analyst
Code Analyst
Posts: 433
Joined: Tue Jul 26, 2011 8:29 pm
Location: Ireland

Re: the Cardassian bonus for manned intel

Post by QuasarDonkey »

Here's a patch that will disable the 15% Cardassian intel bonus and GUI message.

freeintel0.patch:

Code: Select all

NAME: Disable Cardassian 15% intel bonus
DESC: This patch removes the 15% intel bonus that Cardassian-owned and inhabited systems receive.
AUTHOR: Spocks-cuddly-tribble 
URL: https://www.armadafleetcommand.com/onscreen/botf/viewtopic.php?f=168&t=761
TAG: enhancement

# Replace percentage 15 with 0.
>> 0x409cd  0F
<< 0x409cd  00

# Disable the GUI message about loyal Cardassians.
>> 0xf50b1  75
<< 0xf50b1  EB
Post Reply

Return to “the Cardassian bonus for manned intel”