If you want to help us maintaining this wiki, check out our discord server: https://discord.gg/3u69jMa 

Difference between revisions of "Run a server on Linux with UCC"

From SWRC Wiki
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 7: Line 7:
* Game files on host system (GameData folder)
* Game files on host system (GameData folder)


* Republic Commando UCC app for starting server
* Republic Commando UCC app


==Setup==
==Setup==
Now we need to create two .sh files inside System folder.
* Install wine (32 Bit) on your linux machine accordingly to instructions


The first startup script looks like this one:
* Install screen application
 
* Upload game files to linux machine (GameData folder)
 
* Download [[Republic Commando UCC]] and put it into GameData/System folder
 
* Create a bash script inside GameData/System to start server:


(start.sh)
<pre>
<pre>
screen -AmdS swrc-server /home/XXX/SWRC/GameData/System/startx.sh
screen -d -m -S swrc wine UCC.exe Engine.ServerCommandlet
</pre>
</pre>


Let me explain it:
* Server will run now on screen process and will be detached from your terminal
*screen -AmdS                                  creates a new screen session for our server.
*swrc-server                                    is the name of our screen session
*/home/XXX/SWRC/GameData/System/startx.sh      points to a second startup file inside GameData/System folder. Of course you have to adjust the path to the file!


The second file:
==Using screen==
To look up all running screen sessions, use:


(startx.sh)
<pre>
<pre>
wine UCC.exe Engine.ServerCommandlet ini=System.ini
screen -ls
</pre>
</pre>


*wine UCC.exe              we run our UCC.exe win32 application with wine
To switch into a screen session, use:
*Engine.ServerCommandlet  Start a server in the screen session
*ini=System.ini            Specify our pre configurated ini file


So why do we need two files to start the server. Now first of all we need to create a new screen session and afterwards we can start our UCC.exe which starts the server commandlet.
<pre>
 
screen -r <screen name>
Now you can start your server by running ./start.sh  (Don't forget to chmod 777 start.sh startx.sh)
</pre>
 
==Using screen==
With the command "screen -ls", we can see what screen sessions are running at the moment. Using "screen -R <sessionname>" switches our SSH session to the specified screen session. If you switched, press ctrl + A and afterwards ctrl + D to get back to your SSH session without closing the server screen.


While using the command "screen -R <sessionname>" you may encounter an error. If so, enter "/script/dev/null" and try the command again.
To detach screen from terminal, press ctrl + A and ctrl + D


==Master Server Query==
==Master Server Query==


Also don't forget to put these lines into your /etc/hosts file if you want to see your servers on browser. Clients need to install [http://www.moddb.com/mods/star-wars-republic-commando-graphics-fix/downloads/republic-commando-multiplayer-fix-updated this] patch aswell.
Install multiplayer browser fix from [[Useful Stuff for Client]].
 
<pre>
65.112.87.186 swrcommando.ms1.gamespy.com #SWRC MasterServer
65.112.87.186 swrcommando.ms2.gamespy.com #SWRC MasterServer
65.112.87.186 swrcommando.ms3.gamespy.com #SWRC MasterServer
65.112.87.186 swrcommando.available.gamespy.com #SWRC MasterServer
65.112.87.186 swrcommando.master.gamespy.com #SWRC MasterServer
</pre>

Latest revision as of 22:15, 9 November 2021

Basic Configuration

First of all, you need all the configuration done, so head over to Setting up a Server.

Requirements

  • Linux machine capable of running wine (No GUI required)
  • Game files on host system (GameData folder)
  • Republic Commando UCC app

Setup

  • Install wine (32 Bit) on your linux machine accordingly to instructions
  • Install screen application
  • Upload game files to linux machine (GameData folder)
  • Create a bash script inside GameData/System to start server:
screen -d -m -S swrc wine UCC.exe Engine.ServerCommandlet
  • Server will run now on screen process and will be detached from your terminal

Using screen

To look up all running screen sessions, use:

screen -ls

To switch into a screen session, use:

screen -r <screen name>

To detach screen from terminal, press ctrl + A and ctrl + D

Master Server Query

Install multiplayer browser fix from Useful Stuff for Client.