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 Pixelmon’ 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 ingame 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 exectued)
#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 chatgame. 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

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.

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.