This is a mod for Contraband Police. It allows you to add custom radio channels.
Important
This mod, "Pirate Radio," is purely a fictional and creative addition to enhance the gaming experience. It is themed around historical pirate radio broadcasts and does not promote, condone, or encourage any form of illegal activity or media piracy. The mod is intended solely for entertainment purposes within the context of the game.
- Download BepInEx 5.4 (x64 | x32)
- Extract the archive into the root directory of Contraband Police
- Download Pirate Radio (Releases)
- Place
PirateRadio.dll
inBepInEx/plugins
- Done. Now see Usage
After installing the mod and running the game once, a new folder will be created within the root directory of the game called Channels
. Any subfolder within the Channels
folder will become a radio channel, and any audio files placed within those subfolders gets added to that channel as a song.
Warning
I have not tested the limits. Adding lots of radio channels will possibly lead to performance loss. Adding lots of audio files should be fine though, but don't quote me on it.
<game_root>
- Channels
- Pirate Radio
- Song1.mp3
- Song2.mp3
- Song3.mp3
- 80s on 8
- Cool song.wav
- Even cooler song.flac
- Freedom Radio
- Fight the power.mp3
- etc.xm
- Pirate Radio
- Channels
- Interaction now toggles the radio state, instead of cycling through channels.
- Using scroll wheel while looking at the radio selects channels.
- The keybinds
NextChannel
andPreviousChannel
allow you to select channels too.
I've also added some keybinds to make the radio more enjoyable to use. They can be configured by opening the config file in BepInEx/config/kerillian.pirate.radio.cfg
Config Name | Default Key | Description |
---|---|---|
NextChannel | RightArrow | Select the next channel |
PreviousChannel | LeftArrow | Select the previous channel |
Toggle | F5 | Toggle the radio |
Skip | F6 | Skip track on the current channel |
Reload | F7 | Reload radio channels |
Open | F8 | Open Channels folder in a file explorer |
All audio formats Unity supports.
Format | Extension |
---|---|
MPEG layer 3 | .mp3, .mp2 |
Ogg Vorbis | .ogg |
Microsoft Wave | .wav |
Free Lossless Audio Codec (Flac) | .flac |
Audio Interchange File Format | .aiff, .aif |
Ultimate Soundtracker module | .mod |
Impulse Tracker module | .it |
Scream Tracker module | .s3m |
FastTracker 2 module | .xm |
Due to requiring libraries from the game, you have to setup a MSBuild property called ConPolPath
that points to the games install location.
If you don't know how to add a global property I've written a few examples below for different tools.
Note
Example of a valid path: C:\Program Files (x86)\Steam\steamapps\common\Contraband Police
- The path should be absolute
- No trailing slashes
Settings > Build, Execution, Deployment > Toolset and Build > MSBuild global properties
Add the argument -p:ConPolPath="Absolute/Path/Here"
Visual Studio stores editor specific values in .csproj.user
. So create or edit PirateRadio.csproj.user
and add the xml tag ConPolPath
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<ConPolPath>Absolute/Path/Here</ConPolPath>
</PropertyGroup>
</Project>