-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: Add support for using map IDs in macro functions #3852
Comments
This will be a nice improvement. While the getInfo method of rounding up all the ids is good, I think it would be nice to have a simpler getAllMapIDs option. Otherwise I know I'm just creating a UDF immediately to do that like I have for other getInfo data-points with "missing" functions. ;) Oh, and shouldn't "ID" be capitalized in the functions? (i.e. "Photo ID" always capitalizes both letters, etc.) |
Good Idea, I'll add that function. For the capitalization, I'll have you know my approach is the One True Way to camel humps abbreviations 😄 It doesn't matter for functionality since MTScript functions are (supposed to be) case insensitive, but your way is probably easier on most people's eyes when reading docs and such. I'll change that too. |
I'm not a fan of increasing the MTscript footprint with YAFN (Yet Another Function Name) so I'm in favor of putting the info in the return value of No idea how @cwisniew feels about it and it's really his call... |
There's a bug here that I need to fix. If a map name has exactly 32 characters but is not a valid GUID, a For any future testers, opening this 1.13.1 campaign will result in this error incorrectly being generated:
|
Closing this off as the feature has been released for a while now. Bug reports can be filed if needed. |
Feature Request
Since map names can be changed and aren't unique, they can't be used by libraries as stable identifiers for maps. Map IDs are better to refer to maps since they are unqiue and can't be changed by the user. But there is no support in the macro function for using map IDs, so even if a library author wants to use map IDs they first have to convert to non-unique map names.
The Solution you'd like
Whenever a map name or display name can be used as an input to a macro function, a map ID would also be accepted.
A few new macro functions would also be created:
getCurrentMapID()
: get the ID of the current map.getMapIDs(mapName, delim)
: get all the IDs of maps that have the namemapName
, as a string list or JSON array.getAllMapIDs(delim)
: get all the IDs of maps in the campaign as a string list or JSON array.Finally,With @FullBleed's suggestion of thegetInfo("campaign")
would have a new key"zoneIDs
whose value is an array of map IDs in the campaign.getAllMapIDs()
function, this is no longer need to get that list.Alternatives that you've considered.
Have the library add a special token to each map to contain metadata such as an ID for the map. The downside is that the token can get in the user's way and can be inadvertently deleted or modified by the user, thus losing the map ID. The library author also has to add extra logic to make sure these tokens exist, and to generate the IDs. And if more than one library needs map IDs, they either need to coordinate or produce their own tokens and IDs.
Additional Context
No response
The text was updated successfully, but these errors were encountered: