| .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 |
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(): Returnstrueif 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_VERSIONfrommain.cpp. - Validates git release tags.
- Cross-compiles the
.asibinary 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.