PKCore Copilot Rules — Free CoPilot Rules Template
    Neura Market
    Neura Market
    /CoPilot
    Marketplace
    Directories
    Resources
    CoPilot
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityDeepSeekDeepSeekCoPilotCoPilotStable DiffusionStable DiffusionMidjourneyMidjourney
    OverviewRulesPromptsMCPsAgentsGamesBlogVideosGuidesCoursesCommunityPluginsTrending
    CoPilotRulesPKCore Copilot Rules
    Back to Rules

    PKCore Copilot Rules

    faospark July 19, 2026
    0 copies 0 downloads
    Rule Content
    # PKextended - AI Agent Instructions
    
    ## Project Overview
    BepInEx 6.0 IL2CPP plugin for Suikoden I & II HD Remaster (Unity 2022.3.28f1). Uses Harmony to patch Unity engine calls for texture filtering, controller prompt swapping, and custom texture replacement.
    
    ## Architecture
    
    ### Harmony Patching Pattern
    All features use Harmony prefix/postfix patches to intercept Unity setters:
    ```csharp
    [HarmonyPatch(typeof(Image), nameof(Image.sprite), MethodType.Setter)]
    [HarmonyPrefix]
    public static void Image_set_sprite_Prefix(Image __instance, ref Sprite value)
    ```
    
    Patches live in `Patches/` folder. Each has static `Initialize()` called from `Plugin.ApplyPatches()`.
    
    ### Configuration-Driven Features
    - Each feature has dedicated `ConfigEntry<T>` in `ModConfiguration.cs`
    - Features conditionally patched in `Plugin.Load()` based on config values
    - Access config/logging globally via static `Plugin.Config` and `Plugin.Log`
    
    ### Game-Specific Classes
    - **`GRSpriteRenderer`**: Game's custom sprite renderer (not standard Unity)
    - Patches must target both standard Unity classes (`Image`, `SpriteRenderer`) and game classes
    
    ## Key Conventions
    
    1. **Static Access Pattern**: `Plugin.Log.LogInfo()` and `Plugin.Config.FeatureName.Value` used throughout patches
    2. **Caching for IL2CPP**: Dictionaries cache sprites/textures (`customSpriteCache`, `texturePathIndex`) - essential for performance in IL2CPP
    3. **Modular Patching**: Each feature independently applied - check config before patching in `ApplyPatches()`
    4. **Logging Levels**: `LogInfo` for user-facing actions, `LogDebug` for development details, `LogWarning` for failures
    
    ## Build & Deploy
    
    - **Always use `dotnet build` to build the project.**
    - **Auto-deploy**: Release builds output directly to game's `BepInEx\plugins\` (via registry lookup in `.csproj`)
    - **Debug builds**: Go to `bin\Debug` for testing without game installation
    - **Excluded folders**: `reserve/`, `build/`, `forlater/` - documentation and experimental code
    
    ## Git Commit Policy
    
    - **ONLY THE USER decides what gets committed to GitHub.**
    - AI agents do NOT commit changes without explicit user request.
    - Always ask the user for approval before `git commit` and `git push`.
    - Present changes for review and wait for explicit user command to commit.
    
    ## Adding New Features
    
    1. Create patch class in `Patches/` with `[HarmonyPatch]` attributes
    2. Add config entries to `ModConfiguration.cs`
    3. Add static `Initialize()` method to set up state from config
    4. Call `harmony.PatchAll(typeof(YourPatch))` in `Plugin.ApplyPatches()` with config check
    5. Update README.md configuration section and CHANGELOG.md
    
    ## Critical Implementation Details
    
    - **IL2CPP Limitations**: No reflection, must use direct type references
    - **Sprite Suffix Convention**: Xbox=`_00`, PS4=`_01`, PS5=`_02` for controller prompts
    - **Texture Replacement**: Partial coverage only - intercepts setters, not all texture loads
    - **Scene-based detection**: Custom textures discovered per scene load, not globally
    - **Mipmap bias**: Negative values prevent white outlines on filtered sprites
    
    ## Debugging & Development Tools
    
    - **DNSSpy  and Unity Asset Explorer**: Required for full debugging. Use to inspect game assets, scene hierarchy, and component values at runtime
    - **Game Focus**: This project targets **Suikoden I & II HD Remaster** (Unity 2022.3.28f1) exclusively. All patches, textures, and configurations must be tailored to these games
    - **Dependency Repository**: [d3xMachina/Suikoden-Fix](https://github.com/d3xMachina/Suikoden-Fix) is a major source for patches. Reference this repo for game-specific implementation patterns and compatibility considerations
    
    ## Reference Files
    
    - [Plugin.cs](Plugin.cs) - Entry point, patch orchestration
    - [ModConfiguration.cs](ModConfiguration.cs) - All config definitions
    - [GlobalControllerPromptPatch.cs](Patches/GlobalControllerPromptPatch.cs) - Example of global Image.sprite interception
    - [reserve/UNITY_CLASSES_EXPLAINED.md](reserve/UNITY_CLASSES_EXPLAINED.md) - Unity API technical details
    
    

    Comments

    More Rules

    View all

    QPrisma Copilot Rules

    A
    alexandergg

    Site Casanova Limaemedeiros Copilot Rules

    V
    victormedeeeiros-design

    Mosl Custom Chart Copilot Rules

    R
    riviangeralt

    InOut App Copilot Rules

    J
    jeanvq

    Fastfood Express Copilot Rules

    J
    jersonjjcr

    Pds Pre View Copilot Rules

    E
    eiriksgata

    Neura weekly digest

    Stay up to date

    The week's most-read AI news, trending AI tools and new automation workflows, in one email. At most once a week. Free, and you can unsubscribe in one click.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for CoPilot and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Games
    • Blog
    • Videos
    • Guides
    • Courses
    • Community
    • Plugins

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    © 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.

    Neura Market

    Custom AI Systems & Services

    Our team of experienced AI builders will help build custom AI systems, workflows, and solutions.

    Request custom work

    Ready-made automations for this

    Workflows from the Neura Market marketplace related to this CoPilot resource

    • Automated Execution Cleanup System with n8n API and Custom Retention Rulesn8n · $9.99 · Related topic
    • Receive and Analyze Emails with Rules in Sublime Securityn8n · $9.99 · Related topic
    • Create an IPL Cricket Rules Q&A Chatbot with Google Gemini APIn8n · $14.99 · Related topic
    • Automate Bing Copilot Searches and Summarize Results with AIn8n · $14.99 · Related topic
    Browse all workflows