Post reply

Other options
Shortcuts: ALT+S post or ALT+P preview

Topic summary

Posted by jastey
 - September 14, 2008, 05:33:01 PM
Thank you very much! I will let you know when I updated the tutorial.
Posted by Baronius
 - September 14, 2008, 02:43:56 PM
I would be glad if you included them in your coding tutorial (and I'm sure drake127 wouldn't mind it either, if he was here).

Drake127 said that these only worked in BG:TotSC, so he might have checked BG1 (without TotSC) to a certain extent, but I don't know (I suppose they work only with TotSC).
Posted by jastey
 - September 14, 2008, 09:26:21 AM
I missed this when preparing my BG1 coding tutorial (link). Can I ask permition to include this into the tutorial?
Was any of the above tried for plain BG1 (without the TotSC)?
Posted by Avenger_teambg
 - August 08, 2005, 05:27:35 PM
Ok, what about triggers, i just made 0x0091 (SpellCastObjectRES(O:Object, S:ResRef) ) work.
Posted by Baronius
 - July 23, 2005, 10:28:27 PM
The last release is the Original Saga, isn't it? (They changed the original Spider's Bane to something different :( )
I just have stock BG1 plus TotSC... with final patch IIRC.
Posted by Avenger_teambg
 - July 23, 2005, 06:55:08 PM
Wow, up to 215?
I'm sure all the rest in between should work.
Maybe even more, i believe that stuff common in iwd1 and bg2 is also in bg1.
(Since iwd1 code was passed to blackisle around the time bg1 was released).
This would work only in the last upgrade of bg1, i guess.
Posted by Baronius
 - July 17, 2005, 04:16:09 PM
According to drake127's tests, these also work:
204 TakePartyItemNum(S:ResRef*,I:Num*)
215 FollowObjectFormation(O:Object*,I:Formation*,I:Position*)

There are some other actions that haven't been tested yet:
240 ReallyForceSpellDeadRES(S:RES*,O:Target)
318 ForceSpellRangeRES(S:RES*,O:Target)
319 ForceSpellPointRangeRES(S:RES*,P:Target)

HaveSpellRES() does not work.
Posted by Avenger_teambg
 - July 17, 2005, 12:40:54 PM
Any other actions that are missing from the list?
Posted by Baronius
 - July 16, 2005, 07:25:19 PM
The working TP2 code.

APPEND ~action.ids~ ~31 SpellRES(S:ResRef*,O:Target*)~
UNLESS ~SpellRES(S:ResRef\*,O:Target\*)~

APPEND ~action.ids~ ~95 SpellPointRES(S:ResRef*,P:Target*)~
UNLESS ~SpellPointRES(S:ResRef\*,P:Target)~

APPEND ~action.ids~ ~113 ForceSpellRES(S:ResRef*,O:Target)~
UNLESS ~ForceSpellRES(S:ResRef\*,O:Target)~

APPEND ~action.ids~ ~114 ForceSpellPointRES(S:ResRef*,P:Target)~
UNLESS ~ForceSpellPointRES(S:ResRef\*,P:Target)~

APPEND ~action.ids~ ~160 ApplySpellRES(S:ResRef*,O:Target)~
UNLESS ~ApplySpellRES(S:ResRef\*,O:Target)~

APPEND ~action.ids~ ~181 ReallyForceSpellRES(S:ResRef*,O:Target)~
UNLESS ~ReallyForceSpellRES(S:ResRef\*,O:Target)~

APPEND ~action.ids~ ~191 SpellNoDecRES(S:ResRef*,O:Target*)~
UNLESS ~SpellNoDecRES(S:ResRef\*,O:Target\*)~

APPEND ~action.ids~ ~192 SpellPointNoDecRES(S:ResRef*,P:Target*)~
UNLESS ~SpellPointNoDecRES(S:ResRef\*,P:Target\*)~
Posted by Baronius
 - July 16, 2005, 07:23:51 PM
Okay here are the descriptions.


31 SpellRES(S:ResRef*,O:Target*)
95 SpellPointRES(S:ResRef*,P:Target*)
113 ForceSpellRES(S:ResRef*,O:Target)
114 ForceSpellPointRES(S:ResRef*,P:Target)
160 ApplySpellRES(S:ResRef*,O:Target)
181 ReallyForceSpellRES(S:ResRef*,O:Target)
191 SpellNoDecRES(S:ResRef*,O:Target*)
192 SpellPointNoDecRES(S:ResRef*,P:Target*)



31 SpellRES(S:ResRef*,O:Target*)
Casts a spell on target O object. S is always a maximum 7-character long SPL filename written with upper case, without the SPL extension. Additionally, the filename cannot consist only of numbers. The spell must be memorized by the caster. It is interruptible during casting. The spellcaster must meet the level requirements of the spell.
Warning: according to tests, it doesn't work reliably.

95 SpellPointRES(S:ResRef*,P:Target*)
Casts a spell on target P[x.y] point. S is always a maximum 7-character long SPL filename written with upper case, without the SPL extension. Additionally, the filename cannot consist only of numbers. The spell must be memorized by the caster. It is interruptible during casting. The spellcaster must meet the level requirements of the spell.

