Jump to content

BPv177 Compatibility


Taimon

Recommended Posts

You may experience a crash, when installing BPv177 before SCSII Smarter Priests. BPv177 gives the shadow druids some swords, so they fight two-weapon-style. SCSII also tries to arm them appropriatly and decides to give them a two-handed staff. That will leave them with a sword in the off-hand and a staff in the main hand.

The engine will refuse to display the animation (two-handed weapon used, but there is something in the shield slot) and crash the game.

 

/Edit (updated due to missing TWOHANDED):

Quickfix would be to simply add an EQUIP and TWOHANDED to this line in priest/priest.tph (l. 435):

ADD_CRE_ITEM ~staf01~ #0 #0 #0 ~NONE~ ~WEAPON1~

 

So it should read:

ADD_CRE_ITEM ~staf01~ #0 #0 #0 ~NONE~ ~WEAPON1~ EQUIP TWOHANDED

Link to comment

Another crash causer is cefald01.cre.

BP adds an effect and (strangely) decides to put the effects between spell memo info and memorized spells.

Your macro "wipe_and_reset_spells" does not handle this correctly and which will yield to a wrong effects offset in cefald01.cre. (when installing "Slightly Improved Faldorn")

 

I know you can't anticipate all the strange things other mods might do to the CRE structure. However, since your mod is more likely to be updated, I decided to rewrite the macro instead of changing only a couple lines in the BPv177 tp2.

There has been some WeiDU developement in the meantime, so the code should look cleaner and you don't have to deal with offsets at all.

DEFINE_PATCH_MACRO ~wipe_and_reset_spells~ BEGIN
REMOVE_MEMORIZED_SPELLS
REMOVE_KNOWN_SPELLS
DEFINE_ARRAY spell_types BEGIN
	"PRIEST"	// 0
	"WIZARD"	// 1
	"INNATE"	// 2
END
INNER_ACTION BEGIN
	COPY - ~%filename%~ ~.../inlined/new_spells.2da~
		COUNT_2DA_ROWS 0 ~rowcount~
END
FOR (i=0;i<~%rowcount%~;i=i+1) BEGIN
	INNER_ACTION BEGIN
		COPY - ~%filename%~ ~.../inlined/new_spell.2da~
			READ_2DA_ENTRY ~%i%~ 0 0 ~spell_name~
			READ_2DA_ENTRY ~%i%~ 1 0 ~spell_type~
			READ_2DA_ENTRY ~%i%~ 2 0 ~spell_lev~

			// no evaluation of variables in ADD_MEMORIZED_SPELL, so workaround
			SPRINT spell_type $spell_types(~%spell_type%~)
			<<<<<<<< .../inlined/add_memorized
			ADD_MEMORIZED_SPELL ~%spell_name%~ #%spell_lev% ~%spell_type%~
			>>>>>>>>
			COPY - ~.../inlined/add_memorized~ ~.../inlined/add_memorized~
				EVALUATE_BUFFER
	END
	PATCH_REINCLUDE ~.../inlined/add_memorized~
END
END

Link to comment

Archived

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

×
×
  • Create New...