skruis 180 Posted May 12, 2015 Is there a way to get a list of hill numbers, city names, etc. and their coordinates via a scripting command? I took a quick look at the BIKI and nothing stood out. Thanks, skruis (bus) Share this post Link to post Share on other sites
gc8 970 Posted May 12, 2015 It is possible. nearestLocations _nearbyLocations = nearestLocations [ position player, [], 9000000]; use something like that ( not exactly sure about the args ) Share this post Link to post Share on other sites
Greenfist 1863 Posted May 12, 2015 There's the group of 'location' commands: nearestLocations locationPosition text_location , for example. The location types (for Arma2) Share this post Link to post Share on other sites
skruis 180 Posted May 12, 2015 Disregard, I found a path or the start of a path via the configClasses. I should be able to interrogate the map class and yank out the 'names' and 'hills'. If I get it working, I'll report back in with the solution. Thx. skruis (bus) ---------- Post added at 17:50 ---------- Previous post was at 17:31 ---------- Oh wait, on closer inspection, it contains some hill locations but not all. GC/Green, I'll take a look at the stuff you suggested and let you know. Thanks! skruis (bus) Share this post Link to post Share on other sites
Greenfist 1863 Posted May 12, 2015 What kind of hill it doesn't return? Perhaps it's of some other type? Share this post Link to post Share on other sites
skruis 180 Posted May 12, 2015 Green, I was referring to the Altis config file. It has records for hills which on the map are denoted by the triangles w/ the dots in the center. The locations I'm looking for have a dot and a number so something like . 230. They seem to be on hills but maybe they're Mounts, ViewPoints or Flags. Still trying to narrow it down. Thanks, skruis (bus) ---------- Post added at 18:24 ---------- Previous post was at 18:14 ---------- I believe they're 'Mounts'. I placed a player and then executed: _locs = nearestLocations [position player, ["Mount"],50]; hint str(_locs); And it returned three locations whose x,z seemed to line up with three nearby hill numbers. -skruis (bus) ---------- Post added at 18:50 ---------- Previous post was at 18:24 ---------- And the numbers aren't hill numbers, they're the elevation of the 'Mounts'. I feel pretty stupid. I've thought for years that those were hill numbers. Share this post Link to post Share on other sites
Greenfist 1863 Posted May 12, 2015 And the numbers aren't hill numbers, they're the elevation of the 'Mounts'. I feel pretty stupid. I've thought for years that those were hill numbers. :D Just add a marker there and name it: "Hill " + str round((atltoasl locationPosition yourLocation) select 2) :cool: Share this post Link to post Share on other sites
skruis 180 Posted May 12, 2015 Ok, in my defense, I've heard others refer to them as hill #'s too! lol Alright, so I've got this bit of code to collect the hill numbers :-) _mountspos2d = nearestLocations [position player, ["Mount"],50]; _mountspos3d = []; { _mountpos2d = position (_x); _mountspos3d pushBack (ASLtoATL _mountpos2d); } forEach _mountspos2d; Thanks for the ATLtoASL! Didn't know that existed. I was originally going in a round about way to get a non e based Z coordinate. I created a mod called Athena, it's a 2nd screen app, and I'm hoping to create a routine that exports all of the overlay data from the maps so that data can be imported into a map in Athena and displayed over the map image in a similar fashion to the ingame editor. Just some background for you. Thanks for your help! skruis (bus) Share this post Link to post Share on other sites
Larrow 2797 Posted May 13, 2015 These maybe handy for you... (configFile >> "CfgWorlds" >> worldName >> "Names") holds the position of important positions on a map. This only holds hills that have a triangle (trig position). " _name = configName _x; _angle = getNumber ( _x >> 'angle' ); _desc_name = getText ( _x >> 'name' ); _pos = getArray ( _x >> 'position' ); _radX = getNumber ( _x >> 'radiusA' ); _radY = getNumber ( _x >> 'radiusB' ); _desc_type = getText ( _x >> 'type' ); _mrk = createMarker [ _name, _pos ]; _mrk setMarkerShape 'ELLIPSE'; _mrk setMarkerColor 'colorRed'; _mrk setMarkerDir _angle; _mrk setMarkerText format [ '%1 - %2', _desc_name, _desc_type ]; _mrk setMarkerSize [ _radX, _rady ]; "configClasses ( configFile >> "CfgWorlds" >> worldName >> "Names" ); (configFile >> "LocationTypes") holds a list of all possible location types that a map can contain. This will also output ALL height markers not just trig points. _worldRadius = ( getNumber ( configFile >> "CfgWorlds" >> worldName >> "mapSize" )) / 2; _worldCenter = getArray ( configFile >> "CfgWorlds" >> worldName >> "centerPosition" ); _output = []; " _type = configName _x; _locations = nearestLocations [ _worldCenter, [ _type ], _worldRadius ]; _positions = []; { _pos = locationPosition _x; _positions pushback ATLToASL _pos; }foreach _locations; _output pushback [ _type, _positions ]; "configClasses ( configFile >> "CfgLocationTypes" ); copyToClipboard str _output; Share this post Link to post Share on other sites
skruis 180 Posted May 13, 2015 Larrow: Thanks! I ran that script snippet that I posted before with the radius set to 2million :-) and it returned 9000 locations+ on Altis :-) (NameCity, NameCityCapital, NameVillage, NameMarine, Hill, Mount) I turned that into a function that I bundled into my mod. I ended up dumping the "Mounts" (which is funny) and just retaining the city names and such but the routine takes the locations and dumps them to a .json file. It's working perfectly. Share this post Link to post Share on other sites
Harzach 2505 Posted May 13, 2015 And the numbers aren't hill numbers, they're the elevation of the 'Mounts'. That's where hill numbers come from. Elevation in meters. Share this post Link to post Share on other sites
skruis 180 Posted June 3, 2015 (edited) That's where hill numbers come from. Elevation in meters. And normally, I'd agree with you and say "thats a useful way to provide references" but in the map, I've seen multiple hills in the same area w/ the same number so it's not always a 'perfect' reference though it will work 99.2% of the time ;-) I guess my more specific point was that I don't think BIS provided the numbers as a way to reference this hill vs that hill, they could have realized the function and said "Yea, that works", but I think the displaying of the elevation number was literally intended as a an elevation hint. What use are the contour's if there isn't ever a base reference number? It's kind of like the evolution question: why are giraffe's necks so long? Is it so they could reach the food? Is it because the longer necked giraffe's survived more easily and produced even longer necked offspring and the cycle repeated itself? It's a fine point but it's still a point...even if it doesn't 'really' matter. Edited June 3, 2015 by skruis Share this post Link to post Share on other sites
Harzach 2505 Posted June 12, 2015 Again, hill numbers are derived from elevation in meters. This isn't a notion of mine, it's convention. In practical use, hills with the same elevation in the same area would be referenced as "hill 123 alpha" and "hill 123 bravo". IIRC, cardinal directions are also used - "hill 123 north" and "hill 123 south". BI provided elevations because they are expected on a topo map. Share this post Link to post Share on other sites
Tankbuster 1733 Posted June 13, 2015 Perhaps relevant... there's 25 hill locations on Altis, but 10 of them don't have names (when using text _x) Share this post Link to post Share on other sites
Grumpy Old Man 3540 Posted June 13, 2015 Yeah, too bad BI went away from using locations to mark special points on the map. In A2 you had plenty of rocks marked, strongpoints around cities etc, all gone now. Share this post Link to post Share on other sites