Jump to content

Issue and Fix for Mordenkainen's Force Missiles


Recommended Posts

The current code for Mordenkainen's Force Missiles doesn't work  correctly with higher level versions of the spell. Starting at level 13, the projectiles don't animate properly.   After much testing I found the source and a fix: (edit: I found a second fix after I posted this)

1.  The reason for the break is that there is a gap between the first two projectiles in the sequence and the rest.  In my testing with BG2EE 2.5 the first two projectiles are added as numbers 345 and 346,  then 347 is skipped and it picks back up at 348.  Even manually assigning them, or changing the LPF ALTER_SPELL_HEADER portion of the code to account for the gap does not solve the issue.

2. The projectiles still fly a bit squirrley sometimes.  Changing the speed of the second projectile to 20 and removing the "random path" flag makes the projectiles fly much more akin to Magic Missile.  This can be done in NI before adding the projectile, or in WeiDu.  I have made the changes using WeiDu via the TP2 since it appears that the source .pro from IWD (I assume) is exactly the same.

 

 

Changed this:

  ADD_PROJECTILE ~iwdification/pro/cdimfm.pro~
  ADD_PROJECTILE ~iwdification/pro/cdimfm2.pro~

  // ADD_PROJECTILE won't add multiple versions of the same projectile, but it's needed for MFM's special projectile chain - do it manually
  OUTER_FOR (index = (cdimfm2 + 1) ; index < (cdimfm2 + 10) ; ++index) BEGIN

To this:

  ADD_PROJECTILE ~iwdification/pro/cdimfm.pro~
  ADD_PROJECTILE ~iwdification/pro/cdimfm2.pro~
  COPY_EXISTING ~cdimfm2.pro~ ~override~
	WRITE_BYTE 0x0a 20		
	WRITE_LONG 0x2c BIT5 + BIT10
	

  // ADD_PROJECTILE won't add multiple versions of the same projectile, but it's needed for MFM's special projectile chain - do it manually
  OUTER_FOR (index = (cdimfm2) ; index < (cdimfm2 + 10) ; ++index) BEGIN

This corrected the issues for me and allows the projectiles to animate much more like magic missile, which I believe is the desired behavior.  I hope this helps, IWDification is by far one of my favorite mods ever and has been both a huge inspiration and source of ideas for my own mods.  Thank you Cam for your hard work!

Edited by Daeros_Trollkiller
added new fixes
Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...