Files
psopeeps-newserv/system/config.example.json
T
2022-08-08 23:18:05 -07:00

285 lines
22 KiB
JSON

{
// Configuration file for newserv. This file is standard JSON with comments.
// Server's name (maximum 16 characters). This appears in the upper-right
// corner of the screen while in lobbies.
"ServerName": "newserv",
// Address to connect local clients to (IP address or interface name)
"LocalAddress": "en0",
// Address to connect external clients to (IP address or interface name). If
// you're running newserv behind a NAT, this should be your router's
// public-facing address.
"ExternalAddress": "10.0.1.5",
// Port to listen for DNS queries on. To disable the DNS server, comment this
// out or set it to zero.
"DNSServerPort": 53,
// Ports to listen for game connections on.
"PortConfiguration": {
// Format of entries in this dictionary:
// name: [port, version, behavior]
// Various versions of PSO hardcode these ports in the clients. Don't change
// these unless you don't want to support certain versions of PSO.
"gc-jp10": [9000, "gc", "login_server"],
"gc-jp11": [9001, "gc", "login_server"],
"gc-jp3": [9003, "gc", "login_server"],
"gc-us10": [9100, "pc", "split_reconnect"],
"gc-us3": [9103, "gc", "login_server"],
"gc-eu10": [9200, "gc", "login_server"],
"gc-eu11": [9201, "gc", "login_server"],
"gc-eu3": [9203, "gc", "login_server"],
"pc-login": [9300, "pc", "login_server"],
"pc-patch": [10000, "patch", "patch_server_pc"],
"bb-patch": [11000, "patch", "patch_server_bb"],
"bb-init": [12000, "bb", "data_server_bb"],
// TODO: If Xbox support ever gets built, add this port to the above config.
// "xb-login": [????, "xb", "login_server"],
// Schthack PSOBB uses these ports.
// "bb-patch2": [10500, "patch", "patch_server"],
// "bb-init2": [13000, "bb", "data_server_bb"],
// Ephinea PSOBB uses these ports. Note that 13000 is also used by Schthack
// PSOBB, but not for the patch server; this means you unfortunately can't
// support both Schthack and Ephinea PSOBB clients at the same time. This
// may be fixed in the future using a similar technique as the
// split_reconnect behavior, but this isn't implemented yet.
// "bb-patch3": [13000, "patch", "patch_server"],
// "bb-init3": [14000, "bb", "data_server_bb"],
// newserv uses these ports, but there is no external reason that these
// numbers were chosen. You can change the port numbers here without any
// issues. Note that the bb-data1 and bb-data2 ports must be sequential;
// that is, the bb-data2 port must be the bb-data1 port + 1.
"pc-lobby": [9420, "pc", "lobby_server"],
"gc-lobby": [9421, "gc", "lobby_server"],
"bb-lobby": [9422, "bb", "lobby_server"],
"xb-lobby": [9423, "xb", "lobby_server"],
"pc-proxy": [9520, "pc", "proxy_server"],
"gc-proxy": [9521, "gc", "proxy_server"],
"bb-proxy": [9522, "bb", "proxy_server"],
"xb-proxy": [9523, "xb", "proxy_server"],
"bb-data1": [12004, "bb", "data_server_bb"],
"bb-data2": [12005, "bb", "data_server_bb"],
},
// Where to listen for IP stack clients. This exists to interface with PSO GC
// clients running in a local Dolphin emulator. To enable local Dolphin
// clients to connect, set this to ["/tmp/dolphin-tap"] and configure Dolphin
// to use the tapserver type of broadband adapter. You do not need to install
// or run tapserver. See README.md for details on how to get PSO to connect
// via this interface.
// If you're doing unusual things, you can also add numbers or "address:port"
// strings to this list to listen for tapserver connections on a TCP port.
"IPStackListen": [],
// Other servers to support proxying to. If either of these is empty, the
// proxy server is disabled for that game version. Entries are like
// "name": "address:port"; the names are used in the proxy server menu.
"ProxyDestinations-PC": {},
"ProxyDestinations-GC": {},
"ProxyDestinations-XB": {},
// Proxy destination for patch server clients. If this is given, the internal
// patch server (for PC and BB) is bypassed, and any client that connects to
// the patch server is instead proxied to this destination.
// "ProxyDestination-Patch": "",
// Proxy destination for BB clients. If this is given, all BB clients that
// connect to newserv will be proxied to this destination.
// "ProxyDestination-BB": "",
// By default, the interactive shell runs if stdin is a terminal, and doesn't
// run if it's not. This option, if present, overrides that behavior.
// "RunInteractiveShell": false,
// Specify which kinds of logging you want to be enabled. This allows you to
// make the terminal more or less noisy when players are connected, so you can
// see only the log messages you care about. The log levels are, in decreasing
// order of verbosity, "debug", "info", "warning", "error", and "disabled".
"LogLevels": {
// AX messages are messages sent to the terminal with the $ax command.
"AXMessages": "info",
// Channel exceptions are messages about clients disconnecting unexpectedly,
// or other unexpected network-level events.
"ChannelExceptions": "info",
// Client messages describe events that are specific to a single client's
// connection or game state.
"Clients": "info",
// Command data messages show the raw data for all commands sent and
// received, on both the game server and proxy server. If stderr is a
// terminal, these messages are colored as well; green is for commands sent
// by the client, yellow is for commands sent by newserv, and red is for
// commands sent by the remote server (for proxy server sessions).
"CommandData": "info",
// Config messages describe server-wide events, and generally only occur
// during the startup procedure.
"Config": "info",
// DNS server messages describe erroneous queries that the DNS server does
// not respond to. Normal DNS queries do not generate any log messages.
"DNSServer": "info",
// Function compiler messages describe PowerPC function call assembly
// events, which generally only occur during startup.
"FunctionCompiler": "info",
// IP stack simulator messages describe clients connecting and disconnecting
// via the IP stack interface, and errors that occur at the simulated
// network level within the simulator.
"IPStackSimulator": "info",
// License manager messages describe the creation of new license files.
"LicenseManager": "info",
// Lobby messages describe creation and deletion of lobbies and games, as
// well as item tracking events within games.
"Lobbies": "info",
// Patch file index messages describe finding and preloading the patch files
// available for download to BB and PC clients.
"PatchFileIndex": "info",
// Player data messages describe the loading and saving of player and
// account data files.
"PlayerData": "info",
// Proxy server messages describe clients connecting and disconnecting from
// the proxy server, as well as events that occur in each session.
"ProxyServer": "info",
// Replay messages are generated when replaying a session log (usually
// during functional testing).
"Replay": "info",
// Game server messages describe clients connecting and disconnecting from
// the game server.
"GameServer": "info",
// Static game data messages describe the loading of any kind of game data.
"StaticGameData": "info",
},
// By default, the server only allows users who are registered in the license
// file to connect. By enabling this option, all users will be allowed to
// connect. Each time a user connects with an unregistered license (serial
// number / access key combination, or username/password combination on BB), a
// temporary license is created for them, which lasts until the server is
// shut down. This license is not saved to the license file. For BB, player
// and account data is still saved on the server, even for users with
// temporary licenses.
"AllowUnregisteredUsers": false,
// User to run the server as. If present, newserv will attempt to switch to
// this user's permissions after loading its configuration and opening
// listening sockets. The special value $SUDO_USER causes newserv to look up
// the desired username in the $SUDO_USER variable instead.
// "User": "$SUDO_USER",
// Information menu contents. Each entry is a 3-list of
// [title, short description, full contents]. In the short description and
// full contents, you can use PSO escape codes with the $ character (for
// example, $Cx for colors).
"InformationMenuContents": [
["Text colors", "$C7Display color values", "These values can be used to color text in\nsome situations, with escape codes like %sC6.\n\n$C0Color 0$C7 - Black\n$C1Color 1$C7 - Blue\n$C2Color 2$C7 - Green\n$C3Color 3$C7 - Cyan\n$C4Color 4$C7 - Red\n$C5Color 5$C7 - Purple\n$C6Color 6$C7 - Yellow\n$C7Color 7$C7 - White\n$C8Color 8$C7 - Pink\n$C9Color 9$C7 - Violet\n$CGColor G$C7 - Orange Pulse"],
["Lobby commands", "$C7Display commands\nfor use in the\nlobby", "Lobby commands: you must be a moderator to use\nthese commands.\n\n%sallevent <event>: Change the server's event\n%sevent <event>: Change this lobby's event\n%stype <type>: Change this lobby's type\n%sann <message>: Announce a message to all players\n%sax <message>: Send a message to the server"],
["Game commands", "$C7Display commands\nfor use in games", "Game commands: you must be the game leader to\nuse these commands.\n\n%spassword <password>: Set the game's password.\n If used with no password, unlocks the game.\n%smaxlevel <%n>: Set the game's maximum level.\n%sminlevel <%n>: Set the game's minimum level.\n%scheat: Enable or disable cheat mode."],
["Player commands", "$C7Display commands\nfor player data", "Player commands: anyone can use these commands.\n\n%sarrow <color>: Change your lobby arrow color.\n%sbbchar <username> <password> <slot>: Convert\n your character to PSOBB format.\n%sli: Show lobby or game information.\n%swhat: Describes the nearest item on the ground."],
["Cheat commands", "$C7Display commands\nfor cheating", "Cheat commands: cheat mode must be enabled in the\ngame for these commands to work.\n\n%scheat: Enables or disables cheat mode in a game.\n%sinfhp: Enables or disables infinite HP for you.\n%sinftp: Enables or disables infinite TP for you.\n%swarp <area>: Sends you to a certain area.\n%sitem <data>: Creates an item. The item will appear\n from the next box opened or enemy defeated.\n%sedit <stat> <value>: Changes your character stats.\n This command works only on Blue Burst."],
["Mod commands", "$C7Display commands\nfor moderators", "Moderation commands: you must be a moderator to\nuse these commands.\n\n%ssilence <serial>: Silence/unsilence a player.\n%skick <serial>: Disconnect a player from the server.\n%sban <duration> <serial>: Ban a player. Duration may\n be of the form 60m, 24h, 2w, etc."],
["Using $item", "$C7Show how to use\nthe %sitem command", "Using the %sitem command\n\nThe %sitem command is used to create items.\nUse it like this:\n\n%sitem <item code in hexadecimal>\n\nThe item code must be from 2 to 16 bytes (4 to 32\ncharacters) of hexadecimal data. Any bytes you\nomit will become zeroes.\n\nThe item that you specify will appear from the next\nenemy you kill or box you break.\n\nTo create meseta, use the command like this:\n\n%sitem 04000000 %n0 %n0 <amount>"],
["Using $edit", "$C7Show how to use\nthe %sedit command", "Using the %sedit command\n\n%sedit is used on PSOBB to change character stats.\nUse one of the following subcommands:\n\n%sedit ATP <value>\n%sedit MST <value>\n%sedit EVP <value>\n%sedit HP <value>\n%sedit DFP <value>\n%sedit ATA <value>\n%sedit LCK <value>\n%sedit MESETA <amount>\n%sedit EXP <amount>\n%sedit LEVEL <level>\n%sedit NAMECOLOR <color in hex, AARRGGBB format)\n%sedit SECID <section ID name>\n%sedit NAME <new character name>\n%sedit NPC <NPC name>\n%sedit TECH <technique name> <new technique level>\n\nNPC names: none, ninja, rico, sonic, knuckles,\n flowen, elly\n\nTechnique names: foie, gifoie, rafoie, barta,\n gibarta, rabarta, zonde, gizonde, razonde,\n grants, deband, jellen, zalure, shifta, ryuker,\n resta, anti, reverser, megid, all"],
["Using $bbchar", "$C7Show how to use\nthe %sbbchar command", "Using the %sbbchar command\n\n%sbbchar is used to convert a character from an\nolder version of PSO to Blue Burst format and save\nit on this server. Use the command like this:\n\n%sbbchar <username> <password> <slot>\n\nIf the username and password are correct, the\ncharacter that you're currently playing as will be\nconverted to PSOBB format and saved under that\naccount, in the specified character slot (1-4)."],
["Arrow colors", "$C7Display lobby arrow\ncolor list", "$C7These values can be used with the $C6%sarrow$C7 command.\n\n0: no marker\n1: red\n2: blue\n3: green\n4: yellow\n5: purple\n6: cyan\n7: orange\n8: pink\n9: white\n10: white\n11: white\n12: black"],
["Event values", "$C7Display lobby event\nlist", "These values can be used with the $C6%sevent$C7 command.\n\nnone - no event\nxmas - Christmas event\nval - Valentine's Day\neaster - Easter Sunday event\nhallo - Halloween event\nsonic - Sonic Adventure DX event\nnewyear - New Year's event\nbval - White Day\nwedding - Wedding Day event\nspring - spring event\ns-spring - spring event with striped background\nsummer - summer event\ns-summer - summer event with striped background\nfall - fall event"],
["GC lobby types", "$C7Display lobby type\nlist for Episodes\nI & II", "These values can be used with the %stype command.\n$C6*$C7 indicates lobbies where players can't move.\n$C2Green$C7 indicates Episode 1 & 2 (GC) only lobbies.\n\nnormal - standard lobby\n$C2inormal$C7 - under standard lobby $C6*$C7\n$C2ipc$C7 - under PC lobby $C6*$C7\n$C2iball$C7 - under soccer lobby $C6*$C7\n$C2cave1$C7 - Cave 1 $C6*$C7\n$C2cave2u$C7 - Cave 2 Ultimate $C6*$C7\n$C2dragon$C7 - Dragon stage (floor is black)\n$C2derolle$C7 - De Rol Le stage (water/walls are gone)\n$C2volopt$C7 - Vol Opt stage\n$C2darkfalz$C7 - Dark Falz stage"],
["Ep3 lobby types", "$C7Display lobby type\nlist for Episode\nIII", "These values can be used with the %sln command.\n$C6*$C7 indicates lobbies where players can't move.\n$C8Pink$C7 indicates Episode 3 only lobbies.\n\nnormal - standard lobby\n$C8planet$C7 - Blank Ragol Lobby\n$C8clouds$C7 - Blank Sky Lobby\n$C8cave$C7 - Unguis Lapis\n$C8jungle$C7 - Episode 2 Jungle\n$C8forest2-1$C7 - Episode 1 Forest 2 (ground)\n$C8forest2-2$C7 - Episode 1 Forest 2 (near Dome)\n$C8windpower$C7\n$C8overview$C7\n$C8seaside$C7 - Episode 2 Seaside\n$C8some?$C7\n$C8dmorgue$C7 - Destroyed Morgue\n$C8caelum$C7 - Caelum\n$C8digital$C7\n$C8boss1$C7\n$C8boss2$C7\n$C8boss3$C7\n$C8knight$C7 - Leukon Knight stage\n$C8sky$C7 - Via Tubus\n$C8morgue$C7 - Morgue"],
["Area list", "$C7Display stage code\nlist", "These values can be used with the $C6%swarp$C7 command.\n\n$C2Green$C7 areas will be empty unless you are in a quest.\n$C6Yellow$C7 areas will not allow you to move.\n\n $C8Episode 1 / Episode 2 / Episode 4$C7\n0: Pioneer 2 / Pioneer 2 / Pioneer 2\n1: Forest 1 / Temple Alpha / Crater East\n2: Forest 2 / Temple Beta / Crater West\n3: Caves 1 / Spaceship Alpha / Crater South\n4: Caves 2 / Spaceship Beta / Crater North\n5: Caves 3 / CCA / Crater Interior\n6: Mines 1 / Jungle North / Desert 1\n7: Mines 2 / Jungle South / Desert 2\n8: Ruins 1 / Mountain / Desert 3\n9: Ruins 2 / Seaside / Saint Million\n10: Ruins 3 / Seabed Upper / $C6Purgatory$C7\n11: Dragon / Seabed Lower\n12: De Rol Le / Gal Gryphon\n13: Vol Opt / Olga Flow\n14: Dark Falz / Barba Ray\n15: $C2Lobby$C7 / Gol Dragon\n16: $C6Battle 1$C7 / $C6Seaside Night$C7\n17: $C6Battle 2$C7 / $C2Tower$C7"],
["Debug commands", "$C7Display commands\nfor debugging\nnewserv itself", "The following commands may be useful for\ninvestigating bugs in newserv.\n\n%sdbgid: Enable or disable high ID preference.\n When enabled, you'll be placed into the\n latest slot in lobbies/games instead of\n the earliest.\n%sgc: Send your own Guild Card to yourself.\n%srand <value in hex>: Set the random seed for\n all games you create."]
],
// Welcome message. If not blank, this message will be shown to PSO GC users
// upon first connecting. (If this is blank, they will be taken directly to
// the main menu instead.) The welcome message is never shown to PSO PC or PSO
// BB users, though the patch server message (below) can be used for a similar
// purpose.
"WelcomeMessage": "",
// Patch server message. If not blank, these messages will be shown to PSO PC
// and PSO BB users (respectively) when they connect to the patch server. Note
// that PSO PC displays the text in a Windows edit control instead of using
// PSO's normal text renderer, so linebreaks must be \r\n and color escapes
// (e.g. $C6) do not work in PCPatchServerMessage.
"PCPatchServerMessage": "$C7newserv patch server\n\nThis server is not affiliated with, sponsored by, or in any\nother way connected to SEGA or Sonic Team, and is owned\nand operated completely independently.",
"BBPatchServerMessage": "newserv patch server\r\n\r\nThis server is not affiliated with, sponsored by, or in any other way connected to SEGA or Sonic Team, and is owned and operated completely independently.",
// Default lobby event. If set, this sets the holiday event in all lobbies at
// server start time, as well as the pre-lobby holiday event. The event can be
// changed in each lobby independently with the $event command, or in all
// lobbies with the $allevent command. When a game is created, it inherits the
// holiday event from the lobby from which it was created.
// The value for this field can be a string like "xmas" (the values have the
// same meanings as the $event command), or an integer.
// "LobbyEvent": "xmas",
// Episode 3 menu song. If set, Episode 3 clients will hear this song when
// they are at the newserv main menu. If set, this value must be an integer.
// "Episode3MenuSong": 0,
// By default, the server keeps track of items in all games, even for versions
// other than Blue Burst. This enables use of the $what command, as well as
// protection against item duplication cheats (the cheater is disconnected
// instead of the other players). If item tracking causes any issues, it can
// be turned off here. This option has no effect on Blue Burst games - item
// tracking is always enabled for them.
"EnableItemTracking": true,
// Item drop rates for non-rare items in BB games. For each type (boxes or
// enemies), all the categories must add up to a number less than 0x100000000.
// Each number is a probability (out of 0x100000000) that the given item type
// will appear.
"CommonItemDropRates-Enemy": [
0x03000000, // material
0x20000000, // equipment
0x06000000, // technique disk
0x01800000, // scape doll
0x06000000, // grinder
0x10000000, // atomizers, etc.
0x20000000, // mates/fluids
0x40000000, // meseta
],
"CommonItemDropRates-Box": [
0x00800000, // material
0x20000000, // equipment
0x01000000, // technique disk
0x02000000, // scape doll
0x08000000, // grinder
0x10000000, // atomizers, etc.
0x20000000, // mates/fluids
0x80000000, // meseta
],
// Unit drop rates for non-rare items in BB games. Each entry is an array of
// unit types, one array per difficulty. Each entry in the array has an equal
// probability of dropping. If a unit type is 0xFF, then no item will drop.
"CommonUnitTypes": [
// normal
[0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x0C, 0x0C, 0x0C,
0x10, 0x10, 0x10, 0x14, 0x14, 0x14, 0x18, 0x18, 0x18, 0x21, 0x21, 0x21,
0x24, 0x24, 0x24, 0x27, 0x27, 0x27, 0x2A, 0x2A, 0x2A, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,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 0x41, 0x41,
0x42, 0x42, 0x43, 0x43, 0x44, 0x44, 0x45, 0x45, 0x46, 0x46, 0x47, 0x47,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF],
],
}