Jump to content

MAGE_ALL in Item/Spell Effects


Skye

Recommended Posts

I tried making an effect that would target only mages, but it seems as though using opcode 177 to target class 202 (MAGE_ALL) doesn't work at all.

 

Is there a better way of doing this besides creating an effect for every single mage/x combo? Not that there are that many, I'm just not a fan of littering files with lots of effects.

 

Bonus question: Are there any tricks that would allow us to invert the selection? Being able to affect a creature that doesn't fall into a category would be incredibly useful.

 

I'm guessing not since the new IWD:EE opcodes seem to be adding a lot of fixed "not x" categories.

Link to comment

Bonus question: Are there any tricks that would allow us to invert the selection?

I wish!

 

I'm also interested in the main question too, I've had problems with opcode 177 targeting mages - as I recall, I couldn't figure how to target single-class mages but exclude sorcerers. So, a general primer would be nice from someone with experience in this area. (@Aquadrizzt?)

Link to comment

Are you saying that setting the IDS file to CLASS.ids and target category to MAGE (1) also affects sorcerers? Because sorcerers are an entirely separate class with a different ID number.

 

Anyway, I couldn't find an easier way to target all mage combos with an effect and ultimately I decided to take a different approach entirely.

Link to comment

Are you saying that setting the IDS file to CLASS.ids and target category to MAGE (1) also affects sorcerers? Because sorcerers are an entirely separate class with a different ID number.

 

Maybe? Something like that. Sorcerers don't have their own CLAB file, so I was trying to add a spell in CLABMA01.2da that would only affect mages, and it either 1) affected both classes, or 2) did not effect either. Eventually I gave up and just COPY_KIT'd the sorcerer class to an identical new sorcerer kit, with its own CLAB, and added a 177 spell to the mage CLAB that caused sorcerers to switch over to the new kit. (Targeting sorcerers *did* work.)

 

Looking in NI now, I don't even see MAGE_ALL as an option.

 

In any event how mages are handled is a little wacky, so if anyone happens to know what works and what doesn't work, it would be good to know.

Link to comment

I haven't tried my stuff on a sorcerer, so I don't know whether that's true or not.

 

Looking in NI now, I don't even see MAGE_ALL as an option.

That's because MAGE_ALL has the same number as LONG_BOW. Don't know why, but that's irrelevant.

 

I'm guessing there are handlers for the X_ALL entries in script parsers, but not in opcode parsers.

Link to comment

Are you saying that setting the IDS file to CLASS.ids and target category to MAGE (1) also affects sorcerers? Because sorcerers are an entirely separate class with a different ID number.

Well, if you just look at the info here:

1 MAGE

Detects mages (and sorcerers), though only single class & kits.

I don't really think the Sorcerer and mages are a different classes, they have extra feature yes, but the way it's handled by the engine...

 

Of course the class.ids'es marker just puts a number on a script that's being compiled ... having nothing real to do with the games class system, other than the associations, that are made, some of which can be quite random.

Aka, you can make a giant blob of goo, and set the class number as 143 in the .cre file, and it's being threated as a wolf by the rangers favorite enemy attacks, while it's a giant blob of goo(set the .cre animation to be a slime, 0x7900).

 

That's because MAGE_ALL has the same number as LONG_BOW. Don't know why, but that's irrelevant.

It's there from BG1. Likely having to do with the longbow damage... or something.

Link to comment

Of course the class.ids'es marker just puts a number on a script that's being compiled ... having nothing real to do with the games class system, other than the associations, that are made, some of which can be quite random.

Yeah, but a creature's class is defined by the number in its CRE file. If anything I would assume it's just the script/effect handlers that are specifically programmed to assume that sorcerers are mages for all effects and purposes, even though they are a different class. Anyway, the distinction between "same class with extra features" and "different class that shares resources" is meaningless from an external perspective. For a modder, it only matters how the IDS values are parsed.

Link to comment

If you need to target a spell by EFF to mages but not sorcerers, go the route the Fixpack did with elf/half-elf immunities:

 

* Have the first EFF target sorcerers (19 in CLASS.IDS) and apply a 1 second immunity to...

* the second EFF that targets mages (1)

 

That second EFF may actually have to be a spell containing the mage-targeting EFF. I'm not in a position to check if you can give an immunity to an EFF the way you can a SPL.

 

edit: Hell, you could apply that immunity in the starting area via script and make it permanent (timing 9).

Link to comment

Are you saying that setting the IDS file to CLASS.ids and target category to MAGE (1) also affects sorcerers? Because sorcerers are an entirely separate class with a different ID number.

 

Anyway, I couldn't find an easier way to target all mage combos with an effect and ultimately I decided to take a different approach entirely.

 

MAGE doesn't include sorcerers (despite what IESDP says).

 

Edit: it is possible for the mage and sorcerer to share the same clab. It is just necessary to heavily use the #177 targeting MAGE or SORCERER. I have test files if you want the SubtleDoctor. If anybody else is interested, I'm happy to share the details.

 

Edit2: Gha! I sent Jarno those files! Jarno, look in your inbox. I sent this to you ages ago. You already have proof that IESDP documentation is wrong here!

Link to comment

MAGE doesn't include sorcerers (despite what IESDP says).

Let's get this sorted out now.

 

In CLASS.IDS there's

 

1 MAGE (IESDP: detects single-class mages and sorcerers)

19 SORCERER (IESDP: detects single-class sorcerers)

202 MAGE_ALL (IESDP: detects all mages and sorcerers, whether single- or multi-/dual-classed)

 

Which ones are incorrect, and how should it be?

Link to comment

Let's get this sorted out now.

In CLASS.IDS there's

 

1 MAGE (IESDP: detects single-class mages and sorcerers)

19 SORCERER (IESDP: detects single-class sorcerers)

202 MAGE_ALL (IESDP: detects all mages and sorcerers, whether single- or multi-/dual-classed)

 

Which ones are incorrect, and how should it be?

1 MAGE: Detects single-class mages only, including kits.

19 SORCERER: Detects sorcerers only, including kits.

202 MAGE_ALL: Does not work as intended in effect opcodes.

 

For dual/multiclass mages you'd have to use FIGHTER_MAGE, MAGE_THIEF, FIGHTER_MAGE_CLERIC and so on.

 

Link to comment

Archived

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

×
×
  • Create New...