WhosThatPixelmon - A simple server-side chat plugin for Pixelmon that mimics the 'Whos that Pokemon' intervals from the show

This is a discussion topic for the Ore project, WhosThatPixelmon. View the full project on Ore for downloads and more information.


Whos That Pixelmon

A ChatGame plugin for Pixelmon to mimic the ‘Whos that Pokemon’ intervals from the show.

Plugin in action

Installation

Drag the jar into your server’s mods folder.
Make sure you have the dependencies RealMap and Pixelmon Reforged installed.

Features

  • Picks a random sprite from all available sprites.
  • Configurable item rewards and time intervals.
  • Prevents players from keeping maps created.

Commands

/whosthatpixelmon, /wtp start
Forces the chat game to start and resets the time elapsed towards the next instance

Permissions

whosthatpixelmon.command.start

Config

The config file for this plugin is located in config/whosthatpixelmon/whosthatpixelmon.conf within your server’s folder.
Default Config File:

# List of potential item rewards, a random item will be selected from the list if itemRewardsEnabled=true
item=[
    {
        # Quantity of item being given
        amount=2 
        # The ItemID of the item being rewarded, enable tooltips in-game to see itemIDs when hovering over items
        name="pixelmon:rare_candy"
    },
    {
        amount=2
        name="pixelmon:ultra_ball"
    }
]

# Enables item rewards being given
itemsEnabled=true

# List of commands to be run by the server when a player wins the chat game (all commands will be executed)
# Type <player> in the command string to insert the winning player in the command.
# The command you enter here must be a valid command that is executable by the server.
commands=[
        "give <player> minecraft:diamond 1" #example command, will give the winning player a diamond
        "give <player> minecraft:emerald 1"
]

# Enable/disable commands list (see above) being executed when a player wins
commandsEnabled=false

# Enable/disable answer being revealed if the sprite is not guessed correctly in time
revealAnswer=false

# Time interval between successive instances of the chat-game. A random time between these values will be used when counting
# towards the next event launch. Make both values the same if you want the event to launch at the same time interval.
time {
    maximumTimeInterval=35
    minimumTimeInterval=30
}

# Time interval in seconds for players to enter guesses for the chat game
guessingTime=30

# Prefix that will be shown in front of messages that are broadcast, e.g. [Chat Games]
# Note: A space at the end is not needed, and will appear double spaced in game if present.
prefix = "[Chat Games]"

# Message displayed when the chat game launches
startingMessage = "'Whos that Pixelmon' will begin in 5 seconds. Have an empty main hand to participate"

# Message displayed when the chat game is not answered correctly
noAnswerMessage = "Nobody guessed correctly in time"

# Message displayed when answer is revealed
# Note: Pixelmon names will still remain in English. This message will be constructed in the contexts:
# "[noAnswerMessage]. [revealAnswerMessage] <name of pixelmon>!" e.g. Nobody guessed correctly in time. It's Dewott!
# "<player> [guessedMessage]. [revealAnswerMessage] <name of pixelmon>!" e.g. Biscuitss_ guessing correctly. It's Dewott!
revealedAnswerMessage = "It's"

# Message displayed when the chat game is guessed correctly
# Usage:
# "<player> [guessedMessage]. [revealAnswerMessage] <name of pixelmon>!" e.g. Biscuitss_ guessed correctly. It's Dewott!
guessedMessage = "guessed correctly"

# Message displayed when the winner receives an item reward
# Usage:
# <itemReceivedMessage> [item name] x[item amount] e.g. You have received ultra ball x2
itemReceivedMessage = "You have received"

# List of potential item rewards, a random item will be selected from the list if itemRewardsEnabled=true
item=[
    {
        # Quantity of item being given
        amount=2 
        # The ItemID of the item being rewarded, enable tooltips in-game to see itemIDs when hovering over items
        name="pixelmon:rare_candy"
    },
    {
        amount=2
        name="pixelmon:ultra_ball"
    }
]

# Enables item rewards being given
itemsEnabled=true

