Skip to content

Commit

Permalink
modified: zh/Manual/服务器
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhugeBright authored and Librarian committed Feb 17, 2025
1 parent 9790544 commit ed69f7f
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions Page/zh/Manual/服务器.mediawiki
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

如果你想建立[[zh/Manual/多人游戏|多人网络游戏]],你需要在你的计算机上建立一个OpenTTD '''服务器'''。如果所有玩家将连接至您的家庭网络,请跳至"开启服务器"一节。
== 如果你使用防火墙 ==
为了您的安全,千万''不要''完全禁用防火墙。相反,将其配置为允许 UDP 和 TCP 连接到端口'''3979''' ("开放端口")。如果你希望你的服务器在[https://servers.openttd.org/listing 公共服务器列表(en)]可见(推荐),还需要打开'''3978'''端口到仅限UDP连接。
为了您的安全,千万 ''不要'' 完全禁用防火墙。相反,将其配置为允许 UDP 和 TCP 连接到端口'''3979''' ("开放端口")。如果你希望你的服务器在[https://servers.openttd.org/listing 公共服务器列表(en)]可见(推荐),还需要打开'''3978'''端口到仅限UDP连接。
== 如果您通过路由器连接到互联网 ==
你需要设置路由器将来自公网玩家的游戏数据转发到路由器内网内的 OpenTTD 服务器上。不这样做,数据就只会被丢弃,永远都无法发送到服务器上。这就是一个经典的使用[https://www.wikipedia.org/wiki/Port_forwarding 端口转发]的例子;在这种情况中,你需要设置 '''3979''' 端口能够转发 '''UDP 和 TCP''' 连接的数据,即设置端口 3979 能够进行端口转发(包括 TCP 和 UDP)。(如果你因为某些情况无法使用 3979 端口,你可以在游戏控制台输入"server_port <端口号>"让 OpenTTD 使用其他端口号)

Expand All @@ -18,35 +18,32 @@

== 开启服务器 ==
[[File:en/Manual/Ottdmulti6.png|right]]
'''1''' From the Main Menu, click '''Multiplayer'''
'''1''' 在主菜单选择'''联机游戏'''

'''2''' Click '''Start Server'''
'''2''' 点击'''启动服务器'''

'''3''' Pick a name for your game to help others identify it, and enter it into the '''Game name''' box
'''3''' '''游戏名称'''一栏填写服务器名称来帮助玩家辨别它

'''4''' Configure the additional settings:
*'''Set Password''' sets a password for the server so that only users who know the password can join your game.
*'''Connection''' specifies whether the server is for local/private use only, or advertises itself to the master server so it is visible in the internet server list.
*'''Language Spoken''' is for requesting that users speak a certain language on your server.
*'''Max clients''' limits the total number of clients (players and spectators) that can connect.
*'''Max companies''' limits the number of companies at game.
*'''Max spectators''' limits the number of clients who can connect to watch but not play (not-players).
'''5''' Click '''New Game''' (to generate random new game), or '''Load Game''' (to continue an saved game), or '''Play Scenario''', or '''Play Heightmap''', or '''Cancel'''.
'''4''' 调整其他设置:
*'''设置密码''' 为服务器密码来让只有知道密码的人才能进入你的服务器。
*'''可见度''' 设置服务器是仅供本地/私人使用,还是广播到主服务器来让它出现在服务器列表中。
*'''玩家数目''' 限制连接服务器的最大玩家数量。
*'''公司数量''' 限制游戏中最大公司数量。
'''5''' 点击'''新游戏'''(随机生成一张新地图),'''读取存档'''(继续保存的游戏),'''以场景开始游戏''''''以高度图开始游戏'''

==连接到服务器==
Players connected to your home network should immediately see your server on the server list and be able to connect easily.
和你处于同一局域网下的玩家应该能立即从服务器列表看到你的服务器,方便快捷地连接到服务器。

If some players are connecting via the public Internet, however, your server will only appear if you have chosen "Internet (advertise)" under "Connection" (there may be a delay of several minutes before it is visible). Otherwise, they will need to know your router's IP address, or your computer's if you aren't using a router. This can be obtained by visiting https://www.whatismyip.com/.

==专用服务器==
If you are expecting many players and aren't going to be using the computer running the server to play yourself, you can start OpenTTD as a [[en/Manual/Dedicated server]] instead of the usual interactive graphical version.
如果你要开一个容纳大量玩家的服务器,并且不想自己在服务器运行时一直游玩,你可以将 OpenTTD 启动为[[zh/Manual/专用服务器]]。

If you run your server on ubuntu/debian and you want to automatically start/stop and save your game, check out the init.d scripts at https://bitbucket.org/frodus/openttd-init
如果你在 ubuntu/debian 运行服务器,并且你想自动开服/关服并且保存游戏,请查阅 https://bitbucket.org/frodus/openttd-init 的 init.d 脚本。

[[Category:en/Manual/Multiplayer]]


==管理员端口==
If you want to remotely control your OpenTTD server using a stand-alone program/script, the recommended way is to use the [[en/Development/Server admin port|Admin Port]].
如果你要用单独的程序/脚本远程控制你的 OpenTTD 服务器,推荐的方法是用[[en/Development/Server admin port|管理员端口]]。

0 comments on commit ed69f7f

Please sign in to comment.