# SE Grid Manager
[](LICENSE)
## Overview
SE Grid Manager is a powerful plugin for *Space Engineers* that facilitates comprehensive grid management for both clients and server environments. The plugin enables players to effectively view, manage, and delete blocks from their grids via an intuitive in-game interface, while also supporting seamless integration with Torch server environments.
## Features
- **Client-side Grid Management**: An in-game user interface (UI) allows players to manage their grids effortlessly.
- **Block-level Operations**: Provides the ability to view and delete individual blocks from grids, enhancing player control and flexibility.
- **Multi-platform Support**: Compatible with standalone *Space Engineers*, dedicated servers, and Torch servers, offering versatility in deployment.
- **HTTP API Integration**: Exposes RESTful API endpoints for external integrations, making it possible to interact programmatically with the grid management system.
- **Real-time Communication**: Implements client-server messaging to provide timely updates on grid status and changes.
- **Owner-based Filtering**: Displays only blocks owned by the requesting player, ensuring privacy and security.
## Architecture
The SE Grid Manager is organized into four primary components, each serving a specific purpose:
### 1. ClientPlugin
- Provides the in-game UI for players to interact with their grids.
- Implements keyboard shortcuts (e.g., `Ctrl+G`) to quickly access the grid management interface.
- Facilitates secure communication with server plugins to retrieve and manipulate grid data.
- Displays detailed block information, enhancing player awareness of their grid configurations.
### 2. TorchPlugin
- Functions as a server-side plugin tailored for Torch server environments.
- Listens for HTTP requests and provides REST API endpoints for external applications.
- Manages grid data and player permissions, ensuring that operations are performed securely and accurately.
- Processes client requests for grid and block information, serving as the backbone for server-client interactions.
### 3. DedicatedPlugin
- A lightweight server-side plugin designed for dedicated server environments.
- Offers core grid management functionalities without the overhead of Torch-specific features.
- Ensures basic grid management capabilities are accessible in non-Torch setups.
### 4. Shared
- Contains common code that is utilized across all plugins.
- Manages configuration settings and logging utilities.
- Includes Harmony patching helpers to facilitate code modifications and enhancements.
## Requirements
### Development Environment
To develop and build the SE Grid Manager, ensure you have the following installed:
- **Visual Studio 2019 or later** (or Visual Studio Code with the C# extension)
- **.NET Framework 4.8.1**
- **Space Engineers Game Files** (for client plugin references)
- **Space Engineers Dedicated Server** (for server plugin references)
- **Torch Server** (optional for Torch plugin development)
### Game Dependencies
- **Space Engineers** (latest version)
- **Harmony 2.3.3** (included via NuGet)
- **Newtonsoft.Json** (included with *Space Engineers*)
## Installation
### Initial Setup
Since this project lacks automated dependency resolution, you'll need to manually configure assembly references.
#### 1. Clone the Repository
```bash
git clone https://github.com/snowmuffin/SE_Grid_Manager.git
cd SE_Grid_ManagerEdit Directory.Build.props to update the paths to match your installations:
<Project>
<PropertyGroup>
<Bin64>C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64</Bin64>
<Dedicated64>C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64</Dedicated64>
<Torch>C:\TorchServer</Torch>
</PropertyGroup>
</Project>Ensure the required assemblies are available:
Verify that the following assemblies exist in your $(Bin64) path:
Sandbox.Game.dllSandbox.Common.dllSandbox.Graphics.dllVRage.dllVRage.Game.dllVRage.Input.dllVRage.Library.dllVRage.Math.dllNewtonsoft.Json.dll
Verify that the Torch assemblies exist in your $(Torch) path:
Torch.dllTorch.API.dllTorch.Server.exe
Verify that the dedicated server assemblies exist in your $(Dedicated64) path.
# Using Visual Studio
# Open Gridmanager.sln and build the solution
# Using command line (if MSBuild is available)
msbuild Gridmanager.sln /p:Configuration=Debug /p:Platform="Any CPU"- Build the
ClientPluginproject. - Copy
Gridmanager.dllfromClientPlugin\bin\Debug\to your Space Engineers Plugins folder:%AppData%\SpaceEngineers\Plugins\Local\
- Build the
TorchPluginproject. - Copy the following files to your Torch
Plugins\folder:Gridmanager.dllmanifest.xml
- Build the
DedicatedPluginproject. - Copy
Gridmanager.dllto your dedicated server's Plugins folder.
- Ctrl+G: Opens the grid list interface.
- Navigate through your grids to view detailed block information.
- Click "Delete Block" to remove individual blocks (requires server permission).
The Torch plugin provides several configuration options:
- Enable HTTP Listener: Toggle to enable or disable the REST API.
- HTTP Port: Specify the port for the HTTP listener (default: 8080).
- Web Host Address: Configure the address for external access.
We welcome contributions to enhance the SE Grid Manager. To contribute:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and add tests if applicable.
- Submit a pull request detailing your changes.
This project is licensed under the MIT License - see the LICENSE file for details.
For more detailed information or support, please refer to the project's GitHub Issues or reach out to the community.
This README provides a comprehensive overview of the SE Grid Manager project, enhancing the existing content while maintaining its core structure and features. It includes essential sections such as installation, usage, contributing, and licensing, ensuring clarity and professionalism throughout the document.