A string in the visual's script is missing a "t". All the underlying script works correctly (hence why Day[9] was still drawing Scrolls even though it appeared to shuffle Decks), the animation is just pointing to the wrong dummy card up front. :B
Yeah it would take a lot of time to change something like that /s
Haha so that's the exasperating part of all this: this is, including writing a full check-in comment, like a 90-second change.
But /u/pimpwilly is right about patch submissions as well - the approval process for content patches across various devices is generally not especially fast, and there's a lot involved on the dev side as far as kicking out a new patch even before the submission/approval process (there are exceptions to this for certain kinds of code hotfixes, but that's black magic that my artist hands don't get to touch). So this fix gets done this morning... and then, much like Shepherd Book's hair, it waits.
Ah, I understand better now. Thanks for the reply.
Just to be clear, my intention wasn't firing shots at Blizzard or anything. I was just saying changes like these take very little amount of time and Blizzard devs will fix them pretty fast probably. It's a different story they don't get released until later.
It's all good, I didn't assume there was any offense meant.:) I just figured more context was probably more useful than less, because you're totally right both about it being a really quick fix and then a weirdly delayed release.
Oh man, this just made me super curious about how Hearthstone is organized under the hood in Unity. Are all cards prefabs that you're just creating instances of as needed?
Yup! Pretty much everything is an instance once the game's actually up and running (including things like materials per mesh component, which is super useful for animation), and we have individual prefabs for each card, token, hero, board, FX controllers and components (like, Fireball is broken into three prefabs for an idle loop animation, a missile, and an impact, and those are all assembled into a single big Fireball FX prefab, and that can be hooked up to any card prefab that we want the Fireball animation on, or we can take any of those smaller components and combine it with other components for a different combo of FX), etc. etc. etc. The card prefab nests usually get about three layers deep (FX component prefabs hooked up to FX controller prefabs hooked up to card prefab, etc.), and all of those just get instantiated and then cleaned up as needed. On the initial creation side, FX animations, board clickables, etc. behaviors are mostly managed through PlayMakers attached to the prefabs themselves and then triggered through script, whereas card behaviors and dynamic things (like where a missile is firing towards this time around) are more just script start to finish.
In the particular case of SpawnToDeck spells like Deck of Wonders, we have a few different scripts that just automatically create a dummy card(s) and animate it in a particular way, and we can hook up FX animations to that, have a bunch of public parameters we can modify, etc. One of the parameters we get in SpawnToDeck is pointing that dummy card to the card prefab that it should be mimicking... which means that a dumb typo makes a pretty big difference. (Whereas things like Spawn To Hands and Dead Man's Hand set the dummy card through script, so an incorrect override is a lot harder to pull off.)
Also, just as an aside, so many things in the game are technically cards, which cracks me up. Hero? Card. Hero Power? Card. Enchantment? Literally unplayable card that I just accidentally spawned into my hand instead of the card that casts it, because I'm an idiot. :P
I uh, have no idea if that jumble actually helped answer any of your curiosities, feel free to hit me up with more questions if you have them!:)
Quick question: the FX used for Pyroblast is also the one used by Meteor, right? In that case, you're just using the same prefab as well?
Meteor is a case that has all its own unique FX art and prefabs (the underpinnings are actually based on Starfire's FX, of all things, although pretty much the only thing that got kept was the missile-falling-from-the-sky part).
But you've got exactly the right idea - like, Jaina's Hero Power, Flamewanker and Medivh's Steward all use the exact same FX controller prefab, and that controller is a single combination of component prefabs (idle loop, missile, impact). Or we can take a single FX component prefab, like the viney Druid/Shaman idle loop prefab, and hook that up as part of a bunch of different controller prefabs, so that even if one controller shoots a nature missile (like Living Roots) and another that pops up a paw buff (like Mark of the Wild), we only have to make the one idle loop prefab and we can share it between lots of FX controller prefabs based on the rest of the needs of the card. :)
Wow, so Meteor was done from scratch? I always thought that it was a repurpose of the Pyroblast art. TIL!
Also, I'm very glad to know that you guys also call him Flamewanker.
Since you touched this subject, here's a follow-up: was the bug that we had some time ago regarding the viney animation related to multiple idle animations? Or something like one of the controller prefabs not deactivating the idle animation after loading the action?
I'm not actually familiar with that bug never, it never actually crossed my plate (I'm not sure if it was before my time or I just got lucky :P).
Very very generally, though, if an animation mostly looks normal but then just pops out of existence without any sort of die-off or dissipation (especially an idle or impact - missiles kinda have to suddenly vanish, we just try to hide it under an impact effect), it means that it's getting deactivated without reaching the fade-out animation in the PlayMaker instructions attached to the component prefab (and this is pretty much always the case with an idle that seems to last just a biiiit too long and then insta-vanishes). If the FX are getting weirdly bright and kinda hard-edged-looking, it's probably multiple instances of the same prefab component getting created and piled right on top of each other (this can happen for all sorts of reasons, there's much less of a one-size-fits-all cause than the pop-deaths). Those are my two guesses based on the "multiple idle" and "not deactivating the idle" bits, but all I can really do is hazard a guess (unless you're secretly an encyclopedia and know the location of a clip of the bug). :)
I'm not gonna be able to find a clip now, but the bug was that, once in a while, when a Druid spell was cast, the viney animation would persist, not dissipating at all until the end of the match, to the point that it could stack with other viney animations.
That's why I'm guessing that one of the controllers ended up not deactivating it.
Oh, hah, yeah, I think you're pretty spot on then. The controller probably completely lost track of it somehow, so it wasn't able to deactivate the idle or even tell it to move out of its main loop in the component PlayMaker to the fade-out that would have at least hidden it.
Holy shit man. Thank you SO much. I always wanted to see a reply like this from a blizz dev. Please DO keep contributing and keep tell us how hs works under the hood. Love you! <3
I have a quick question and it would be great if you could answer.
I'm curious about how enchantment are done in HS ie when a card gain +1/+1 for example and the number turn green.
I can think of only 2 way this is done:
1) if card have static value attached to them(ie a river croc is a 2/3) then overwritting the value on the fly would be difficult if the attack/dmg is part of the art and it would require some kind of layer shenanigans to do that or something.
2)Card do not have actual value and the attack/health value are not part of the actual card art and are thus added on top of the card during the game or created on the fly during the game which would allow far easier flexibility.
thanks,
Mostly 2. Cards do have base values assigned to them through script (so a River Croc is always a 2/3 until an enchantment tells it otherwise), but all the text is separate layers from the gem/card/etc. textures, and it's along the lines of Unity text, not a static transparency layer of text that's overlaid on top of the base card textures, so we can easily modify it via script, localize it, played little green boop-animations on it, etc. :)
Idk who did the animations for Dragon's Fury, but that fire looks AMAZING and I wish you guys steadily but surely moved on from repeating so many existing VFX, and I say that despite knowing you keep them there consciously for reasons like user familiarity or just 'same type of spell' unification, e.g. Doomsayer and Abyssal Enforcer having the same effect, just different colors.
Please, please, please, no more repeated Fireballs or Frostbolts :3.
Too bad Dragon's Fury won't really be a reliable card in many Mage decks in general, except likely only for this Big Deck of Wonders Mage type of deck, because this means everyone will see less of this beautiful fire.
Oh hey that was me! Thanks!:D
Pie-in-the-sky, I'd love to have all those various AoEs (and other common reuses, but since we're talking AoEs) more specifically flavored (at least by tribe or something, so that Dragons maybe get cool curling flames, demons get gross Fel flames with oily smoke, Abominations get goo-spolsions instead, there's actually a visual difference between dealing 1 damage and 5...), and just keep the timing, overall size/shape/area coverage, etc. really similar so they're all still clearly related and feel like they're doing the same mechanical thing even if they have more unique flavors. It'd take a lot of time, and even outside the visual cohesion there's the tricky bit of not going visually busier and busier as we need to introduce new ones (visual noise creep is a very real thing in FX, lol), but I think it'd be a blast of a challenge and do a lot for the vibe of different cards. We'd also need to figure out how to carve the size of FX down pretty decently for that to be kind to people's downloads, I think.
It's a lot more work than we have bandwidth for right now, but we can dream!:D
Slightly off topic, but a friend and I have always wondered. This makes no difference at all in reality, but it makes a big difference psychologically. When you draw a card, is it picked at random from your deck under the hood, or does your deck have a set order when you start the game? I can’t think of any card that places or draws from anywhere other than the top of your deck or randomly into your deck, so we’ve always wondered if there’s actually a set order.
Your deck gets shuffled at the start of the game and stays that order unless it gets re-shuffled by another card (anything that says "Shuffle", essentially, like Kingsbane or Deck of Wonders). It basically just behaves like a physical deck that way. :)
Since you mentioned the issue of an animation popping out of existence, I've noticed this happens with Defile, when it gets re-cast (example).
It looks kinda odd, and it's a shame because it's a really cool unique effect, that sadly ends up looking a bit rough because of that cut off.
Also, I really appreciate all this detailed commentary, it's amazingly interesting to read about how Hearthstone works under the hood! :)
Ah, thanks for the kind words Mr./Ms. ForeskinFarter! I'm really glad people are having fun reading all my boring nerd rants. :D
As far as the Defile pop, I thiiiiink the fix for that should be live now, or is going live soon (I hope so, because otherwise I'm gonna feel real dumb for having marked it "Fixed":P). But yeah, that was exactly a case of the component getting deactivated before it was able to finish fading out. :B
Wow, thanks for the response! I always wondered if there was actually any reason to do so under the hood - it seemed not, so I always presumed you just picked at random each draw. This is very comforting to know, even if I lost that (sportsman's) bet!
Haha I'm glad it's comforting, I was a little worried I'd just lost someone a bet. :P
Hadidjah
I DONE GOOFED. D:
Hadidjah
A string in the visual's script is missing a "t". All the underlying script works correctly (hence why Day[9] was still drawing Scrolls even though it appeared to shuffle Decks), the animation is just pointing to the wrong dummy card up front. :B
Hadidjah
Haha so that's the exasperating part of all this: this is, including writing a full check-in comment, like a 90-second change.
But /u/pimpwilly is right about patch submissions as well - the approval process for content patches across various devices is generally not especially fast, and there's a lot involved on the dev side as far as kicking out a new patch even before the submission/approval process (there are exceptions to this for certain kinds of code hotfixes, but that's black magic that my artist hands don't get to touch). So this fix gets done this morning... and then, much like Shepherd Book's hair, it waits.
Hadidjah
It's all good, I didn't assume there was any offense meant.:) I just figured more context was probably more useful than less, because you're totally right both about it being a really quick fix and then a weirdly delayed release.
Hadidjah
I love you too. <3
Hadidjah
Yup! Pretty much everything is an instance once the game's actually up and running (including things like materials per mesh component, which is super useful for animation), and we have individual prefabs for each card, token, hero, board, FX controllers and components (like, Fireball is broken into three prefabs for an idle loop animation, a missile, and an impact, and those are all assembled into a single big Fireball FX prefab, and that can be hooked up to any card prefab that we want the Fireball animation on, or we can take any of those smaller components and combine it with other components for a different combo of FX), etc. etc. etc. The card prefab nests usually get about three layers deep (FX component prefabs hooked up to FX controller prefabs hooked up to card prefab, etc.), and all of those just get instantiated and then cleaned up as needed. On the initial creation side, FX animations, board clickables, etc. behaviors are mostly managed through PlayMakers attached to the prefabs themselves and then triggered through script, whereas card behaviors and dynamic things (like where a missile is firing towards this time around) are more just script start to finish.
In the particular case of SpawnToDeck spells like Deck of Wonders, we have a few different scripts that just automatically create a dummy card(s) and animate it in a particular way, and we can hook up FX animations to that, have a bunch of public parameters we can modify, etc. One of the parameters we get in SpawnToDeck is pointing that dummy card to the card prefab that it should be mimicking... which means that a dumb typo makes a pretty big difference. (Whereas things like Spawn To Hands and Dead Man's Hand set the dummy card through script, so an incorrect override is a lot harder to pull off.)
Also, just as an aside, so many things in the game are technically cards, which cracks me up. Hero? Card. Hero Power? Card. Enchantment? Literally unplayable card that I just accidentally spawned into my hand instead of the card that casts it, because I'm an idiot. :P
I uh, have no idea if that jumble actually helped answer any of your curiosities, feel free to hit me up with more questions if you have them!:)
Hadidjah
....I... I've seen a lot of name puns in my day.
This is the best one. It's beautiful, and so are you.
Hadidjah
ʕっ•ᴥ•ʔっ <3
Hadidjah
It's from this snippet of Firefly.
I just like the resentful way she says "It'll still be there...waiting." :P
Hadidjah
Meteor is a case that has all its own unique FX art and prefabs (the underpinnings are actually based on Starfire's FX, of all things, although pretty much the only thing that got kept was the missile-falling-from-the-sky part).
But you've got exactly the right idea - like, Jaina's Hero Power, Flamewanker and Medivh's Steward all use the exact same FX controller prefab, and that controller is a single combination of component prefabs (idle loop, missile, impact). Or we can take a single FX component prefab, like the viney Druid/Shaman idle loop prefab, and hook that up as part of a bunch of different controller prefabs, so that even if one controller shoots a nature missile (like Living Roots) and another that pops up a paw buff (like Mark of the Wild), we only have to make the one idle loop prefab and we can share it between lots of FX controller prefabs based on the rest of the needs of the card. :)
Hadidjah
I'm not actually familiar with that bug never, it never actually crossed my plate (I'm not sure if it was before my time or I just got lucky :P).
Very very generally, though, if an animation mostly looks normal but then just pops out of existence without any sort of die-off or dissipation (especially an idle or impact - missiles kinda have to suddenly vanish, we just try to hide it under an impact effect), it means that it's getting deactivated without reaching the fade-out animation in the PlayMaker instructions attached to the component prefab (and this is pretty much always the case with an idle that seems to last just a biiiit too long and then insta-vanishes). If the FX are getting weirdly bright and kinda hard-edged-looking, it's probably multiple instances of the same prefab component getting created and piled right on top of each other (this can happen for all sorts of reasons, there's much less of a one-size-fits-all cause than the pop-deaths). Those are my two guesses based on the "multiple idle" and "not deactivating the idle" bits, but all I can really do is hazard a guess (unless you're secretly an encyclopedia and know the location of a clip of the bug). :)
Hadidjah
Oh, hah, yeah, I think you're pretty spot on then. The controller probably completely lost track of it somehow, so it wasn't able to deactivate the idle or even tell it to move out of its main loop in the component PlayMaker to the fade-out that would have at least hidden it.
Hadidjah
<3 :)
Hadidjah
Mostly 2. Cards do have base values assigned to them through script (so a River Croc is always a 2/3 until an enchantment tells it otherwise), but all the text is separate layers from the gem/card/etc. textures, and it's along the lines of Unity text, not a static transparency layer of text that's overlaid on top of the base card textures, so we can easily modify it via script, localize it, played little green boop-animations on it, etc. :)
Hadidjah
Oh hey that was me! Thanks!:D
Pie-in-the-sky, I'd love to have all those various AoEs (and other common reuses, but since we're talking AoEs) more specifically flavored (at least by tribe or something, so that Dragons maybe get cool curling flames, demons get gross Fel flames with oily smoke, Abominations get goo-spolsions instead, there's actually a visual difference between dealing 1 damage and 5...), and just keep the timing, overall size/shape/area coverage, etc. really similar so they're all still clearly related and feel like they're doing the same mechanical thing even if they have more unique flavors. It'd take a lot of time, and even outside the visual cohesion there's the tricky bit of not going visually busier and busier as we need to introduce new ones (visual noise creep is a very real thing in FX, lol), but I think it'd be a blast of a challenge and do a lot for the vibe of different cards. We'd also need to figure out how to carve the size of FX down pretty decently for that to be kind to people's downloads, I think.
It's a lot more work than we have bandwidth for right now, but we can dream!:D
Hadidjah
Your deck gets shuffled at the start of the game and stays that order unless it gets re-shuffled by another card (anything that says "Shuffle", essentially, like Kingsbane or Deck of Wonders). It basically just behaves like a physical deck that way. :)
Hadidjah
This is the sort of beautiful mess that I live for.
Hadidjah
Ah, thanks for the kind words Mr./Ms. ForeskinFarter! I'm really glad people are having fun reading all my boring nerd rants. :D
As far as the Defile pop, I thiiiiink the fix for that should be live now, or is going live soon (I hope so, because otherwise I'm gonna feel real dumb for having marked it "Fixed":P). But yeah, that was exactly a case of the component getting deactivated before it was able to finish fading out. :B
Hadidjah
Haha I'm glad it's comforting, I was a little worried I'd just lost someone a bet. :P
Hadidjah
It should go live with the 10.2 patch, I believe.:) (Content fixes like this one have to wait for a patch since we can't hotfix them.)