mirror of
https://github.com/parkervcp/eggs.git
synced 2024-11-26 16:19:04 +08:00
Merge pull request #1136 from grimsi/add/cod4x
Added egg for Call of Duty 4X
This commit is contained in:
commit
ad9da41c18
@ -78,6 +78,8 @@ If you are reading this it looks like you are looking to add an egg to your serv
|
||||
|
||||
[Cryofall](/cryofall/cryofall)
|
||||
|
||||
[Call of Duty 4X](/cod/cod4x)
|
||||
|
||||
[ET Legacy](/enemy_territory/etlegacy)
|
||||
|
||||
[FTL: Tachyon](/ftl/tachyon)
|
||||
|
154
cod/cod4x/README.md
Normal file
154
cod/cod4x/README.md
Normal file
@ -0,0 +1,154 @@
|
||||
# Call of Duty 4X
|
||||
|
||||
## Game files mounting
|
||||
The server does **not** contain the base game files, but they are necessary to use the server.
|
||||
|
||||
While the server itself is open-source, the game files are copyrighted and you will need to own a legitimate copy of the game (Call of Duty 4: Modern Warfare)
|
||||
in order to provide the game files to the server.
|
||||
|
||||
More information here: https://github.com/callofduty4x/CoD4x_Server#setting-up-a-call-of-duty-4-server-with-cod4x-18
|
||||
|
||||
### Correctly mounting the game files
|
||||
In order to give the server access to the needed game files you will need to create a new mount.
|
||||
|
||||
Let's say you copied the game files to your node into the directory `/home/pterodactyl/serverfiles/cod4x` (you can choose any directory you want of course).
|
||||
The directory structure will look like this: <details>
|
||||
|
||||
```
|
||||
/home/pterodactyl/serverfiles/cod4x
|
||||
├── main
|
||||
│ ├── iw_00.iwd
|
||||
│ ├── iw_01.iwd
|
||||
│ ├── iw_02.iwd
|
||||
│ ├── iw_03.iwd
|
||||
│ ├── iw_04.iwd
|
||||
│ ├── iw_05.iwd
|
||||
│ ├── iw_06.iwd
|
||||
│ ├── iw_07.iwd
|
||||
│ ├── iw_08.iwd
|
||||
│ ├── iw_09.iwd
|
||||
│ ├── iw_10.iwd
|
||||
│ ├── iw_11.iwd
|
||||
│ ├── iw_12.iwd
|
||||
│ ├── iw_13.iwd
|
||||
│ ├── localized_english_iw00.iwd
|
||||
│ ├── localized_english_iw01.iwd
|
||||
│ ├── localized_english_iw02.iwd
|
||||
│ ├── localized_english_iw03.iwd
|
||||
│ ├── localized_english_iw04.iwd
|
||||
│ ├── localized_english_iw05.iwd
|
||||
│ └── localized_english_iw06.iwd
|
||||
└── zone
|
||||
└── english
|
||||
├── ac130.ff
|
||||
├── aftermath.ff
|
||||
├── airlift.ff
|
||||
├── airplane.ff
|
||||
├── ambush.ff
|
||||
├── armada.ff
|
||||
├── blackout.ff
|
||||
├── bog_a.ff
|
||||
├── bog_b.ff
|
||||
├── cargoship.ff
|
||||
├── code_post_gfx.ff
|
||||
├── code_post_gfx_mp.ff
|
||||
├── common.ff
|
||||
├── common_mp.ff
|
||||
├── coup.ff
|
||||
├── hunted.ff
|
||||
├── icbm.ff
|
||||
├── jeepride.ff
|
||||
├── killhouse.ff
|
||||
├── launchfacility_a.ff
|
||||
├── launchfacility_b.ff
|
||||
├── localized_code_post_gfx_mp.ff
|
||||
├── localized_common_mp.ff
|
||||
├── mp_backlot.ff
|
||||
├── mp_backlot_load.ff
|
||||
├── mp_bloc.ff
|
||||
├── mp_bloc_load.ff
|
||||
├── mp_bog.ff
|
||||
├── mp_bog_load.ff
|
||||
├── mp_broadcast.ff
|
||||
├── mp_broadcast_load.ff
|
||||
├── mp_carentan.ff
|
||||
├── mp_carentan_load.ff
|
||||
├── mp_cargoship.ff
|
||||
├── mp_cargoship_load.ff
|
||||
├── mp_citystreets.ff
|
||||
├── mp_citystreets_load.ff
|
||||
├── mp_convoy.ff
|
||||
├── mp_convoy_load.ff
|
||||
├── mp_countdown.ff
|
||||
├── mp_countdown_load.ff
|
||||
├── mp_crash.ff
|
||||
├── mp_crash_load.ff
|
||||
├── mp_crash_snow.ff
|
||||
├── mp_crash_snow_load.ff
|
||||
├── mp_creek.ff
|
||||
├── mp_creek_load.ff
|
||||
├── mp_crossfire.ff
|
||||
├── mp_crossfire_load.ff
|
||||
├── mp_farm.ff
|
||||
├── mp_farm_load.ff
|
||||
├── mp_killhouse.ff
|
||||
├── mp_killhouse_load.ff
|
||||
├── mp_overgrown.ff
|
||||
├── mp_overgrown_load.ff
|
||||
├── mp_pipeline.ff
|
||||
├── mp_pipeline_load.ff
|
||||
├── mp_shipment.ff
|
||||
├── mp_shipment_load.ff
|
||||
├── mp_showdown.ff
|
||||
├── mp_showdown_load.ff
|
||||
├── mp_strike.ff
|
||||
├── mp_strike_load.ff
|
||||
├── mp_vacant.ff
|
||||
├── mp_vacant_load.ff
|
||||
├── scoutsniper.ff
|
||||
├── simplecredits.ff
|
||||
├── sniperescape.ff
|
||||
├── ui.ff
|
||||
├── ui_mp.ff
|
||||
├── village_assault.ff
|
||||
└── village_defend.ff
|
||||
|
||||
3 directories, 93 files
|
||||
```
|
||||
</details>
|
||||
|
||||
First of all add the directory of the mount to the config.yml (in `/etc/pterodactyl`) of your node.
|
||||
```
|
||||
allowed_mounts:
|
||||
- /home/pterodactyl/serverfiles
|
||||
```
|
||||
After you've done this, restart wings with `systemctl restart wings`.
|
||||
|
||||
Now you simply create a mount in the Pterodactyl Panel with the following settings:
|
||||
1. Set the source to `/home/pterodactyl/serverfiles/cod4x`
|
||||
2. Set the target to any directory you want (but not something in `/home/container`, I suggest something like `/mnt/gamefiles/cod4`)
|
||||
3. Set read-only to "true" ("false" will also work, but then you risk that one instance overwrites files for all other instances)
|
||||
4. For the rest of the settings you can decide what works best for you
|
||||
5. Create the mount
|
||||
6. Add the correct node to the list of nodes for the mount
|
||||
7. Add the CoD4X egg to the list of eggs for the mount
|
||||
|
||||
### Correctly configuring the servers
|
||||
In order for the server to find the game files you have to set "Game file path" variable in the server to the same directory that you used in the "target" field of the mount.
|
||||
When you start the server for the first time it will prompt you to mount the game files under the configured path.
|
||||
1. In the admin interface open your server
|
||||
2. Go to the tab "Mounts"
|
||||
3. Klick on the green "+" button on the correct mount in order to mount the game files
|
||||
4. Restart the server
|
||||
|
||||
|
||||
**Congratulations!** Your server should be able to find the game files and start.
|
||||
|
||||
## Default Server Ports
|
||||
The default is 28960, but the server will automatically use the port defined in the allocation.
|
||||
|
||||
| Port | default |
|
||||
|---------|---------|
|
||||
| Game | 28960 |
|
||||
|
||||
#### Plugins may require ports to be added to the server.
|
104
cod/cod4x/egg-call-of-duty4-x.json
Normal file
104
cod/cod4x/egg-call-of-duty4-x.json
Normal file
@ -0,0 +1,104 @@
|
||||
{
|
||||
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
|
||||
"meta": {
|
||||
"version": "PTDL_v1",
|
||||
"update_url": null
|
||||
},
|
||||
"exported_at": "2021-05-04T10:23:27+02:00",
|
||||
"name": "Call of Duty 4X",
|
||||
"author": "admin@grimsi.de",
|
||||
"description": "A client and server modification for Call of Duty 4: Modern Warfare with the aim to fix bugs and enhance gameplay!",
|
||||
"features": null,
|
||||
"images": [
|
||||
"quay.io\/parkervcp\/pterodactyl-images:base_debian"
|
||||
],
|
||||
"file_denylist": [],
|
||||
"startup": "if [ ! -d \"{{GAME_FILE_PATH}}\" ]; then echo \"CoD 4 game files not found. Maybe they are not mounted?\"; echo \"In order for the server to start mount the game files here: {{GAME_FILE_PATH}}\"; while true; do sleep 2; done; fi; .\/cod4x18_dedrun +exec server.cfg +set dedicated \"{{SERVER_NETWORK_MODE}}\" +set sv_maxclients \"{{MAX_PLAYERS}}\" +set net_ip 0.0.0.0 +set net_port \"{{SERVER_PORT}}\" +set fs_basepath \"{{GAME_FILE_PATH}}\" +set fs_homepath . +map_rotate",
|
||||
"config": {
|
||||
"files": "{\r\n \"main\/server.cfg\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \"sv_hostname\": \"sv_hostname \\\"{{server.build.env.SERVER_NAME}}\\\"\",\r\n \"rcon_password\": \"rcon_password \\\"{{server.build.env.ADMIN_PASSWORD}}\\\"\",\r\n \"g_password\": \"g_password \\\"{{server.build.env.SERVER_PASSWORD}}\\\"\",\r\n \"sv_authtoken\": \"sv_authtoken \\\"{{server.build.env.SERVER_AUTH_TOKEN}}\\\"\",\r\n \"sv_mapRotation\": \"sv_mapRotation \\\"{{server.build.env.MAP_ROTATION}}\\\"\"\r\n }\r\n }\r\n}",
|
||||
"startup": "{\r\n \"done\": \"By using this software you agree to the usage conditions\",\r\n \"userInteraction\": []\r\n}",
|
||||
"logs": "{}",
|
||||
"stop": "quit"
|
||||
},
|
||||
"scripts": {
|
||||
"installation": {
|
||||
"script": "#!\/bin\/ash\r\n# CoD 4X Installation script\r\n#\r\n# Server Files: \/mnt\/server\r\n\r\nDOWNLOAD_LINK=https:\/\/cod4x.me\/downloads\/cod4x_server-linux.zip\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\/\r\n\r\n## this is a simple script to validate a download url actually exists and is reachable\r\nif [ ! -z \"${DOWNLOAD_LINK}\" ]; then \r\n if curl --output \/dev\/null --silent --head --fail ${DOWNLOAD_LINK}; then\r\n echo -e \"Download-URL is reachable.\"\r\n else \r\n echo -e \"Could not reach ${DOWNLOAD_LINK}.\"\r\n echo -e \"Aborting installation...\"\r\n exit 1\r\n fi\r\nfi\r\n\r\n# Download the server binaries\r\necho -e \"running 'curl -sSL ${DOWNLOAD_LINK} -o ${DOWNLOAD_LINK##*\/}'\" \r\ncurl -sSL ${DOWNLOAD_LINK} -o ${DOWNLOAD_LINK##*\/}\r\n\r\necho -e \"Unpacking server files\"\r\nunzip ${DOWNLOAD_LINK##*\/}\r\n\r\necho -e \"Moving server files to \/mnt\/server\"\r\nmv .\/cod4x-linux-server\/* .\r\n\r\necho -e \"Cleaning up downloaded files.\"\r\nrm ${DOWNLOAD_LINK##*\/}\r\nrm -rf .\/cod4x-linux-server\r\n\r\necho -e \"Installing required runtime libs.\"\r\nmv .\/runtime\/libstdc++.so.6 .\r\n\r\necho -e \"Generating config file\"\r\ncat <<EOF > .\/main\/server.cfg\r\nsv_hostname \"${SERVER_NAME}\"\r\ng_password \"${SERVER_PASSWORD}\"\r\nrcon_password \"${ADMIN_PASSWORD}\"\r\n\r\nsv_punkbuster \"0\"\r\nsv_cheats \"0\"\r\nsv_voice \"0\"\r\nscr_teambalance \"1\"\r\ng_allowvote \"1\"\r\n\r\nsv_authorizemode \"0\"\r\nsv_authtoken \"${SERVER_AUTH_TOKEN}\"\r\n\r\nsv_floodProtect \"1\"\r\n\r\nsv_mapRotation \"${MAP_ROTATION}\"\r\nEOF\r\n\r\necho -e \"running 'chmod +x .\/cod4x18_dedrun'\"\r\nchmod +x .\/cod4x18_dedrun\r\n\r\necho -e \"Installation complete\"",
|
||||
"container": "quay.io\/matthewp\/pterodactyl:alpine-install",
|
||||
"entrypoint": "ash"
|
||||
}
|
||||
},
|
||||
"variables": [
|
||||
{
|
||||
"name": "Server Name",
|
||||
"description": "Hostname of the server.",
|
||||
"env_variable": "SERVER_NAME",
|
||||
"default_value": "Pterodactyl CoD 4X Server",
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|string|max:40"
|
||||
},
|
||||
{
|
||||
"name": "Server Password",
|
||||
"description": "Password of the server.",
|
||||
"env_variable": "SERVER_PASSWORD",
|
||||
"default_value": "",
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "nullable|string|max:20"
|
||||
},
|
||||
{
|
||||
"name": "Admin Password",
|
||||
"description": "RCON password for the server.",
|
||||
"env_variable": "ADMIN_PASSWORD",
|
||||
"default_value": "password123",
|
||||
"user_viewable": false,
|
||||
"user_editable": false,
|
||||
"rules": "required|string|min:8|max:20"
|
||||
},
|
||||
{
|
||||
"name": "Server Slots",
|
||||
"description": "Amount of players that can play on the server.",
|
||||
"env_variable": "MAX_PLAYERS",
|
||||
"default_value": "32",
|
||||
"user_viewable": true,
|
||||
"user_editable": false,
|
||||
"rules": "required|digits_between:1,3|min:1"
|
||||
},
|
||||
{
|
||||
"name": "Game File Path",
|
||||
"description": "Path to the CoD 4 game files (has to be the same as the \"target\" of the mount)",
|
||||
"env_variable": "GAME_FILE_PATH",
|
||||
"default_value": "\/mnt\/gamefiles\/cod4",
|
||||
"user_viewable": false,
|
||||
"user_editable": false,
|
||||
"rules": "required|string|max:40"
|
||||
},
|
||||
{
|
||||
"name": "Map Rotation",
|
||||
"description": "Map rotation in Quake format.",
|
||||
"env_variable": "MAP_ROTATION",
|
||||
"default_value": "gametype war map mp_crossfire",
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "nullable|string|max:1000"
|
||||
},
|
||||
{
|
||||
"name": "Server Network Mode",
|
||||
"description": "1 for LAN only, 2 for public",
|
||||
"env_variable": "SERVER_NETWORK_MODE",
|
||||
"default_value": "1",
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|digits:1|min:1|max:2"
|
||||
},
|
||||
{
|
||||
"name": "Server Authentication Token",
|
||||
"description": "Token needed to list your server on the public masterserver. Generate here: https:\/\/cod4master.cod4x.me\/index.php?token_generator=true",
|
||||
"env_variable": "SERVER_AUTH_TOKEN",
|
||||
"default_value": "",
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "nullable|string|size:40"
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user