Jump to content

Changing armor level with EFFs


Gom Jabbar

Recommended Posts

Here’s what I like to do: Change the armor level animation of my PCs thanks to effects.

Actually, something very similar to Ctr+1 or VEquip() script action.

You may wonder why not use the latter --> Vequip() affects the selected PC, not the one running the script (at least in BG1). So for instance, if no PC is selected, Vequip() is not applied (In fact Vequip() acts like Ctr+1).

I tried and used Eff#53 AnimationChange() but I’m only able to change the avatar animation. I don’t know if it’s possible to reach the armor level animation with that effect …? Be that as it may, I don’t know the animation ID values for armor level animations.

 

Any help would be greatly appreciated!

Link to comment

Not sure what you mean by armour level animations - like chain, plate, leather etc.? I think those are relatively hard-coded to what you're actually wearing (the animation in the armour .itm file) though in theory you could do some sort of hackery with item swapping via opcodes.

Link to comment
Not sure what you mean by armour level animations - like chain, plate, leather etc.?
:( Exactly, that’s it! Actually “Armor level†sounds like the internal engine label for the various armour animations. Armor level 1 without any armor, armor lvl 2 for leather ones, 3 for chain and 4 for plate. This is what IE displays when you use ctr+1 or Vequip().

 

I think those are relatively hard-coded to what you're actually wearing (the animation in the armour .itm file)
Yes, it may be through a field named paperdoll animation ID in DLTC or inventory icon in NI.

 

though in theory you could do some sort of hackery with item swapping via opcodes.
I hope so but how can it be done?

Animation .bam files exist for each kind of armour and are easily identifiable by their names but I’m not able to call them via opcodes.

For instance in BG1, a leather armored human male fighter use CHMF2xx.bam files (xx depends on actions, A to attack, C to cast and G for general actions) and if he’s wearing a chain armour, it should be CHMF3xx.bam.

But I think you know that .. :D

Link to comment
I think those are relatively hard-coded to what you're actually wearing (the animation in the armour .itm file)
Yes, it may be through a field named paperdoll animation ID in DLTC or inventory icon in NI.
Actually, it should be in the header animation, the field at 0x22 in the item file.
though in theory you could do some sort of hackery with item swapping via opcodes.
I hope so but how can it be done?
I would give the item one or two special abilities. Let's say your armour normally looks like chain mail, and you want to be able to change it so that it looks like leather or plate. First, make two or three copies of the base item and give them different names. If your prefix is GJ, you might have gjchan01.itm, gjleat01.itm, gjplat01.itm etc.

 

Then load one armour and give it two new extended headers in DLTCEP (Extended Effects tab, Add). You could specify the "Use Icons" to be leather and plate BAMs, respectively. Make the Target type Self (5). Give it one charge that's expended so it gets destroyed, then Add and Edit an effect for Item: Create Item in Slot (opcode 143), armour slot (1) and for the Resource, specify your alternate item (such as gjleat01). Do the same for the other items, only adjust the resources accordingly.

 

Now when you use the armour, you'll see 2 different icons and you can adjust it up or down in "animation level."

Link to comment

First of all, thank you for your suggestion. It isn’t exactly suitable for what I want to do but I didn’t give lot of details about that. Very roughly, I wrote BG1 AI scripts to equip characters with weapons or armours automatically according their situation. The latter feature is useful for rangers to make the most of their ability to hide in shadow.

As regards the implementation, I found it was more effective to mask the armor effects, instead of removing the armour from its slot. In that way, characters can be equipped with an armor again automatically after an area transition -> Very helpful when you get into areas in the face of monsters.

However, to make things realistic in with that implementation, you need to display the avatar animation without armour although there is one in the armor slot.

My solution uses the magical weapon slot and a dummy armor-type item with the 0x22 field empty. Some people will object there is a risk of overwriting magical weapons but it’s quite easily manageable because you can create these weapons again without loosing paperdoll /animation set by the dummy item.

Link to comment

Archived

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

×
×
  • Create New...