Jump to content
Hendryk

New Spell

Recommended Posts

Is there a way to reference a newly created spell to a new entry in Spell.ids so that the new spell can be referred to in a script?

 

Or is there a way to cast the new spell from a script without reference to Spell.ids?

Edited by Hendryk

Share this post


Link to post

Thank you very much! Your helpful reply also gave me something to search for in Sim's scripting guide where I find the whole question covered. Marvelous!

Share this post


Link to post

The SpellRES commands are one of the features of the BG2 engine that was only partially implemented for SOA... so it's THERE, but you can't _directly_ compile the commands unless you have TOB, or if you use some code that appends ACTION.IDS for SOA players. Quest Pack and probably most of Cam's mods have it, so you'll either need to steal it or declare TOB-required if you want to use the commands in .d or .baf code with WeiDU.

 

(Another way around the problem, which I've used in the past, is to use precompiled BCS files from TOB machines, and then EXTENDing those in. That, too, will let it work in an SOA-only environment, but is a little clunky.)

Share this post


Link to post

Thanks again. Happily, I only have to test that the spell works correctly off a script in my game. I'll definitely refer Domi here though as she's the one who will have to integrate it into the mod.

Share this post


Link to post

We already use it for a few other custom spells, so we are ToB required, Hendryk.

Edited by Domi

Share this post


Link to post

If that's the only reason that the mod is ToB- required, then I would definately suggest you add the code to your tp2 to append to the action.ids. It's relatively simple on your end, and opens the mod up to everyone.

 

EDIT:

As a side note, the only other major compatibility conflicts you will run into with SoA vs ToB is if any spells use effects 300-316(?). Not sure what the ending number is but basically everything above 300 was added for ToB, so it will make a SoA-only game crash. Also, if the mod requires a player to be a Wild Mage, then that will obviously require ToB.

Edited by Loriel

Share this post


Link to post

I code the whole thing reffering only to ToB section of IESDP, so I do not even know which things may or may not require ToB. So, I'd rather put the ToB required tag to be on the safe side.

Share this post


Link to post
Might as well be TOB only, hell even MAC users don't have the "can't get TOB" excuse anymore.  :)

True, but we can still say we can't PLAY it...I have TOB, but it runs so slowly that it's not worth the upgrade. I know - I've got an ancient computer, but there are still some who prefer to download a mod that is SOA-compatible, especially if it's only a matter of 25 lines or less of tp2 code (which is all it takes to append all the TOB action.ids and trigger.ids stuff for us SOA users).

Share this post


Link to post

Then, perhaps it is a matter of making a separate minimod that upgrades SoA's IDS to ToB's without installing ToB?

Share this post


Link to post

If you could share the code I will gladly add it ... or if you are going to release it as a separate minimod than it will take care of itself I suppose :)

Share this post


Link to post
APPEND ~action.ids~ ~31 SpellRES(S:RES*,O:Target*)~
UNLESS ~SpellRES(S:RES*,O:Target*)~
APPEND ~action.ids~ ~95 SpellPointRES(S:RES*,P:Target*)~
UNLESS ~SpellPointRES(S:RES*,P:Target*)~
APPEND ~action.ids~ ~113 ForceSpellRES(S:RES*,O:Target)~
UNLESS ~ForceSpellRES(S:RES*,O:Target)~
APPEND ~action.ids~ ~114 ForceSpellPointRES(S:RES*,P:Target)~
UNLESS ~ForceSpellPointRES(S:RES*,P:Target)~
APPEND ~action.ids~ ~160 ApplySpellRES(S:RES*,O:Target)~
UNLESS ~ApplySpellRES(S:RES*,O:Target)~
APPEND ~action.ids~ ~181 ReallyForceSpellRES(S:RES*,O:Target)~
UNLESS ~ReallyForceSpellRES(S:RES*,O:Target)~
APPEND ~action.ids~ ~191 SpellNoDecRES(S:RES*,O:Target*)~
UNLESS ~SpellNoDecRES(S:RES*,O:Target*)~
APPEND ~action.ids~ ~192 SpellPointNoDecRES(S:RES*,P:Target*)~
UNLESS ~SpellPointNoDecRES(S:RES*,P:Target*)~
APPEND ~action.ids~ ~240 ReallyForceSpellDeadRES(S:RES*,O:Target)~
UNLESS ~ReallyForceSpellDeadRES(S:RES*,O:Target)~
APPEND ~action.ids~ ~318 ForceSpellRangeRES(S:RES*,O:Target)~
UNLESS ~ForceSpellRangeRES(S:RES*,O:Target)~
APPEND ~action.ids~ ~319 ForceSpellPointRangeRES(S:RES*,P:Target)~
UNLESS ~ForceSpellPointRangeRES(S:RES*,P:Target)~
APPEND ~action.ids~ ~337 ReallyForceSpellPointRES(S:RES*,P:Target*)~
UNLESS ~ReallyForceSpellPointRES(S:RES*,P:Target*)~
APPEND ~trigger.ids~ ~0x4031 HaveSpellRES(I:Spell*Spell)~
UNLESS ~HaveSpellRES(I:Spell*Spell)~

Share this post


Link to post
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...