lotrointerface.com
Search Downloads


Go Back   LoTROInterface > LotRO > Developer Discussions > Lua Programming Help (L)

Reply
Thread Tools Display Modes
  #1  
Unread 08-09-2011, 12:59 PM
Fido Fido is offline
The Undefeated
 
Join Date: Jul 2011
Posts: 6
Access to the map

Hi,
is there a way to set overlay on the world map? I took a look on MoorMap, but there is its own window created. (btw. where he took the map graphics from, in the resources folder I didn't find anything)
Has the API no access to the map object?

Thanks
Fido
Reply With Quote
  #2  
Unread 08-09-2011, 03:02 PM
Garan's Avatar
Garan Garan is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Oct 2010
Posts: 340
Quote:
Originally Posted by Fido
Hi,
is there a way to set overlay on the world map? I took a look on MoorMap, but there is its own window created. (btw. where he took the map graphics from, in the resources folder I didn't find anything)
Has the API no access to the map object?

Thanks
Fido
There is no access to the built-in Turbine map which is why MoorMap exists. There is also no direct access to the player location or heading - we can get ;loc coordinates by requiring the user to click a quickslot but that is the most access Turbine has granted at this point.

As to the empty Map folder, that is a placeholder for any maps which need external images when the built in resource has not yet been identified. Currently, all of the resource IDs for the maps included in MoorMap have been identified but as new areas are released, a JPG image will be in the Maps folder until the in-game resource is identified. In game resources are far more efficient so I do my best to keep the Maps folder empty

If you are interested in creating your own overlays for the maps, I have an option in the works with MoorMap to allow custom overlays to be assigned to a map and selected from a dropdown - this will be more useful (such as for raids and tutorials) once there are more interrior/instanced maps included in MoorMap. Unfortunately, the Overlay option will not be published for several months yet as there are a lot of other tasks with higher priority atm.
Reply With Quote
  #3  
Unread 08-09-2011, 04:35 PM
Fido Fido is offline
The Undefeated
 
Join Date: Jul 2011
Posts: 6
Thank you. This are bad news
But if I unterstand it correctly there is a way to get access to the build-in resources. Can you show an example how to load a build-in resource? And how did you found it out?

Fido
Reply With Quote
  #4  
Unread 08-09-2011, 06:11 PM
Garan's Avatar
Garan Garan is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Oct 2010
Posts: 340
Quote:
Originally Posted by Fido
Thank you. This are bad news
But if I unterstand it correctly there is a way to get access to the build-in resources. Can you show an example how to load a build-in resource? And how did you found it out?

Fido
The built in images can be assigned with the SetBackground() method for those controls supporting images - review the Turbine API for which
controls support SetBackground(). Unfortunately, using images isn't always just as straightforward as that. Depending on how you want the image to interact with other images, you may have to use SetBlendMode() and SetBackColorBlendMode() and in some instances the undocumented method SetStretchmode(). All of these methods are used in various ways in MoorMap and AltInventory.

As to locating the image resource IDs, this is complicated by a bug in the SetBackground() method - if a non-image resource ID is passed, the client will crash to desktop. This makes it difficult to just browse the resource IDs looking for a specific image. The most obvious workaround is to read through the dat files to get a list of images, then use an application to view just those valid images. However, reverse engineering is a ToS violation and many would consider reading through the DAT files to discover the image resources and match them to IDs as a form of reverse engineering. I took a slightly different approach - I wrote a plugin (IRV - Image Resource Viewer) which can track ranges of good images and bad images and allow the user to scan until a bad image is found (at which point the client crashes to desktop). The bad image is automatically locked out when the plugin is next loaded (it saves the image id just prior to testing it). This, combined with seed values from the undocumented methods Item:GetBackgroundImageID(), Item:GetQualityImageID(), Item:GetShadowImageID() and Item:GetUnderlayImageID() provided enough resources to build a decent library of images.

Unfortunately, I haven't updated the published version of IRV since last November so it is no longer functional and the library is sorely out of date. My current library has 261 maps identified with another 144 maps of places I haven't been to yet (whereas the old library only had a couple dozen identified) with over 3400 total Library entries. I plan to clean it up and publish a newer version with the enhancements that I have added to it since last November as well as the current image library, but I have a number of other tasks that keep pushing that project back. You can get around the one major bug in the published version by following the instructions in the comments section of the plugin.
EDIT: I have published ver 1.03 of IRV which should have most of my current Library as well as a number of enhancements.

Last edited by Garan : 08-23-2011 at 02:41 PM.
Reply With Quote
  #5  
Unread 08-10-2011, 12:58 PM
Fido Fido is offline
The Undefeated
 
Join Date: Jul 2011
Posts: 6
Thumbs up

Wow, I didn't thought creating a map plugin will be so complicated
It is a great work you've done. I'll play with the images first. Maybe is a map plugin not the best idea to learn creating plugins
Thanks a lot for the infos.

Fido
Reply With Quote
Reply


Thread Tools
Display Modes

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mini-map felgrath Interface Help (L) 2 03-01-2008 02:02 PM
Map tralkar General Authoring Discussion (L) 1 07-30-2007 12:06 AM
Mini Map Shadimar Interface Help (L) 4 07-13-2007 09:06 PM
Map Locations Galmir Interface Requests (L) 5 07-03-2007 06:28 AM
is it possible to move the map? Ylva Interface Help (L) 7 05-25-2007 03:53 PM


All times are GMT -5. The time now is 06:07 PM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | ESOUI | LoTROInterface | MMOUI | Swtorui