Some important notes for editing:
-> the Ultimate Editor changes some code of sub_44F42C when altering shiplist (monster switch) or map size (for borg spawning)
-> the global map- resp combat- behavior of monsters is not governed by sub_44F42C:
- Borg / Map: stay IF system still populated ELSE transwarp jump to next (not monster occupied) system:
viewtopic.php?p=34119#p34119
- Tarellian / Combat: don't fire any weapons:
viewtopic.php?p=29166#p29166
-> whereas it's possible to add new system effects for other monster (e.g. +/- credits, morale, research...), adding corresponding new message pop-ups is a bit more complicated i.e. one would have to know about effects
-> enabling planetary defense (OBs/SH) against monster (or system damage besides pop loss), unfortunately, would be excessive work, since we cannot use even part of sub_466CF0(standard system attack). Also note the attack immediately on arrival setting.
At asm-44F3F0 is the switch/jump table for monster system behavior (case=4byte address of code sequence) sorted by shiplist.sst-ID, cf
here.
1. Population loss:
Code: Select all
-> Borg:
44F4A4 cmp ebx, 0Ah // kill all if pop lower 10
44F7F3 fmul ds:5791B0 (0.5) // pop loss 50%
44F802 cmp dword ptr [esp+20h], 14h // if pop loss lower 20...
44F809 mov dword ptr [esp+20h], 9 // make pop loss 9 (odd values?)
-> Crystal Entity:
44F832 cmp esi, 5 // kill all if pop lower 5
44F8AB fmul ds:5791A8 (0.3) // pop loss 30%
-> Tarellian:
44F8DC cmp edx, 5 // kill all if pop lower 5
44F955 fmul ds:5791A0 (0.15) // pop loss 15%
2. Planets after Borg Attack: (loc_44F4CA...)
Code: Select all
44F4E3 cmp byte ptr [esi+48h], 3 // if not a gas giant...
44F561 mov edx, 1 // change to barren
44F56F mov al, [esi+38h] // planet size for brg[l,m,s].ani
3. Borg spawning: (loc_44F5D3...) -> copies after system assimilation (for main borg limits see:
viewtopic.php?p=10788#p10788)
For adjusting probabilities see
Scheme of the Random Events (#1.1). Turning off random events doesn't prevent borg copies after system assimilation
Code: Select all
44F635 cmp ds:58FDE0, 10h //exit if 16 or more cubes in game(redundant)
For difficulty level 1-5:
Random divisor:
44F65B mov eax, 6
44F79A mov edi, 4
44F7AD mov esi, 3
44F7C0 mov ebx, 2
44F7D3 mov dword ptr [esp+1Ch], 2
44F683 cmp edx, 1 // if remainder not 1...
44F686 jnz loc_44F4FD // no new cube
No new cube if number of cubes already in game:
44F660 mov ecx, 2
44F79F mov ecx, 3
44F7B2 mov ecx, 4
44F7C5 mov ecx, 8
44F7DB mov ecx, 10h
44F6A6 mov ebx, 24h // Monster race-ID to spawn
4. End turn code for system attack tasks: (prepare message screens)
Code: Select all
Borg: (loc_44F4FD)
44F539 mov dword ptr [edx+4], 24h // Borg race-ID
Crystal Entity: (loc_44F84B)
44F887 mov dword ptr [edx+4], 25h // Crystal race-ID
Tarellian: (loc_44F8F5)
44F931 mov dword ptr [edx+4], 29h // Tarellian race-ID
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.