Host

Last-modified: 2025-11-20 (木) 01:38:48

覚書

最新のテスト版アップデート

最新のテスト版アップデート

  • force_install_dir ./7dtdserver (login 前に)
  • app_update 294420 -beta latest_experimental
server_fixesのインストール

server_fixesのインストール

LevelCap 解放

LevelCap 解放

  • ./Data/Config/progression.xml
  • <level max_level="3000" exp_to_level="10000" experience_multiplier="1.05" skill_points_per_level="1" clamp_exp_cost_at_level="60">
初期スポーン位置を設定する

初期スポーン位置を設定する
./Data/Worlds/[MAP名]/spawnpoints.xml

<?xml version="1.0" encoding="UTF-8"?>
<spawnpoints>
        <spawnpoint position="1600,43,1600" rotation="0,85,0" />
</spawnpoints>
崩落キャンセル

崩落キャンセル

  • 前提:Server Fixes 導入
  • CpmSettings.xml
  • <PreventFallingBlocks>0</PreventFallingBlocks>
  • ゼロ以外にするとキャンセル
WebMAPを埋める方法

WebMAPを埋める方法

  • visitmap <x1> <z1> <x2> <z2> [check]
  • 6k MAP であれば、-3000 -3000 3000 3000 くらいでOK
    • 6K map: visitmap -3072 -3072 3072 3072
    • 8K map: visitmap -4096 -4096 4096 4096
    • 10K map: visitmap -5120 -5120 5120 5120
WebMAPの設定確認方法

WebMAPの設定確認方法

  • コンソールまたはtelnetから
    webpermission list
  • 設定方法
    • webpermission add web.map global 2000
    • 通常は、serveradmin.xmlに追記
自動再起動スクリプト

自動再起動スクリプト

サンプル

#!/bin/sh
###変数初期設定###
now=$(date "+%Y_%m_%d_%H_%M")
host1="サーバアドレス ポート"
pass="telnet パスワード"
PROCESS_NAME="7DaysToDieServer"
###TELNET経由でシャットダウン###
while read LINE
do
  if echo "$LINE" | grep Total; then
    test `echo "$LINE" | cut -d " " -f 3` = "0";
    if [ $? -ne 0 ]; then
      # 人が居るので遅延処理付きシャットダウン
      wcmd="shutdownba 5"
    else
      # 人が居ないので強制シャットダウン
      wcmd="shutdown"
    fi
    (echo open ${host1}
    sleep 1
    echo ${pass}
    sleep 1
    cmd="say \"[FF0000] (AutoMSG) サーバーを再起動します [-]\""
    echo ${cmd}
    sleep 1
    echo ${wcmd}
    sleep 1
    echo "exit"
    sleep 1) | telnet
  fi
done < <(
(echo open ${host1}
sleep 1
echo ${pass}
sleep 1
cmd="listplayers"
echo ${cmd}
sleep 2
echo "exit"
sleep 1) | telnet)
#プロセスの終了を待つ、複数鯖を運用する場合はプロセス名をもっと厳密に定義する必要がある
#指定しているserverconfig等が良いかも
while :
do
  #監視するプロセスが何個起動しているかカウントする
  count=`ps -ef | grep $PROCESS_NAME | grep -v grep | wc -l`
  #監視するプロセスが0個場合に、処理を分岐する
  if [ ${count} = 0 ]; then
    #0個場合は、サービスが停止しているので起動する
    echo "$PROCESS_NAME 停止を確認"
    break
  else
    echo "$PROCESS_NAME 起動中"
  fi
  sleep 5
