Play as more than one Empire

You can talk about anything. (please read forum rules before posting)

Moderator: thunderchero

User avatar
NayThanLok
Cadet 4th Year
Cadet 4th Year
Posts: 17
Joined: Sat Apr 27, 2013 5:38 pm

Play as more than one Empire

Post by NayThanLok »

Random Question

I would love to play through the whole game one day, from tech 1 to tech 10 - sticking as close to 'canon' as possible. I use the UDM canon map savegame but when I start a play through, but something inevitably always happens that doesn't follow the Trek lore - like the Cardassians forming an alliance with the Klingons.

I know its a very unusual question but Is there a way to play as more than one Empire?

I remember many years ago trying to use UE to play one turn as the Feds, then end the turn and switch the savegame to the Cards, then end the turn and switch to Klingons etc - but within a few rounds of this - everything would crash.

Is this something that would be possible please?
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3258
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Play as more than one Empire

Post by Flocke »

Hey NayThanLok,

I think the best you can do is to run multiple windowed BotF instances in a multiplayer game.

This can be done, but dxwnd I remember had some issue to run multiple instances from same install directory. And given the registry can only be setup for one game at a time and is required by direct play, I guess you need to switch the registry with some scripts to establish the connection.
Alternatively you can try mpr++, that can run multiple instances from same install directory, it however sometimes crashes when files are written simultaneously by the auto save or combat.

The most stable approach therefore is to run the game in some virtual machines, which however is quite ressource intensive. :roll:
User avatar
NayThanLok
Cadet 4th Year
Cadet 4th Year
Posts: 17
Joined: Sat Apr 27, 2013 5:38 pm

Re: Play as more than one Empire

Post by NayThanLok »

Thanks - looks like I need to buy three more computers then.

I'm sure the Wife will understand.... Once I explain my sound reasoning....
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3258
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Play as more than one Empire

Post by Flocke »

NayThanLok wrote: Mon Feb 06, 2023 6:56 pm Thanks - looks like I need to buy three more computers then.
While non of above hotseat suggestions are optimal, all 3 should work.

1) Game Copy:

As explained by thunderchero in viewtopic.php?p=56130#p56130 , all required to connect is that each game install must have their own registry keys to point to the correct install path, and the registry key game versions must match.

Therefore:
  1. Duplicate install folder
  2. Then, from windows start run "regedit" command to access the registry editor.
    Lookup and duplicate the registry keys from selected install at "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microprose\Star Trek: ...".
    Adjust the InstallPath but for next step keep care to not lengthen the new registry key name.

    The registry keys actually are split to "Microprose" and "Microsoft\DirectPlay\Applications" folders, but duplicating the Microprose ones from my testing seems to be sufficient.
  3. with a hex editor edit trek.exe registry keys at 0x00174357 and 0x0017b09f
  4. change the trek.exe window name at 0x00188c47 so it is unique
  5. edit the stbof.ini application path
  6. and in my case, for the second run I had to enable window 8 comatibility mode
    ( also refer viewtopic.php?p=58950#p58950 )
This requires some setup but should be the preferred way since it both avoids file write conflicts and memory overhead of the virtual machines.

Edit: I tested this approach myself by now, and it works flawless.
For further details also check the hotseat topic: viewtopic.php?f=3&t=4164

2) When auto save is disabled, from my experience using mpr++ works fine as well and does not require to edit the registry. I'm however not sure on the combat, since the BotF combat writes file to game install path as well. To get it stable for the long run, one might need to edit trek.exe to write combat files to a different path, or again fallback to (1).

3) Virtual machines are free and can easily be setup for this. E.g. you might use VirtualBox from Oracle: https://www.virtualbox.org/
You however will have to install Windows to the first VM. The other VMs you can clone thereafter.

