Hosting SWBF with PC Dedicated Server Software (and Invincibility/Historical)

Started by Led, December 24, 2009, 12:44:47 PM

Previous topic - Next topic
This is a copy of a post about hosting SWBF from my Clan Page.  Some may find it useful.
The Invincibility switch is discussed in this post.


New Guide:  Using Linux/Wine to host SWBF
http://www.swbfgamers.com/index.php?topic=8927.msg94961#msg94961



In November 2012, Gamespy was shut down.  In May 2014, GameMaster was released and has allowed us to host internet servers again.  As of 6/1/2016 SWBFgamers now hosts GameMaster and the service is named SWBFspy.  Be sure to get game and server patches from this site, as there is a community troll that claims to have a service (but it is non-functioning) edit:  maybe his works now (I will never be able to verify it), but he is an even bigger troll.

To host, you will still need to portforward.



You can also use the LAN option using either GameRanger or Tunngle or other LAN service.  Tunngle and Gameranger supports the use of the dedicated server software as described in this post.

Here is a link to a post to learn about hosting with tunngle:
http://www.swbfgamers.com/index.php?topic=5531.0


------------------------------------------------------------
Hosting SWBF

There are two ways to host SWBF. One way is with your game disk. Another, more stable way is to use the SWBF dedicated server software.

This guide will describe how to use the dedicated server software.


Getting the Software
--------------------

The first step is to get the software. It can be downloaded from SWBFgamers.com:
http://www.swbfgamers.com/index.php?action=downloads;sa=view;down=441
Be sure to also get the SWBFspy server patch located at this link
http://www.swbfgamers.com/index.php?action=downloads;sa=view;down=1386
(replace the original file with the one at the link above).



You can only host a game with this software.

I am often asked the question, "How do you play SWBF and host it too?"
The answer for me is that I have two computers. One for playing swbf and one for hosting.

However, it is possible to host and play on only one computer. I will describe how to do that at the end of this guide.

Download and install the dedicated server software (version 1.2). Go ahead and run the server software once, so that it creates a file called
"Battlefront Server.ini". I will describe this file later, and modifications that can be made to this file.


Dealing with your Router
------------------------

If you have a firewall/router you must enable portforwarding so that other people can connect to your computer. I know how to configure my router, but I don't know anything about yours though, so please consult your router manual.

If you know all about your router and how to portforward, then portforward ports 3658, 3659, 6500, and 27900, 29910, 29920 (both TCP and UDP) to your host computer. 

If you have a software firewall, like one built into windows, then you will need to deal with that, too, by allowing access for battlefront.  If are having troubles, try temporarily disabling your firewall and see if it works--then, if it does work, at least now you know what the issue is.

You can also spend money and rent a server.  PLA rents a server from www.NFOservers.com and it costs about $17/month and can run 5-8 server instances at a time.  Contact me if you want more details.  You can also use Wine on Linux for about $8/month.   Wine works with the SWBF1 dedicated server, but I've not seen it work for SWBF2.

Adding Commands to your Server
------------------------------

The basic BattleFront Server.ini file contains a line that can and
should be edited. Look for this line in the file:

APP_COMMAND_LINE_BASIC=/win /norender /autonet dedicated /resolution 320 240 /nosound

To turn off gamepad aim assist and to set a better framerate for players, add commands to this line as follows:

APP_COMMAND_LINE_BASIC=/win /norender /autonet dedicated /resolution 320 240 /nosound /noaim /tps 30


A list of commands that I know that work here are as follows:

/noaim is to turn off gamepad aim assist
/tps 30 sets the frame rate to 30 frame per second, which is much smoother than the default of 20
/unlimitedammo gives unlimited ammo
/invincible makes you invincible to enemy fire


other commands are available through the interface window.


Starting and Running the Server
-------------------------------

Follow the directions included with the software to learn how to adjust maps and tickets, etc., and how to boot or ban players using the GUI.  IMPORTANT:  be sure to set your hosting bandwidth in the GUI to 1M+   .


Hosting and Playing on the Same Computer
----------------------------------------

-Set up the dedicated server software as previously described
-Start SWBF using your game disk
-Alt tab out of the game
-Start the SWBF dedi server software
-re-enter the game
-Alt tab out to boot/ban players, etc.


Hosting without using the GUI
-----------------------------

If run the same basic server setting over and over, you can create a DOS batch file to run the server. Below is the contents of the batch file I use to run the CloudCity Only server:


----------
battlefront.exe /win /norender /noteamdamage /autonet dedicated /resolution 320 240 /nosound /noaim /tps 30 /gamename Led-CloudCity-TKoff-antiGlitch /playerlimit 16 /playercount 1 /bots 2 /difficulty 2 /throttle 2048 /spawn 5 bes2r 400 400 bes2a 400 400
----------

Copy that text between the lines into a file called CloudCity.bat

