Revision indexing in progress... (search in this revision will be accurate after indexed)
.onedev-buildspec.yml Loading last commit info...
.gitignore
CMakeLists.txt
README.md
bombd_hooks.h
build.sh
config.ini
main.cpp
mingw-w64-i686.cmake
README.md

Need for Speed: ProStreet Server ASI Plugin Template (PluginTemplate)

A clean developer template for building custom .asi C++ plugins for the Need for Speed: ProStreet server (bombd.exe) using ProStreetServerASILoader.

Repository URL: https://code.weexnes.dev/ProStreetServerASILoader/PluginTemplate


Overview

This template abstracts away raw memory offsets and reverse-engineering complexity, providing developers with a clean C++ event callback API in bombd_hooks.h.


Developer API (bombd_hooks.h)

Developers can implement custom event callbacks inside main.cpp:

#include "bombd_hooks.h"
#include <iostream>

namespace Bombd {

    // Triggered on server startup
    void OnServerInit() {
        std::cout << "Server Initialized! Port: " << GetServerPort() << std::endl;
    }

    // Triggered when a player logs in
    void OnPlayerLogin(const PlayerInfo& player) {
        std::cout << "Player joined: " << player.playerName << std::endl;
    }

    // Triggered when a new race day / game room is created
    void OnGameCreated(const GameSessionInfo& session) {
        std::cout << "Race Day Created: " << session.gameName << std::endl;
    }
}

Available Helper Functions

  • Bombd::GetActiveSessions(): Returns a list of active race sessions/lobbies (GameSessionInfo).
  • Bombd::GetServerPort(): Returns the server's configured UDP port.
  • Bombd::IsServerRunning(): Returns true if the main server loop is active.

Building

Prerequisites

Install the 32-bit MinGW toolchain and CMake:

# Arch Linux
sudo pacman -S cmake make mingw-w64-gcc python

Compilation

Run the build script:

chmod +x build.sh
./build.sh

Binary output: build/ProStreetPluginTemplate.asi


OneDev Automated CI/CD

Includes .onedev-buildspec.yml for OneDev CI/CD automation:

  • Automatically extracts PLUGIN_VERSION from main.cpp.
  • Validates git release tags.
  • Cross-compiles the .asi binary on tag pushes and uploads build artifacts.

Deployment

Copy your compiled .asi file into the server's scripts/ directory:

cp build/ProStreetPluginTemplate.asi ~/.OpenProStreet/scripts/

When bombd.exe launches, ProStreetServerASILoader will discover and execute your plugin automatically.

Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover