HomeJavaMods<Legacy> Battleship ⚓ [for GameBox v2]
<Legacy> Battleship ⚓ [for GameBox v2]
ModsJava

<Legacy> Battleship ⚓ [for GameBox v2]

⬇ Download on Spigot
This game depends on my plugin GameBox!

battleship.png
Sink your opponents ships before he sinks yours!

A fun inventory game for two Players
open the spoilers for some awesome pictures :)

This game depends on my plugin GameBox. It is one of many inventory games for which GameBox provides a neat GUI and lots of customization.
Take a look at the GameBox page for the other games :)





about.png


This two player game is about sinking your opponents ships, before he sinks yours. Each player can see two different inventories. One is shown while the opponent is attacking. It shows your own ships on the water and slots that were fired at before are marked.
Spoiler: Defending inventory
The enemy did not fire before:
Defending1.png

The other inventory is shown while the player is attacking and displays hidden slots where the player did not fired at yet. With a click on one of these hidden slots the player fires and the slot will reveal either water or an enemy ship.
Spoiler: Attacking inventory
Five hits and one miss:
Attacking1.png
Five hits and two misses:
Attacking2.png

The game is won if one player hit all ships of his opponent. Per default the game is also won, if the opponent does not fire during the fire timer (default: 10 seconds). This can be changed in the configuration file.
Spoiler: Won/Lost inventories
This game was finished because the first player did not shoot during his 10 second time frame (configurable in configuration file).
Lost1.png

Won1.png

For the game to start the players must first place their ships. The number or each ship type can be set to one or to two in the configuration file. There are four different ship types: two blocks long, three blocks long, four blocks long and five blocks long.
Spoiler: Placing ships
No ship placed yet (click to place one block):
SetShipEmpty.png
The shown player has already placed his first (5 blocks long) and his second (4 blocks long) ship and is now waiting for the other player to finish placing the second ship. If the timer runns out without a player placing his/her ship(s) the game will place them randomly and will move on to the next step.
WaitingForOtherToSetShip.png



configuration.png
Spoiler: Default configuration file
Code (YAML):
# ----------------------------------------------------------------------------#
#                                                                             #
#                              Battleship config                              #
#                                                                             #
# ----------------------------------------------------------------------------#

# name of the language file (in the folder 'language')
#   the default.yml file is overwritten on every server restart!
#   This means you will have to use the other files to customize the messages, but since i am adding messages regulary in updates
#   you can use the default file if you just want to have the up to date english default messages
langFile
: "default.yml"






gameBox
:
  mainButton
:
    # define the Material and data for the button (format: 'material:data')
    materialData
: "IRON_BLOCK"
    # display name of the button
    displayName
: "&3Battleship"
    # lore of the button
    lore
:
   - ""
    - "&1Heavy battle on the ocean"
  gameButtons
:
    # number of ships in the game (only 1 or 2)
    #   if not set they will all default to 1
    normalGame
:
      materialData
: "IRON_BLOCK"
      displayName
: "&l&1Normal"
      lore
:
     - ""
      - '&l&51 Carrier, 1 Battleship,'
      - '   &l&52 Cruisers, 1 Destroyer'
      - '&1Cost
: &45'
      - '&1Reward
: &210'
      # slot of the button in the gui
      #   be careful to not use the same twice ;)
      slot
: 12
      cost
: 5
      reward
: 10
      aircraftCarrier
: 1
      battleship
: 1
      cruiser
: 2
      destroyer
: 1
      inviteGuiTitle
: "   Start a game of &3Battleship"
    specialRules
:
      materialData
: "COAL_BLOCK"
      displayName
: "&l&1Special rule"
      lore
:
     - ""
      - '&l&5One ship of each kind'
      - '&1Cost
: &410'
      - '&1Reward
: &215'
      - '&l&5In this game the attacker'
      - '   &l&5will even change after a hit'
      slot
: 14
      cost
: 5
      # false by default
      #   this changes attacker even if you hit a ship
      changeGridAfterHit
: true
      # false by default
      #   this changes attacker when the fire timer ran out instead of ending the game
      switchGridsAfterFireTimerRanOut
: true
      reward
: 10
      inviteGuiTitle
: "   &3Battleship&r with special rules"
    withTopList
:
      materialData
: "nether_star"
      displayName
: "&l&1Combat"
      lore
:
     - ""
      - '&l&52 Cruisers otherwise'
      - '   &l&5one of each ship'
      - '&1Cost
: &450'
      - '&1Reward
: &2100'
      - '&l&5Your number of wins'
      - '   &l&5in this game will be tracked!'
      - '&l&5Compare yourself'
      - '   &l&5with others in the top list.'
      slot
: 30
      cost
: 50
      reward
: 100
      # if true the best score of this button is saved
      saveStats
: true
      cruiser
: 2
      inviteGuiTitle
: "   &3Battleship   &5Combat"
  topListButtons
:
    # use the same key as the game you want to display the top list for
    #   for that button 'saveStats' must be true (see above)
    withTopList
:
      materialData
: "nether_star"
      displayName
: "&l&cTop list"
      lore
:
     - ""
      - "&1Combat &1top list"
      slot
: 32
      # inventory title of the top list (%player% and %game%)
      inventoryTitle
: '              Top List'
      # Lore of the skulls in the inventory. Use %rank% for the rank and %wins% for the number of wins
      skullLore
:
     - ''
      - '&6Rank:&1 %rank%'
      - '&6Wins:&1 %wins%'







gameRules
:
  # play sounds in the game
  playSounds
: true


# requires vault and an economy plugin
economy
:
  enabled
: false

# use "Material:data" or "ID:data"
# Some materials can not be displayed in an inventory, just test everything after changing
# You are advised to use different materials. At least on the same grid
#   otherwise the game could break
materials
:
  yourGrid
:
    ship
:
      material
: "Iron_block"
      name
: "&7Ship"
    lockedShip
:
      material
: "7"
      name
: "&8Locked ship"
    miss
:
      material
: "160:3"
      name
: "&2Yeah! A miss!"
    hit
:
      material
: "35:14"
      name
: "&4Damn! A hit..."
    water
:
      material
: "160:11"
      name
: "&1Water"
  othersGrid
:
    cover
:
      material
: "WOOL:7"
      name
: "&6Cover"
    miss
:
      material
: "160:11"
      name
: "&4That did not hit..."
    hit
:
      material
: "Iron_block"
      name
: "&2Booom! Gotcha"


# Customise the timers used in the game (all times in seconds)
timers
:
  # timer used during the ship-set part of the game
  shipSetTimer
:
    countdown
: 30
  # timer used during the main part of the game
  fireTimer
:
    countdown
: 10
  # timer used when attacker and defender change
  changingGrids
:
    countdown
: 3



If you like my inventory games you should take a look at Minesweeper, GemCrush and all the other GameBox games ;) or express your happiness with a small donation [​IMG]



Spoiler: Video by LtJim007 (Outdated v. 1.x.x)


To Do

- mark sunk ships by adding glow to them
Tell me your ideas!


Got any bugs or suggestions? Please tell me in the discussion.

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

<Legacy> Battleship ⚓ [for GameBox v2] is a free Minecraft Java mod. Compatible with Minecraft 1.8, 1.9, 1.10, 1.11 and newer. Downloaded 9,016 times (via Spigot). Download it and open it directly in the game.

Explore more