# List of commands to be run by the server when a player wins the chat game (all commands will be executed)
# Type <player> in the command string to insert the winning player in the command.
# The command you enter here must be a valid command that is executable by the server.
commands=[
        "give <player> minecraft:diamond 1" #example command, will give the winning player a diamond
        "give <player> minecraft:emerald 1"
]

# Enable/disable commands list (see above) being executed when a player wins
commandsEnabled=false

# Enable/disable answer being revealed if the sprite is not guessed correctly in time
revealAnswer=false

# Time interval between successive instances of the chat-game. A random time between these values will be used when counting
# towards the next event launch. Make both values the same if you want the event to launch at the same time interval.
time {
    maximumTimeInterval=35
    minimumTimeInterval=30
}

# Time interval in seconds for players to enter guesses for the chat game
guessingTime=30

# Prefix that will be shown in front of messages that are broadcast, e.g. [Chat Games]
# Note: A space at the end is not needed, and will appear double spaced in game if present.
prefix = "[Chat Games]"

# Message displayed when the chat game launches
startingMessage = "'Whos that Pixelmon' will begin in 5 seconds. Have an empty main hand to participate"

# Message displayed when the chat game is not answered correctly
noAnswerMessage = "Nobody guessed correctly in time"

# Message displayed when answer is revealed
# Note: Pixelmon names will still remain in English. This message will be constructed in the contexts:
# "[noAnswerMessage]. [revealAnswerMessage] <name of pixelmon>!" e.g. Nobody guessed correctly in time. It's Dewott!
# "<player> [guessedMessage]. [revealAnswerMessage] <name of pixelmon>!" e.g. Biscuitss_ guessing correctly. It's Dewott!
revealedAnswerMessage = "It's"

# Message displayed when the chat game is guessed correctly
# Usage:
# "<player> [guessedMessage]. [revealAnswerMessage] <name of pixelmon>!" e.g. Biscuitss_ guessed correctly. It's Dewott!
guessedMessage = "guessed correctly"

# Message displayed when the winner receives an item reward
# Usage:
# <itemReceivedMessage> [item name] x[item amount] e.g. You have received ultra ball x2
itemReceivedMessage = "You have received"

Changing item rewards:

To change the possible item rewards, simply copy and paste the following block of text inbetween the square brackets, making sure there is a comma after the final curly brace if another block is to follow. The amount of blocks represent the amount of potential item rewards when the chat game is answered correctly.

{  
        amount=2  
        name="<modid>:<itemname>"  
    },

Each block has a name, and an amount. To get an item’s ID, press F3 + H in minecraft, which will enable tooltips and show each item’s ID when hovered over in your inventory. The item amount is an integer that will define the quantity of the item give, please ensure that the item amount is not higher than the max stack size of the item you are rewarding.

If you only want to include one possible item reward, ensure that there is only one block in the square brackets, and that a comma does not follow the curly brace.

Item rewards can be disabled by setting itemsEnabled=false.

Changing commands:

A list of commands can be added which will be run by the server when a winner is announced. These commands must be valid and executable by the server. If the command is derived from a plugin, ensure that the plugin is installed correctly on the server. All commands in the list will be executed. By default this feature is disabled, but can be enabled by setting commandsEnabled=true.

Changing the answer being revealed:

By default the correct answer will not be displayed if no players guess the sprite correctly within the given time interval. This can be changed by setting revealAnswer=true, which will display the answer in chat even when it is not guessed correctly in time.

Changing guessing interval times:

The time interval allocated for player guesses can be modified by changing the value of guessingTime. This value will be read in seconds, and will start counting down when the map is given to the player and not when the event broadcast is sent in chat.

Changing interval times:

The time node in the config file defines the time interval for the chat game to take place.
mimimumTimeInterval and maximumTimeInterval is the earliest and latest that a new instance of the chat game will launch in minutes following an instance that has passed. If the server has started, these values will define the earliest and latest the first instance of the chat game will launch.

The time that the chat game launches will be randomised between these defined intervals. If you would like a static time between launches, simply put down the same value for both intervals, which will cause the game to launch at exactly the time specified.

Changing prefix:

