My To Do List

To start C2C i make a small .net exe. It will be able to locate the bts.exe then start it and set the PATH Environment Variable to include the Assets directory of the mod. This way we can put the xerces.dll in the C2C\Assets directory. The exe searches the bts.exe in directories specified in a xml file it also saves the last known location to this xml.

Edit!
The status of the parser change is that i have a possible error somewhere in the reading code for TraitInfos i have to find and fix this before i commit.
I fixed that error:).
 
I make a simple .net exe to launch the game with C2C.
The Search Paths for the Bts directory are in a Xml like this one if you have yours in a different place you can simply add it there.
Please post there you have the Game so i can include as many as possible in the first commit.
Code:
<?xml version="1.0" encoding="utf-8"?>
<C2CLauncher>
  <LastBtsPath>C:\Program Files (x86)\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword</LastBtsPath>
  <BtsSearchPaths>
    <Path>C:\Program Files (x86)\Firaxis Games</Path>
    <Path>C:\Program Files\Firaxis Games</Path>
    <Path>C:\Program Files (x86)\Steam\SteamApps\common</Path>
    <Path>C:\Program Files\Steam\SteamApps\common</Path>
    <Path>If you have the Game in a different place add your Path here</Path>
  </BtsSearchPaths>
</C2CLauncher>
 
C:\Program Files (x86)\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword

C:\Program Files\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword
 
(on my old XP machine):
C:\Program Files\Steam\steamapps\common\Sid Meier's Civilization IV Beyond the Sword\Beyond the Sword

I don't think I customized that (or even had an option to) so that's where Steam puts it.
 
I had to run your Launcher as an Administrator to get it to work. Maybe have it set to run as Adminstrator as default?
 
When I use the launcher I get an error message and it launches the normal game rather than C2C. I have configured CivilizationIV.ini to automatically launch C2C.

"Mods\Caveman2Cosmos \ is an invalid mod directory, ignoreing"
 
I had to run your Launcher as an Administrator to get it to work. Maybe have it set to run as Adminstrator as default?

I don't need them but if this is a common issue i can change it.
Do you need AdminRights for the Game?

When I use the launcher I get an error message and it launches the normal game rather than C2C. I have configured CivilizationIV.ini to automatically launch C2C.

"Mods\Caveman2Cosmos \ is an invalid mod directory, ignoreing"

I updated the Svn try the new version and tell me if it fixes your problem.
 
Would it be possible to choose the mod path? I have my set up as mods/Caveman2Cosmos/trunk
 
Would it be possible to choose the mod path? I have my set up as mods/Caveman2Cosmos/trunk
In the latest version you can set the ModDir in the C2CLauncher.xml if you have it in a subdirectory like you do.

It didn't fix the problem, but it changed the error message. Now says Mods\Release\ is an invalid directory.

You have to run the C2CLauncher.exe in the root of Caveman2Cosmos not the one insyde the sources.

There's a C2CLauncher.xml included in which you can edit your path quite easily.

In the latest version you can do that.
 
You have to run the C2CLauncher.exe in the root of Caveman2Cosmos not the one insyde the sources.
Aha. Then I get the first error message again. It is however possible that the problem stems from Civ4 being located on my SSD and symlinked to the disk where I keep my other steam games. I'll ask a friend of mine with basically the same setup - but without the symlink - to test it.

edit: Looks like it isn't cause by that, and isn't caused by the .ini file setting either. Very strange.
 
So... I'm trying to figure this out. It seems like I can load the game fine without using the C2C launcher exe file. Is this loading in a way that we shouldn't be right now or is it that when you load a mod now it then routes through that exe and use of the launcher is optional? I'm a little confused.
 
So... I'm trying to figure this out. It seems like I can load the game fine without using the C2C launcher exe file. Is this loading in a way that we shouldn't be right now or is it that when you load a mod now it then routes through that exe and use of the launcher is optional? I'm a little confused.
Currently use of the launcher is optional, but when the DLL is switched over to using the new xerecs XML parser it will be required for the game to load properly.

I'm guessing you could ditch the launcher if you were willing to modify your vanilla Civ4 BTS installation, though. I'm thinking I'll try symlinking the xerecs dll into the vanilla directory.
 
Ok... well... while it is really cool to finally be able to bypass the main civ game load process without causing potential errors the plan does create some concern for the ability to load save game files by direct double-click on those.
 
I didn't even know that was possible.

However I don't really see why the CvGameCoreDLL can't simply load the xerecs dll directly itself before starting to process the XML. As long XML isn't being read in DllMain that shouldn't be a problem.
 
Yeah, I was wondering if we could run the setup as a nested part of the normal process. Perhaps we could send a bool variable when loading the setup file to let it know if it's being called as part of the normal load process or if it's been initiated on it's own.
 
Ok... well... while it is really cool to finally be able to bypass the main civ game load process without causing potential errors the plan does create some concern for the ability to load save game files by direct double-click on those.

Ok I didn't know that you could do that with mod saves.

I didn't even know that was possible.

However I don't really see why the CvGameCoreDLL can't simply load the xerecs dll directly itself before starting to process the XML. As long XML isn't being read in DllMain that shouldn't be a problem.
Yeah, I was wondering if we could run the setup as a nested part of the normal process. Perhaps we could send a bool variable when loading the setup file to let it know if it's being called as part of the normal load process or if it's been initiated on it's own.


I tried loading the dll manually in DllMain and use Delay-Loading but we can't do this because of"error LNK1194: cannot delay-load 'xerces-c_3_1.dll' due to import of data symbol".
This was the first thing i tried but it was just a waste of time:(
We can't copy the dll to the bts installation so i made that crapy launcher to add the assets directory to the PATH Environment Variable and then start the Game. it works for me but there are alot of problems with it so this is of the table sorry for wasting everybodys time with that:(

Next thing i try is to directly link the xerces code into the CvGameCoreDLL the same way we do it with Boost.Thread but i have no idea if that works and how long it takes.
I have to edit the makefile to do this and i never really used one of them.
 
Top Bottom