empire wide % food bonus test code

General Modding Information/Questions; support/discussion/questions

Moderator: thunderchero

Forum rules
:idea: Please search before starting new topic. :idea:
There is a good chance it has already been asked.
Post Reply
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1961
Joined: Sun Apr 27, 2008 2:00 am

empire wide % food bonus test code

Post by Spocks-cuddly-tribble »

I think at some point there was a request by thunderchero for an empire wide % food bonus (for romulans IIRC). Here is test code:

Code: Select all

NAME: Test code for new output ID 0x36 % food (empire-wide)

>> 0x00039db9 8d 04 95 00
>> 0x00039dbf 00 29 d0
<< 0x00039db9 66 c7 43 70
<< 0x00039dbf 8d 04 52

>> 0x00043a72 8d 04 95 00 00 00 00 29 d0 c1 e0 02 01 d0
>> 0x00043a86 01 c0
<< 0x00043a72 6b c2 1a 8b 54 24 2c 8b 52 78 66 01 51 70
<< 0x00043a86 90 90

>> 0x000418b7 89 f3 8d 14 9d 00 00 00
>> 0x000418c0 29 da c1 e2 02 29 da 8d 88 40 02 00 00 c1 e2 03 01 d1 8d 14 b5 00 00 00 00 29 f2 05 c0 00 00 00 c1 e2 06
>> 0x000418fc 89
<< 0x000418b7 6b d6 58 8d 8c 10 40 02
<< 0x000418c0 00 33 d2 b2 c0 0f af f2 03 d6 0f b6 58 4c 69 db bc 01 00 00 0f b7 ab 08 1b 5b 00 89 6c 24 14 90 90 90 90
<< 0x000418fc 01

>> 0x0004148c 89 84 24 3c 04 00 00 db 84 24 3c 04 00 00 dc 0d 74 89 57 00 d9 e8 de c1 dc 8c 24 20 04 00 00 dd 9c 24
>> 0x000414b2 8b 9c 24 24 04 00 00 8b b4 24 20 04 00 00
<< 0x0004148c 0f b6 5e 4c 69 db bc 01 00 00 66 03 83 08 1b 5b 00 8b cc 89 01 db 01 dc 0d 74 89 57 00 d9 e8 de c1 ba
<< 0x000414b2 dc 0c 11 dd 1c 11 8b 5c 11 04 8b 34 11 90

>> 0x000431ce 75 1c bb ac 88 57 00 ba ea 07 00 00 b8 54 87 57
>> 0x000431df e8 cc 43 0c 00 85 c0 74 04 85 c9 74 e4
<< 0x000431ce 0f b6 5e 4c 69 db bc 01 00 00 66 03 8b 08 1b 5b
<< 0x000431df eb 0b 90 90 90 90 90 90 90 90 90 90 90
Requires e.g. the Pakled multi patch and updated systInfo map (below): viewtopic.php?p=60784#p60784

Code: Select all

NAME: systInfo address-map 0xB4 (with utopia preview fix) for new output IDs 0x35 + Credits & 0x36 % food (empire-wide)

>> 0x18DA6C 00 00 04 00 08 00 0C 00 FF 02 28 00 2C 00 18 00 1C 00 20 00 38 00 40 00 44 00 10 00 14 00 48 00 FF 02 FF 02 FF 02 FF 02 8C 00 B8 00 60 00 64 00 68 00 6C 00 70 00 4C 00 74 00 FF 02 B0 00 7C 00 AC 00 80 00 3C 00 50 00 FF 02 94 00 A4 00 98 00 88 00 90 00 A0 00 A8 01 BC 00 A8 00 14 01 5C 00 54 00 58 00 30 00 84 00 9C 00 24 00 78 00 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02

<< 0x18DA6C 00 00 04 00 08 00 0C 00 FF 02 28 00 2C 00 18 00 1C 00 20 00 38 00 40 00 44 00 10 00 14 00 48 00 FF 02 FF 02 FF 02 FF 02 8C 00 B8 00 60 00 64 00 68 00 6C 00 70 00 4C 00 74 00 FF 02 B0 00 7C 00 AC 00 80 00 3C 00 50 00 FF 02 94 00 A4 00 98 00 88 00 90 00 A0 00 A8 01 BC 00 A8 00 14 01 5C 00 54 00 58 00 30 00 84 00 9C 00 24 00 78 00 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02 FF 02
GUI popup code for vanilla would be (extra bytes needed), but I think a patch by thunderchero relocated the whole area? viewtopic.php?p=37216#p37216
004F5564         push    0                                 ; emps % bonus food (vanilla 0 = not given)

mov edx, [esp+20]   // empsInfo+DC -> @ vanilla 4F5507 moved to esp stack location (each push/pop +/-4)
movzx edx, word [edx-6C]  // get empsInfo+70 (DC-6C=70h) = new empire wide % food bonus
push edx
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
Post Reply

Return to “General Modding Information/Questions”