YO-TAROU


Project Cars 2 – Dedicated Server 設定その2(アプデ後)

前回の記事では(バグのおかげで)てんやわんやだった設定内容ですが、直近のアプデで大方正常に動いている?ようなので、改めて記事を書いてみようと思います。なんせ設定変更はメモ帳に手書きするしか今のところ方法がないので使い勝手が悪いです。
一応下のコードで動いてはいるけど、天候設定が機能していないような、テスト不足です。

server.cfg

初期のcfgからは不要な文字を外して大分コンパクトにしています。

//////////////////////////
// Basic server options //
//////////////////////////

logLevel : "info" // debug/info/warning/error.
eventsLogSize : 10000
name : "**********" // 任意のサーバー名を入力
secure : true
password : "" // 鍵をかけるにはパスワードを入力
maxPlayerCount : 20
bindIP : ""
steamPort : 8766
hostPort : 9000
queryPort : 27016
sleepWaiting : 50
sleepActive : 10
sportsPlay: false

///////////////////////////
// HttpApi configuration //
///////////////////////////

enableHttpApi : true // ウェブコントロールを有効にするにはtrue アクセスは127.0.0.1:27017
httpApiLogLevel : "warning"
httpApiInterface : ""
httpApiPort : 27017
httpApiExtraHeaders : {"*" : "Access-Control-Allow-Origin: *"}
httpApiAccessLevels : {
    // But you could for example use this to change all access levels to public (not recommended!)
    // "*" : "public"
    // "" : "private"
    // "status" : "private"
    // "api/help" : "private"
    // "api/list*" : "private"
}
httpApiAccessFilters : {
    "public" : [{ "type" : "accept" }],
	"private" : [{ "type" : "ip-accept", "ip" : "127.0.0.1/32" },{ "type" : "group", "group" : "private" },{ "type" : "reject-password" }],
    "admin" : [{ "type" : "ip-accept", "ip" : "127.0.0.1/32" },{ "type" : "group", "group" : "admin" },{ "type" : "reject-password" }],
}
httpApiUsers : {
    "****username****" : "****password****", // ウェブ用のユーザーとパスを入力
    // "michal" : "bar",
}
httpApiGroups : {
     "private" : [ "****username****" ], // 上のユーザーネームを入力
     "admin" : [ "****username****" ], // 上のユーザーネームを入力
}
staticWebFiles: "web_files"

//////////////////////////
// LuaApi configuration //
//////////////////////////

enableLuaApi : true
luaAddonRoot: "lua"
luaConfigRoot: "lua_config"
luaOutputRoot: "lua_output"
luaApiAddons : [
    "sms_base",
    // "sms_rotate", // ローテーションを有効にするにはコメント解除
    // "sms_motd", // ウェルカムメッセージを有効にするにはコメント解除
    "sms_stats",
]
luaAllowedLibraries : [
    "lib_rotate"
]

////////////////////////////////
// Game setup control options //
////////////////////////////////

