Peter1981 wrote:just an off the cuff thought but wouldn't larger task forces need some consideration of the auto-battle at least and maybe the battle calculations as well? or does trek.exe not care about the individual ships in a task force but its combined overall stats
I don't think would matter that much in the end. See it's all done through arrays and loops, so in C programming language it might like this:
Code: Select all
struct TaskForce_t { // (sizeof=0x6C)
int fleetId;
int shipCount;
int shipIDs[9];
int mission;
...
int cloaked;
}
and the code would use it like this:
Code: Select all
for (i = 0; i < 9; i++) {
id = taskForce.shipIDs[i];
...
}
So we'd have to patch a lot of
instructions, etc., to make the code handle more than 9.
But we'd also need to move the shipId's array within the TaskForce structure, here's how we'd expand it to 18 ships:
Code: Select all
struct TaskForce_t { // (sizeof=0x6C + 18*4)
int fleetId;
int shipCount;
int oldShipIDs[9]; // NO LONGER USED
int mission;
...
int cloaked;
int newShipIDs[18]; // <- ship id's are moved to the end of the structure
}
and we'd change a lot references to the shipId's offset within Trek.exe. Note this is the high-level theory behind it, in practice, we're just fiddling with offsets, i.e. the original uses offset 8 within the TaskForce structure, we want to change it to offset 0x6C. That's the basic idea. This is the basic method I used for extending the Energy Screen. If it's done right, the code will still behave exactly as before.
I've done some basic research into this mod, and it seems to be possible, but at the very least it would break compatibility with save games, i.e. you couldn't use modded save games with an unmodded version of Trek.exe and vice versa. A small price to pay.
Though I wouldn't hold my breath waiting for this mod, I can't guarantee it will work, there are far more complications than the Energy Screen Project. But I'll try.