When you have Windows Professional installed, you might also look into Hyper-V containers. From what I've seen, it's however a bit more work to setup, and I've found no good tutorials.
Last edited by Flocke on Sun Apr 02, 2023 1:34 pm, edited 4 times in total.
User avatar
NayThanLok
Cadet 4th Year
Cadet 4th Year
Posts: 17
Joined: Sat Apr 27, 2013 5:38 pm

Re: Play as more than one Empire

Post by NayThanLok »

Thankyou so much
Iceman
Admiral
Admiral
Posts: 3318
Joined: Fri Apr 10, 2009 2:00 am

Re: Play as more than one Empire

Post by Iceman »

You can do that rather easily in Supremacy, BTW. LMK if you want to know how to do it.
User avatar
slickrcbd
Lieutenant-Commander
Lieutenant-Commander
Posts: 200
Joined: Tue Sep 08, 2015 9:22 pm
Location: in front of a computer

Re: Play as more than one Empire

Post by slickrcbd »

Flocke wrote: Mon Feb 06, 2023 3:34 pm Hey NayThanLok,

I think the best you can do is to run multiple windowed BotF instances in a multiplayer game.

This can be done, but dxwnd I remember had some issue to run multiple instances from same install directory. And given the registry can only be setup for one game at a time and is required by direct play, I guess you need to switch the registry with some scripts to establish the connection.
Alternatively you can try mpr++, that can run multiple instances from same install directory, it however sometimes crashes when files are written simultaneously by the auto save or combat.

The most stable approach therefore is to run the game in some virtual machines, which however is quite ressource intensive. :roll:
What about using virtual machines? BotF doesn't have that great a system requirement for a modern computer. So you can set up multiple Win98SE systems with a quarter gigabyte of RAM to run them, maybe half a gigabyte. Win98SE doesn't have activation or Windows Genuine disAdvantage, so you should be able to use the same product key on multiple systems. You can use less than 10gb of HD space for them too. Heck, there were lots of systems for Win98 with only 4gb. If it is solely for BotF you can use less than 2gb, possibly only 1gb, although I'd recommend around 4gb.
I don't know if HyperV will let you do it, but VMware or Virtual Box can do it. Virtual PC used to also be available for free, but I don't know if it will work on anything later than Windows 7 and I think it's been removed from Microsoft's website.

I'm just saying they wouldn't be as resource intensive as it used to be for the purpose of BoTF if you use period appropriate operating systems. XP had a significantly higher minimum system requirement than Windows 98 which could run with only 32mb of RAM (not very well, but I had a 300mhz laptop with only 96mb that ran fairly well until it took a fall when cleaning out my closet in 2020), and Vista had an even greater requirement (quadruple that of XP across the board). The requirements only became relatively static after Vista.
Last edited by slickrcbd on Mon Jun 12, 2023 3:35 am, edited 1 time in total.
User avatar
LadyGray
Cadet 2nd Year
Cadet 2nd Year
Posts: 8
Joined: Wed Mar 29, 2023 4:50 am

Re: Play as more than one Empire

Post by LadyGray »

I've tried everything but I can't get it to work. Firstly I tried the Virtual Machines but it turns out that installer from this site doesn't work on windows 98. Also i dont know how the networking would be on windows 98.

I also tried duplicating the registry key and editing the hex file but after i edit the trek.exe file with the hex editor it wont load and just comes up with an error message saying the game needs a CD ROM to play. im probably doing something wrong as i don't have experience with hex editing but I've no idea what.

It's a shame as I would like to play all 5 empires myself instead of having a bad AI.
User avatar
slickrcbd
Lieutenant-Commander
Lieutenant-Commander
Posts: 200
Joined: Tue Sep 08, 2015 9:22 pm
Location: in front of a computer

Re: Play as more than one Empire

Post by slickrcbd »

Well, when I was in school we managed to install Windows XP virtual machines with only 4gb virtual hard drives. The problem is activation. I can't recall if Windows 2000 requires activation, but it too can make due with only 4gb.

Alternately, try downloading XP mode which is really just a virtual machine for HyperV (successor to Virtual PC). It only works on a pro version of Windows 7, but there were ways to get it to work with Win10.