When you are familiar with the dedicated server software, it is easy to edit this kind of batch file.

Note:  Windows Server 2008 has a limitation on the length of a batch file.  I have not determined how to overcome this limitation.  Be aware that long batch files may not execute properly if you use Windows Server 2008.

update 7/1/2016  Longer batch file names can be used in Server 2012 R2 when using PowerShell.



Hosting Mod Maps with the Dedicated Server Software
-----------------------------------------------------------------------
You need two things to host a mod map:
1) the mod map, and
2) a file called mapinfo.txt for each map (if you use the GUI).


If you want to host a mod-map using the dedicated server software,
you will need to place the map folder in the Addon Folder of the
*server* software.  If you are using the 1.2 deicated server software,
there will already be a folder located in the Addon Folder call Tat3.

Tat3 is Jabba's Palace, which is a map that was released with upgrade
1.2 of the software.

The mapinfo.txt must reside inside of the mod map folder, or else the
GUI will not be able to recognize that the map is to be loaded into
the GUI.


Here is the file from Tat3:
CW,TATOOINE: JABBA CW,tat3c,CIS,republic,200,200
GCW,TATOOINE: JABBA GCW,tat3a,alliance,imperial,200,200

The format of the file is:
ERA, TEXT NAME what ever you want, mapname-with-faction-extension, faction1, faction2, tickets1, tickets2

The mapname is very important to get correct.  The folder is called tat3,
and the extension "c" is usually for CW era and the "a" is usually for the GCW era. However, some maps don't use this designation, and there is no way to know for sure if the mod map maker followed these conventions.  (Although you may try looking in the addme.script file to get some clues.)

Therefore, some maps can not be hosted using the dedicated server software, and instead must be hosting using the game disk method, which does not require the mapinfo.txt file.




Here are some updates based on new discoveries:
--------------------------------------

If you specify a map name with out a ticket count in a batch file, like this:

bes2r bes2a

then the default tickets specified in the mission lua will be used.



If you copy Battlefront.exe to something else, say BattlefrontGameNight.exe and execute it,
it will create a new ini file called BattlefrontGameNight.ini. 

You can edit this for your settings for you maps, like invinciblility, etc.  This way, you can use the same map install for some various server settings without having to make a copy of your entire server folder.

If you want to host a Historical map, you can do so by using a batch file.  Here is a link to a tutorial:
http://www.swbfgamers.com/index.php?topic=7870.msg84624


All the best,
Led







Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet


Quote from: Buckler on December 24, 2009, 12:44:47 PM
Hosting and Playing on the Same Computer
----------------------------------------
-Set up the dedicated server software as previously described
-Start SWBF using your game disk
-Alt tab out of the game
-Start the SWBF dedi server software
-re-enter the game
-Alt tab out to boot/ban players, etc.

the best,
Led

"Every second is of infinite value"
Johann Wolfgang von Goethe quotes (German Playwright, Poet, Novelist and Dramatist. 1749-1832)

I second this to a sticky.

It already has been stickied.

Nice post, Buck!


(•̪●)=ε/̵͇̿̿/'̿'̿ ̿ ̿̿ ̿ ̿"" (-_-*)

"There are three classes of people: those who see. Those who see when they are shown. Those who do not see."
Leonardo da Vinci quotes (Italian draftsman, Painter, Sculptor, Architect and Engineer whose genius epitomized the Renaissance humanist ideal. 1452-1519)

And a fourth class of people, those who post and then later notice that the post is stuck. Thank you Jedikiller.


A big problem with invincibility server is that you can't respawn. You have to leave the server or find a death region to respawn.

Quote from: ModTester on May 02, 2011, 05:25:38 AM
A big problem with invincibility server is that you can't respawn. You have to leave the server or find a death region to respawn.

Yes, this is true.  You can get killed in turrets though.   Note that invincibility is not a mod or a hack, just an undocumented PC dedi server software command.
Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet

November 27, 2011, 01:34:45 PM #8 Last Edit: November 27, 2011, 01:41:51 PM by Phobos Developer
I forget what code must I add to turn on player select (disable auto assign) in the batch?
/sideselect 1 crashes

pretty sure it's just /sideselect without anything after.
Thats how the ps2 server is.


What is the command for using a password in the batch?
Formerly:
{Alpha}Gen.Ultimo
[212]Cpl.Ultimo
WUSi.Whisper

/password whateverpassgoeshere

Look at the command line that shows up when you execute the GUI (at the bottom of the GUI) to learn about the other commands that can be used.

Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet

Thank You My Friend!  :tu:
Formerly:
{Alpha}Gen.Ultimo
[212]Cpl.Ultimo
WUSi.Whisper

now, the invincible command is not wanting to work. And i made sure to run it with no other commands that alter the server after it.(ex: unlimitedammo , sideselect , etc.)
Formerly:
{Alpha}Gen.Ultimo
[212]Cpl.Ultimo
WUSi.Whisper