TekUnlock v1.2
==============

Directly teach engrams to players when specific creatures are killed. All
players within radius automatically learn the engrams.


FEATURES
--------
- Kill-based grants: Kill creatures to auto-learn engrams
- Variable unlock count: Randomly grant N engrams from a pool
- Smart filtering: Only grants engrams the player doesn't already have
- Radius detection: All players near the kill get the reward
- Persistent unlocks: Unlocked engrams survive mindwipes
- Chat notifications: Players see what they unlocked


INSTALLATION
------------
1. Copy the TekUnlock folder to ArkApi/Plugins/
2. Edit config.json with your creature -> engram mappings
3. Restart server or use: plugins.load TekUnlock


FILES
-----
TekUnlock.dll              Plugin binary
PluginInfo.json            ArkApi plugin metadata
config.json                ACTIVE config — what the plugin loads at runtime
config_template.json       Comprehensive examples (valid JSON, copy-paste)
config_reference.jsonc     Annotated reference with inline explanations
                           (.jsonc — has // comments, NOT loaded by plugin)


CONFIGURATION
-------------
Settings:
{
  "Settings": {
    "ChatPrefix": "TekUnlock",
    "UnlockRadius": 50000.0,
    "MessageOnUnlock": true
  }
}

- ChatPrefix: Prefix for chat messages
- UnlockRadius: Distance from kill to receive rewards (50000 = ~500m)
- MessageOnUnlock: Show chat notification when engrams are granted


Three KillUnlocks formats are supported:

Format 1 — Array (grant ALL engrams):
{
  "KillUnlocks": {
    "Broodmother_Character_BP": [
      "Blueprint'/Game/.../PrimalItemStructure_TekReplicator_C'",
      "Blueprint'/Game/.../PrimalItemStructure_TekGenerator_C'"
    ]
  }
}

Format 2 — Random range (minUnlock / maxUnlock):
{
  "KillUnlocks": {
    "Megapithecus_Character_BP": {
      "engrams": [
        "Blueprint'/Game/.../PrimalItemArmor_TekHelmet_C'",
        "Blueprint'/Game/.../PrimalItemArmor_TekShirt_C'",
        "Blueprint'/Game/.../PrimalItemArmor_TekPants_C'",
        "Blueprint'/Game/.../PrimalItemArmor_TekBoots_C'",
        "Blueprint'/Game/.../PrimalItemArmor_TekGloves_C'"
      ],
      "minUnlock": 1,
      "maxUnlock": 2
    }
  }
}

With minUnlock: 1 and maxUnlock: 2, killing Megapithecus grants 1-2 random
Tek armor pieces that the player doesn't already have.

Format 3 — Fixed count (unlockCount):
{
  "KillUnlocks": {
    "Dragon_Character_BP": {
      "engrams": [...],
      "unlockCount": 3
    }
  }
}

Always grants exactly 3 random engrams from the pool per kill.


UNLOCK OPTIONS
--------------
engrams      - Array of blueprint paths to grant (must end with _C)
unlockCount  - Exact number to grant (alternative to min/max)
minUnlock    - Minimum engrams to grant
maxUnlock    - Maximum engrams to grant (random between min-max)


PATTERN MATCHING
----------------
Each KillUnlocks key is matched as a substring of the killed creature's
class name. First match wins, so order patterns from most-specific to
most-generic. Substring matching means a key like "Boss" would match many
creatures — keep patterns specific.


CONSOLE COMMANDS
----------------
TekUnlock.Reload   - Reload configuration (admin only)
TekUnlock.List     - Show loaded kill rules (admin only)
TekUnlock.Grant <blueprint>
                   - Grant the specified engram to yourself (admin only)


PERSISTENT STORAGE
------------------
Player unlocks are saved to player_unlocks.json (alongside config.json):

{
  "<PlayerDataID>": {
    "name": "PlayerName",
    "unlocks": ["blueprint_path_1", "blueprint_path_2"]
  }
}

- Unlocks survive mindwipes — re-applied automatically on player join
- Tied to PlayerDataID (character-specific, not Steam ID)


NOTES
-----
- Only wild creature kills trigger unlocks (tamed don't count)
- Players must be within UnlockRadius when the creature dies
- Already-known engrams are skipped (no duplicates)
- Blueprint paths must end with _C for class loading


VERSION HISTORY
---------------
v1.2 - Plugin_Init for hot-loading support
v1.1 - Variable unlock count (minUnlock/maxUnlock), smart filtering
v1.0 - Initial release


SUPPORT
-------
discord.gg/qsbhxDEUfw
