Caledorn
Emperor
That's great! I will definitely try this, and give feedback! Thanks for all your awesome work, guys. Your contributions to Pitboss is truly appreciated. 

That's great! I will definitely try this, and give feedback! Thanks for all your awesome work, guys. Your contributions to Pitboss is truly appreciated.![]()
Url: [COLOR="#0033FF"]www.example.com[/COLOR]/[COLOR="#FFA500"]subdomain[/COLOR]/[COLOR="#0033FF"]PBs[/COLOR]/[COLOR="#008000"]myPB[/COLOR]
Empty Webdirectory: /var/www/[COLOR="#FFA500"]subdomain[/COLOR]/[COLOR="#0033FF"]PBs[/COLOR]/[COLOR="#008000"]myPB[/COLOR]/Saves/pitboss
Altroot-Argument (Linux-Path): [COLOR="#FF0000"]/home/$USERNAME[/COLOR]/[B]_url_[/B][COLOR="#0033FF"]example.com[/COLOR]/[COLOR="#FFA500"]subdomain[/COLOR]/[COLOR="#0033FF"]PBs[/COLOR]/[COLOR="#008000"]myPB[/COLOR]
Altroot-Argument (Wine-Syntax): Z:[COLOR="#FF0000"]\home\$USERNAME[/COLOR]\[B]_url_[/B][COLOR="#0033FF"]example.com[/COLOR]\[COLOR="#FFA500"]subdomain[/COLOR]\[COLOR="#0033FF"]PBs[/COLOR]\[COLOR="#0033FF"]myPB[/COLOR]
Finally, add symbolic link. (Do not forget to allow symlinks in your webserver settings.)
/var/www/[COLOR="#FFA500"]subdomain[/COLOR]/[COLOR="#0033FF"]PBs[/COLOR]/[COLOR="#008000"]myPB[/COLOR]/Saves/pitboss/auto -> [COLOR="#FF0000"]/home/$USERNAME[/COLOR]/_url_[COLOR="#0033FF"]example.com[/COLOR]/[COLOR="#FFA500"]subdomain[/COLOR]/[COLOR="#008000"]PBs[/COLOR]/[COLOR="#008000"]myPB[/COLOR]/Saves/pitboss/auto
Legend:
[COLOR="#0033FF"]www.example.com[/COLOR] Your Domain (or IP)
[COLOR="#FFA500"]subdomain[/COLOR] Free choice
[COLOR="#FF0000"]/home/$USERNAME[/COLOR] Free choice
[COLOR="#0033FF"]PBs[/COLOR] Root folder of your PB games. If you use PBStats this should be the PBs folder of this project.
[COLOR="#008000"]myPB[/COLOR] Name of your PB, free choice
Hello Caledorn,
the wrapper is just for the users. As host you need just to configure a webserver.
Did you use a Windows or Linux host for your PB Servers?
For Windows it should be similiar, i.e.
1. Assume your Domain is http://example.com and your games are organized as PBs/PB1, PBs/PB2, etc.
2. Move your PB ALTROOT-Dir into C:\_url_example.com\PBs\PB1 and restart your server with the new path. The special foldername allows the client to detect the correct domain for the request.
3. Create in your root folder of your webserver the folder-chain [http_root]\PBs\PB1\Saves
Now, link (mklink-tool from Microsoft) C:\PBs\PB1\Saves\pitboss into the above folder, i.e.
mklink /D C:\PBs\PB1\Saves\pitboss [http_root]\PBs\PB1\Saves\pitboss
(Untested because I use Linux.)
=>
If a user with BTS_Wrapper.exe connects to your server the game will try to load
http://exlample.com/PBs/PB1/Saves/pitboss/[Savename]
I'm running on a Windows 8.1 installation.
Your explanation is very handy - but I have a few additional questions:
- The games do not follow the naming scheme of PB1, PB2, etc. - they follow varying naming schemes. I currently have games with names like RBPB18, RBPB25, Badgame4, CFC2014. Will the design of this feature work with varying names like that?
Your folder names should also be ok. Problematic are names which require some encoding in URL, like space and special characters.- Do I have to modify the altroot of the games, or will a simple symlink of the current altroot into the webserver folder you're describing work the other way around? E.g. If the files are in c:\pitboss\<game name>\saves\pitboss - can I create a symlink to c:\_url_pitboss.watto.no\PBs\<game name>\saves\pitboss and leave the current altroot statements as they are?
No, this does not work. The ALTROOT affects the path which will be send to theee user. Thus, in your case it would be c:\pitboss\<game name>\ No url information on client side.
Well, you could use a symlink, but also needs to change the path in your PB startup script.
- Will the wrapper work for people who are running Civ4BTS using Steam?
3. Now, use the batch script to start the Pitboss server (Edit MOD variable!) and start a test game. If you see the 'Message of the day' from the pbSettings.ini, it works.
int getCITY_HOME_PLOT() const { return GC.getCITY_HOME_PLOT(); }
[COLOR="SeaGreen"]
mutable CvString tmp;
const char * getAltrootDir( ) const {
tmp.Convert( gDLL->GetPitbossSmtpLogin() );
return tmp.GetCString();
}[/COLOR]
.def("getDiplomacyPowerTypes", &CyGlobalContext::getDiplomacyPowerTypes, "string () - Returns enum string")
[COLOR="SeaGreen"].def("getAltrootDir", &CyGlobalContext::getAltrootDir, "string ( )" )[/COLOR]
If you want host a new Pitboss game please note that our real good stuff hides in the test-subfolder![]()
The normal Exe of Civ4:BTS could be used to start the Steam version, too.
for (pNode = headCityNameNode(); (pNode != NULL); pNode = nextCityNameNode(pNode))
{
szName = gDLL->getText(pNode->m_data);
if ([b]isCityNameValid[/b](szName, true))
{
szName = pNode->m_data;
break;
}
}