Re: 1.50.1 Fan Patch
Posted: Tue May 03, 2016 3:54 pm
Excellent! One more thing. Is it possible to make Lord Brazen's "Cluster" galaxy size selectable in MP? Currently it can only be used in SP.
I have a little experience with assembly editing, if I find some time I'll see if I can't help locate something relevant to how the AI chooses races.
Edit: I'm uncertain if this information will help, but regarding AI race selection:
After you've generated a galaxy at least once (won't show up otherwise!), a search of the game's memory (in DOSBox) for an array of bytes as follows...
Should only yield one result. These are some instructions inside a function that executes multiple times during galaxy creation, and is run by every AI player at least once for every player slot already filled. It compares the AI's randomly chosen race against races already chosen to avoid duplicate races. In the middle of this code somewhere is:
mov al,[eax+ecx]
Flanked on either side by two jumps. If you modify this particular line to read:
mov al,0F
Then you've told the game that the race being compared against is always race number #16 (which doesn't exist - #12 is Trilarians), so it will always pass. Now the game can randomly generate 3x Psilons etc. The beginning of this function seems to hold the current player slot in register EDX. This is as close as I could get to controlling the races the AI generates. I'm afraid my experience with this (especially with DOSBox) is too limited to be of much more use, but I hope it helps someone here find what they need.
I have a little experience with assembly editing, if I find some time I'll see if I can't help locate something relevant to how the AI chooses races.
Edit: I'm uncertain if this information will help, but regarding AI race selection:
After you've generated a galaxy at least once (won't show up otherwise!), a search of the game's memory (in DOSBox) for an array of bytes as follows...
Code: Select all
8D 3C 37 9C 89 0D ** ** ** ** 8B CF 8B C1 C1 E8 0C 8B 04 85 ** ** ** ** 85 C0 74 08 8A 04 08 E9 17 00 00 00 51 E8 ** ** ** ** 83 C4 04 2C 01 0F 84 A7 00 00 00 8A 05
mov al,[eax+ecx]
Flanked on either side by two jumps. If you modify this particular line to read:
mov al,0F
Then you've told the game that the race being compared against is always race number #16 (which doesn't exist - #12 is Trilarians), so it will always pass. Now the game can randomly generate 3x Psilons etc. The beginning of this function seems to hold the current player slot in register EDX. This is as close as I could get to controlling the races the AI generates. I'm afraid my experience with this (especially with DOSBox) is too limited to be of much more use, but I hope it helps someone here find what they need.