omp-npc-ng is a standalone fork workspace for the open.mp NPC component.
The goal is to split NPC work out of the omp-server monorepo so it can be:
- built independently
- shipped as a drop-in open.mp component
- extended without upstream coupling
- wrapped with a separate Pawn bridge for
NPC_*and laterFCNPC_*compatibility
This repository is intended for future NPC work that does not fit cleanly into the upstream server, while still staying on the open.mp component model instead of falling back to the old SA-MP plugin architecture.
This repository currently contains the initial scaffold.
Included already:
- standalone top-level CMake setup
- vendored local copies of
omp-sdk,omp-network,omp-netcodeandcpp-httplib - real NPC core sources ported from
open.mp/Server/Components/NPCs - successful 32-bit
NPCs.sobuild - successful isolated load test in a real
omp-serverruntime - external Pawn bridge build with ported
NPC_*natives and callbacks - successful isolated component load test for
OMPNPCNGPawn.so - CI skeleton
- package metadata skeleton
- initial include/layout/docs structure
Not ported yet:
- FCNPC compatibility includes and callbacks
- a clean replacement strategy for the stock upstream Pawn-side NPC registration
| Path | Content |
|---|---|
src/core/ |
Standalone NPC core component (OMPNPCNG) |
src/pawn_bridge/ |
External Pawn bridge component (OMPNPCNGPawn) |
pawno/include/ |
Pawn includes for native and compatibility surfaces |
docs/ |
Porting and architecture notes |
libs/ |
Vendored open.mp dependencies |
The standalone build is designed around vendored open.mp pieces:
libs/omp-sdklibs/omp-networklibs/omp-netcode
Until those directories exist, CMake configures in bootstrap mode and intentionally skips the real component build.
Expected bootstrap flow:
git clone git@github.com:Knogle/omp-npc-ng.git
cd omp-npc-ng
git submodule update --init --recursiveThe dependency layout is currently left flexible. It can be implemented with submodules or vendored snapshots, as long as the build sees the required libs/omp-sdk, libs/omp-network and libs/omp-netcode directories.
Bootstrap-only configure:
cmake -S . -B build -DOMP_NPC_NG_BOOTSTRAP_ONLY=ON
cmake --build build --parallelOnce vendored dependencies are present:
cmake -S . -B build -DOMP_NPC_NG_BOOTSTRAP_ONLY=OFF
cmake --build build --parallel32-bit build for drop-in testing against the current Linux omp-server runtime:
cmake -S . -B build-port32 \
-DOMP_NPC_NG_BOOTSTRAP_ONLY=OFF \
-DOMP_NPC_NG_BUILD_PAWN_BRIDGE=OFF \
-DCMAKE_C_FLAGS=-m32 \
-DCMAKE_CXX_FLAGS=-m32
cmake --build build-port32 --parallel --target NPCs32-bit build including the optional external Pawn bridge:
cmake -S . -B build-port32-bridge \
-DOMP_NPC_NG_BOOTSTRAP_ONLY=OFF \
-DOMP_NPC_NG_BUILD_PAWN_BRIDGE=ON \
-DCMAKE_C_FLAGS=-m32 \
-DCMAKE_CXX_FLAGS=-m32
cmake --build build-port32-bridge --parallel --target NPCs OMPNPCNGPawn- Port
open.mp/Server/Components/NPCsintosrc/core/. - Replace the placeholder
OMPNPCNGcomponent with the real forked NPC core. - Port the Pawn-facing NPC natives into
src/pawn_bridge/. - Register those natives externally through
IPawnComponentandPawnEventHandler. - Add FCNPC compatibility includes and callback/native mapping.
See docs/bootstrap-plan.md for the current bootstrap order.
The old FCNPC codebase is still tightly bound to the legacy SA-MP plugin model, fixed server addresses and hook-based internals. omp-npc-ng deliberately starts from the open.mp component architecture instead:
- stable component entry point
- explicit SDK interfaces
- drop-in
components/*.so/*.dlldeployment - cleaner separation between core logic and Pawn integration
Right now, the NPC core is drop-in buildable as NPCs.so, and the optional external Pawn bridge also builds as OMPNPCNGPawn.so. On a stock omp-server runtime the upstream Pawn.so still registers the same NPC_* native surface, so loading OMPNPCNGPawn.so alongside it currently produces duplicate-native warnings. That bridge is therefore primarily useful for forked runtimes where you want to own the NPC Pawn surface separately.
This repository uses the same license family as open.mp: Mozilla Public License 2.0. See LICENSE.