Skip to content

Instantly share code, notes, and snippets.

@e39a562r
Last active August 21, 2019 13:05
Show Gist options
  • Save e39a562r/a919224a9162b2f9c1693de76ab0ebe1 to your computer and use it in GitHub Desktop.
Save e39a562r/a919224a9162b2f9c1693de76ab0ebe1 to your computer and use it in GitHub Desktop.

GCP 建立虛擬機

  1. 區域請選台灣
  2. 開機磁碟,選擇 Ubuntu 18.04 LTS,然後拉到下面選擇 10GB SSD
  3. 允許 HTTP 跟 HTTPS 連線

安裝

點擊虛擬機上面的 SSH 按鈕進入後台

1. 先更新套件管理工具

sudo apt update

應該很快就跑完了

2. 安裝 steam 需要的 lib32gcc1

sudo apt install lib32gcc1

3. 下載 steam

curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -

官方建議開新使用者來安裝 steam 但是我懶所以算了

4. 建立 mordhau 更新腳本

echo \
  "@ShutdownOnFailedCommand
@NoPromptForPassword 1
force_install_dir ./mordhau
app_update 629800 validate
quit" > update_mordhau.txt

5. 下載 mordhau 伺服器

./steamcmd.sh +login anonymous +runscript update_mordhau.txt

開、關、更新伺服器

啟動 mordhau 伺服器

screen -dmS mordhau ./mordhau/MordhauServer.sh 

關閉 mordhau 伺服器

screen -S mordhau -X quit

更新 mordhau 伺服器

./steamcmd.sh +login anonymous +runscript update_mordhau.txt

改設定

改 Game.ini

nano mordhau/Mordhau/Saved/Config/LinuxServer/Game.ini

改好之後按 ctrl + x 離開,然後按 Y 表示存檔,然後按 Enter 表示不改檔案名字 內容範例:

[/Script/Mordhau.MordhauGameMode]
PlayerRespawnTime=0.000000
BallistaRespawnTime=30.000000
CatapultRespawnTime=30.000000
HorseRespawnTime=30.000000
DamageFactor=1.000000
TeamDamageFactor=0.500000
MapRotation=FFA_Contraband
MapRotation=FFA_Tourney
[/Game/Mordhau/Blueprints/GameModes/BP_DeathmatchGameMode.BP_DeathmatchGameMode_C]
ScoreToWin=5000
[/Script/Mordhau.MordhauGameSession]
MaxSlots=32
ServerName=台服 1vs1 單挑 禁亂鬥 快速重生 50殺 120hz [e39a562r]
AdminPassword=
BannedPlayers=
ServerPassword=
Admins=76561198027717994
Admins=76561198021697406
Admins=76561198018479545
Admins=76561198048740205
Admins=76561198121880695

改 Engine.ini

mordhau/Mordhau/Saved/Config/LinuxServer/Engine.ini

內容範例:

[/Script/EngineSettings.GameMapsSettings]
ServerDefaultMap=/Game/Mordhau/Maps/Contraband/FFA_Contraband.FFA_Contraband
[/Script/OnlineSubsystemUtils.IpNetDriver]
NetServerMaxTickRate=120

ServerDefaultMap: 預設地圖 NetServerMaxTickRate: 伺服器判斷命中與傷害的頻率,預設60即每秒60次

禁道具

火彈

rm ./mordhau/Mordhau/Content/Mordhau/Blueprints/Equipment/Thrown/BP_FireBom*

煙霧彈

rm ./mordhau/Mordhau/Content/Mordhau/Blueprints/Equipment/Thrown/BP_SmokeBomb*

標槍

rm ./mordhau/Mordhau/Content/Mordhau/Blueprints/Equipment/Thrown/BP_Javelin*

飛刀

rm ./mordhau/Mordhau/Content/Mordhau/Blueprints/Equipment/Thrown/BP_ThrowingKnife*

石頭

rm ./mordhau/Mordhau/Content/Mordhau/Blueprints/Equipment/Thrown/BP_Rock*

投擲斧

rm ./mordhau/Mordhau/Content/Mordhau/Blueprints/Equipment/Thrown/BP_ThrowingAxe*

長弓

rm ./mordhau/Mordhau/Content/Mordhau/Blueprints/Equipment/Ranged/BP_Longbow*

獵弓

rm ./mordhau/Mordhau/Content/Mordhau/Blueprints/Equipment/Ranged/BP_RecurveBow*

十字弓

rm ./mordhau/Mordhau/Content/Mordhau/Blueprints/Equipment/Ranged/BP_Crossbow*

工具箱

rm ./mordhau/Mordhau/Content/Mordhau/Blueprints/Equipment/Misc/BP_ToolBox*

陷阱

rm ./mordhau/Mordhau/Content/Mordhau/Blueprints/Equipment/Misc/BP_BearTrap*     

PaviseShield

rm ./mordhau/Mordhau/Content/Mordhau/Blueprints/Equipment/Shields/BP_PaviseShield*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment