Jump to content

My contribution to this mod


Recommended Posts

IWD-ification is by far one of my favorite mods, and inspired me to become a modder last year.  I would like to contribute to the cause!  One of the things I felt was missing in this mod was that the hit visuals are still in BG-style, which for me was kinda jarring.  I put together the below code for one of my mods that I am working on.  It sets the hit visuals to IWD-style for BG games.  I'd be honored if you would consider including it as an optional component.  Please feel free to change the files from my prefix (dtk) to yours for consistency's sake.   And I certainly wouldn't be offended if you changed any of the code to make it cleaner/more compatible/efficient.  Even though I have been learning WeiDu for over a year now, I still feel like I'm a novice when I look at some of the code you guys create.

 

The required files are attached in the .zip

 

///////////////////////////////////////////////////
//Change all hit visual effects to IWD-style //////
///////////////////////////////////////////////////
BEGIN @1000

COPY ~iwdification_hit/bam~ ~override~
COPY ~iwdification_hit/vvc~ ~override~
COPY ~iwdification_hit/wav~ ~override~



COPY_EXISTING ~dmgtypes.2da~ ~override~

  SET_2DA_ENTRY 2 1 2  ~*~
  SET_2DA_ENTRY 2 2 2  ~dtkfirhh~
  SET_2DA_ENTRY 2 3 2  ~dtkfirhl~
  	    SET_2DA_ENTRY 7 1 2  ~*~
	    SET_2DA_ENTRY 7 2 2  ~dtkelchh~
		SET_2DA_ENTRY 7 3 2  ~dtkelchl~
		  SET_2DA_ENTRY 8 1 2  ~*~
		  SET_2DA_ENTRY 8 2 2  ~coldh~
		  SET_2DA_ENTRY 8 3 2  ~coldl~
			    SET_2DA_ENTRY 10 1 2  ~*~
				SET_2DA_ENTRY 10 2 2  ~dtkacihh~
 PRETTY_PRINT_2DA
 
	
COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~		//remove old hit visual effects to prevent conflicts
	READ_BYTE 0x18 flags
		PATCH_IF ((flags & BIT2) = BIT2) BEGIN // don't care if not droppable
			LPF DELETE_EFFECT INT_VAR silent = 1 check_headers = 1 match_type = 1 match_opcode = 215 STR_VAR match_resource = shacid END // remove manual hit visual to avoid conflict with IWD DMGTYPES.2DA changes
			LPF DELETE_EFFECT INT_VAR silent = 1 check_headers = 1 match_type = 1 match_opcode = 215 STR_VAR match_resource = poison END // remove manual hit visual to avoid conflict with IWD DMGTYPES.2DA changes
				LPF DELETE_EFFECT INT_VAR silent = 1 check_headers = 1 match_type = 2 match_opcode = 215 STR_VAR match_resource = shacid END // remove manual hit visual to avoid conflict with IWD DMGTYPES.2DA changes
				LPF DELETE_EFFECT INT_VAR silent = 1 check_headers = 1 match_type = 2 match_opcode = 215 STR_VAR match_resource = poison END // remove manual hit visual to avoid conflict with IWD DMGTYPES.2DA changes
					LPF DELETE_EFFECT INT_VAR silent = 1 check_headers = 1 match_type = 3 match_opcode = 215 STR_VAR match_resource = shacid END // remove manual hit visual to avoid conflict with IWD DMGTYPES.2DA changes
					LPF DELETE_EFFECT INT_VAR silent = 1 check_headers = 1 match_type = 3 match_opcode = 215 STR_VAR match_resource = poison END // remove manual hit visual to avoid conflict with IWD DMGTYPES.2DA changes
						LPF CLONE_EFFECT INT_VAR silent = 1 check_headers = 1 match_type = 1 match_opcode = 12 match_parameter2 = 4194304 opcode = 215 parameter2 = 0 parameter1 = 0 timing = 0 dicenumber = 0 dicesize = 0 STR_VAR resource = dtkmaghh  END // adds IWD hit visual effect for magic to items that do magic damage
						END
						BUT_ONLY 
				
COPY_EXISTING_REGEXP GLOB ~^.+\.spl$~ ~override~		//remove old hit visual effects to prevent conflicts
			LPF DELETE_EFFECT INT_VAR silent = 1 check_headers = 1 match_type = 1 match_opcode = 215 STR_VAR match_resource = shacid END // remove manual hit visual to avoid conflict with IWD DMGTYPES.2DA changes
			LPF DELETE_EFFECT INT_VAR silent = 1 check_headers = 1 match_type = 1 match_opcode = 215 STR_VAR match_resource = poison END // remove manual hit visual to avoid conflict with IWD DMGTYPES.2DA changes
				LPF DELETE_EFFECT INT_VAR silent = 1 check_headers = 1 match_type = 2 match_opcode = 215 STR_VAR match_resource = shacid END // remove manual hit visual to avoid conflict with IWD DMGTYPES.2DA changes
				LPF DELETE_EFFECT INT_VAR silent = 1 check_headers = 1 match_type = 2 match_opcode = 215 STR_VAR match_resource = poison END // remove manual hit visual to avoid conflict with IWD DMGTYPES.2DA changes
					LPF CLONE_EFFECT INT_VAR silent = 1 check_headers = 1 match_type = 1 match_opcode = 12 match_parameter2 = 4194304 opcode = 215 parameter2 = 0 parameter1 = 0 timing = 0 dicenumber = 0 dicesize = 0 STR_VAR resource = dtkmaghh  END // adds IWD hit visual effect for magic to spells that do magic damage
				BUT_ONLY 

COPY_EXISTING_REGEXP GLOB ~^.+\.spl$~ ~override~		//Magic Missile
  READ_LONG   0x08 name
	  PATCH_IF ((name = 12052) OR (name = 12072) OR (name = 26426) OR ( name = 25892)) BEGIN
				LPF DELETE_EFFECT INT_VAR silent = 1 check_headers = 1 match_type = 1 match_opcode = 141 END // remove existing lighting effect from specific spells to avoid conflicts with new hit visuals
	END
	BUT_ONLY

COPY_EXISTING_REGEXP GLOB ~^.+\.spl$~ ~override~		//Skull Trap
  READ_LONG   0x08 name
	  PATCH_IF ((name = 12072) OR (name = 26426) OR (name = 25892)) BEGIN
				LPF ALTER_EFFECT INT_VAR silent = 1 check_headers = 1 match_type = 1 match_opcode = 215 STR_VAR resource = dtknechh END // modify hit visual for skull trap spells
	END
	BUT_ONLY
	
COPY_EXISTING ~spin104a.spl~ ~override~  //Larloch's Minor Drain
	LPF DELETE_EFFECT INT_VAR silent = 1 check_headers = 1 match_type = 1 match_opcode = 215 END // remove existing lighting effect from specific spells to avoid conflicts with new hit visuals
		BUT_ONLY IF_EXISTS

COPY_EXISTING ~spwi119a.spl~ ~override~  //Larloch's Minor Drain
	LPF DELETE_EFFECT INT_VAR silent = 1 check_headers = 1 match_type = 1 match_opcode = 215 END // remove existing lighting effect from specific spells to avoid conflicts with new hit visuals
		BUT_ONLY IF_EXISTS

COPY_EXISTING ~wand03.itm~ ~override~  //Wand of Magic Missiles
	LPF DELETE_EFFECT INT_VAR silent = 1 check_headers = 1 match_type = 1 match_opcode = 141 END // remove existing lighting effect from specific spells to avoid conflicts with new hit visuals
		BUT_ONLY IF_EXISTS

COPY_EXISTING ~wand12.itm~ ~override~  //Wand of Magic Missiles (second version in BG1)
  READ_LONG   0x0c name
	  PATCH_IF (name = 6689) BEGIN
	LPF DELETE_EFFECT INT_VAR silent = 1 check_headers = 1 match_type = 1 match_opcode = 141 END // remove existing lighting effect from specific spells to avoid conflicts with new hit visuals
		END
		BUT_ONLY IF_EXISTS

 

 

 

iwdification_hit.zip

Edited by Daeros_Trollkiller
added info
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...