Pocket Plane Group

Miscellany, Inc. => Infinity Engine Modding Q&A => Topic started by: Aelthane on October 24, 2008, 01:17:56 AM

Title: possible?
Post by: Aelthane on October 24, 2008, 01:17:56 AM

Hi, I'd like an opinion on whether an idea would be possible before I commit a bunch of time to it. I have in mind a blue-mage type class that would get abilities from monsters. For example, it could use a scan spell on an umber hulk and gain the confusing gaze ability. I was thinking this might be accomplished by using some kind of "IF target=umber hulk THEN learn spell confusing gaze" type of logic. (I'm kind of new to this whole modding thing if you hadn't guessed.) Any help would be appreciated. Thanks!
Title: Re: possible?
Post by: Kulyok on October 24, 2008, 01:53:29 AM
Hey, welcome to PPG.

It's an interesting idea. To me it seems possible(I don't know about spell icons in the spellbook, but I guess it'll work; there are quite a few spell mods around/unused icons in the game, after all). But if this mage meets Irenicus, everyone in the game is dead - RotF kills everything.
Title: Re: possible?
Post by: SixOfSpades on October 24, 2008, 03:51:39 AM
Theoretically it's possible, but it would be absolute HELL to code--to the point that no modder (that I can think of, anyway) would ever attempt it. A much more plausible solution would be to make a variant of Spell Turning that takes abilities cast directly at you (such an an Umber Hulk's Confusion) and bounces it back at them.
Title: Re: possible?
Post by: SimDing0™ on October 24, 2008, 06:05:19 AM
Howsabout having the spell IDS target by race/class/whatever and each EFF set a global variable which is picked up by baldur.bcs?
Title: Re: possible?
Post by: SixOfSpades on October 24, 2008, 11:52:12 AM
I thought piling more crap onto baldur.bcs was pretty much verboten?
Title: Re: possible?
Post by: GeN1e on October 24, 2008, 08:02:33 PM
First of all, am I correct thinking that a mage's going to learn the spell via using scan.spl onto umber guy and after the use receiving confusion to his repertoire?

Can be done pretty elegant without scripting - via 177 opcode:
our scan.spl would contain a significant nubmer of "Use EFF file [177] [0xNN 0x4] EffName"s, where NN would be an entry in race.ids and EffName - a respective external effect. One for each monster type.
Each of effects would target at original caster a "Learn spell [147] [0x0 0x0] RespectiveSpell".
In short, this way.
Title: Re: possible?
Post by: Aelthane on October 24, 2008, 11:06:01 PM
Thanks for the welcome! I think that will let me do a lot of what I had in mind. Not to look a gift horse in the mouth, but is there any way to do a similar thing for more specific creatures, such as a dust mephit? Thanks!
Title: Re: possible?
Post by: GeN1e on October 25, 2008, 01:19:08 AM
Theoretically - branching. Thing that affects mephits would consist of half a dozen effects, each for different mephit type. However I'm unsure if dust mephits are any different each from other in a way that 177 could discern. In fact, I believe the only difference is a name aka string.
Specific.ids doesn't seem to be used much in game, so giving mephits a unique identity is possible, but this way you'll have to work manually with each creature.
Title: Re: possible?
Post by: SixOfSpades on October 25, 2008, 01:36:32 PM
The good thing about this kind of spell is that, even though making it detect every kind of creature in the game would take ages to do, it would still be perfectly functional even with only a few creatures "known" to it. That should help you work out the kinks before you bury yourself in the project, as opposed to after. But just be warned it's gonna take a lot of work. Good luck, though!

(And yes, luck does come into play in modding. The game engine has some truly freaky quirks, but sometimes they do work out in your favor, even if you don't even understand what the hell just happened.)
Title: Re: possible?
Post by: Aelthane on October 26, 2008, 11:39:00 PM
OK. Again, thanks for the help. Don't know if it'll work, but at least I have a place to start.
Title: Re: possible?
Post by: Aelthane on October 30, 2008, 12:00:52 AM
OK, I lied, I do need some more help. Is there any way or place where I can get decompiled .spl files, so I can figure out how coding them works? And would the target of the spell be represented in the script as "Target", or "Spelltarget" or what? Again, thanks.
Title: Re: possible?
Post by: GeN1e on October 30, 2008, 12:39:42 AM
You can't really decompile spells (only scripts and dialogs), the best starting place is to take an existing one and open it with DLTCEP or Near Infinity. If that's what you meant.
Quote
And would the target of the spell be represented in the script as "Target", or "Spelltarget" or what?
Again, not sure what you mean. If that's about using making your spell's subeffects to target specific monster types, then it involves no scripting, the properties set for the177th opcode are what determines which type will be affected.