Posted by: Miloch

I thought the reference was clear. No one posted an alternate set of alter-this-and-that functions, so there is no need for "two [sets of functions] enter; one [set of functions] leaves". I'm not adding two functions for adding item/spell headers, I'm not arbitrarily adding one of them and I'm deferring adding one or the other based on its merits until a later date because I'm busy with getting this thing to run on BGEE now.

Oh, I see. And I just watched that movie too but I'm just a half-orc. So basically it requires someone to review the code options and come up with the best/most versatile function, aye?

Posted by: Wisp

I thought the reference was clear. No one posted an alternate set of alter-this-and-that functions, so there is no need for "two [sets of functions] enter; one [set of functions] leaves". I'm not adding two functions for adding item/spell headers, I'm not arbitrarily adding one of them and I'm deferring adding one or the other based on its merits until a later date because I'm busy with getting this thing to run on BGEE now.

Posted by: CamDawg

Alright, I've uploaded these to my site. I didn't update BG2FP's version yet since I'll need to re-point all of the calls in the tp2 and I didn't want you to wait on me. Here's the new library and the accompanying documentation. Enjoy!

as the macro names? I went back and forth on the plural/singular and just decided to make them singular, even though they could all patch multiples. A few other additions you'll see when the revised macros go up--BG/IWD durations now goes both ways, and the TobEx flags for backstab and non-invis targeting have been added to the soon-to-be-former cd_item_alter_header.

Posted by: Wisp

A late addition, but what do you say about changing the "area cre" function into "area actor" and renaming the cre_name variable into either just name or actor_name? Other functions and tools generally refer to this substructure as "actor", rather than "cre".

Posted by: Wisp

I declare Thunderdome on the itm/spl header stuff. Alternatively, if nothing happens, I will be reviewing/adapting/complementing it at some unspecified time in the future.

Cam's alter-this-and-that functions (from BG2-Fixpack on github) will be in, under new names. The name format is ALTER_FOO_BAR instead of cd_foo_alter_bar. (Assuming I can swing it in a nice manner, I will also be making fj_* and sc#* functions available under compliant aliases.)

PATCH_IF (fv = 0) AND NOT (GAME_IS ~bg1 totsc~) BEGIN LAUNCH_PATCH_FUNCTION FJ_CRE_EFF_V2 END END PATCH_IF (fv != 0) AND (GAME_IS ~bg1 totsc~) BEGIN LAUNCH_PATCH_FUNCTION T-CRE_EFF_V1 END ENDOtherwise, it will convert BGEE CREs to v1 EFFs, which is an epic fail.

While we're at it, we should implement a GAME_IS ~bgee~ check (look for oh2010.are or the like). [Edit: also means GAME_IS ~bg1~ and ~totsc~ need to include && not ~bgee~ or the above will make no difference.]

Edit: oh and as I think I mentioned elsewhere, all references to the functions need to be uppercased or they'll fail (there's at least one t-CRE_EFF_V1 somewhere else I think).

Posted by: Miloch

Might as well add FJ_SPL_ITM_REINDEX since it isn't big. I haven't used it frequently but there is some infrequent usage, and it isn't huge. Offhand I can't say whether GeN1e's functions are useful or tested. Should definitely add some version of add_spell/item_header. The one I posted appears to be somewhat more comprehensive than GeN1e's and also combines both spell and item editing to reduce maintenance. Also, it's in use in some mods in final beta testing, and appears to work. I guess I could produce documentation (eventually) - lack of that has never stopped WeiDU heh. The parameters are mainly just references to IESDP values.

Edit: in response to Galactygon, I would be suspicious of any WeiDU functions that are notably "slow during install" unless you're calling them 100s or 1000s of times. Even fj_are_structure being the monster it is takes less than a second or so per call. Might want to double-check the code. Most of the functionality is already available, with the exception of being able to change effects. I do have some similar functions as perhaps does plainab but would have to double-check them.

Posted by: the bigg

Posted by: Galactygon

I have written a series of macros that work as a search function for spell and item effects, so one could dynamically look for certain effects, and then do any of the following: add, change, or delete new effects. One major feature that I also have written is their ability to insert effects anywhere in the effects list.

The drawback is that the execution of these macros is slow during install.

I would be more than happy to contribute, and I would like to see some sort of community standard with regards to having a powerful and effective way to deal with finding, adding, deleting, and duplicating effects from spells/items. If you download SpellPack, much of the code can be found in SpellPackB6/Macros/spl_itm_effect.tph.