mirror of
https://github.com/mleem97/gregWiki.git
synced 2026-04-11 03:29:19 +02:00
refactor: update project branding and structure for gregFramework
- Changed project title and tagline in docusaurus.config.js to reflect the new branding. - Updated package.json and package-lock.json to rename the project to gregwiki-docs-site. - Adjusted sidebar and documentation files to align with the new project structure and naming conventions. - Enhanced documentation content for clarity and consistency across various sections. - Added Prettier as a development dependency for code formatting. This commit aligns the project with the new branding and improves overall documentation quality.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
# Getting Started EN
|
||||
|
||||
## Steps
|
||||
|
||||
1. Build FrikaMF locally (`dotnet build`).
|
||||
2. Create your mod project.
|
||||
3. Validate runtime dependency on `FrikaModdingFramework`.
|
||||
4. Use hooks/events from the reference pages.
|
||||
|
||||
## Next
|
||||
|
||||
- [Hook Event Reference EN](../Reference/Hook-Event-Reference)
|
||||
- [Troubleshooting EN](../Troubleshooting/overview)
|
||||
@@ -0,0 +1,3 @@
|
||||
# Guides Index EN
|
||||
|
||||
- [Getting Started EN](Getting-Started)
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"key": "wiki-import-moddevs-guides"
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
# ModDevs Index EN
|
||||
|
||||
Audience: developers building mods on top of FrikaMF.
|
||||
|
||||
## Contents
|
||||
|
||||
- [Getting Started EN](Guides/Getting-Started)
|
||||
- [Hook Event Reference EN](Reference/Hook-Event-Reference)
|
||||
- [Troubleshooting EN](Troubleshooting/overview)
|
||||
- [AI Usage Policy](../AI-USAGE)
|
||||
@@ -0,0 +1,132 @@
|
||||
---
|
||||
title: Mod-Developer (Debug) EN
|
||||
description: Rust vs C# decision guide, getting started for both tracks, hook discovery, architecture, and API orientation.
|
||||
sidebar_position: 130
|
||||
tags:
|
||||
- audience:moddev
|
||||
---
|
||||
|
||||
## Mod-Developer (Debug)
|
||||
|
||||
You only need one track: **Rust** or **C#**. FrikaMF bridges runtime communication.
|
||||
|
||||
Full framework capability catalog with setup guides: [`Framework Features & Use Cases`](/wiki/legacy/wiki-import/Framework-Features-Use-Cases).
|
||||
|
||||
## Rust vs C# decision guide
|
||||
|
||||
| Criteria | 🔷 C# Track | 🦀 Rust Track |
|
||||
| --- | --- | --- |
|
||||
| Onboarding speed | Fast | Medium |
|
||||
| Direct Unity/Il2Cpp access | Strong | Indirect |
|
||||
| Native-level control | Medium | High |
|
||||
| Safety model | Medium | High |
|
||||
| Recommended for | Most gameplay mods | Performance/ABI-heavy systems |
|
||||
|
||||
## Lua/Python/Web FFI status
|
||||
|
||||
- Rust FFI in framework core: **implemented**.
|
||||
- Built-in Lua runtime host: **not implemented**.
|
||||
- Built-in Python runtime host: **not implemented**.
|
||||
- Built-in generic HTTP/WebSocket FFI transport: **not implemented**.
|
||||
|
||||
Recommended approach:
|
||||
|
||||
- Run Lua/Python as a sidecar process and connect through your C# or Rust mod boundary.
|
||||
- Use framework events as stable inputs and framework APIs as safe outputs.
|
||||
- Keep Unity/IL2CPP object access in C# or Rust layers.
|
||||
|
||||
For full DE/EN step-by-step tutorials per FFI entrypoint, see:
|
||||
|
||||
- [Lua FFI — How to Start Developing (DE + EN)](/wiki/legacy/wiki-import/Lua-FFI-Start-Developing)
|
||||
|
||||
## Architecture
|
||||
|
||||
```text
|
||||
Data Center (IL2CPP)
|
||||
↓ HarmonyX Patch
|
||||
FrikaMF C# Bridge (Il2Cpp objects -> C-ABI structs)
|
||||
↓ P/Invoke / C-ABI ↓ MelonLoader API
|
||||
Rust Mod (.dll) C# Mod (.dll)
|
||||
```
|
||||
|
||||
## Source of truth for hooks
|
||||
|
||||
- [`HOOKS.md`](../HOOKS)
|
||||
|
||||
## C# track quick start
|
||||
|
||||
```powershell
|
||||
dotnet build .\framework\framework/FrikaMF.csproj /p:GameDir="C:\Path\To\Data Center"
|
||||
```
|
||||
|
||||
```csharp
|
||||
using HarmonyLib;
|
||||
using MelonLoader;
|
||||
using Il2Cpp;
|
||||
|
||||
[HarmonyPatch(typeof(Server), nameof(Server.PowerButton))]
|
||||
public static class Patch_Server_PowerButton
|
||||
{
|
||||
public static void Prefix(Server __instance)
|
||||
{
|
||||
MelonLogger.Msg($"Server power toggle: {__instance.name}");
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Rust track quick start
|
||||
|
||||
```powershell
|
||||
cargo build --release
|
||||
```
|
||||
|
||||
```rust
|
||||
#[no_mangle]
|
||||
pub extern "C" fn mod_init(_api_table: *mut core::ffi::c_void) -> bool {
|
||||
true
|
||||
}
|
||||
```
|
||||
|
||||
## dnSpy / dotPeek guidance
|
||||
|
||||
- Open generated `Assembly-CSharp.dll` interop output.
|
||||
- Validate signatures and call context.
|
||||
- Document candidates in `HOOKS.md`.
|
||||
- Implement Harmony patch and event dispatch.
|
||||
|
||||
## Why many IL2CPP interop methods look empty
|
||||
|
||||
Interop assemblies often contain metadata-facing stubs; real implementation lives in native IL2CPP binaries.
|
||||
|
||||
## Web FFI vs Web UI (important)
|
||||
|
||||
- `DC2WebBridge` provides Unity-side UI adaptation/styling.
|
||||
- It is not a generic network FFI transport bus.
|
||||
- For Web FFI, implement your own HTTP/WebSocket gateway with validation and rate limits.
|
||||
|
||||
Config API reference: [`Mod Config System`](/wiki/legacy/wiki-import/Mod-Config-System)
|
||||
|
||||
## Cross-track example
|
||||
|
||||
### 🦀 Rust
|
||||
|
||||
```rust
|
||||
#[no_mangle]
|
||||
pub extern "C" fn mod_on_event(event_id: u32, _ptr: *const u8, _len: u32) {
|
||||
if event_id == 1001 {
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 🔷 C\#
|
||||
|
||||
```csharp
|
||||
[HarmonyPatch(typeof(CustomerBase), nameof(CustomerBase.AreAllAppRequirementsMet))]
|
||||
public static class Patch_Requirements
|
||||
{
|
||||
public static void Postfix(bool __result)
|
||||
{
|
||||
MelonLogger.Msg($"Requirements met: {__result}");
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,8 @@
|
||||
# Modding Guide EN
|
||||
|
||||
English mirror page.
|
||||
|
||||
The maintained canonical page is currently:
|
||||
|
||||
- [Modding Guide](Modding-Guide)
|
||||
- [Lua FFI — How to Start Developing (DE + EN)](/wiki/legacy/wiki-import/Lua-FFI-Start-Developing)
|
||||
@@ -0,0 +1,10 @@
|
||||
# Hook Event Reference EN
|
||||
|
||||
Primary source:
|
||||
|
||||
- [HOOKS](../../HOOKS)
|
||||
- [Hook Naming Convention](../../HOOK-NAMING-CONVENTION)
|
||||
|
||||
Additional:
|
||||
|
||||
- [FFI Bridge Reference](../../FFI-Bridge-Reference)
|
||||
@@ -0,0 +1,3 @@
|
||||
# Reference Index EN
|
||||
|
||||
- [Hook Event Reference EN](Hook-Event-Reference)
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"key": "wiki-import-moddevs-reference"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
# Troubleshooting Index EN
|
||||
|
||||
- [Troubleshooting EN](overview)
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"key": "wiki-import-moddevs-troubleshooting"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
# Troubleshooting EN
|
||||
|
||||
## Verify
|
||||
|
||||
1. Validate hook signatures against `HOOKS`.
|
||||
2. Check `MelonLoader/Latest.log` and framework logs.
|
||||
3. Match game version and FrikaMF version.
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"label": "Mod developers",
|
||||
"position": 20,
|
||||
"key": "wiki-import-root-moddevs"
|
||||
}
|
||||
Reference in New Issue
Block a user