Static initialising a table
Can I do the following? Do you spot any obvious mistakes? The values below maybe fictitious - but is the syntax/concept correct?
Many thanks local lSpellNamesAndIds = { ["PALADIN"] = { ["Retribution"] = { ["Judgment"] = { 231663, "Judgment", }, ["Templars-verdict"] = { 85256, "templars-verdict", }, ["crusader-strike"] = { 231667, "crusader-strike", }, }, }, ["DRUID"] = { ["Balance"] = { ["Starfall"] = { 231663, "Starfall", }, ["Sunrise"] = { 85256, "Sunrise", }, }, }, }; |
OK I have fixed it now, a few extra commas here and there... Sorry
|
Quote:
Lua Code:
|
Lua Code:
Since you said your values are fictitious, this might not be useful advice, but there's certainly no need to create tables for every spell containing only the name and the ID. |
Quote:
|
Yes it is in-progress code for the time being. I am not sure what to do with the spell lists yet, or the buffs/debuffs lists but I know I need to keep track. My idea is to create something like weakauras or more like simcraft, where you have script which looks at 2-3 things and decides what to do next. I got this idea from writing my own simcraft scripts for my Frost mage just a few lines of code so that I could understand the rotation and the talents etc and compare with the simcraft's own (very complicated) scripts. Then I thought why can't I have this script in game too - and then I tried weakauras or the other one that highlights your buttons, but it is too heavy duty and then I thought let me have a go at it myself. Something like that. It's also fun to make your own addon and use it (productively) in game. In the old WoW you could have it on full auto (one button raid healing), but now you cannot assign different actions to the same key in combat, so the best you can do is to highlight existing buttons or provide clues like DBM and others - anything more than that and you'd be breaking a lot of rules. And I suppose a lot of people already break them anyway.
|
|
Thank you for the links to those addons.
I have done mine for now, I think, finished testing late last night, tested on my Balance Druid. As with weakauras et all, I still find my reaction times way too slow to take full advantage of the on-screen prompts even though they display well before the end of the GCD or the previous spell cast. Maybe good to remind you to use a trinket or something but it's like bicycle riding, it needs to be fluid and quick, you cannot be following prompts. On the Frost Mage for example, on occasion I must cast 6 spells back to back, especially the Flurry's, you cannot be following prompts for that you have to know it or have a sequence macro for when Flurry procs. I also think (have not tested) that the client queues keystrokes, so that you spam the spell 50% into the GCD and say 75% into the previous cast, and it still fires and with 0 latency, whereas if you wait any longer there will be pauses in your rotation and a DPS loss. Best use of the prompts I think will be from a machine that reads the prompt and reacts in 0 time. Not allowed of course. |
Quote:
1. If I understood correctly, you were referring to "latency" as a lapse of time between a spell cast (or GCD) finisihing and a new cast starting. At least in WoW, this is not what people (or indeed Blizzard) usually refers to when speaking of "latency"; we usually refer to it as the time between your game client registering an user-event (say a button click) and that event being received by your realm's server, or inversely your realm's server sending you a world update (say some mob starting to cast a spell on you) and your game client receiving that information. This is essentially dependent on the player's Internet connection and, as different game clients (players) will have different latencies but still need to play in the same timeframe, some players will have this local-world / realm-world synchronisations spawned at "slightly" different intervals (when the difference isn't "slight", then you'll see players complain about "lag"). 2. I might be wrong (don't think so but ...) but I believe the queueing works solely based on your actual latency (as I described it above). Your game client is aware of your latency (see https://wow.gamepedia.com/API_GetNetStats ) and will therefore allow you to queue an ability only within this time. E.g. your latency == 100ms means you can successfuly activate a spell 100ms before the current spell cast (or GCD) elapses. |
Quote:
Yes you are right, I am/was describing that the client has a look-ahead buffer for the keyboard, it used to be configurable but can't find it now, which means that the client launches a new spell as soon as it is practically possible which means that on my reported 35 ms latency I can visibly press the button once, and only once, while the cast bar is still at 70%-80% and the new spell still launches. |
Quote:
/dump GetCVar("SpellQueueWindow") /run SetCVar("SpellQueueWindow", 50) -- default is 400 I think. |
Ah that's good to know, thanks.
|
All times are GMT -6. The time now is 02:51 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI