Print this page

HowTo build an Instance Module

Download the Template

You can download the current template here

How the Template is build

- Everything is stored in the "defaults.profile" array. First you have to name your instance, you can use BabbleZones, it is a lib which contains translations of all zones in WoW, including the instances. Just name the englisch name of the instance.
- The version is very important if you change something. See here what you have to do, when the user shall be informed to reset his tactic because there are changes in the original one.
- Leave the inital attribute to true! The framework needs this variable.
- The id of your instance must be the same value which you have chosen for your module name "BT_instname" case sensitive! Otherwise your module cannot be loaded.
- If you like to add some Copyright information, you can use the Info attribute. This text will be shown on the info frame. Just check if it is not too big, because size is limited to a few lines.
- You should add the patchlevel as well, so that the user can see if the module is just as new as possible. Sometimes Blizzard changes the bosses, so if you chanange the tactic because the boss has changed, just update this field. Then the important list starts, bosses.

Insert Bosses

Because of WOTLK I have implemented the mode of the instances, that you can add tactics for 25 and 10 mode instances. Just use the field like in the example. You can add 5, 10, 25 and 40 modes. Others are not supported.
In the template you have two example bosses. You can use BabbleBoss for the name.
ratext contains a string, every new line is a new post in the raidchannel.
tactictext contains the whole tactictext. To make it better to read in the code you can use [[ ]] instead of " " then
trash contains the whole information about the trashmobs of a boss. This is optional, some bosses don't have any trash. Lokalize it like the tactictexts.
the text is interpreted exactly how you type it. Please localize this strings in the locale files.
You can add upto three action buttons with "actionBtn1" ect. You have three options to specify the button: give it a text, and a function wich is called if the button is pressed and optionaly you can give it a flag so that it is only shown if the player is promoted a raidleader. The function which is called if one clicks on the button can be specified directly or you call it and do it more downwards.
imgdata is a list of images for this boss.

Insert images for a boss

source must contain the path to this image, it can be case insensitive for Windows but no garanty for Mac.
btnId must be set of the number of buttons you put on the images + 1
A button needs a x and y coordinate and a type. You can use the types "f" for ranged dps, "n" for melee, "t" for tank, "h" for healer, "b", "x", "y", "z" for bosses.
caption is optional, if you don't set it, the standard caption is taken. If you like to have a blank caption set caption to " " be carefull "" will cause errors! Don't forget the space!
The list fontstrings is also optional, if you like to write something on the map just give the text color and position, optional the font. The color values must be between 0 and 1. Watch here which fonttypes are supported.
To fill the legend panel you can add entries but here the color is not optional, if you don't set it the text will be white.
It is very importent, that the images are type TGA and the size is a power of 2. I recommend 256x256.

To create a tactic for a whole instance, it is very easy to copy a boss from the template and relace your data in it. To get the coordinates drag them on the image ingame and save the data. Then you can copy them from the WTF/accname/SavedVariables/BT_instname.lua file.

Force update of a Module

If you have to correct the button position because of a patch or better ideas, you can force a reset of the module. Please increase the version counter every time you change something. That does not include a message to the users. Every module has a function CheckUpdate(). There you can call the function BT_main:ShowUpdateInfoFrame(). This function creates a info frame to ask the user if he likes to reset the module. Here is an example:

function BT_Eye:CheckUpdate()
if(not self.db.profile.initial)then
if(defaults.profile.version+1 > self.db.profile.version)then
if(defaults.profile.version >= 2)then --here add the version number where a reset is needed
BT_main:ShowUpdateInfoFrame()
end
end
end
self.db.profile.version = defaults.profile.version+1
self.db.profile.initial = false
end;

NOTE: It is only possible to reset the whole module! All user tactics, trash and button position for this module will be lost. So use this only if it is important.
If you change the boss or trash tactic it will be always the newes text shown, so don't reset the module!

Changes in BossTactics

You must change the file instances.lua in the framework to get a link in the list. It is the best you look how it is done for the standard tactics. But be aware, everyone who shall see your module must change this file. And it will be overitten by every update of BossTactics!

Publish the Module

If you think that your module should be added to BossTactics please let me know, I will check its correctness. Please send a zip to sorontur'at'kdh-wow.de. You will get a developer key.