XP needs a minimum of 512mb of RAM and 4gb of HD space is recommended for the OS and game. BOTF will run on a real machine with 512mb of RAM and XP. If you have a lot of mods you might want to give it more RAM, like 1gb.
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3258
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Play as more than one Empire

Post by Flocke »

LadyGray wrote: Mon Jun 12, 2023 1:05 am im probably doing something wrong as i don't have experience with hex editing but I've no idea what.
Typical errors would be:
  • edit the wrong executable
    - the named offsets are for trek.exe from application install folder
    - AFC BOTF installer must be used, not the CD ISO install
  • edit the wrong offsets
    - with HxD simply click [ctrl + g] and enter the offset number without '0x' prefix
    hex-edit.jpg
    hex-edit.jpg (150.31 KiB) Viewed 1015 times
  • miss one offset
    - 3 offsets to edit, read above
  • mess the executable length
    - when you replace "BOTF" by "WTF" then set the hex value of lasst character to zero
    - lengthening is not possible, since it would mess all the other coded executable offsets
Please let us know what resolved your issue when you find a solution. Whatever it is, others might run into the same issue.

HTH
User avatar
LadyGray
Cadet 2nd Year
Cadet 2nd Year
Posts: 8
Joined: Wed Mar 29, 2023 4:50 am

Re: Play as more than one Empire

Post by LadyGray »

Is this the correct part to edit in for the last hex given in no buildngs upgrade mod?

Image
User avatar
LadyGray
Cadet 2nd Year
Cadet 2nd Year
Posts: 8
Joined: Wed Mar 29, 2023 4:50 am

Re: Play as more than one Empire

Post by LadyGray »

and for the first two hex I was editing this part


Image


Image

and this is the error I get

Image
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3258
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Play as more than one Empire

Post by Flocke »

LadyGray wrote: Mon Jun 12, 2023 7:26 am Is this the correct part to edit in for the last hex given in no buildngs upgrade mod?
It's all the correct locations. The only way I managed to reproduce your issue is to set a wrong CDPATH in stbof.ini :roll:
It must be set to same path like the HDPATH, both set to the new install path. And it should have no space letters.
User avatar
LadyGray
Cadet 2nd Year
Cadet 2nd Year
Posts: 8
Joined: Wed Mar 29, 2023 4:50 am

Re: Play as more than one Empire

Post by LadyGray »

Thanks a lot stbotf.ini was the problem I had left the last backslash out on CDPATH and HDPATH ! So now I have managed to get 2 copys of BOTF on the same PC running at the same time which is great.

The remanining problem now is the multiplayer as it's not picking up any game. I've used TCP/IP leaving address blank and just filling player name and game name on both copies. Firewall is disabled.

Image
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3258
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Play as more than one Empire

Post by Flocke »

That's looking to get close! :)
LadyGray wrote: Tue Jun 13, 2023 12:21 am The remanining problem now is the multiplayer as it's not picking up any game. I've used TCP/IP leaving address blank and just filling player name and game name on both copies. Firewall is disabled.
If not blocked by some firewall, Windows Defender or some Anti-Virus software, it might be that you changed the version number when copying the registry keys. The version number must be same for the game to be found.
same_reg_version.jpg
same_reg_version.jpg (38.47 KiB) Viewed 913 times
If that doesn't help, you can try duplicate the DirectPlay application keys from:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\DirectPlay\Applications\Birth of the Federation
They however should only be relevant when launched from a game Lobby like WarZone or the old MSN Gaming Zone
In my testing it made no difference.

Edit: I remember one other thing you might be missing. In system options Apps -> Optional Features -> Additional Windows Functions (scroll to bottom) you need to activate the legacy DirectPlay support. The AFC Installer should already have activated it, but if not you need to do so manually.
legacy_dplay.jpg
legacy_dplay.jpg (60.81 KiB) Viewed 910 times
Post Reply

Return to “General Chat”