Jump to content


Photo

ITEM_EFFECT_TO_SPELL and insert_point?


4 replies to this topic

#1 Ulb

Ulb
  • Members
  • 146 posts
  • Gender:Male

Posted 26 August 2017 - 12:52 AM

Hey, it seems insert_point does not work with the ITEM_EFFECT_TO_SPELL function. Is there any way I can force WeiDU to put the effects from my item at the beginning of the spell's header? (Looks like it is putting them at the end by default.)



#2 Wisp

Wisp
  • Modders
  • 1087 posts
  • Gender:Male

Posted 29 August 2017 - 10:09 AM

ITEM_EFFECT_TO_SPELL does not implement a an insert_point variable. I can add one.

 

Edit: Am I correct in thinking that the sane thing is to insert the new effects at the start of the effect block in the same order as they had in the source file (as opposed to reverse order, which is what you would get if each effect was added as the first effect sequentially)?


Edited by Wisp, 29 August 2017 - 10:20 AM.


#3 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6249 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 29 August 2017 - 10:55 AM

... in thinking that the sane thing is ...?

 What insane question. :D So how about an answer: a Toyota.

Realize that you walked in to that.

Erhm, but really aren't you just asking how many-eth the inserted effect should be, and if the mod maker want to set the value to be zero in each one of them, one after another, they become the first one, one after another and so eventually get placed in the reverse order(, as they are set to be the first one, one after another).

 

Also you might want to consider having a default ... say "-1" to be assigned as the last, while the 0 is the very first(and default)... or something as it's unlikely that the mod maker knows the exact amount of the already existing effects, in every case.


Edited by Jarno Mikkola, 29 August 2017 - 11:02 AM.

Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#4 Ulb

Ulb
  • Members
  • 146 posts
  • Gender:Male

Posted 29 August 2017 - 11:53 AM

ITEM_EFFECT_TO_SPELL does not implement a an insert_point variable. I can add one.

 

 

 

That might be a nice additon.

Though in retrospect, adding the effects via 'ADD_SPELL_EFFECT' wasn't as much of a hassle as I thought it would be.

 

Edit: Am I correct in thinking that the sane thing is to insert the new effects at the start of the effect block in the same order as they had in the source file (as opposed to reverse order, which is what you would get if each effect was added as the first effect sequentially)?

 

 

Yeah, I would think so.



#5 subtledoctor

subtledoctor
  • Modders
  • 2164 posts
  • Gender:Male

Posted 29 August 2017 - 06:36 PM

I was gonna say, why not just create it from whole cloth with ADD_SPELL_EFFECT? But I see you got there without me. ;) (Though to be fair, I can imagine circumstances where you would rather not do that.)

Wisp, I think the sane thing is to have the default, and the insert_point values, match other functions such as ALTER_EFFECT. Uniformity is probably more important than figuring out which way seems 'right.' (One of the functions, I forget which - ADD_ITEM_EQEFFECT perhaps? - deviates from the general pattern and it drives me insane every time I encounter it.)

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE




Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users