Jump to content

Scripting for spells


Miloch

Recommended Posts

I understand for scripting, the conventions are 1 for priest, 2 for wizard, 3 for innate, 4 for class spells. So if I want to refer to SPWI215 I can use 2215 as well as WIZARD_WEB. But how would I refer to SPDR201 for the Avenger version of Web? I would prefer not to use the RES commands since I may need to use this for BG1.

Link to comment

If I port it over, I will. Though I could just use the wizard spell, but then I'd have druids with incorrect spell slots and who knows what. So is there a convention for the SPDR spells or did someone botch the prefixes?

Link to comment
I understand for scripting, the conventions are 1 for priest, 2 for wizard, 3 for innate, 4 for class spells. So if I want to refer to SPWI215 I can use 2215 as well as WIZARD_WEB. But how would I refer to SPDR201 for the Avenger version of Web? I would prefer not to use the RES commands since I may need to use this for BG1.

 

HaveSpellRES("SPRA201")

 

SpellRES("SPRA201", LastSeenBy())

 

---

 

I believe you can also use the appropriate mage spell reference and it will also work. Seems to me this is true after one of the official patches, not straight out of the box BG2: SoA? or ToB?

 

Or in other words there was not a way to script these spells before SpellRES was activated or the devolopers did something to make the mage or priest spell references allowable substitutions.

Link to comment

Ok, here's one for you: how would one script the offensive/defensive spin abilities of the bardic blade kit? I don't see it as a spell of any sort - even an innate or class-based one. For that matter, I'm not even sure how bard song works in scripting exactly. I haven't seen a lot of good bard scripts out there that aren't just F/M/T scripts, unless I'm missing something.

Link to comment
Ok, here's one for you: how would one script the offensive/defensive spin abilities of the bardic blade kit? I don't see it as a spell of any sort - even an innate or class-based one. For that matter, I'm not even sure how bard song works in scripting exactly. I haven't seen a lot of good bard scripts out there that aren't just F/M/T scripts, unless I'm missing something.

 

IIRC, nothing particularly difficult about offensive/defensive spin because the bard can't do anything else while engaged in either.

 

Kind of depends on the level of the bard.

 

At some point, their song is so powerful that you don't really want them doing anything else except sing.

 

Bardsong is treated like a Modal State.

 

Out of combat, you just have them sing all the time, since you never know when you are going to run into a battle.

 

In battle, you want the Bardsong to be interruptible for spellcasting, and attacking if anything is too close.

 

The eSeries, eMage has the bardsong code. It works pretty well. I've used it all the way through the game once with Haer'dalis in my party. IIRC he ended up with about 16 kills total by the end of ToB but he sang his sparrow lungs out, keeping my part nicely buffed. Of course, then Nythrun proves out that Bardsong didn't do a lot of the things it said it did in the desription. Oh, well.

 

The IWD series is actually way better as far as Bardsong goes because you get different songs as you level up.

 

So you would want certain songs running in combat, or out of combat, or if you were facing a certain type of enemy, etc.,.

 

Oh you might need to script the Jesters songs slightly differently than the others because it is designed to screw with enemies rather than help the party. I never put much thought into it because I never used a Jester.

Link to comment
IIRC, nothing particularly difficult about offensive/defensive spin because the bard can't do anything else while engaged in either.
So... what commands do you use to script the spin, and how do you distinguish between the offensive and defensive?
Link to comment
IIRC, nothing particularly difficult about offensive/defensive spin because the bard can't do anything else while engaged in either.
So... what commands do you use to script the spin, and how do you distinguish between the offensive and defensive?

 

:)

 

If I reading you correctly, the spins are spells. You script them like any other spell.

 

Usage based on function, threat assessment, nearness of enemies, targetting (not so much in the case), etc.,.

 

Probably use a timer to prevent re-cast. For the most compatible method.

Link to comment
I don't see it as a spell of any sort - even an innate or class-based one.
I guess I was blind, or my editor wasn't searching properly at the time. They're at SPCL521 (offensive spin) and SPCL522 (defensive spin). Sorry for wasting your time - should be dead easy to script now that I know what they are. :)

 

Maybe something to add to eSeries though? I don't see them in eMage.baf.

Link to comment
I don't see it as a spell of any sort - even an innate or class-based one.
I guess I was blind, or my editor wasn't searching properly at the time. They're at SPCL521 (offensive spin) and SPCL522 (defensive spin). Sorry for wasting your time - should be dead easy to script now that I know what they are. :)

 

Maybe something to add to eSeries though? I don't see them in eMage.baf.

 

No worries :D

 

Hmm, I thought I had them scripted.

 

They could be in the scripts as BLADE_OFFENSIVE_SPIN or SpIn521, more likely SpIn521 so I don't have to package a custom version of the spell.ids along with the eSeries or have code in the .tp2 to add BLADE_OFFENSIVE_SPIN spin if it isn't there already.

 

But it is possible that I missed those two.

Link to comment
They could be in the scripts as BLADE_OFFENSIVE_SPIN
Er, yeah, it's there. Something seriously wrong with my search capability :). Pretty much what I had in mind for the scripting, only my enemy blade doesn't have to be as smart of course. As with the shapeshifter, once he gets to these actions, there's not going to be much future in the combat anyhow, one way or another.
Link to comment

If using HaveSpell(), should Class spells (like offensive spin) be added to a CREs memorized innates? Or if you have the relevant kit (blade in this case) does the engine automatically figure in the class spells the CRE should have?

Link to comment

Archived

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

×
×
  • Create New...