Giter VIP home page Giter VIP logo

pirateradio's Introduction

Pirate Radio

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.

Install

  1. Download BepInEx 5.4 (x64 | x32)
  2. Extract the archive into the root directory of Contraband Police
  3. Download Pirate Radio (Releases)
  4. Place PirateRadio.dll in BepInEx/plugins
  5. Done. Now see Usage

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

Controls

The mod completely overhauls the radio controls.
  • Interaction now toggles the radio state, instead of cycling through channels.
  • Using scroll wheel while looking at the radio selects channels.
  • The keybinds NextChannel and PreviousChannel allow you to select channels too.
Keybinds

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

Supported files

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

Development

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

Rider

Settings > Build, Execution, Deployment > Toolset and Build > MSBuild global properties

Dotnet CLI

Add the argument -p:ConPolPath="Absolute/Path/Here"

Visual Studio

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>

Thanks

  • Friends & Family. Love you.
  • BepInEx
  • Kade
    • Their mod for Bomb Rush was a massive help in understanding how to load files from StreamingAssets.

pirateradio's People

Contributors

kerillian avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.