Jump to content

Adding animations


Miloch

Recommended Posts

(Split from this topic.)

Then what we need is an imported-Drider-animation mod resource pack that is freely available for download and incorporation into anyone's mod (something similar to what DavidW has done with DS).
Also been done - see LC Bestial Animations. It is there as a modder resource - you do not even need to inform the author if you use anything (it's all from IWD1/2/NWN after all).
No, it hasn't. That package is hacky (it adds the creatures in an abnormal manner such that the new creatures don't have death animations and corpses) and huge (350 MB isn't feasible for incoporation as a resource pack).

 

What we need is a working package for each new creature (a seperate Drider package, seperate packages for each creature type, etc). Death animations and corpses are a must-have, too.

No, no, noooo. What we don't need is yet another effort at this that uses different slots yet again and results in even more conflicts than what are already out there. I guess you didn't read the documentation that comes with the mod, but both the drider male and the drider female get their own slots (at MSH1 and MLI3) which means they get their own death animations. It also means you'll get conflicts with any mods that already use that slot, and there are several - just look at the list I linked.

 

In practical terms, that means if someone installs Secret of Bone Hill after your mod, your drider might end up looking like a lizard king. And good luck finding your own open slot, because there aren't any except the few Cuv found before he took off. Those are all non-standard, meaning you'll have to do some manipulating to get them working, and I think he filled them all anyway. Hence the reason for combining death animations for similar sprites. And last I checked, Galactygon said he'd found a way around that too, and a better one than Cuv's he claimed.

 

As for Bestial Animations, it's a *resource*, not a mod for players. You wouldn't install all 350MB or whatever, unless your mod adds new creatures with every single animation in it. As a modder, you should be adding just the animations you want. You can even delete it afterwards if it's taking up too much space on your drive. Or rip the same animations from BP, CtB, SoBH, IWD itself - it's all the same thing, just with different conflicting slots. I'm not saying LCBA is necessarily the best solution for the animation issue, but any new effort should focus on resolving existing slot conflicts, not introducing new ones.

 

And as for having a separate package for each animation, heh... you'll have to find a separate slot for each one first. Cuv started doing separate packages for each slot (not for each animation) but as a modder I found them harder to work with and would've preferred to grab them all at once so I can review them all, then just use what I wanted.

Link to comment
No, no, noooo. (snip)

 

I read the documentation on the forum itself (rather than waste hours downloading 350 MB of mostly useless resources). According to the forum, creatures disappear upon death without death animations or corpses. The resource itself doesn't look to have been updated in some time, so I doubt that a fix is forthcoming.

 

I think that you're missing my point:

 

I'm talking about modular packages. Each package would consist of tp2 code and a folder containing the necessary resources. A modder wishing to use the Drider animation would simply insert the tp2 code into his/her own tp2 and copy the resource folder into his/her mod's main folder. The code would be such that it detects itself and doesn't reinstall if another mod has already installed the animation. Older mods could be updated to use the new packages. Modders would utilize only the packages needed for their mods (no gargantuan package download), and inter-mod conflicts would be minimized.

 

Is it possible? I don't know because I don't have the time right now to investigate the particulars of importing animations. If it is, however, I'd say it'd be vastly superior to the LC pack.

 

aWL

Link to comment
Is it possible?
If you're interested in doing this intelligently (rather than making Yet-Another-Mod-That-Overwrites-Existing-Animations-Willy-Nilly) then yes, I would applaud your efforts. I'll even give you some code :cool:.

 

This is what I use to get the svirfneblin animations into the game for Aurora. I use the MBFI (Fire Beetle) slot that LC-BA uses for two reasons. First, whatever else you might say, Galactygon put some thought into what animations should go with what slots as far as "circle" size which is hardcoded to the slots. In other words, you don't want to put a drider (large) into a goblin (small) slot because the selection circle will look silly.

 

Secondly, there aren't too many conflicts in that slot. Return to Trademeet puts a Harpy there and Neverending Journey 2 puts a Sentry there. RTT being a total conversion isn't too much of an issue, but I move it anyway, just in case.

BEGIN ~Svirfneblin Animation~

//Checks if slot we're using is filled by an unknown mod
ACTION_IF (FILE_EXISTS_IN_GAME ~mbfia1.bam~) AND NOT(FILE_EXISTS_IN_GAME ~doomleut.cre~) AND NOT(FILE_EXISTS_IN_GAME ~zur104.itm~) AND NOT(FILE_EXISTS_IN_GAME ~lcwtazok.itm~) THEN BEGIN
 PRINT ~WARNING: Unknown mod conflict (MBFI slot filled but no NEJ2, RTT or LC)~
END

//IDS patching (adds MBFI animation slot if not present)
APPEND ~animate.ids~ ~0xe210 BEETLE_FIRE~ UNLESS ~^0x[Ee]210~
APPEND ~anisnd.ids~ ~0xe210 MBFI	 CGAMEANIMATIONTYPE_BEETLE_FIRE~ UNLESS ~^0x[Ee]210~

//Checks for known mod slot conflicts and moves as relevant
ACTION_IF FILE_EXISTS_IN_GAME ~ar0083.are~ THEN BEGIN //For BG2 and BGT only
 //Reassign NEJ2 Sentry 2 to MBFI Sword slot
 ACTION_IF (FILE_EXISTS_IN_GAME ~mbfia1.bam~) AND (FILE_EXISTS_IN_GAME ~doomleut.cre~) THEN BEGIN
COPY_EXISTING ~mbfia1.bam~ ~override/mbfisa1.bam~
			  ~mbfia1e.bam~ ~override/mbfisa1e.bam~
			  ~mbfia2.bam~ ~override/mbfisa2.bam~
			  ~mbfia2e.bam~ ~override/mbfisa2e.bam~
			  ~mbfide.bam~ ~override/mbfisde.bam~
			  ~mbfidee.bam~ ~override/mbfisdee.bam~
			  ~mbfigh.bam~ ~override/mbfisgh.bam~
			  ~mbfighe.bam~ ~override/mbfisghe.bam~
			  ~mbfigu.bam~ ~override/mbfisgu.bam~
			  ~mbfigue.bam~ ~override/mbfisgue.bam~
			  ~mbfisc.bam~ ~override/mbfissc.bam~
			  ~mbfisce.bam~ ~override/mbfissce.bam~
			  ~mbfisd.bam~ ~override/mbfissd.bam~
			  ~mbfisde.bam~ ~override/mbfissde.bam~
			  ~mbfisl.bam~ ~override/mbfissl.bam~
			  ~mbfisle.bam~ ~override/mbfissle.bam~
			  ~mbfitw.bam~ ~override/mbfistw.bam~
			  ~mbfitwe.bam~ ~override/mbfistwe.bam~
			  ~mbfiwk.bam~ ~override/mbfiswk.bam~
			  ~mbfiwke.bam~ ~override/mbfiswke.bam~
 END

 //Reassign RTT Red Harpy to MBFI Halberd slot
 ACTION_IF (FILE_EXISTS_IN_GAME ~mbfia1.bam~) AND (FILE_EXISTS_IN_GAME ~zur104.itm~) THEN BEGIN
COPY_EXISTING ~zur104.itm~ ~override~ //Harpy weapon
  PATCH_IF (SOURCE_SIZE > 0x71) BEGIN
	READ_SHORT 0x1c rt ELSE 0 //Item type
	PATCH_IF rt = 0x14 BEGIN
	  READ_BYTE 0x18 fl //Flags
	  WRITE_BYTE 0x18 (fl BOR 0b00100000) //Not movable
	  WRITE_SHORT 0x1c 0x1e //Item type (halberd, was large sword)
	  WRITE_ASCIIT 0x22 ~HB~ //Item animation (was S2) 
	  WRITE_BYTE 0x31 0x63 //Proficiency (halberd, was 2h sword)
	  READ_LONG 0x64 xo //Header offset
	  WRITE_SHORT (xo + (x * 56) + 0x2c) 0 //Overhand (was 60)
	  WRITE_SHORT (xo + (x * 56) + 0x2e) 35 //Backhand (was 40)
	  WRITE_SHORT (xo + (x * 56) + 0x30) 65 //Thrust (was 0)
	END
  END
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~mbfia1.bam~ ~override/mbfiha1.bam~
			  ~mbfia1e.bam~ ~override/mbfiha1e.bam~
			  ~mbfia2.bam~ ~override/mbfiha2.bam~
			  ~mbfia2e.bam~ ~override/mbfiha2e.bam~
			  ~mbfia4.bam~ ~override/mbfiha4.bam~
			  ~mbfia4e.bam~ ~override/mbfiha4e.bam~
			  ~mbfica.bam~ ~override/mbfihca.bam~
			  ~mbficae.bam~ ~override/mbfihcae.bam~
			  ~mbfide.bam~ ~override/mbfihde.bam~
			  ~mbfidee.bam~ ~override/mbfihdee.bam~
			  ~mbfigh.bam~ ~override/mbfihgh.bam~
			  ~mbfighe.bam~ ~override/mbfihghe.bam~
			  ~mbfigu.bam~ ~override/mbfihgu.bam~
			  ~mbfigue.bam~ ~override/mbfihgue.bam~
			  ~mbfisc.bam~ ~override/mbfihsc.bam~
			  ~mbfisce.bam~ ~override/mbfihsce.bam~
			  ~mbfisd.bam~ ~override/mbfihsd.bam~
			  ~mbfisde.bam~ ~override/mbfihsde.bam~
			  ~mbfisl.bam~ ~override/mbfihsl.bam~
			  ~mbfisle.bam~ ~override/mbfihsle.bam~
			  ~mbfisp.bam~ ~override/mbfihsp.bam~
			  ~mbfispe.bam~ ~override/mbfihspe.bam~
			  ~mbfitw.bam~ ~override/mbfihtw.bam~
			  ~mbfitwe.bam~ ~override/mbfihtwe.bam~
			  ~mbfiwk.bam~ ~override/mbfihwk.bam~
			  ~mbfiwke.bam~ ~override/mbfihwke.bam~
 END

//Copies IWD svirfneblin BAMs
 COPY ~svirf/graphics~ ~override~

//Corrects weapons and animations on existing svirfneblin
 COPY_EXISTING ~udsvdead.cre~ ~override~ //Svirfneblin
			~udsvir03.cre~ ~override~ //Goldander Blackenrock
			~udsvir05.cre~ ~override~ //Therndle Daglefodd
			~udsvir06.cre~ ~override~ //Svirfneblin
PATCH_IF (SOURCE_SIZE > 0x2d3) BEGIN
  ADD_CRE_ITEM ~blun01~ #0 #0 #0 ~NONE~ ~WEAPON2~ EQUIP //Svirfneblin Club
  WRITE_SHORT 0x28 0xe210 //Animation (MBFI)
  WRITE_BYTE 0x2f 38 //Skin Color (light dirt brown, was 7 light metallic green)
  WRITE_BYTE 0x32 5 //Hair Color (light silver, was 109 terracotta)
END
 BUT_ONLY_IF_IT_CHANGES

 COPY_EXISTING ~udsvir01.cre~ ~override~ //Odendal Breachgnome
			~udsvir02.cre~ ~override~ //Svirfneblin
			~udsvir04.cre~ ~override~ //Innkeeper
			~udsvir07.cre~ ~override~ //Svirfneblin
PATCH_IF (SOURCE_SIZE > 0x2d3) BEGIN
  REPLACE_CRE_ITEM ~ax1h01~ #0 #0 #0 ~NONE~ ~WEAPON2~ EQUIP //Svirfneblin Pickaxe
  WRITE_SHORT 0x28 0xe210 //Animation (MBFI)
  WRITE_BYTE 0x2e 114 //Major Color (yet another brown, was 65 really dark gray)
  WRITE_BYTE 0x2f 38 //Skin Color (light dirt brown, was 7 light metallic green)
  WRITE_BYTE 0x32 5 //Hair Color (light silver, was 109 terracotta)
END
 BUT_ONLY_IF_IT_CHANGES

 COPY_EXISTING ~udsvir08.cre~ ~override~ //Svirfneblin Leader
PATCH_IF (SOURCE_SIZE > 0x2d3) BEGIN
  REPLACE_CRE_ITEM ~ax1h01~ #0 #0 #0 ~NONE~ ~WEAPON1~ EQUIP //Pickaxe (was sw1h07 Short Sword)
  WRITE_SHORT 0x28 0xe210 //Animation (MBFI)
  WRITE_BYTE 0x2e 114 //Major Color (yet another brown, was 65 really dark gray)
  WRITE_BYTE 0x2f 38 //Skin Color (light dirt brown, was 7 light metallic green)
  WRITE_BYTE 0x32 5 //Hair Color (light silver, was 109 terracotta)
END
 BUT_ONLY_IF_IT_CHANGES
END

You wouldn't have to do this last bit with existing CREs since AFAIK there aren't any driders in BG2 by default, but you would have to account for the mod added ones, and you would want to copy a test drider to make sure it works.

 

I've only tested this code parses and assigns things correctly AFAICT. The side effect of this change is that I'm guessing both the NEJ sentry and the RTT harpy if present will get the svirfneblin death animation. It would've made more sense to move them off to other slots entirely, but that would've required even more shuffling. If corpses are part of death animations then I'll have to figure out what the standard slots for sentries and harpies should be, which sucks because they're all over the place. And then there's the issue of weapon switching... if the gnomes go to use their darts, I've no clue what happens (they probably disappear or perhaps CTD). I don't even know what the "Dart" slot is, and neither did Galactygon last I checked. And I haven't rushed out to install NEJ2 to see if it handles that reassignment correctly (heh).

 

So obviously this'll require further testing. It'd really help if we had standard slots for all the animations, but it'd be a lot of work. The BP folks started some attempt at standardisation, ages ago. This was the aim of LC-BA but it did not address existing mod conflicts (LC being a total conversion, probably didn't deem it relevant). Cuv started to continue this type of work but buggered off after addressing maybe 3 or so slots, mainly for undead.

 

