My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
PluginCreation  
How to create your own plugins.
Featured
Updated Oct 21, 2009 by cmkilger

Map Plugin Tutorial

A plugin creates the planets, continents and countries in the game. It is also responsible for setting up the deck. You can use the existing ViciRiskMap plugin as a template when writing your plugin.

Add a new target to the project. It should be a Load Bundle plugin. Give your plugin a name. It should begin with Vivi and end with Map, like ViciRiskMap. Try to make it something that makes sense for what you map will be.

Create a folder in the Plugins folder. You can do this by adding a new group under plugins. Name it the same as your plugin, just without the Map suffix, since you may wish to create other plugin types to accompany it. Open the Info window for the group and select the Choose… button on the right. Create a new folder with the same name in the Plugins folder, select it and hit Choose.

When creating the new target an plist file was created at the root directory. Find this file and move it to your new plugin folder. Back in Xcode, move the files reference to the group, open the Info window for the file and choose the new location, as was done with the group. Set the bundle identifier to com.example.Map.(your_plugin_name) without the Vici and Map portions of the name. For example, if you have a website at www.blizzard.com, you would identify your Map as com.blizzard.Map.Warcraft.

Double-click on the bundle target to open the build settings. Find the Info.plist File setting. Set it to Plugins/(plugin_folder_name)/(plugin_name)-Info.plist to match the location of your Info.plist file.

Create a new Objective-C class in the plugin folder. Give it the same name as your plugin. Make sure only your target is checked. Click on Finish. You can now begin coding your plugin. You will need to add the new folder and files to SVN.


Sign in to add a comment
Powered by Google Project Hosting