allowEmptyJoin : true
controlGameSetup : true // サーバー側で設定を固定する場合はtrue
sessionAttributes : {
    "ServerControlsTrack" : 0,
    "ServerControlsVehicleClass" : 1,
	"ServerControlsVehicle" : 0,
    "GridSize" : 20,
    "MaxPlayers" : 20,
    "PracticeLength" : 60,
    "QualifyLength" : 20,
    "RaceLength" : 20,
    "Flags" : -375651560,
    "OpponentDifficulty" : 50,
    "DamageType" : 3, // Off 0, Visual Only 1, PerfomanceInpacting 2, Full 3
    "TireWearType" : 6, // X7 0, X6 1, X5 2, X4 3, X3 4, X2 5, Standard 6, Slow 7, Off 8.
    "FuelUsageType" : 0, // Standard 0, Slow 1, Off 2.
    "AllowedViews" : 0,
    "PenaltiesType" : 1,
    "PitWhiteLinePenalty" : 1,
    "DriveThroughPenalty" : 1,
    "AllowablePenaltyTime" : 5,
    "PitControl" : 1,
    "ManualRollingStarts" : 1,
    "RaceRollingStart" : 1,
    "RaceFormationLap" : 1,
    "MinimumOnlineRank" : E,
    "MinimumOnlineStrength" : 100,
    "TrackId" : 521933422,
    "VehicleClassId" : -112887377,
	// "MultiClassSlots" : 3,
	// "MultiClassSlot1" : -112887377,
	// "MultiClassSlot2" : 1553262379,
	// "MultiClassSlot3" : 52697193,
	
	//"PracticeDateYear" : 2017,
	//"PracticeDateMonth" : 9,
	//"PracticeDateDay" : 25,
	"PracticeDateHour" : 10,
	"PracticeDateProgression" :	1,
	"PracticeWeatherProgression" : 1,
	"PracticeWeatherSlots" : 0,
	//"PracticeWeatherSlot1" : 296956818, // LightCloud
	//"PracticeWeatherSlot2" : 1275961519, // Random
	//"PracticeWeatherSlot3" : 1275961519, // Random
	//"PracticeWeatherSlot4" : 1275961519, // Random
	
	//"QualifyDateYear" : 2017,
	//"QualifyDateMonth" : 9,
	//"QualifyDateDay" : 26,
	"QualifyDateHour" : 14,
	"QualifyDateProgression" :	1,
	"QualifyWeatherProgression" : 1,
	"QualifyWeatherSlots" : 0,
	//"QualifyWeatherSlot1" : 129238383, // HeavyCloud
	//"QualifyWeatherSlot2" : 1275961519, // Random
	//"QualifyWeatherSlot3" : 1275961519, // Random
	//"QualifyWeatherSlot4" : 1275961519, // Random
	
	"RaceDateYear" : 2017,
	"RaceDateMonth" : 5,
	"RaceDateDay" : 2,
	"RaceDateHour" : 16,
	"RaceDateProgression" :	1,
	"RaceWeatherProgression" : 1,
	"RaceWeatherSlots" : 0,
	//"RaceWeatherSlot1" : 888299130, // MediumCloud
	//"RaceWeatherSlot2" : 1275961519, // Random
	//"RaceWeatherSlot3" : 1275961519, // Random
	//"RaceWeatherSlot4" : 1275961519, // Random
	
	// Clear -934211870, LightCloud 296956818, MediumCloud 888299130, HeavyCloud 129238383
	// Overcast -1293634875, LightRain 270338437, Rain 1461703858, FogWithRain -358600329
	// Foggy 2067843977, HeavyFog -754279862, Hazy -1299791789, HeavyFogWithRain -1604560069
	// Storm -1592958063, ThunderStorm -2112363295, Blizzard 282734801, snow -2057276008
	// heavysnow 1838012094, Random 1275961519.
}

ローテ用sms_rotate_config.json

// Config version.
version : 7

// Default configuration.
config : {
	"persist_index" : true,
	
	"default" : {
		"Flags" : -375651560,
		"VehicleClassId" : -112887377,
		"MinimumOnlineRank" : E,
		"MinimumOnlineStrength" : 100,
	},
	
	"rotation" : [
		{
			"TrackId" : "Nürburgring Combined",
		},
		{
			"TrackId" : "Autodromo Internazionale Enzo E Dino Ferrari Imola",
		},
		{
			"TrackId" : "Silverstone GP",
		},
		{
			"TrackId" : "Circuit de Spa-Francorchamps GP",
		},
		{
			"TrackId" : "Dubai Autodrome GP",
		},
		{
			"TrackId" : "Nürburgring GP",
		},
		{
			"TrackId" : "Red Bull Ring GP",
		},
		{
			"TrackId" : "Sakitto GP",
		},
		{
			"TrackId" : "Watkins Glen International GP",
		},
		{
			"TrackId" : "Zhuhai International Circuit",
		},
		{
			"TrackId" : "Sportsland SUGO",
		},
		{
			"TrackId" : "Oulton Park International",
		},
		{
			"TrackId" : "Mazda Raceway Laguna Seca",
		},
		{
			"TrackId" : "Bathurst Mount Panorama",
		},
		{
			"TrackId" : "Brno GP",
		},
		{
			"TrackId" : "Road America",
		},
		{
			"TrackId" : "Zolder",
		},
		{
			"TrackId" : "Donington Park GP",
		},
		{
			"TrackId" : "Hockenheim GP",
		},
		{
			"TrackId" : "Circuit de Barcelona-Catalunya GP",
		},
		{
			"TrackId" : "Brands Hatch GP",
		}
	]
}

関連記事


コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です