I'm not sure what to recommend for the drider slot. I don't like the MLIC slot that BP uses, because it's also the BG2 lich slot. The MSH1 slot that LC uses for the male drider is a possibility, because Cuv stacked the IWD Shadow that TS and NEJ2 in the MWAV slot. You'd still have conflicts, but you'd have a clear spot to move them. Another possibility is MHIS that CtB uses, but there are more conflicts there.

Link to comment

Cool. I've not had much time to devote to modding lately (I haven't been able to do so much as check the forums in two days), but I appreciate the help. I need to have a deeper look at LC-BA. Perhaps it can be used as a model but split into individual packages. Perhaps not. I also need to do some reading on animation "slots" as it seems from what you're saying that we're unable to add new ones (but are instead forced to reassign existing ones). I'm not promising fast action (I don't have much time at present, and the next entry in my to-do list is additional interjections for Branwen NPC), but I do need the Drider for Pai'Na NPC, and if I do it then I might as well tackle the whole lot of them, so I'll be looking into this at some point in the future.

 

aWL

Link to comment
If corpses are part of death animations then I'll have to figure out what the standard slots for sentries and harpies should be, which sucks because they're all over the place.

They are, sorry. The last frame of the death animation is the corpse. The animation plays once, then freezes on the last frame.

 

