Jump to content

Weidu, Scripting, and Spells Questions


Caedwyr

Recommended Posts

I've got a couple of questions about whether a couple of skills/HLAs would be possible to implement in BGII and if I can make certain changes to spells via Weidu.

 

1. I would like to use weidu to copy the touch attack spells chooseable by a sorcerer (the ones that create a magic hand attack), and to increase the range property to a greater value, say 50 for example. Is this possible to automate via weidu, and would there be a way to account for other mods that may add new spells? Also, can weidu rename the copies to something else, using a set naming modification method? E.G. the copy SPWI121 becomes SPWI121e, but the original SPWI121 still exists as well.

 

2. Once I have made these changes to the spells, is it possible to script it so as to replace "Bob the sorcerer"'s touch spells, without giving him all of the touch spells, or also giving "Susie the sorcerer" the same changes. Is it also possible to script it such that if Bob learns an new touch spell, the upgraded range version is learned instead? What is necessary, is that Bob's touch spells have increased range, but not Susie's and that any new touch spells that Bob learns will be similarily affected.

 

3. Would it be possible to use weidu to scan the spells to see which ones have increasing duration or damage based on level, and then add additional level headers so as to extend this pattern to say level 40 instead of level 20 (like the spell-50 mod). The tricky part would be to make sure the increase in duration pattern or increase in damage remains the same. The even trickier part would be to program it such that weidu would apply these changes to previously modified spells, such as in 1.

 

 

4. Can Weidu scan for damage type of spells, and generate new spells based on a template. For example, what I'd like to do is scan for elemental damage type. If the spell is Fireball, for example, the weidu would then create Ice, Lightning and Acid versions of Fireball. Then, weidu would generate a .2da file like Spell Immunity's refering to the new Ice, Lightning, Acid, and Fire versions of fireball. Finally, weidu would also generate a new master spell (with set criteria) that would be the spell to cast that would bring up the menu of the subspells.

 

I know how to modify spells in this manner using DLTCP, but I'd like to know if I can automate the process using weidu. An added bonus, would be that weidu could then take into account any mod added spells, or other spells already modified in the problems 1-3 above.

 

 

The real keys, are is weidu modification of spells possible to automate and to use logic tests to determine which spells to modify, and can these new spells generated in weidu be given to a specific individual, without giving it to all members of that class? Finally, is it possible for this script to check and replace any spells learned subsequent to the HLA being given?

 

 

 

Hopefully it isn't too much of a beast. The Cleric remix gives me hope that this is possible.

Link to comment
1. I would like to use weidu to copy the touch attack spells chooseable by a sorcerer (the ones that create a magic hand attack), and to increase the range property to a greater value, say 50 for example.  Is this possible to automate via weidu, and would there be a way to account for other mods that may add new spells?  Also, can weidu rename the copies to something else, using a set naming modification method?  E.G. the copy SPWI121 becomes SPWI121e, but the original SPWI121 still exists as well.

 

You could easily modify the range variable of the magic item that is created on the caster. As for finding new spells that use similar magic item creations... Not off the top of my head without IMMENSE amounts of coding. (Unless you just modified all Magic Created Item types in the game.) When you COPY_EXISTING ~spellitm1.itm~ ~override/spellitm2.itm~ you have effectively created a clone of the original. During the same copy, make your changes to range, and you've created a new version of the item, with new name and range. Leaving the old one unaffected.

 

2. Once I have made these changes to the spells, is it possible to script it so as to replace "Bob the sorcerer"'s touch spells, without giving him all of the touch spells, or also giving "Susie the sorcerer" the same changes.  Is it also possible to script it such that if Bob learns an new touch spell, the upgraded range version is learned instead?  What is necessary, is that Bob's touch spells have increased range, but not Susie's and that any new touch spells that Bob learns will be similarily affected.

 

The way I would do it is to script it in the DPlayer3.bcs. Set a trigger somewhere in the game that identifies the difference from 'Bob' and 'Suzy'. Then in the DPlayer script do a "HasSpell" check. If 'Bob' has spell 'touchspell1', then the script casts another spell that removes the original, and replaces it with the funky new version. Quite easy actually, you'd just need a single block per spell you wish affected.

 

3.  Would it be possible to use weidu to scan the spells to see which ones have increasing duration or damage based on level, and then add additional level headers so as to extend this pattern to say level 40 instead of level 20 (like the spell-50 mod).  The tricky part would be to make sure the increase in duration pattern or increase in damage remains the same.  The even trickier part would be to program it such that weidu would apply these changes to previously modified spells, such as in 1.

 

I don't think I'd want to try this in-game with weidu. Instead I'd use an external program setup to create those spell extentions. (Not impossible, just not worth the labor IMO.) Igi has some neat tools that would help with this. He's also done some similar "extention header creation on the fly" coding recently that'd be right up this alley. *Makes sure he doesn't open any ticking packages in plain brown wrappers he's sure Igi is sending him shortly.* :cry:

 

4.  Can Weidu scan for damage type of spells, and generate new spells based on a template.  For example, what I'd like to do is scan for elemental damage type.  If the spell is Fireball, for example, the weidu would then create Ice, Lightning and Acid versions of Fireball.  Then, weidu would generate a .2da file like Spell Immunity's refering to the new Ice, Lightning, Acid, and Fire versions of fireball.  Finally, weidu would also generate a new master spell (with set criteria) that would be the spell to cast that would bring up the menu of the subspells.

 

I can't see it doing this really. While finding a damage type and changing it is easy, that's IF the hex offset is known. Again, I'd throw this one at Igi. I know he's done similar stuff with his .exe creations. Things like the master spell, etc... would have to at least be partially done by yourself, with only extention header-type changes made by the program itself.

 

The real keys, are is weidu modification of spells possible to automate and to use logic tests to determine which spells to modify, and can these new spells generated in weidu be given to a specific individual, without giving it to all members of that class?  Finally, is it possible for this script to check and replace any spells learned subsequent to the HLA being given?

 

I can see at least one method working to do this. If you follow my example for your #1. If you are going to use a large number of spells, a cutscene with an invis/invul cre running the script would work better IMO than using the DPlayer. (As it can easily get bogged down.) Your HLA could summon this cre with it's script instead of assigning the spell directly as well.

 

Hope that made some sense anyways.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...