Day of Infamy

Day of Infamy

Not enough ratings
How to use the Playlist system Server-side
By Arc
This guide will introduce you to the Day of Infamy's Playlist system
   
Award
Favorite
Favorited
Unfavorite
1.) What is Playlist
A playlist is a set of restrictions, rules and options for a server which can be easily enabled on your server without the need of further modifications.

This system is primarily used for NWI Official and NWI-like custom servers. It offers easier server setups and allows your server to be in matchmaking and have player stats (unlocks, experience points, etc.).

It is also useful for total modifications and other custom content hosted via multiple server providers. It is not meant to be used for one-off custom servers as it does not have any benefit for them.
1.1) NWI vs custom created Playlists
NWI Playlists are meant to unify server settings so they are restricting certain CVARs to certain value and they restricts map pool to only contain certain NWI maps/modes combinations.

You won't be able to change forced CVARs as well as NWI Playlists files themself. You can change almost anything what is not forced by playlist and you can further restrict map/mode pool, for example exclude night maps (this is done via mapcycle file).

If you want or need to modify values that are forced by NWI playlist and still want to be in Matchmaking mode, you have no choice but to create your own custom one and distribute it to players.

If you want to know which CVARs and map/mode combo are being forced by NWI playlists, use Secton 3 as a guideline, extract NWI playlist and take a look into it.
2.) Matchmaking/Rankings with default playlists
In Day of Infamy, Player Progression system is tied to NWI official playlist.
Your Custom playlist and dummy default "custom" playlist will NOT have Player Progression

These are official playlists shipped with game:
nwi/coop nwi/coop_commando nwi/mp_battles nwi/mp_casual_with_bots nwi/mp_first_deployment nwi/mp_special_assignments custom example

Once you choose your desired playlist, you have to enable it via your "server.cfg", see:
sv_playlist <playlist_name>

CVAR for server.cfg, example:
sv_playlist nwi/coop

Additionally, Playlists may contain additional Rulesets (basically sub-playlists), currently only NWI Coop Playlists are using Rulesets, current valid rulesets:
default german_campaign commonwealth_campaign american_campaign

Example use in "server.cfg":
sv_playlist nwi/coop sv_ruleset german_campaign


You may choose to use default "custom" playlist should you not want to be restricted by NWI Playlist rules and still be findable via Multiplayer/Cooperative, however you will NOT have Player Progression on your server !
3.) How to create your own playlist
Now we will take a look into default files, cvar format and example playlist.
3.1) Custom playlist (UNRANKED), part one
You can use the example file or you can create empty one, as you wish. The example playlist in this guide is copied from the official one, so you can copy and paste it in if you want to.

Here you can see where to find the official playlists, just in case.

Official playlists are located in:
doi_misc_dir.vpk/scripts/playlists/nwi
Example and official custom playlists are located in:
doi_misc_dir.vpk/scripts/playlists
VPK files can be opened via GCFScape:
http://nemesis.thewavelength.net/index.php?p=26

All custom playlists belong to their respective folder, for example:
doi\scripts\playlists\arc\test_1.playlist doi\scripts\playlists\arc\test_2.playlist etc.

then in server.cfg (or startup file), CVAR will look like this:
sv_playlist arc/test_1 or sv_playlist arc/test_2 etc.

