Initial post. (You don't want to see this, it's ugly)
[Workshop] Map Identifier Script
There's currently no built-in way to determine which map you're playing on and this frustrated me a little... so I went and made something that could tell you. :D
READ ME:
Unfortunately, I've recently found that this method isn't 100% reliable for maps that can be used in both regular play, and Arcade play. (Maps such as King's Row & Blizzard World were the play area is restricted)It’s still a good enough method of getting the current map, as only the restricted versions of the regular maps have issues, but still, I’m going to try and find a new method. (Or if Blizzard would hurry and add it themselves, that would be extra noice)
I’ve tried to come up with the most reliable method of checking the map and for now, I think this is pretty accurate. However, I’m still trying to come up with better ideas for the sake of efficiency and because… why not? It’s pretty good efficient now, sitting at only 3 actions, plus an optional one from the user if you decide to change it’s variable location
The script:
The maps (important):
-
Invalid informationCapture maps are made using 3 maps in the same world, each at different positions. This means that it you can't detect which part you're currently playing in, unless you write another script to do so. - Capture maps are made using 3 maps in the same world, at different positions. Only when playing on a non-arcade control map, you can check which section you're currently on by getting the
ObjectiveIndex
. I've made a list of these and put them in the map ID's section. - Arcade maps are mostly all variants of existing maps, but each play on a different world. With the exception of Oasis City Center & Ilios Ruins, they are all distinguishable from every other map. The two mentioned exceptions share the same ID as their main map.
Detecting the 2 exceptions:
-
- Ilios Ruins: The Map ID will either be 12, 30 or 31. If the map ID is 30 or 31, just look down the list. If it's 12, however, get the ObjectiveIndex of the map. 0=Arcade variant | 2 = Ruins.
- Oasis City Center: Unfortunately there doesn't seem to be a way of detecting between Arcade and Control variants. The Obj. Index in Control is 0 and obviously the arcade version would return 0 anyway. :/ Let me know if you find a fix to this!
-
It's a big ugly wall of text, I know, I'm sorry. D:
How do you use it?
Add my rule to the top of your Workshop script and at the beginning of the game, it'll give you a number ID representing the current map.
- The script preset has everything set to default so you're free to work on top of it being imported.
If you want to import the script into an existing project:
- Save your current project.
- Import my rule using the code. (This will overwrite your current script)
- Copy my rule.
- Load your project preset.
- Paste my rule.
- Done! My map identifier rule will appear at the bottom so move it to the top.
The map ID is saved in Global Variable A, so just add another action to the bottom to set it where you want. For example:SetGlobalVariable(B, (GlobalVariableA)).
Make sure you keep the rule at the very top of your script to ensure there are no conflicting variables.
Map ID's
Normal Maps:
ID Map Name 0 Black Forest 1 Blizzard World 2 Busan 3 Castillo 4 Château Guillard 5 Dorado 6 Ecopoint: Antarctica 7 Eichenwalde 8 Hanamura 9 Havana 10 Hollywood 11 Horizon Lunar Colony 12 Ilios (Arcade variant: Ruins | Obj.Index: 2) 13 Junkertown 14 King's Row 15 Lijiang Tower 16 Necropolis 17 Nepal 18 Numbani 19 Oasis (Arcade variant: City Center) 20 Paris 21 Petra 22 Rialto 23 Route 66 24 Temple of Anubis 25 Volskaya Industries 26 Watchpoint: Gibraltar 27 Ayutthaya Arcade Map Variants:
28 Busan Downtown 29 Busan Sanctuary 30 Ilios Lighthouse 31 Ilios Well 32 Lijiang Control Center 33 Lijiang Garden 34 Lijiang Night Market 35 Nepal Sanctum 36 Nepal Shrine 37 Nepal Village 38 Oasis Gardens 39 Oasis University Control map Objective Indexes:
Map Name Obj. Index Busan Downtown 0 Busan Sanctuary 1 Busan MEKA Base 2 - - - - Ilios Lighthouse 0 Ilios Well 1 Ilios Ruins 2 - - - - Lijiang Night Market 0 Lijiang Garden 1 Lijiang Control Center 2 - - - - Nepal Village 0 Nepal Shrine 1 Nepal Sanctum 2 - - - - Oasis City Center 0 Oasis Gardens 1 Oasis University 2
Normal Script (1 Rule, 3 Actions):
- v1.0: 5VAQA
For those interested, I've compressed it all into one action:
There shouldn't really be any issues, but I wouldn't recommend using this as I haven't tested the stability.
I would also highly recommend not opening the action to avoid the risk of crashing.
*USE AT OWN RISK* - I'm not responsible for any crashes resulting in loss of work.
Update: I've used this single action plenty of times and I'm yet to have any issues. I'd still advise not opening it if you have a potato PC, but if you do, just wait for a second or two if your client stops responding; it'll come back.
Continue:
- v1.0: THQFD
Edit 1:
If you catch any maps that are incorrect or not working let me know ASAP! I’ve done my best to try and write everything as accurately and as carefully as I could to avoid errors, but I’m only human.
Enjoy!
*money on an update in a couple days from now making all my work redundant xD*
Map Identifier Script
In an effort to use as few actions as possible, I’ve managed to compile this script into just 1 action. I strongly advise not opening the action to avoid crashing. Using it in your script anyway is completely safe, however.
How do I use it?
When the script is run, Global Variable A will be set to a specific value, relating to an index of a map from 0-52. You can find the list of map indexes slightly below this.
Simple. If you do have any questions, however, feel free to ask.
Join the Discord for more info and updates: https://discord.gg/fmsu6ba
Map ID's:
Old & Broken - "Version 2.0"
Some Info:
Control maps have a separate ID for their Arcade variant. For example, Ilios can be played normally, but also has an ID for its Deathmatch mode.
ID Map Name 0 Black Forest 1 Blizzard World 2 Busan 3 Castillo 4 Château Guillard 5 Dorado 6 Ecopoint: Antarctica 7 Eichenwalde 8 Hanamura 9 Havana 10 Hollywood 11 Horizon Lunar Colony 12 Ilios 13 Junkertown 14 King's Row 15 Lijiang Tower 16 Necropolis 17 Nepal 18 Numbani 19 Oasis 20 Paris 21 Petra 22 Rialto 23 Route 66 24 Temple of Anubis 25 Volskaya Industries 26 Watchpoint: Gibraltar 27 Ayutthaya 28 Busan Downtown 29 Busan Sanctuary 30 Ilios Lighthouse 31 Ilios Ruins 32 Ilios Well 33 Lijiang Control Center 34 Lijiang Garden 35 Lijiang Night Market 36 Nepal Sanctum 37 Nepal Shrine 38 Nepal Village 39 Oasis City Center 40 Oasis Gardens 41 Oasis University
ID Map Name Map Type 0 Ayutthaya Arcade 1 Black Forest Arcade 2 Blizzard World Normal 3 Blizzard World Arcade 4 Busan Normal 5 Busan Downtown Arcade 6 Busan Sanctuary Arcade 7 Castillo Arcade 8 Chateau Guillard Arcade 9 Dorado Arcade 10 Dorado Normal 11 Ecopoint: Antarctica Arcade 12 Eichenwalde Normal 13 Eichenwalde Arcade 14 Hanamura Normal 15 Hanamura Arcade 16 Havana Arcade 17 Havana Normal 18 Hollywood Normal 19 Hollywood Arcade 20 Horizon Lunar Colony Normal 21 Horizon Lunar Colony Arcade 22 Ilios Normal 23 Ilios Lighthouse Arcade 24 Ilios Ruins Arcade 25 Ilios Well Arcade 26 Junkertown Normal 27 King's Row Normal 28 King's Row Arcade 29 Lijiang Control Center Arcade 30 Lijiang Garden Arcade 31 Lijiang Night Market Arcade 32 Lijiang Tower Normal 33 Necropolis Arcade 34 Nepal Normal 35 Nepal Sanctum Arcade 36 Nepal Shrine Arcade 37 Nepal Village Arcade 38 Numbani Normal 39 Oasis Normal 40 Oasis City Center Arcade 41 Oasis Gardens Arcade 42 Oasis University Arcade 43 Paris Normal 44 Paris Arcade 45 Petra Arcade 46 Rialto Normal 47 Route 66 Normal 48 Temple of Anubis Normal 49 Temple of Anubis Arcade 50 Volskaya Industries Normal 51 Volskaya Industries Arcade 52 Watchpoint: Gibraltar Normal
Versions:
v2.0 (Fixed a lot of accuracy issues)
Text Import:
rule("§ Map Identifier v2.0 - Xerxes § | DO NOT OPEN - *CRASH WARNING* | Default: G.VarA - Copy the action and edit the text to change"){event{Ongoing - Global;}actions{Set Global Variable(A, Round To Integer(Add(Distance Between(Nearest Walkable Position(Vector(-500.000, 0, 0)),Nearest Walkable Position(Vector(500, 0, 0))), Distance Between(Nearest Walkable Position(Vector(0, 0, -500.000)),Nearest Walkable Position(Vector(0, 0, 500)))), Down));Set Global Variable(A, Index Of Array Value(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Empty Array, 153), 468), 1196), 135), 139), 477), 184), First Of(Filtered Array(Append To Array(Append To Array(Empty Array, 343), 347), Compare(Current Array Element, ==, Global Variable(A))))), 366),First Of(Filtered Array(Append To Array(Append To Array(Empty Array, 433), 436), Compare(Current Array Element, ==,Global Variable(A))))), 403), First Of(Filtered Array(Append To Array(Append To Array(Empty Array, 382), 384), Compare(Current Array Element, ==, Global Variable(A))))), 993), 386), First Of(Filtered Array(Append To Array(Append To Array(Empty Array, 331), 348), Compare(Current Array Element, ==, Global Variable(A))))), 659), 145), 569), 384), 1150), 371), 179),497), 374), 312), 324), 434), 297), 276), 330), 376), 347), 480), 310), 342), 360), 364), 372), 370), 450), 356), 305),Global Variable(A)));}}
Complete Remake (latest version)
Text Code: https://pastebin.com/n27xszn5
Enjoy!