-
-
Notifications
You must be signed in to change notification settings - Fork 0
Developing expansions
Caution
This article is still under construction and incomplete.
Eggspansions allow users to add new cards to the game, introducing more variety and new strategies. Thanks to Eggsplode's modular structure, it's rather simple to add new ones to the game. This article covers the basics of expansion development.
Note
The test version is required to develop and test expansions.
Before we can start to write code, we must tell Eggsplode what the expansion is called and which emoji it should use. In resources/expansions.json, add your expansion in this format:
"myexpansion": {
"name": "My Expansion",
"emoji": "🧩"
}Start the bot and send /start. Your expansion should appear in the dropdown menu!
For each card in your expansion, add the following code to resources/cards.json and adapt it to your card's properties:
"do_something": {
"title": "Do something",
"description": "Do some stuff!",
"emoji": "🎴",
"count": 4,
"usable": true,
"explicit": true,
"expansion": "myexpansion"
},-
title: The name of the card, shown in the play menu, on Nope prompts, and when seeing the future. -
description: A brief description of what the card does, shown in the play menu and when hovering over the card. -
emoji: An emoji that should represent the card, shown next to the title. -
count: The amount of cards that should be placed in the initial deck, before cards are handed to the players. Will be increased when there are more than 5 players. -
usable: Whether the card can be played during normal turns (by using the Play button in the menu) -
explicit: If set tofalse, the default Nope prompt is shown when this card is played. Setting this totrueassumes that either a custom Nope mechanism is being used or the card cannot be noped. -
expansion: The expansion the card belongs to.
Now comes the fun part, code! Create a Python new file under eggsplode/cards, with the exact same name you used in expansions.json.