I also need to do some reading on animation "slots" as it seems from what you're saying that we're unable to add new ones (but are instead forced to reassign existing ones).

 

Yep. More precisely, there's a handful of unused slots, but way too few to avoid conflicts, and you can't add more. This is fundamentally what drives the problems: the number of animations people would like to have in the game is much larger than the number of slots. The Bestial Animations hack is clever (put an animation into each weapon slot; leave the "base" creature animation blank") but it still leaves you death-animation-less.

Link to comment

Which works just fine for the summons and such that do not leave corpses. For other monsters, you are left with hacks to get around the limit. It'd be great if someone produced a complete standardized method of getting around the limit, but so far all attempts have been left incomplete.

Link to comment
If corpses are part of death animations then I'll have to figure out what the standard slots for sentries and harpies should be, which sucks because they're all over the place.
They are, sorry. The last frame of the death animation is the corpse. The animation plays once, then freezes on the last frame.
Damn, that sucks. I guess more shuffling is in my future.
The Bestial Animations hack is clever (put an animation into each weapon slot; leave the "base" creature animation blank") but it still leaves you death-animation-less.
It does, but I think you can still have a "common" death animation among creatures that share the same slot. Which might be fine if, say, you have a bunch of goblins, or for what Cuv did, a bunch of ghosts sharing the same slot.

 

@Wounded_Lion: would you need both the male and female drider or just one or the other? It makes a difference between trying to juggle one or two slots, with the latter option being double the work. Though I'm thinking that at least these two could share the same slot. Who really cares what gender a drider was once it's dead, unless you're into spider necrophilia or something (eww).

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...