"/castrandom" not working as expected since patch

I googled Abyss Worm and couldn't find its ID.
28/07/2018 18:39Posted by Lowfi
Hi again, if you want to randomize, create a table and use the math.random method to fetch index numbers from it, then call SummonByID function. Like this

/script a={656,199,899} ;n=math.random(#a);C_MountJournal.SummonByID(a[n])

a={any, number, of, mountID}
so
656 summons Llothien Prowler
199 Amani War Bear
899 Abyss Worm

You can google the mount ids you want or use a simple macro to check all your mount ids in your mounts tab.


I would rather they just fix the bug ith /castrandom not being actually random, but in case they don't or I get fed up waiting for the fix: How do you get the mount ID's? cause I don't see them listed anywhere convenient.

If I have to jump through hoops just to get the mount ID's every time I want to change something, then I'll pass.
The random mount button is vastly inferior to a proper mount macro, take mine for example:

/userandom [combat]Will of the Forsaken;[mod:ctrl]Grand Expedition Yak;[mod:alt]Azure Water Strider;[swimming]Subdued Seahorse;[flyable]High Priest's Lightsworn Seeker,Enchanted Fey Dragon,Warforged Nightmare;Warlord's Deathwheel


It has conditionals, alternatives with ctrl or shift if I wanted to and it checks for the condition flying so I get more ground appropriate mounts since they can't use their wings anyhow. Heck it's even a skill button using my racial while I'm in combat so I'm not wasting a slot.

I'd much rather have the cast random function fixed.
I ran:
/script mountIDs = C_MountJournal.GetMountIDs(); print(mountIDs)

and all i got was a message "table: 0000022105D6FB70".

How can I access this table? I am looking for a list of BfA Mount Names and their IDs.
Can I also add an argument such as
"print (mountIDs > 1000)" to only show newer mounts?
28/07/2018 21:00Posted by Rumpelînchen
I ran:
/script mountIDs = C_MountJournal.GetMountIDs(); print(mountIDs)

and all i got was a message "table: 0000022105D6FB70".

How can I access this table? I am looking for a list of BfA Mount Names and their IDs.
Can I also add an argument such as
"print (mountIDs > 1000)" to only show newer mounts?

You could use

/run local i,m=GetMouseFocus().index if i then m = {C_MountJournal.GetDisplayedMountInfo(GetMouseFocus().index)} print(m[1],"is mountID",m[12]) end

Simply hover over the mount in the journal and use the macro, it'll print the Id in the chatframe.

Have to echo everyone else though, the Summon Random is basically unusable.
It will only use a water mount when you are at a certain depth, it will only randomly use the water strider and in land only areas, and it will never use a land only mount in a flying area.

Additionally, since the favourites are account wide, it makes it even less of a function that people want to use. This character only uses mechanical mounts and rockets, my paladin only uses holy looking stuff such as the chargers and the argent crusade hippo, my warrior only uses dragons. For all 3 characters the Summon Random is completely useless.
If you just want the ID of a specific mount, below code would work:
/run local mount = "Grand Armored Gryphon";for i,v in pairs(C_MountJournal.GetMountIDs()) do local n = C_MountJournal.GetMountInfoByID(v);if(n == mount) then print(mount.." ID is "..v);return; end end
just change "Grand Armored Gryphon" at the beginning to the mount you want.

Alternatively, anyone wishing to get a listing of all mounts and their IDs can use this code:
/run for i,v in pairs(C_MountJournal.GetMountIDs()) do local n = C_MountJournal.GetMountInfoByID(v); ChatFrame1:AddMessage(v.." "..n) end
Note that the uses for this one may be limited though. there are MANY mounts in the game.
28/07/2018 22:44Posted by Grimmj
If you just want the ID of a specific mount, below code would work:


Thanks, those work great.

Two things I noticed:
- Blizzard seems to use MountIDs that were previously unused on new mounts. You can find some BfA mounts in between Legion mounts on the list from the second script.
- You have to use the mount name of your localized client language, or else the first script does not find a result.
To get a more manageable list (as the second macro has so many that the top few can even be cut off), you can specify a start and end using this:
/run i = 1 t = 100 v = C_MountJournal.GetMountIDs() for m = i,t do n = C_MountJournal.GetMountInfoByID(v[m]); ChatFrame1:AddMessage(v[m].." "..n) end
Simply change i = 1 and t = 100 to alter the start and end position.
Thanks for the script! Still would be nice to see /castrandom fixed.
Maybe I'll just change my macros from /castrandom to /castsequence before they fix it as a temporary measure
------------------------------
For those above, is there a way to make the script write the table into a text file? Would be useful if I could then import the file to excel or something that can use sort or find functions
29/07/2018 08:14Posted by Mahmeya

For those above, is there a way to make the script write the table into a text file? Would be useful if I could then import the file to excel or something that can use sort or find functions

Hi Mahmeya,

Sadly, macros can't write to text files. such are the limitations of WoW's sandbox. Addons can write variables into a special SavedVariables folder upon logout, but those variables have a maximum size and thus aren't fit for exporting a listing of mounts either.

I'm currently exporting the mount data by hand into an excel sheet with the use of Tinypad, a note-editing addon that allows me to copy and paste 20 mounts at a time. This may take a bit but will provide the ease of use that you described. Expect a download link for that excel sheet here in a few hours.
The excel sheet is now available for download.
link: https://mega.nz/#!qlIBxKLB!Gm90ErUpRP0ddRluJFxRVqVJfjWLFg0UavOAfay1qP0

It contains the mount IDs, English mount names, mount type, if the mount is multi-passenger and whether the mount has vendors.

Please note that the Mount ID and Mount name were done automatically with Lua code, but the rest i added manually. So there might be one or two errors in the sheet. ;)
28/07/2018 15:11Posted by Woods
Not sure if you're a fan of addons or not but with Litemount you can set different mounts for different characters then type

/litemount macro

to create a random summon button.

You can even set locations, but I think that needs to be updated for 8.0.


I wasn't aware of this addon so I think I will give it a try thanks :) As the Blizz 'favourite mount' feature is no good for me either as like many I have different mounts per character and different macros for ground and flying mounts.
28/07/2018 13:33Posted by Patella
I like to have a different set of mounts and pets to match each character, so the Random Mount button isn't an option.


This ;)
I will also recommend LiteMount addon, got all the configurable stuff one need.
https://www.curseforge.com/wow/addons/litemount
is there any progress to fixing that problem?
06/08/2018 19:01Posted by Groovjin
is there any progress to fixing that problem?
15/08/2018 12:04Posted by Nephesh
06/08/2018 19:01Posted by Groovjin
is there any progress to fixing that problem?


Yes please, fix this it's boring.
Please... Up !
I really wish this would get fixed :(