It is recommended to use custom named playlist directory as shown in example to prevent any incompatibility issues with pre-existing playlist or pre-existing custom playlist which did not follow this guide !
3.2) Custom playlist (UNRANKED), part two
Now let’s take a look at the example playlist:
"playlist" { "name" "Example Playlist" "description" "An example of an Insurgency playlist file." "category" "pvp" // Required: Menu category, should be "pvp", "coop", "custom", "solo" or "hidden" // Optional: Maxplayer requirements. // Servers running this playlist must have a maxplayers value between // require_maxplayers_min and require_maxplayers_max to operate. "require_maxplayers_min" "1" "require_maxplayers_max" "49" // Optional: sv_pure settings "sv_pure" { // This value will be used for sv_pure unless it has been defined serverside in a config or launch parameter. "default" "1" } // Optional: Rank limits // If >= 0, player ranks must be within these values to play on this playlist "rank_limits" { "min" "-1" "max" "-1" } // A list of maps that this playlist must be played on. // If no maps are included, this playlist will have no map restrictions. "allowed_maps" { // "mapname" "gamemode" // eg: "station" "push" } // Localization files, loaded before anything in this file is referenced by UI, ideal // for strings like map and gamemode names that will be displayed in the menu "localization" { //"file" "<localization path>" } // Recommended convars, will be applied but are not enforced and // can be changed by server operators. "cvars" { // "CVAR" "VALUE" "ambush" // Gamemode specific cvars { // "CVAR" "VALUE" } } // Enforced convars, these will be unchangable. "forced_cvars" { // "CVAR" "VALUE" "ambush" // Gamemode specific cvars { // "CVAR" "VALUE" } } // Defines the filters available to players searching for a game. "filters" { // Passworded server handling, by default this is 0 and hides _all_ passworded servers from the server results. // Setting this to 1 will allow passworded servers to appear in the list and will prompt for a password on connection, // this may be desired behaviour for playlists with a small server count or players who expect passworded servers. "show_passworded_servers" "0" // Minimum player count filter, removing this key will remove this filter. "players" { "min" "0" // Minimum slider value, defaults to 0 "max" "64" // Maximum slider value, defaults to require_maxplayers_max value } // Mod support, if enabled a filter is added allowing people to include/exclude servers which have sv_pure -1 or 0 // and support workshop items "mod_support" "1" // Per-tag filtering, each filter is given a 3-state button to require/exclude specific tags // Example tags: no3dvoip, notargetindicator, deathmsgs, nofriendlyfire, deadchat, deadvoice, teamtalk (alltalk disabled), fullscoreboard (kd on scoreboard) // Values: 0 = Exclude, 1 = Include, 2 = Ignore "tags" { // "tag name" // { // "default" "value" // Value (0-2): Default state of this button // "ignorable" "1" // Boolean, can this filter opt out of tag filtering. Default 1 // "invert" "0" // Boolean, an inverted filter will REQUIRE a tag when crossed out and EXCLUDE a tag when ticked. Default 0 // } } } // // Solo menu specific info // // Solo mode specific recommended convars, applied but not enforced "solo_cvars" { // "CVAR" "VALUE" "ambush" // Gamemode specific cvars { // "CVAR" "VALUE" } } // Recommended mapcycle, this is the default cycle if they haven't loaded it before and resetting the mapcycle will use this. "solo_mapcycle" { // "mapname" "gamemode" // eg: "station" "push" } // Playlist "rulesets", allows you to merge/overwrite specific KV blocks when loaded with "sv_playlist <playlist>" and "sv_ruleset <ruleset>" "rulesets" { // Default ruleset, applied if not using any other ruleset "default" { } // Additional rulesets "name" { // Supported ruleset options // How should we merge this ruleset with the playlist? Valid options: merge, overwrite. Default: merge. Merge appends/updates, overwrite replaces. "allowed_maps_merge_method" "merge" "allowed_maps" { } } } }
This is a basic (bone) structure of a playlist file (copied directly from "example.playlist" file). It MUST be in the exact same format (so don’t forget {} and "" characters).

Explanation:

"cvars" - this section will be used if there is no specified settings in CFG files, otherwise you can leave it blank

"forced_cvars" - this section forces specific rules and will override any CFG settings, it can be set per gamemode (for example "ambush" will have different settings than "strike" and so on), this section should have preferably your desired server settings.

It will accept same CVARs as server.cfg and server_gamemode.cfg, including "mp_theater_override" and stuff like that.
4.) Publishing your playlist
After you finish creating your playlist, you need to publish it on Steam Workshop so players can download it and be able to find your server (or servers) in Matchmaking.

You will need VPK.exe, it’s located in here:
"..\SteamApps\common\dayofinfamy\bin"

Create a new empty folder on your desktop (or wherever you want), and give it an appropriate name (a name which describes your mod), and replicate the server’s directory structure for custom playlists.

Example:
arcs_test_playlist\scripts\playlists\arc

Now copy your custom playlist there.

Example:
arcs_test_playlist\scripts\playlists\arc\test_1.playlist

Now drag this new folder and drop it over VPK.exe. It will create a VPK file which you can upload to the Steam Workshop.

Uploading is done via an in-game tool. To upload, start Day of Infamy, click on "MODS", then click on "PUBLISH", and continue from there.

You will also need a *.jpg thumbnail picture, smaller than 1MB !!, add tag "playlist". If you have a more complex mod, add more tags which correspond to what the mod should be.


43 Comments
Arc  [author] 3 Dec, 2021 @ 10:40pm 
Feel free to check which gamemodes are supported by examining each playlist file.

I don't remember these things as it is easy enough to retrieve the info.
Eminent Demon 3 Dec, 2021 @ 9:57pm 
I got it working, is it possible to play the "offensive" game mode in official playlists?
Arc  [author] 30 Nov, 2021 @ 2:15am 
Please read this guide so you can better understand what I'm talking about (Section 3.2, example playlist) and check that playlist file because it might be the problem here.
Eminent Demon 30 Nov, 2021 @ 2:05am 
I have it at 12, so that i get 24 bots in total, 12 on each team. I would post the log but it is blank when i open it.
Arc  [author] 30 Nov, 2021 @ 2:03am 
Hard to tell what the message is without a log.

Also, did you check if the playlist has forced bot quota to 0 (which is something i suspect is happening) ?
Eminent Demon 30 Nov, 2021 @ 1:37am 
I tried enabling bots with the "doi_bot_quota 12" cvar, but that didn't get them to spawn either. Also the console tells me "some features such as xp gain and rank may not work" is that normal?
Arc  [author] 30 Nov, 2021 @ 1:25am 
"sv_playlist" "nwi/mp_battles"
I don't think it has bots enabled, if you want to see contents of a playlist, download GCFScape tool, open misc_dir VPK file in dayofinfamy/doi directory, go to scripts/playlists/nwi extract it, open it in any text editor and see which cvars are "forced".
Eminent Demon 30 Nov, 2021 @ 12:08am 
Hi, so i have an issue with PVP server, i load into it, however it tells me that the playlist is incorrect and bots do not spawn at all, any ideas? Heres the .cfg

https://pastebin.com/ACYzteuq
Arc  [author] 21 Jul, 2018 @ 7:59am 
Your log says "nwi/coop" but your server.cfg has "nwi/mp_battles" which is kind of confusing, could you please fetch me matching logs for nwi/mp_battles ?

Also, from the log, the playlist is disabled as the start map (+map) was not supplied with correct gamemode or it was not recognized.
+map command have authority over playlist, if you set unsupported map, the playlist will be disabled before it has a chance to load.

If your server crashes then it's likely due to corrupted files, some permission issues or you are running Steam client on background.
DizzyDwarf 21 Jul, 2018 @ 7:49am 
Sorry For posting on the isurgence page, but its the same guide except for the VPK file section that is changed to DOI

okay here is what is have
the log files are empty in doi\logs so if there is a diffent place to get logs for you please let me know
Server.cfg:
https://pastebin.com/9M75Zstw
Start.bat:
https://pastebin.com/yu5hZv6V
what i copied just before the console closes:
https://pastebin.com/dGpWvp0N

The console just closes after that, if i remove the sv_playlist, the server starts fine and i can join it, even my friends can join through the server browser.

we want to wake this a Official Server for South Africa, since There isnt any currently.