done
###バックアップ###
#起動オプションで "b" が設定してあった場合、バックアップ取る
if [ $# -gt 0 ]; then
  if [ $1 = b ]; then
    echo "バックアップを実施"
    #バックアップ処理をコーディングする
  fi
fi
###サーバ起動###
echo "再起動シーケンス開始"
#起動用のスクリプトを呼ぶか、ここに直接コーディング
ランダムマップ生成改造

ランダムマップ生成改造
\7 Days To Die\Data\Config\rwgmixer.xml
を若干いじる

主張ブロック無効化

主張ブロック無効化
cpm-removelandprotection2, removelandprotection2 removes the association of a land protection block without players needing to be near
Usage: 1. rlp2 <steamid>
2. rlp2 <x> <y> <z>
3. rlp2 nearby [length]
4. rlp2 cleanup
1. Remove all land claims owned by the user with the given SteamID
2. Remove only the claim block on the exactly given block position
3. Remove all claims in a square with edge length of 64 (or the optionally specified size) around the executing player
4. Remove all expired landclaims from the world

目的の主張ブロック近くで
rlp2 nearby 10
rlp2 SteamID
など

落ちたトレーダー初期化

落ちたトレーダー初期化
対象トレーダー内で
chunkreset f

Warning: failed to init SDL thread priority manager: SDL not found

Warning: failed to init SDL thread priority manager: SDL not found

  • $ sudo apt install libsdl2-2.0-0:i386
Chat欄拡張

windows.xml

		<append xpath="/windows">
			<window name="chatoutput" pos="20, -310" depth="-1" width="750" height="310" anchor="LeftTop" controller="ChatOutput" fadeout_wait_time="5" fadeout_duration="2">
				<textlist name="txtOutput" pos="8,-284" width="734" height="270" list_style="chat" pivot="bottomleft" depth="2" font_size="26" crispness="Never">
					<sprite depth="-1" name="border" pos="-8,272" width="750" height="278" sprite="menu_empty2px" color="[black]" type="sliced" fillcenter="false"/>
					<sprite depth="-1" color="[darkGrey]" pos="-8,272" width="750" height="278" type="sliced"   globalopacitymod=".95" />
				</textlist>
			</window>
			<window name="chat" pos="20, -317" width="750" height="310" anchor="LeftTop" controller="Chat" cursor_area="true">
				<rect name="input" depth="2" pos="0,-285" height="32">
					<sprite depth="8" name="border"   sprite="menu_empty2px" color="[black]" type="sliced" fillcenter="false"/>
					<sprite color="[darkGrey]" type="sliced" globalopacitymod="0.95" />
					<combobox name="cbxTarget" type="ComboBoxList`1[EChatType]" value_max="party" pos="2, -6" width="100" height="22" font_size="22" localization_prefix="xuiChatTarget" />
					<textfield name="txtInput" backgroundcolor="[transparent]" depth="2" pos="110,-16" width="636" height="28" pivot="left" justify="left" overflow="ClampContent" max_line_count="1" crispness="Never" open_vk_on_open="true"/>
				</rect>
			</window>
		</append>
右下の表示バグ修正

右下の表示バグ修正
xui reload

UBUNTU関連情報

UBUNTU20.04関連?

メモリ関連の設定
vm.overcommit_memory = 1
vm.max_map_count = 262144

Ubuntu 22.04 for steamcmd

Ubuntu 22.04 for steamcmd

  • sudo add-apt-repository multiverse
  • sudo dpkg –add-architecture i386
  • sudo apt update
  • sudo apt install steamcmd

実行

  • /usr/games/steamcmd
IPアドレス固定

IPアドレス固定

  • /etc/netplan$ cat 00-installer-config.yaml
    network:
       version: 2
       renderer: networkd
       ethernets:
           enp89s0:
               addresses:
                   - 192.168.10.65/24
               nameservers:
                   addresses: [8.8.8.8, 208.67.222.222]
               routes:
                   - to: default
                     via: 192.168.10.231
  • 設定反映
    sudo netplan apply
NIC関連操作

NIC関連操作

  • ifconfig
    ネットワークの設定状況確認
  • lspci | grep 'Ethernet\|Network'
    認識されているNICの一覧表示
  • sudo lshw -C network
    認識しているNICの詳細表示、ここでLogicalNameを拾う
  • ethtool enp4s0
    local name を指定してNICの仕様を表示
SSH関連操作

SSH関連操作

  • sudo netstat -plnt
  • netstat -anutp | grep :22

CSMM関連内部コマンド

一覧

一覧

concussion脳震盪デバフ付与{{#if (gt player.level 100)}} pm ${entityId} "脳震盪を起こします"; buffplayer ${entityId} buffinjuryconcussion; {{else}} pm ${entityId} "このコマンドはLv.100以上で使用できます"; addCurrency(${player.steamId}, 1000); {{/if}}
giveMoneyゲーム内通貨を渡す{{#if (eq player.role.level 1)}} addCurrency(${player.steamId}, ${amo}); pm2 [Payment] steam_${player.steamId} "You have deposited ${amo}."; {{else}} pm2 [Error] steam_${player.steamId} "管理者コマンドです ${player.role.level}."; {{/if}}
resetDroneドローンデータを初期化pm ${entityId} "ドローンデータを初期化します"; rdd ${entityId};
restartPlayerPlayerDataの初期化pm ${entityId} "プレイヤーデータを初期化します"; resetplayerdata steam_${player.steamId}
summonCoyoteチャレンジ救済コマンド{{#if (gt player.level 100)}} pm ${entityId} "コヨーテを呼び出します"; spawnentity ${entityId} 103 {{else}} pm ${entityId} "このコマンドはLv.100以上で使用できます"; addCurrency(${player.steamId}, 1000); {{/if}}
summonDroneドローンを近くに引き寄せるpm ${entityId} "近くのドローンを呼び寄せます"; getdrone ${entityId};
summonVehicles乗り物を近くに引き寄せるpm ${entityId} "近くの乗り物を呼び寄せます"; getbicycle ${entityId}; getbike ${entityId}; getgyrocopter ${entityId}; getjeep ${entityId}; getmotorcycle ${entityId};

参考サイト