Fandom

Battleship Craft Wiki

Fighting Customized Ships

148pages on
this wiki
Add New Page
Comments12 Share

If you have looked through Battleship Craft's code, you may have noticed a 'battleship.sqlite' file that stores your ships.  This is a tutorial that will show you how to transfer data from this database into a .plist file that you can upload into your application, and fight it in a custom battle.

It is recommended that you read this tutorial before proceeding if you plan to spawn your ship in a custom battle.

Procuring a .plist File from your Battleship.sqlite database

Grid data for enemy and shop (or template) ships is stored in a .plist file.  This first section of the tutorial will show you how to tranfer the .sqlite data into .plist data.

Necessary Tools:

Necessary Preparations:

  1. Using iTools, goto: Battleship.app>Ships, right click on 'Box.plist', and select 'Copy to Local'
  2. Using iTools, goto: Documents>db, right click on 'Battleship.sqlite', and select 'Copy to Local'
  3. Open up both the MS Excel and Text documents labeled 'sqlite code'
  4. Open the SQLite editor by accessing it under the 'Web Developer' dropdown menu

Instructions:

  1. On the SQLite Editor, under 'Database' on the top menu, select 'Connect Database'
  2. Select your 'battleship.sqlite' that you copied, and select 'Open'
  3. Under the 'Execute SQL' tab in the SQLite editor, enter 'SELECT z_pk, ztitle FROM zbsmanagedship' in the 'Enter SQL' box, and hit 'Run SQL'
  4. You will see two columns, one with the ship name, one with a number.  Now enter 'SELECT zcolor, zprototype, zquaternion, ztranslationx, ztranslationy, ztranslationz FROM zbsmanagedunit WHERE zship = ???', replacing the '???' with the corresponding number to the ship you are tranfering.
  5. You will see a larger gid with several columns.  Left click on the top row, scroll down, shift+left click on the bottom row.  This will select the entire grid.  Right click, and select 'Copy row(s) as CSV (MSExcel compatible)'
  6. Open up the sqlite code excel sheet.  Make sure cell B1 is selected, then hit paste.
  7. Select all the values from column H, and paste them into the Box.plist file, replacing its <array> <dict>-</dict> entries with the ones you copied fro the excel sheet.
  8. Under 'File', select 'Save As'.  Enter a name that will be used as identification, make sure the format selected is 'Unicode', then select a destination file folder, and hit 'Save'

You now have your .plist file.

Note: the sqlitecode.txt file contains the SQLite editor entry values, I placed them in the tutorial for convenience.

Uploading the .plist File into the Game

This second section will show you how to move the procured .plist into your battleship craft game.

  1. Using iTools, go to your Ships file folder under Battleship.app, and select upload.  Find your new .plist file and upload it.
  2. Find the Ships.plist file in Battleship.app.  Copy the 'AddonAegis' entry, and paste it.  Modify it to fit your uploaded .plist file.  Note: the <key>-</key> entry above the <dict>-</dict> data should be the same as the .plist file

Your custom ship now has the necessary identification to be spawned in a battle.

Note: if you modify the <key>type</key> <string>-</string> entry to 'template' and specify a cost, your ship will appear in the shop.


​​Taken from Shin-Wei Chiou's video here

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.