Skip to content
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

No implementation for dynamic charmed spell cooldowns. #19187

Open
heyitsbench opened this issue Jun 26, 2024 · 7 comments
Open

No implementation for dynamic charmed spell cooldowns. #19187

heyitsbench opened this issue Jun 26, 2024 · 7 comments
Labels
ChromieCraft Generic No specific levelrange

Comments

@heyitsbench
Copy link
Contributor

Current Behaviour

Currently mind controlled/charmed creatures have either no cooldowns on their spells or they are enforced through spell_cooldown_overrides, acting as a SpellInfoCorrections table specifically for charmed spell cooldowns. Because of this, and the current structure of the aforementioned table, the cooldowns are restricted to a single cooldown time.

Expected Blizzlike Behaviour

As I said in a comment:

To my understanding, the way cooldowns work for creatures and their spells follows like this:
A creature has a spell list (can be seen here and here). That is used for its general combat AI, and when charmed, the cooldown is determined by this spell list.

For example, an uncharmed Defias Pillager casts Fireball. Upon casting, it then gets a cooldown for when it will cast next, say min is 10s, max is 20s, and it rolls a 14s cooldown. It then can't use that spell for 14s (not necessarily that it will cast in 14s, just that it is a cooldown). It works pretty much the same way when the creature is charmed, so the pillager while charmed is commanded to cast fireball, and it rolls a 16s cooldown, that means the creature cannot be commanded to cast fireball again for 16s.

As for what these cooldowns would be if the player character itself cast these spells with no cooldown, that we cannot know unless something goes quite wrong on Blizzard's end.

Source

WoWEdit screenshots, Wrath Classic, conversations with other, smarter people

Steps to reproduce the problem

  1. Charm a Defias Pillager.
  2. Cast Fireball.
  3. Observe its cooldown.

Extra Notes

No response

AC rev. hash/commit

c9725dd

Operating system

Windows 10 x64

Custom changes or Modules

mod-ptr-template

@heyitsbench heyitsbench added the ChromieCraft Generic No specific levelrange label Jun 26, 2024
@Kitzunu Kitzunu pinned this issue Jun 26, 2024
@Kitzunu
Copy link
Member

Kitzunu commented Jun 26, 2024

Also rename spell_cooldown_overrides to properly "limit" the use to creature mc spells

@heyitsbench
Copy link
Contributor Author

Well the "correct" solution would be to tie it into SmartAI or something like it and not use a separate table, seeing as that seems to be what Blizz did. Obviously would require a lot of research/data entry though.

@Kitzunu
Copy link
Member

Kitzunu commented Jun 26, 2024

SAI not that good though yikes

@avarishd
Copy link
Contributor

Wouldn't having that in creature_template_spell be better? As it's right next to the given spell(s) in question.

@Gultask
Copy link
Contributor

Gultask commented Jul 5, 2024

SAI not optimal I think, as Blizz seemed to use a different system for creature spells. In very old screenshots they used initial and repeat timers like SAI but later they seemed to move to a frequency + cooldown based system without explicit timers, so there'd not be any upper limit to timers.

As for creature_template_spell I don't think so because it's a sniffed table, and if it had timers we'd see them.

@heyitsbench
Copy link
Contributor Author

In very old screenshots they used initial and repeat timers like SAI but later they seemed to move to a frequency + cooldown based system without explicit timers

I believe it's the other way around. You can see that this screenshot (I believe taken during some Blizzcon) a window appearance of either Windows Vista or Windows 7 and includes min/max timers. In this screenshot (Iirc taken from the WoW Diary by John Staats), you can see an appearance of I believe some Windows 9x variant, and it includes frequency values.

@Nyeriah
Copy link
Member

Nyeriah commented Jul 5, 2024

You can’t tie it to SAI because creatures don’t use SAI alone, they can also use other scripting engines

@Rorschach91 Rorschach91 unpinned this issue Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ChromieCraft Generic No specific levelrange
Projects
Development

No branches or pull requests

5 participants