CobbleBrain - AI Dialogue System for Cobblemon
ModMIT

CobbleBrain - AI Dialogue System for Cobblemon

CobbleBrain is a mod that gives Pokémon a "brain," allowing them to think, talk, and interact with their surroundings in dynamic ways. Easy to setup and play!

1.5K
Downloads
6
Followers
2 months ago
Updated
📦
6
Versions

📖About CobbleBrain - AI Dialogue System for Cobblemon

CobbleBrain – AI Dialogue System for Cobblemon

Version
License
Status

Discord: join the official Cobblemon server, check mods-and-plugins → CobbleBrain.

About

CobbleBrain is a mod that gives Pokémon a “brain,” allowing them to think, talk, and interact dynamically with the world. It integrates artificial intelligence into gameplay, making your companions talk to you, react to battles, protect you from mobs and even cook a delicious steak, all of that using your prompt.


Features

  • Pokémon can talk to the player and to each other.
  • Pokémon can perform actions such as attacking, eating, and cooking.
  • Dialogue influenced by friendship, nature, past interactions, and world conditions.
  • Memory system that stores previous interactions.
  • Configurable PvE/PvP, friendship, and dialogue style in

/config/cobblebrain.json5.

  • Supports cloud AI models (Google AI Studio, OpenAI, OpenRouter) and local models via LM Studio.

How to Play

1. Choosing AI Mode Cloud Mode (Easiest)

Cloud mode uses external AI providers to process dialogue.

Using Player2

  1. Run the game with the mod installed, then close it (it will generate cobblebrain.json5)
  2. Install the Player2 app and create an account.
  3. Copy the apiBaseUrl from the app (Example: http://127.0.0.1:4315) then paste it into config/cobblebrain.json5.
  4. Write "player2" in localApiProvider at config/cobblebrain.json5
    Optional: Choose a model directly inside the Player2 app (under Chat Model or Local LLM).
    Here's a Tutorial on YouTube!

Using Other Providers

  1. Run the game with the mod installed, then close it (it will generate cobblebrain.json5)
  2. Create an account with a provider (examples: Google AI Studio, OpenAI, OpenRouter).
  3. Generate an API key from the provider’s dashboard.
  4. Choose a model (examples: gemma-3-12b-it, gpt-4.1-mini, anthropic/claude-3.5-sonnet).
  5. Edit config/cobblebrain.json with:
    • apiKey: your generated key
    • apiBaseUrl: provider’s official URL
    • aiModel: ID of the chosen model
      Here's a Tutorial on YouTube!
Local Mode
Local mode runs AI models directly on your computer using LM Studio. 
WARNING: LOCAL MODELS MAY CAUSE PROBLEMS IF YOU RUN/INSTALL MODELS THAT ARE TOO HEAVY.

**Steps:**  
1. Install [LM Studio](https://lmstudio.ai) (available for Windows, Mac, Linux).  
2. Open LM Studio and set up a folder for storing models.  
3. Download a model (examples: LLaMA, Mistral).  
   - 4b–5b models → lightweight, fast, good for simple dialogues.  
   - 7b–8b models → balanced, deeper responses.  
   - 12b+ models → complex, detailed dialogues, requiring significant RAM and GPU.  
4. Prefer quantized versions (q4, q5, q8) to reduce resource usage.  
5. Start the LM Studio server; it will show a local API address (e.g., `http://localhost:port`).  
6. Edit `config/cobblebrain.json` with:  
   - `apiBaseUrl`: local server address (Example: http://localhost:1234) 
   - `aiModel`: ID or name of the model running in the server
   - `localApiProvider`: "lmstudio"
2. Interacting with Pokémon
  • Use the command /mpk <message> to talk to your Pokémon.
  • If listenToChat = true, any chat message can be interpreted by the AI.
3. Performance Adjustments
  • Use lowTokenMode for faster and lighter responses.
  • Adjust maxShortMemory and maxLongMemory to control how much dialogue memory Pokémon retain.

Usage Recommendations

  • Low-end PC / simple laptop → Cloud AI.
  • Powerful laptop with dedicated GPU → Cloud AI or lightweight local models (4b–7b).
  • Moderate–high-end PC → Cloud AI or robust local models (8b–12b).
  • For local models, always prefer quantized versions (q4, q5, q8) to reduce RAM/GPU usage.

Configuration

To see all available configuration options and detailed explanations, please check the CobbleBrain README on GitHub.
There you will find the full list of variables (apiKey, aiModel, temperature, etc.) and how to customize them in your /config/cobblebrain.json5.


Pokémon Actions

Primary Type-based Actions Cook (Fire) Can cook food and smelt ores. 5% chance of item turning into charcoal. Grow (Plant) Grows tree saplings and crops. Repair (Metal) Repairs tools and weapons up to a certain durability threshold. Shift (Ghost) Transports the player to an alternate dimension. Player becomes invisible, gains increased speed and jump height, but suffers from high weakness.
General Actions Attack Pokémon attacks any mobs close to it. Protect Pokémon targets hostile mobs nearest to the player; if none are found, it follows the player. Eat Pokémon eat any edible item dropped on the ground. Food effects will be added in future updates. Buff Pokémon grants the player a positive status effect based on its primary type (e.g., regeneration, speed). Debuff Pokémon applies a negative status effect to nearby mobs based on its primary type (e.g., slowness, weakness). Sit Pokémon stays fixed in place, ignoring other actions. Idle Pokémon cancels all active commands and returns to normal behavior.

FAQ

Can I play with a free model? Yes, many providers offer free models, but usually with usage limits. I recommend gemma-3-12b-it from Google Ai Studio (Default in the mod) Pokémon responses are too slow. Why? It depends on: 1. Model size (larger models are slower). 2. Prompt length. 3. Internet connection quality. 4. Provider traffic load. How can I speed up Pokémon responses? 1. Shorten the instruct. 2. Enable `lowTokenMode`. 3. Use smaller/quantized models. 4. Adjust `maxShortMemory` and `maxLongMemory`. All these settings are in cobblebrain.json5 inside the config folder. I have issues with my key or provider. What should I do? CobbleBrain only bridges the game and the provider. If problems occur, contact the provider’s support directly. I found a bug / have a suggestion / have a question. - Bugs and suggestions: open an *issue* on GitHub. - Questions: join the official Cobblemon server, go to the content-zone-help section, and search for CobbleBrain. Does the mod collect personal data? No. The mod only forwards the player’s prompt to the chosen AI provider and returns the response. Local logs are generated only if `debugLogging = true`. Can I use local models? Yes, via LM Studio. But be careful: large models may cause crashes or require strong hardware. I want to revert my cobblebrain.json to default. What should I do? Delete or rename your current `cobblebrain.json5` file inside the config folder. When you restart the game, the mod will automatically generate a new config file with the default values.