113 ForceSpellRES(S:ResRef*,O:Target)
Forces the object running the script to cast the spell specified by the S parameter. O is the spell's target object, S is always a SPL filename written with upper case, without the SPL extension. The spell cannot be interrupted and the caster does not need to have the spell memorized or even have the spell.

114 ForceSpellPointRES(S:ResRef*,P:Target)
Forces the object running the script to cast the spell specified by the S parameter. P is the spell's target [x.y] point, S is always a SPL filename written with upper case, without the SPL extension. The spell cannot be interrupted and the caster does not need to have the spell memorized or even have the spell.

160 ApplySpellRES(S:ResRef*,O:Target)
Instantly casts the spell on target O object. S is always a SPL filename written with upper case, without the SPL extension. Does not play the casting animations. The spell cannot be interrupted and area effect spells that target multiple objects will only affect the specified target object.

181 ReallyForceSpellRES(S:ResRef*,O:Target)
Forces the object running the script to cast the spell specified by the S parameter. The casting time is 0, the spell is cast instantly. O is the spell's target object, S is always a SPL filename written with upper case, without the SPL extension. The spell cannot be interrupted and the object does not need to have the spell memorized or even have the spell.

191 SpellNoDecRES(S:ResRef*,O:Target*)
Casts a spell on target O object. S is always a SPL filename written with upper case, without the SPL extension. The spell must be memorized by the caster, and it won't be removed from the caster's memory if cast via this action. It is interruptible during casting. The spellcaster must meet the level requirements of the spell.

192 SpellPointNoDecRES(S:ResRef*,P:Target*)
Casts a spell on target P[x.y] point. S is always a SPL filename written with upper case, without the SPL extension. The spell must be memorized by the caster. SpellPointNoDecRES shouldn't remove the spell from the caster's memory but according to tests this part does NOT work (the spell is cast but is also removed from memorized spells.) It is interruptible during casting. The spellcaster must meet the level requirements of the spell.


NOTES:
SpellRES does not always work reliably.

In case of SpellRES() and SpellPointRES(), the ResRef parameter, which is a filename, must be up to 7 characters long (just like all of the original game's spell files); if it's longer than 7 characters, the spell will not be cast, the command will not work. However, it does not have to follow the SPWIxxx (SPPRxxx etc.) file naming convention.

In case of SpellPointNoDecRES(), according to tests the spell is still removed from the caster's memory (from the memorized spells), it is probably a bug. So it works as if it were SpellPointRES (but unlike in case of that spell, here 8-character long filenames are accepted).
Posted by Baronius
 - June 05, 2005, 09:26:46 PM
Quote from: drake127You are right, eight characters does not work but six character do.
Right. The filenames can be up to seven characters. Beside with seven, I've tested it with 6 characters and with 2 as well.

Quote from: drake127SpellPointNoDec remove spell from table of memorizated spells also in its noRES version. It is a bug or I am wrong?
It seems to be a bug. I tested it and it worked for me in the same way as for you.
Posted by igi
 - June 05, 2005, 08:02:55 PM
Yes, I can, and will.
However, I'd prefer a post in the IESDP update forum (even if the post just contains a link to this topic or something), so I don't have to check and remember every forum for IESDP updates. And a post is better than a PM, because I usually forget those as well... :)

And yes, I still do maintain the IESDP, I'm just very, very busy. I did update my local copy with a few things today though :-)
Posted by drake127
 - June 05, 2005, 07:46:47 PM
You are right, eight characters does not work but six character do.

SpellPointNoDec remove spell from table of memorizated spells also in its noRES version. It is a bug or I am wrong?

igi, you can add to IESDP note about these hidden functions.
Posted by Baronius
 - June 05, 2005, 07:22:26 PM
QuoteSpellNoDecRES worked properly also for me. Problem was SpellPointNoDecRES which behaved like SpellPointRES (removed spell from table of memorizated spells).
I see... I will test it again.

QuoteSpell.ids should not be changed. It is point of functions *RES. Action.ids is file to change.
I've accidently written Spell.ids in my post, certainly action.ids must be modified and not spell.ids. Thanks a lot for correcting me, it could have led to a misunderstanding.

QuoteI did not test Spell*RES functions with eight-character names but even seven-character names may not work if they are lowercase (bad: spwi215; good: SPWI215) or maybe if they are not same as they are write to character file (because these actions check if caster knows this spell).
For me, they were exactly written in the same way in the CRE file as in the script file, but spells with 8-character filenames don't work in case of SpellRES and SpellPointRES (they worked okay in case of the other 6 commands).
Posted by drake127
 - June 05, 2005, 07:13:52 PM
SpellNoDecRES worked properly also for me. Problem was SpellPointNoDecRES which behaved like SpellPointRES (removed spell from table of memorizated spells).

Quote from: BaroniusAfter properly added to spell.ids, these actions ca...
Spell.ids should not be changed. It is not related with these (neither other) actions.

I did not test Spell*RES functions with eight-character names but even seven-character names may not work if they are lowercase (bad: spwi215; good: SPWI215) or maybe if they are not same as they are write to character file (because these actions check if caster knows this spell).