Jump to content


Photo

A little help with a spell?

spell mod modding summon

  • Please log in to reply
No replies to this topic

#1 temnix

temnix
  • Member
  • 983 posts

Posted 22 July 2016 - 12:24 PM

Hello everyone. I'm making a couple of spells for the BG series, using BGEE actually. But the spells should be simple enough to be compatible with other versions of the series. It's a bit of a secret what the spell is, but what I want it to do is either one of these two things:

 

1) Look through the inventory of the entire party, check for a certain item, then replace it with another item. This was my first choice of mechanic. I made a script for this - a long script, because checks have to be made for all of the party members and for several items -  and made it the default AI script of an invisible creature. The script also has DestroySelf() two seconds after it runs those checks. Well, it works just fine - the creature appears, does what it needs to do and goes away.

 

The problem is, I've only been able to summon it through LUA for testing, but I can't seem to do it through the actual spell. I made some scrolls, pointed them to the SPL file, and the SPL uses Summon Creature. However, all Summon spells in the games are targeted, even Find Familiar - you get a cursor and click where you want the creature to pop up. That's no good. The invisible creature I made is just a convenience, a script-bearer, it's not supposed to actually exist. It needs to come and vanish without any targeting. So I need some kind of summon effect that would not use Any Point Within Range. I tried pointing the summon effect to Self or None, but it doesn't seem to work. So my question is, how do I handle invisible creatures (which are just wonderful for a lot of things) without making it obvious that some kind of summoning is taking place?

 

2) As I scratched my head over this, I thought that if I had to live with targeting I could instead write a different script that would search and replace the item in the inventory of just one character instead of going through the whole party. I guess I could use Remove Inventory Item and then Create Inventory Item. But there are two problems here: a) the remove-create change is supposed to be a transformation, the first changes into the second. E.g. turn a potion of healing into a potion of strength. That implies an IF-THEN - if the targeted creature has the item, only then remove it and put the other thing in its place. I don't see how to do that through the effects list. b) there are actually three replacement pairs: if the first item exists, then replace it, then (else) if the second exists, then replace it, and if the second isn't there but the third is, do that for the third. I have even less of an idea how to implement that.

 

But I have to figure it out. In the case of the potion of healing changing to a strength potion, unless I can make those checks, I'll end up just creating a strength potion out of the blue.

 

Whoever can help me out with the first idea or the second will get a place in the credits, I promise.

 

Screen - now trying to go with Preset target, whatever that means...

 

screen.jpg







Also tagged with one or more of these keywords: spell, mod, modding, summon