initial commit
This commit is contained in:
commit
2379e929dc
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
myconfig.json
|
89
Dockerfile
Normal file
89
Dockerfile
Normal file
|
@ -0,0 +1,89 @@
|
|||
FROM ubuntu:20.04 as builder
|
||||
|
||||
MAINTAINER Gered King <gered@blarg.ca>
|
||||
|
||||
RUN \
|
||||
apt-get update && \
|
||||
apt-get install -y build-essential git && \
|
||||
apt-get install -y libevent-dev && \
|
||||
apt-get install -y python python3
|
||||
|
||||
WORKDIR /tmp
|
||||
|
||||
# build and install phosg, a dependency of newserv
|
||||
RUN \
|
||||
git clone https://github.com/fuzziqersoftware/phosg.git && \
|
||||
cd phosg && \
|
||||
make && \
|
||||
make install && \
|
||||
cd ..
|
||||
|
||||
# build newserv itself
|
||||
RUN \
|
||||
git clone https://github.com/fuzziqersoftware/newserv.git && \
|
||||
cd newserv && \
|
||||
make && \
|
||||
cd ..
|
||||
|
||||
|
||||
FROM ubuntu:20.04
|
||||
|
||||
ENV HOME /newserv
|
||||
ENV SUDO_USER root
|
||||
|
||||
WORKDIR /newserv
|
||||
|
||||
RUN \
|
||||
apt-get update && \
|
||||
apt-get install -y libevent-dev
|
||||
|
||||
COPY --from=builder /tmp/newserv/newserv .
|
||||
COPY --from=builder /tmp/newserv/system ./system
|
||||
|
||||
ADD config.json /newserv/system/config.json
|
||||
|
||||
VOLUME /newserv/system/config.json
|
||||
VOLUME /newserv/system/licenses.nsi
|
||||
|
||||
# built in DNS for gamecube
|
||||
EXPOSE 53/udp
|
||||
|
||||
# gc-jp10 | GC | LoginServer
|
||||
EXPOSE 9000/tcp
|
||||
# gc-jp11 | GC | LoginServer
|
||||
EXPOSE 9001/tcp
|
||||
# gc-jp3 | GC | LoginServer
|
||||
EXPOSE 9003/tcp
|
||||
# gc-us10 | PC | SplitReconnect
|
||||
EXPOSE 9100/tcp
|
||||
# gc-us3 | GC | LoginServer
|
||||
EXPOSE 9103/tcp
|
||||
# gc-eu10 | GC | LoginServer
|
||||
EXPOSE 9200/tcp
|
||||
# gc-eu11 | GC | LoginServer
|
||||
EXPOSE 9201/tcp
|
||||
# gc-eu3 | GC | LoginServer
|
||||
EXPOSE 9203/tcp
|
||||
# pc-login | PC | LoginServer
|
||||
EXPOSE 9300/tcp
|
||||
# pc-patch | Patch | PatchServer
|
||||
EXPOSE 10000/tcp
|
||||
# bb-patch | Patch | PatchServer
|
||||
EXPOSE 11000/tcp
|
||||
# bb-data | BB | DataServerBB
|
||||
EXPOSE 12000/tcp
|
||||
|
||||
# bb-data1 | BB | DataServerBB
|
||||
EXPOSE 12004/tcp
|
||||
# bb-data2 | BB | DataServerBB
|
||||
EXPOSE 12005/tcp
|
||||
# bb-login | BB | LoginServer
|
||||
EXPOSE 12008/tcp
|
||||
# pc-lobby | PC | LobbyServer
|
||||
EXPOSE 9420/tcp
|
||||
# gc-lobby | GC | LobbyServer
|
||||
EXPOSE 9421/tcp
|
||||
# bb-lobby | GC | LobbyServer
|
||||
EXPOSE 9422
|
||||
|
||||
CMD ["./newserv"]
|
3
build.sh
Executable file
3
build.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
docker build -t gered/psoserv_fuzziqer:latest .
|
115
config.json
Normal file
115
config.json
Normal file
|
@ -0,0 +1,115 @@
|
|||
{
|
||||
// Configuration file for newserv. This file is standard JSON with comments.
|
||||
|
||||
// Server's name (maximum 16 characters)
|
||||
"ServerName": "Alexandria",
|
||||
// Address to connect local clients to (IP address or interface name)
|
||||
"LocalAddress": "192.168.0.5",
|
||||
// Address to connect external clients to (IP address or interface name)
|
||||
"ExternalAddress": "en0",
|
||||
// Set to false to disable the DNS server
|
||||
"RunDNSServer": true,
|
||||
// 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,
|
||||
|
||||
// By default, the server only allows users who are registered in the license
|
||||
// file. By enabling this option, all users will be allowed to connect. This
|
||||
// option has no effect for Blue Burst clients. Keep in mind that unregistered
|
||||
// users cannot be banned!
|
||||
"AllowUnregisteredUsers": false,
|
||||
|
||||
// If you want to use Blue Burst clients with a different private key, put a
|
||||
// .nsk file in system/blueburst/keys and put its name here.
|
||||
"BlueBurstKeyFile": "default",
|
||||
|
||||
// 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", "$C7Some things you\nmay need to know\nabout text on\nthis server", "$C7Everything you type will be filtered.\n\nDollar signs will become tab chars, which can be\nused to color team names and info boards.\nTo color your text, type %sCx, where x is a\nvalue from the Text Colors list.\n\nPound signs (number signs) will become returns\n(newlines), the sequence %%s will become %s,\nand the sequence %%%% will become %%."],
|
||||
["Text colors", "$C7Display color values", "These values can be used to color text.\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\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%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 - convert a character to PSOBB format\n%sli - show lobby/game information"],
|
||||
["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.\n%sinftp - enables or disables infinite TP.\n%swarp <area> - sends you to a certain area.\n%sitem - creates an item. (BB only)\n%sedit - changes your character's stats. (BB only)"],
|
||||
["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> - kick a player\n%sban <serial> - ban a player"],
|
||||
["Using $item", "$C7Show how to use\nthe %sitem command", "Using the %sitem command\n\nFor PSOBB, the %sitem command is used to create\nitems. Use 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."],
|
||||
["Using banks", "$C7Show how to use\nthe bank switching\nfeature on PSOBB", "Using PSOBB banks\n\nThe %schangebank command allows you to borrow\nthe bank from another character in your account.\nUse it like this:\n\n%schangebank player<%n>\n\nFor example, to use character 4's bank, type:\n\n%schangebank player4"],
|
||||
["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 %sln 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"],
|
||||
],
|
||||
// Welcome message. If not blank, this message will be shown to console users
|
||||
// upon first connecting.
|
||||
"WelcomeMessage": "Welcome to $C6Alexandria$C7, a private PSO server\npowered by newserv.",
|
||||
|
||||
// Item drop rates for non-rare items. 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. 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, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF],
|
||||
// hard
|
||||
[0x01, 0x01, 0x05, 0x05, 0x09, 0x09, 0x0D, 0x0D, 0x11, 0x11, 0x15, 0x15,
|
||||
0x19, 0x19, 0x21, 0x21, 0x24, 0x24, 0x27, 0x27, 0x2A, 0x2A, 0x30, 0x30,
|
||||
0x33, 0x33, 0x36, 0x36, 0x39, 0x39, 0x3C, 0x3C, 0x3F, 0x3F, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF],
|
||||
// very hard
|
||||
[0x02, 0x02, 0x06, 0x06, 0x0A, 0x0A, 0x0E, 0x0E, 0x12, 0x12, 0x16, 0x16,
|
||||
0x1A, 0x1A, 0x22, 0x22, 0x25, 0x25, 0x28, 0x28, 0x2B, 0x2B, 0x31, 0x31,
|
||||
0x34, 0x34, 0x37, 0x37, 0x3A, 0x3A, 0x3D, 0x3D, 0x3F, 0x3F, 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],
|
||||
// ultimate
|
||||
[0x02, 0x02, 0x06, 0x06, 0x0A, 0x0A, 0x0E, 0x0E, 0x12, 0x12, 0x16, 0x16,
|
||||
0x1A, 0x1A, 0x23, 0x23, 0x26, 0x26, 0x29, 0x29, 0x2C, 0x2C, 0x31, 0x31,
|
||||
0x34, 0x34, 0x37, 0x37, 0x3A, 0x3A, 0x3D, 0x3D, 0x3F, 0x3F, 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],
|
||||
],
|
||||
}
|
10
logs.sh
Executable file
10
logs.sh
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
container_name=psoserv_fuzziqer
|
||||
|
||||
if [ "$(docker inspect -f '{{.State.Running}}' ${container_name} 2>/dev/null)" != "true" ]; then
|
||||
echo "${container_name} is not running!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker logs -f $container_name
|
10
newserv_cli.sh
Executable file
10
newserv_cli.sh
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
container_name=psoserv_fuzziqer
|
||||
|
||||
if [ "$(docker inspect -f '{{.State.Running}}' ${container_name} 2>/dev/null)" != "true" ]; then
|
||||
echo "${container_name} is not running!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker attach $container_name
|
34
run.sh
Executable file
34
run.sh
Executable file
|
@ -0,0 +1,34 @@
|
|||
#!/bin/bash
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
container_name=psoserv_fuzziqer
|
||||
|
||||
if [ "$(docker inspect -f '{{.State.Running}}' ${container_name} 2>/dev/null)" == "true" ]; then
|
||||
echo "${container_name} is already running!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker run \
|
||||
--rm \
|
||||
-d -it \
|
||||
--name psoserv_fuzziqer \
|
||||
-p 9000:9000 \
|
||||
-p 9001:9001 \
|
||||
-p 9003:9003 \
|
||||
-p 9100:9100 \
|
||||
-p 9103:9103 \
|
||||
-p 9200:9200 \
|
||||
-p 9201:9201 \
|
||||
-p 9300:9300 \
|
||||
-p 10000:10000 \
|
||||
-p 11000:11000 \
|
||||
-p 12000:12000 \
|
||||
-p 12004:12004 \
|
||||
-p 12005:12005 \
|
||||
-p 12008:12008 \
|
||||
-p 9420:9420 \
|
||||
-p 9421:9421 \
|
||||
-p 9422:9422 \
|
||||
-p 53:53/udp \
|
||||
-v ${PWD}/myconfig.json:/newserv/system/config.json \
|
||||
gered/psoserv_fuzziqer:latest
|
Reference in a new issue