OmsiHook 2.1.0
See the version list below for details.
dotnet add package OmsiHook --version 2.1.0
NuGet\Install-Package OmsiHook -Version 2.1.0
<PackageReference Include="OmsiHook" Version="2.1.0" />
paket add OmsiHook --version 2.1.0
#r "nuget: OmsiHook, 2.1.0"
// Install OmsiHook as a Cake Addin #addin nuget:?package=OmsiHook&version=2.1.0 // Install OmsiHook as a Cake Tool #tool nuget:?package=OmsiHook&version=2.1.0
Omsi-Extensions
Omsi hooking and modding sdk.
The dead simple way to hook into Omsi and fiddle with it's memory. In it's current state we only have mappings for a limited number of Omsi objects, but it's easy to extend. Allows both reading and writing data from Omsi in real time, but currently doesn't allow for anything that requires memory allocation (eg: adding elements to arrays).
The library makes use of C# properties and classes to wrap native Omsi objects making them simple to interact with in a managed environment.
See the documentation for details on the API.
Usage Example
Here's a quick example of how to use it.
using OmsiHook;
class Program
{
static void Main(string[] args)
{
// Create an OmsiHook and attach to any running instance of Omsi
OmsiHook.OmsiHook omsi = new();
omsi.AttachToOMSI();
while (true)
{
// Get the PlayerVehicle and get its position
var pos = omsi.Globals.PlayerVehicle.Position;
// Print the position to the console
Console.WriteLine($"Player vehicle pos: x:{pos.x:F3}\ty:{pos.y:F3}\tz:{pos.z:F3}");
Thread.Sleep(500);
}
}
}
Project Structure
This repository contains the source for the OmsiHook and OmsiHookInvoker libraries as well as template projects using OmsiHook which run under various frameworks.
Here's a summary of the project structure:
\Omsi-Extensions\
┃
┠─► \OmsiHook\ -> Base library containing all the Omsi hooking code and
┃ exposing Omsi's internal data.
┠─► \OmsiHookInvoker\ -> C++ plugin for invoking native Omsi methods from OmsiHook,
┃ only used by OmsiHook.
┠─► \OmsiExtensionsCLI\ -> Example command line application that uses OmsiHook; runs
┃ outside of Omsi.
┠─► \OmsiExtensionsUI\ -> Example Avalonia UI (similar to WPF) application that uses
┃ OmsiHook; runs outside of Omsi.
┖─► \OmsiHookPlugin\ -> Example plugin that uses OmsiHook and compiles to a native
Omsi plugin by using DNNE.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net5.0
- memberpage (>= 2.59.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.