Jump to content


What defines casting animation selection?

  • Please log in to reply
5 replies to this topic

#1 temnix

  • Member
  • 983 posts

Posted 07 December 2017 - 01:18 AM

Where is the list of available casting animations, with those choices - Alteration, Necromancy, Fire white, Fire magenta and so on? Is it a 2DA file? And what do the entries refer to? I know that the schools' animations are projectiles, I've edited them to come with a glow in "Lighting," but what about those pixel-throwing fountains and so on? Are they projectiles also, with BAMs? Can they be replaced? I need a new animation for a new school.

#2 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 4626 posts

Posted 07 December 2017 - 02:19 AM

Well, the casting graphics are the .spl's Header's offset 0x0022, and you can click the link in that to find the list.


You can also use use a spells casting effect to animate it if you feel so inclined, by selecting the zero to the casting graphic, and then adding an animation to the spells casting effects, via opcode #141. Or 215. And yes, they are either .bam or .vvc files, which are just more elaborate .bams, which more defined things, as you can read from here.

In weidu .tp2, the later is done via:

COPY ~~ ~override~

LPF ~ADD_SPELL_CFEFFECT~ opcode = 215 ... END


The only downside of using the opcode 215 is that it can't fizzle, so consider to not make it too long... Very few mods use the spell casting effects, so.

Edited by The Imp, 07 December 2017 - 02:30 AM.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.

#3 temnix

  • Member
  • 983 posts

Posted 08 December 2017 - 06:15 AM

There are no 2da file names on the other end of that link, unfortunately... If that's what governs the selection. I know about VVCs, of course. Right now I have a 215, Play Animation, as a substitute, but as you said, it can't fizzle... But I should be able to make my own spell casting projectiles. There is a "Casting animation" flag in PRO files. I don't know what that controls, but I hope to be able to sneak them inside the list of casting animations. Maybe I can apply it outside, as a self-directed projectile. Very possibly.

#4 Avenger_teambg

  • Member
  • 604 posts

Posted 09 December 2017 - 03:12 PM

If you are looking for a 2da, check gemrb. Otherwise this stuff is mostly hardcoded. Yeah, internally most of it is projectiles.

Opcode 215 is vvcs, opcode 141 is projectiles, opcode 140 is projectiles, opcode 41 is particles (sparkles).

Casting animations are opcode 140 or opcode 41.


#5 temnix

  • Member
  • 983 posts

Posted 11 December 2017 - 01:15 AM

I've already taken care of this.

#6 temnix

  • Member
  • 983 posts

Posted 16 December 2017 - 01:02 PM

As a short primer for casting glows, for those who want to make new schools: I haven't found an easy way to do for a custom glow what the engine does for standard glows - if you can get one feature, you lose another - but there is a labor-intensive way. A casting glow needs to have three things: 1) it's got to fizzle when the caster takes damage, 2) it needs to play correctly oriented in front of the caster, in any direction that he turns, 3) on fizzling there needs to be a separate animation or cycle with sparks flying or some such. I've tried doing this with projectiles, but in the end only effect 215, Play Visual Effect, does the job in every way, and then you need a bunch of files.


The basic structure starts from putting a Cast Spell, Self, in your spell's global effects. This points to Accessory Spell 1. Acc. Spell 1 contains, top to bottom:


1) Remove Effects by Resource, target Acc. Spell 1, Instant;

2) Play Visual Effect, Instant/Limited as appropriate for the main spell's casting time, resource - Visual VVC for Main casting glow;

3) Remove Effects, again, and again Acc. Spell 1, Delayed as appropriate;

4) Cast Spell on Condition, target - Caster, Took Damage, duration Instant/Limited to maximum 6 seconds (for the longest casting time 9), spell to cast - Accessory Spell 2.


The reason this list begins with removal of Spell 1 is to delete any previous contingency put on by this spell. The reason 3) is there is for back-up, it's a later removal just in case.


Acc. Spell 2 contains:


1) Remove Effects, again, Acc. Spell 1;

2) Play Visual Effect, resource - Visual VVC for Spell failure sparks.


In this file 1) is not to remove the contingency but to put an end to the running Main casting glow effect. And 2) is what gets played instead. Thus: when the character starts casting, he prepares himself for a cutting-off of the visual, and for the failure visual, should he take any damage. If nothing happens, the contingency will expire in 6 seconds, I've tested this.


This setup isn't so hard to wrap your head around, but real work that will make you doubt is with the BAM files. So far you have gotten a casting glow that will play right over your character, in his ribcage somewhere. Tick the "Face target" box in the VVC, but the casting glow needs to be some distance in front of the character in any direction, and VVC files or BAM files have a strange system for orientations. I've tried different options and numbers, and it looks like you are going to have to edit your glow BAMs by hand and create several frame sets there for the different directions of the compass. And for each set of frames you'll need to center it individually so that it plays before the character at the right distance - whether he faces N, SW or ESE. I believe there are 16 orientations in all. What makes this even more confusing is that when you assign the frame sets to cycles in your BAM, they don't match the directions from S, and aren't in order at all. So the topmost cycle may play for W, and the next one ENE, and so on. There is a pattern to it, but you pretty much have to test and see in which directions they play. I'm in the process of this for Chronomancy.


The simplest way to figure out the order, and what I will have to do, is probably to draw simple arrow BAMs, 16 of them for all cardinal points, and make a test BAM with 16 one-frame cycles. Then cast this VVC on a character, Looping, out of some item, and have him walk around and look in different directions. The arrows will point all wrong, of course, and then you can go back to the BAM and rearrange the order of cycles and figure out what plays where. Then you can go back to your casting glow BAMs, both of them, and rearrange them, and then you will know where to move the center point for each set of frames. And you don't have to tell me it's all a huge pain in the ass. DO tell if you know how to orient a BAM without all this.


Can't have a new school without a proper casting glow, though.