Thread Tools Display Modes
05-08-09, 10:57 AM   #1
Yewbacca
A Murloc Raider
Join Date: Apr 2009
Posts: 6
Smile I'm an addon author

Hi,

I'm an addon author, how do I add notes to the Carbonite world map? The "Astrolabe" library lets you place notes (frames, actually) on both the minimap and world map. With Carbonite, it's unable to place any notes since Carbonite has that zooming texture instead of a "real" zone-by-zone zoomlevel. So how do I attach notes to Carbonite's map? Is there an API/function for this? I'd like to patch Astrolabe to support Carbonite.
 
05-08-09, 03:17 PM   #2
Jezzabel
A Cyclonian
 
Jezzabel's Avatar
Join Date: Jan 2008
Posts: 40
Actually I use SilverDragon that use the HandyNotes.

On what is called Carbonite Minimap the little icons dont show,

but on what is called the Carbonite Map, the icon appears and zoom with the map.

So I guess it should be possible to do something more interesting and get it on the minimap too ...
 
05-09-09, 11:11 AM   #3
stormkeep
Drunken Dorf
 
stormkeep's Avatar
Premium Member
Join Date: Dec 2008
Posts: 66
Carbonite has built in map "note" support like what Handynotes does already, which is the adding of a note that shows an icon on the map with the note text when you mouse-hover. I'm not sure what you mean by them not showing on the minimap though...with my setup carbonite's map is the minimap as well as the big map, so then notes shows up both places. I'm not even familiar with how to make a carbonite minimap that is indepent of the main map.

You can add notes to the carbonite world map by selecting "add note" from the right click menu.
You can then add additional lines of detail to the notes, if you want, from the "Favorites" window (the notes show up there as well as on the world map).

Last edited by stormkeep : 05-09-09 at 11:19 AM.
 
05-10-09, 04:16 AM   #4
Yewbacca
A Murloc Raider
Join Date: Apr 2009
Posts: 6
Cool

Originally Posted by stormkeep View Post
Carbonite has built in map "note" support like what Handynotes does already, which is the adding of a note that shows an icon on the map with the note text when you mouse-hover. I'm not sure what you mean by them not showing on the minimap though...with my setup carbonite's map is the minimap as well as the big map, so then notes shows up both places. I'm not even familiar with how to make a carbonite minimap that is indepent of the main map.

You can add notes to the carbonite world map by selecting "add note" from the right click menu.
You can then add additional lines of detail to the notes, if you want, from the "Favorites" window (the notes show up there as well as on the world map).
Yes, USERS can right click and "Add Note". I need a way as an addon AUTHOR to send notes to the Carbonite map, manage them, delete them, etc. You gave me an idea though, I'm gonna look inside the heavily obfuscated Carbonite.lua and see what the right click menu's "Add Note" does, but it's quite a bit of work, I'd also have to figure out how they remove notes.

Can I please have an official answer from the Carbonite team? I'd like to know the following:

- The API for adding a note.
- The API for identifying that note.
- The API for deleting a note.
- The API for knowing if Carbonite has taken over the minimap.

I will then write an addition to the Astrolabe library that does as follows:
Code:
If Carbonite is Loaded
    If Carbonite_Owns_Minimap
        "Both the Astrolabe AddToMinimap and AddToWorldmap functions add
        the notes to the world map only, since they're one and the same. And
        I'll manage the notes in a way that prevents duplicates from being
        loaded to the same x/y position when addons call both, this means
        Astrolabe supports carbonite without authors using Carbonite having
        to do anything"
    Else
        "The Astrolabe AddToMinimap works as normal since the minimap is not
        owned by Carbonite, but the AddToWorldmap function adds the notes
        to the Carbonite world map"
End

-- All notes will be managed in a "Continent+Zone+X+Y = notetext, noteid"
format to prevent duplicate notes (when carb owns the minimap), and to
allow the deletenote function to work properly. --
Please help me out here, Carb developers, with the necessary details above. This will make LOTS of Notetaking/Coordinate/Waypoint addons compatible with Carbonite WITHOUT CHANGING THE ADDONS, by putting the compatibility code in the library for transparent support. ;-)
 
05-12-09, 03:41 AM   #5
carboniteaddon
A Pyroguard Emberseer
 
carboniteaddon's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2008
Posts: 2,245
This depends on what these addons are trying to do. The note system in Carbonite is a subset of the Favorites system, which is saved data. There is no way to simply say give me note x outside of the Carbonite UI code that manages the data. The data is in a hierarchy that also contains folders, comments and targets.

The Favorites systems uses the map icon system to draw on the map, which is probably more appropriate for what you are doing, since I assume the data is still being owned by the other addons?


This is what we currently have exposed, which was done for another addon author:

Internally Carbonite uses numbers for map names. You should use standard map names, which we remap internally. We do this already for importing Cartographer data, which uses the base map overlay name. You should use the names returned from GetMapZones(1 to 4), since we already have a table to remap them. GetMapZones returns localized names, which Blizzard sorts alphabetically.

For areas you would do:

Nx.MapInitIconType ("!AddonName", "ZR") -- init zone rectangle type
local icon = Nx.MapAddIconRect ("!AddonName", mapName, zoneX, zoneY, zoneX2, zoneY2, color)
Nx.MapSetIconTip (icon, "text to tooltip")

Zone coords 0-100
Color "112233ff" -- "rrggbbaa" hex string

This type of icon is persistent once added to Carbonite. To remove the data, you would use MapInitIconType to clear it out and then add back only the areas you want to see.

For points we would need to add a Nx.MapAddIconPoint, which the other addon author did not need.

I added MapAddIconPoint for Carb 3.12, so it would be:

Nx.MapInitIconType ("!AddonName", "WP") -- World point
local icon = Nx.MapAddIconPoint ("!AddonName", mapName, zoneX, zoneY, texture)
Nx.MapSetIconTip (icon, "text to tooltip")

Also added for 3.12:
Nx.MapMinimapOwned() -- returns true if minimap in Carb map
__________________
faatal

Last edited by carboniteaddon : 05-12-09 at 03:50 AM.
 
 

WoWInterface » Featured Projects » Carbonite » Carbonite Archive » I'm an addon author


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off