The prefix node will define the message that is shown before all in-game chat messages that are sent by the plugin. Changing the contents of this string will change the prefix displayed on all messages.

Changing broadcasted messages:

The messages that are broadcasted in the plugin can now be modified. Note that although you may be able to change the language of broadcasts this way, Pixelmon names will still need to be answered in English, and will still be displayed in English if the revealAnswer node is set to true;

Contact me

Please report any bugs with the plugin on the Issue Tracker.
Any further queries can be raised by contacting me on Discord.

Not for Commercial Use

A new version has been released for WhosThatPixelmon, it is available for download here.


Changelog:

  • Fixed a bug where the chat game did not read config intervals correctly
  • Fixed a bug where players would retain maps if the server stopped during event runtime
  • Added a config section to readme.md
  • Added a gif to readme.md

Could you add a way to trigger the event with a command?

Thanks, Gab :slight_smile:

A new version has been released for WhosThatPixelmon, it is available for download here.


Changelog

  • Added a command to forcibly start the chat game, will reset any time elapsed towards a naturally occurring instance
  • Fixed a bug when removing maps from player inventories when connecting
  • Removed 'pokeball.png' which was included in the sprites folder that caused crashes
  • Added a commands section to readme.md

What do I have to do so that only 1 person can answer and only answer once? Now I have a problem that 1 player can answer the same pokemon name. and seems to pump

The answer can be repeated many times.

A new version has been released for WhosThatPixelmon, it is available for download here.


Changelog

  • Fixed a bug where players could answer correctly multiple times
  • Fixed a bug where players could retain maps by placing them in item frames

A new version has been released for WhosThatPixelmon, it is available for download here.


Changelog

  • Improved code structure
  • Improved the accuracy of item reward names being displayed
  • Created a new default config file with comments located at “config/whosthatpixelmon/whosthatpixelmon.conf”, the old config file may be deleted as it will no longer work with newer versions. Users who modified the old config file will need to modify the new one to keep their changes.
  • Added a commands node to the config file, which contains a list of commands that will be executed by the server when a player wins the chat game
  • Added a config option to enable/disable commands
  • Added a config option to enable/disable item rewards
  • Added a config option to reveal/hide the answer if the chat game isn’t answered correctly
  • Added a config option to change the time interval for players to guess the sprite
  • Updated readme.md to contain the new config options

Is there a way to add a config to increase the time before the game tries to give you a map? From 5 seconds to 10 seconds for instance.

A new version has been released for WhosThatPixelmon, it is available for download here.


Changelog

  • Updated sprites to include new additions from Pixelmon version 8.3.0
  • Improved formatting for answers
  • Hard coded “Flabebe” as an answer to remove accents from name
  • Fixed a bug where players could swap inventory slots using hotbar numbers to keep the map
  • Fixed a bug where players could swap out the map with another item to keep it
  • Added a config option to change the prefix of all in-game messages sent by the plugin (requires deleting old config to update)
  • Updated readme.md to include the new config option

There is no updated version to download.

A new version has been released for WhosThatPixelmon, it is available for download here.


Changelog

  • Added config sections to allow for the modification of text in broadcasts.

    • Note: The plugin will not function if the config is not updated to accommodate this change. You may either add the new sections (as seen in the docs/readme section) or delete the existing config file to allow for a new one to be generated.
  • Optimised the majority of code used

A new version has been released for WhosThatPixelmon, it is available for download here.


Changelog

  • Added a command to allow players to retrieve a map from the file name (Permission: whosthatpixelmon.map)
  • Added a command to allow players to list all sprite file names for a specified dex number (Permission: whosthatpixelmon.map)

I really like it. But I have a suggestion, is it possible to customize the image and let the player guess?
I don’t know if you’ve seen it, but in episode 55 of Pokémon TV, it was a very interesting quiz session. One of the quizzes was very impressive, .

我非常喜欢你的作品。但我有个建议,可不可以自定义图像然后让玩家猜?
我不知道你是否看过,在宝可梦TV第55集,是个非常有趣的答题环节。当中有个猜谜印象非常深,<从上往下看的胖丁>。

any chance you could add a generations version?