LoTROInterface

LoTROInterface (https://www.lotrointerface.com/forums/index.php)
-   General Authoring Discussion (L) (https://www.lotrointerface.com/forums/forumdisplay.php?f=22)
-   -   Identify asset ID of current map (https://www.lotrointerface.com/forums/showthread.php?t=3860)

Hyoss 11-16-2021 11:25 AM

Identify asset ID of current map
 
Anybody know how to find the assetID of the currently visible map other than browsing all existing assets with AssetBrowser?

Garan must have an idea because MoorMap has so many interior maps included. Not sure if that can be done programmatically at all?

What I am looking to do is get the asset IDs of maps used by missions.

Garan 11-16-2021 06:07 PM

Quote:

Originally Posted by Hyoss (Post 12685)
Anybody know how to find the assetID of the currently visible map other than browsing all existing assets with AssetBrowser?

Guarantee must have an idea because MoorMap has so many interior maps included. Not sure if that can be done programmatically at all?

What I am looking to do is get the asset IDs of maps used by missions.

Short answer: No

Long and somewhat boring (okay, probably exceedingly boring) answer:
There is no programmatical way to get the current map resource. I have a newer and much improved version of IRV that I use to scan for resources any time a new expansion is released. This version has a library feature. New resources are automatically put into the New library. I then filter the display of the New library by size looking for anything that is 1024x768 and move any matching Parchment maps to the Map library. Then I filter on 800x600, 1600x1200, 2400x1800, 3200x2400 and 4800x3600 and move any matching interior maps to the Map library. Last I filter on 200x200 and move any matching compass tiles to the Tiles library. While matching the current map is still a manual process, I only have to look through the Map library which is pretty quick when displaying 120x120 tiles (stretched) in a grid. I use a different set of features to re-scan the Tiles library for size, removing any 32x32 tiles (no longer valid tiles will have a size of 32x32) and then exporting the list of tiles to my MapMaker plugin so that I can spend the next few weeks going insane trying to piece together a few thousand new pieces of the TerrainMap terrain... I've thought several times of publishing the updated IRV but the interface is kinda ugly and it's a bit buggy - it works for the limited use I need it for but it's not really suitable for public consumption.

TLDR=wait for the next release of MoorMap and look up the interior map codes in the defaults.lua file or pester (ok, probably better to beg) Thurallor to release an update to AssetBrowser.

Meanwhile, I will post what I have for Gundabad missions' map ids in the next day or so - I'm not sure I've seen the full cycle of missions yet - so look for a follow-up response here.

Hyoss 11-17-2021 06:34 AM

If you would not mind making your IRV available somewhere I would gladly use that, bugs are no problem and a zip or github link would be enough for me, no documentation needed either.

Also Gundabad mission maps would be an awesome start, I am actually trying to collect all possible mission maps regardless of area for a plugin idea I have. I know some of them have no map of their own when they are in the outside world presumeably.

Garan 11-17-2021 02:52 PM

Quote:

Originally Posted by Hyoss (Post 12687)
If you would not mind making your IRV available somewhere I would gladly use that, bugs are no problem and a zip or github link would be enough for me, no documentation needed either.

Also Gundabad mission maps would be an awesome start, I am actually trying to collect all possible mission maps regardless of area for a plugin idea I have. I know some of them have no map of their own when they are in the outside world presumeably.

IRV isn't likely to ever get updated unless I find myself with a huge amount of time with nothing better to do (I'd rather shave with a belt sander). FWIW, you can easily create your own map resource locator now that they fixed the client crash on non-image resources. Basically, you would create a simple plugin with a single window with a button for starting/stopping the scan, possibly a field for a start id and end id and a control for the image being tested. The scan is a simple loop from the first resource ID until either some limit or a user cancel (I would recommend running the loop in increments of a hundred or maybe a thousand in an update handler with each update starting from the value after the last value processed that way the client doesn't lock up and you will be able to click the button to cancel the scan. For each iteration of the scan loop you would:
set the stretchmode of the control to 0
use pcall to set the background of the control to the next resource ID
if the pcall was successful,
set the stretchmode of the control to 2
retrieve the control size (this will be the image size)
if the size is 1024x768, 800x600, 1600x1200,2400x1800, 3200x2400 or 4800x3600 then you have a map candidate, add it to your list of resources - not all candidates will actually be maps but the vast majority, like 95%, will be.

once your loop has reached it's end or you terminate it don't forget to save your list of resources.
Voilà, your very own map resource finder :) You'll be amazed at how fast it can process all of the images in the entire game. This can of course be easily altered to find resource candidates of any known dimension. If you are running the 32 bit client there is still a resource leak in the client and you may crash to desktop trying to process the entire client, so taking it in large chunks is generally best - the 64 bit client is much better, I have only crashed it once scanning for resources and that was when I tried flushing my resource library and rescanning from scratch all in one big scan.

Of course, getting the images is only half the fun. To be really useful, you now have to identify them all - or as many as possible - that way, when looking for a new map, you only need to be concerned with the ones that have no identity.

It will be much easier for you to write that simple plugin than to unravel IRV.

I found another interior today so I will be holding off at least another day to be sure I have seen the whole cycle of Gundabad missions. When I update MoorMap, I may add some exterior maps for mission areas similar to the maps I added for Laketown and Dale, etc. Basically, it's just a matter of finding the right terrain tiles, sometimes available in TerrainMap, sometimes on my junk zone in MapMaker then creating a single image for the area being displayed. The reason I would include them in MoorMap would be for users to create Overlays for the various missions to be used as guides, tutorials, etc. I just haven't figured out where they would fit in the map selection drop-down list.

Garan 11-18-2021 08:10 AM

Okay, so here's the preview list of new map asset ids from MoorMap. The parchment are all of the new Gundabad parchement as well as the new Rohan overview. The interiors are not all of the interior maps, just those that have been identified from either a mission or quest. Note: the listed names don't include accents because they were meant as just reminder notes for me.

-- parchment
0x4121166a,1024,768 --Mount Gundabad
0x4121166f,1024,768 --Delvings of Gundabad
0x41211669,1024,768 --Gundabad - Mattugard
0x4121166c,1024,768 --Gundabad - Pit of Stonejaws
0x4121166d,1024,768 --Gundabad - Deepscrave
0x4121166b,1024,768 --Gundabad - Clovengap
0x41211670,1024,768 --Gundabad - Gloomingtarn
0x41211668,1024,768 --Car Bronach
0x4121166e,1024,768 --Welkin-lofts
0x411c2de5,1024,768 -- rohan

-- interiors
0x4120fed1,800,600 -- Eirichav
0x4120c9b5,1600,1200 -- vernozal -:
0x4120d230,800,600 -- Mesem-gairu
0x4120dcc7,800,600 -- Agbash-khalt
0x4120fe62,800,600 -- Toll-oivas
0x4120fa0f,800,600 -- Shalakam
0x4120cb04,800,600 -- Atkat-darag
0x412108a6,800,600 -- Skrizagraf
0x4120d22f,800,600 -- The cradle of pain
0x4120fd8d,800,600 -- Skailag
0x4120d2c4,800,600 -- kallamdam (has a weird scale)
0x4120d231,800,600 -- shrine of throkar
0x4120cb05,1600,1200 -- caverns of ronglagam
0x4120dcc6,800,600 -- Hives of Bruvraum
0x4120fa0e,800,600 --Vatug-ronk, the Groaning Pit
0x4120c694,800,600 --Zul-mazal
0x41213775,1600,1200 -- Shalkhajat
0x4120d270,800,600 -- Stone-giant Dwellings
0x41210d2f,800,600 -- Draurakh
0x41210190,800,600 -- Durbangh
0x41210b69,1600,1200 -- Thyrstath
0x4120d2aa,800,600 -- hadnul-zahar
0x41210288,1600,1200 -- Forges of Gundabad
0x4120d9d4,800,600 -- cutaig
0x411f9e6c,800,600 -- Tur agal - upper chamber

The correctly accented names for the EN client can be found in:
Code:

Resource[1][515]="Mount Gundabad"
Resource[1][516]="Delvings of Gundabad"
Resource[1][517]="Mattugard"
Resource[1][518]="Pit of Stonejaws"
Resource[1][519]="Deepscrave"
Resource[1][520]="Clovengap"
Resource[1][521]="Gloomingtarn"
Resource[1][522]="Câr Bronach"
Resource[1][523]="Welkin-lofts"
Resource[1][524]="Eiricháv"
Resource[1][525]="Rohan"
Resource[1][526]="Hall of Vérnozal"
Resource[1][527]="Mesem-gairu"
Resource[1][528]="Agbash-khalt"
Resource[1][529]="Toll-oivas"
Resource[1][530]="Shalakâm"
Resource[1][531]="Atkât-darag"
Resource[1][532]="Skrizagráf"
Resource[1][533]="The Cradle of Pain"
Resource[1][534]="Skáilag"
Resource[1][535]="Kallamdâm"
Resource[1][536]="Shrine of Throkhâr"
Resource[1][537]="Caverns of Ronglagam"
Resource[1][538]="Hives of Brúvraum"
Resource[1][539]="Vatug-ronk, the Groaning Pit"
Resource[1][540]="Zul-mazal"
Resource[1][541]="Shakhajât"
Resource[1][542]="Stone-giant Dwellings"
Resource[1][543]="Draurákh"
Resource[1][544]="Durbángh"
Resource[1][545]="Thyrstáth"
Resource[1][546]="Hadnul-zahar"
Resource[1][547]="Forges of Gundabad"
Resource[1][548]="Cútaig"
Resource[1][549]="Tûr Ágal - Upper Chamber"

I haven't collected the FR/DE names yet so some will be different on those clients

Hyoss 11-18-2021 02:21 PM

Quote:

Originally Posted by Garan (Post 12693)
IRV isn't likely to ever get updated unless I find myself with a huge amount of time with nothing better to do (I'd rather shave with a belt sander). FWIW, you can easily create your own map resource locator now that they fixed the client crash on non-image resources. Basically, you would create a simple plugin with a single window with a button for starting/stopping the scan, possibly a field for a start id and end id and a control for the image being tested. The scan is a simple loop from the first resource ID until either some limit or a user cancel (I would recommend running the loop in increments of a hundred or maybe a thousand in an update handler with each update starting from the value after the last value processed that way the client doesn't lock up and you will be able to click the button to cancel the scan. For each iteration of the scan loop you would:
set the stretchmode of the control to 0
use pcall to set the background of the control to the next resource ID
if the pcall was successful,
set the stretchmode of the control to 2
retrieve the control size (this will be the image size)
if the size is 1024x768, 800x600, 1600x1200,2400x1800, 3200x2400 or 4800x3600 then you have a map candidate, add it to your list of resources - not all candidates will actually be maps but the vast majority, like 95%, will be.

once your loop has reached it's end or you terminate it don't forget to save your list of resources.
Voilà, your very own map resource finder :) You'll be amazed at how fast it can process all of the images in the entire game. This can of course be easily altered to find resource candidates of any known dimension. If you are running the 32 bit client there is still a resource leak in the client and you may crash to desktop trying to process the entire client, so taking it in large chunks is generally best - the 64 bit client is much better, I have only crashed it once scanning for resources and that was when I tried flushing my resource library and rescanning from scratch all in one big scan.

Of course, getting the images is only half the fun. To be really useful, you now have to identify them all - or as many as possible - that way, when looking for a new map, you only need to be concerned with the ones that have no identity.

It will be much easier for you to write that simple plugin than to unravel IRV.

I found another interior today so I will be holding off at least another day to be sure I have seen the whole cycle of Gundabad missions. When I update MoorMap, I may add some exterior maps for mission areas similar to the maps I added for Laketown and Dale, etc. Basically, it's just a matter of finding the right terrain tiles, sometimes available in TerrainMap, sometimes on my junk zone in MapMaker then creating a single image for the area being displayed. The reason I would include them in MoorMap would be for users to create Overlays for the various missions to be used as guides, tutorials, etc. I just haven't figured out where they would fit in the map selection drop-down list.

That sounds like something I should do just for the sake of learning, thank you for breaking it down like that.


All times are GMT -5. The time now is 09:29 PM.

vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI