igi Posted January 29, 2005 Share Posted January 29, 2005 Lo folks, Since (I think), we're fixing the empty DO~~ actions, which aren't actually a bug, IIRC, we could also fix the DLTCEP 'errors'. This tp2 script code should fix the 'useless duration' for spells. But, it doesnt work right. It works on equipping effects, and extension header 1, but not any further extension headers. I've a fair idea of the reason why, but, if I work any more on this, I'll implode. Besides, a real weidu ninja will be able to code the entire thing, while standing on their head, while standing on a very hungry lions head. So... COPY_EXISTING_REGEXP GLOB ~.*\.spl~ ~override~ READ_LONG 0x0064 "extendedHeaderOffset" READ_SHORT 0x0068 "extendedHeaderCount" READ_LONG 0x006a "featureBlockOffset" READ_SHORT 0x006e "castingFeatureBlockOffset" READ_SHORT 0x0070 "castingFeatureBlockCount" WHILE NOT (%extendedHeaderCount% = 0) BEGIN READ_SHORT (%extendedHeaderOffset% + 30 + ((%extendedHeaderCount% -1) * 40)) "extendedHeaderFeatureBlockCount" READ_SHORT (%extendedHeaderOffset% + 32 + ((%extendedHeaderCount% -1) * 40)) "extendedHeaderFeatureBlockOffset" WHILE NOT (%extendedHeaderFeatureBlockCount% = 0) BEGIN READ_BYTE (featureBlockOffset + (extendedHeaderFeatureBlockOffset * 48) + 0x000c) "timingmode" PATCH_IF (%timingmode% = 1) BEGIN WRITE_LONG (featureBlockOffset + (extendedHeaderFeatureBlockOffset * 48) + 0x000e) 0 END SET %extendedHeaderFeatureBlockCount% = %extendedHeaderFeatureBlockCount% -1 END SET %extendedHeaderCount% = %extendedHeaderCount% -1 END WHILE NOT (%castingFeatureBlockCount% = 0) BEGIN READ_BYTE (featureBlockOffset + (castingFeatureBlockOffset * 48) + ((castingFeatureBlockCount -1) * 48) + 0x000c) "timingmode" PATCH_IF (%timingmode% = 1) BEGIN WRITE_LONG (featureBlockOffset + (castingFeatureBlockOffset * 48) + ((castingFeatureBlockCount -1) * 48) + 0x000e) 0 END SET %castingFeatureBlockCount% = %castingFeatureBlockCount% -1 END BUT_ONLY_IF_IT_CHANGES EDIT: Btw, my guess to the error: READ_BYTE (featureBlockOffset + (extendedHeaderFeatureBlockOffset * 48) + 0x000c) "timingmode" Doesnt take the 'current' extendedHeader into account. Link to comment
CamDawg Posted January 29, 2005 Share Posted January 29, 2005 READ_BYTE (featureBlockOffset + (extendedHeaderFeatureBlockOffset * 48) + 0x000c) "timingmode" should be READ_BYTE (featureBlockOffset + ((extendedHeaderCount + extendedHeaderFeatureBlockOffset) * 48) + 0x000c) "timingmode" Similarly, WRITE_LONG (featureBlockOffset + (extendedHeaderFeatureBlockOffset * 48) + 0x000e) 0 should be WRITE_LONG (featureBlockOffset + ((extendedHeaderCount + extendedHeaderFeatureBlockOffset) * 48) + 0x000e) 0 Link to comment
igi Posted January 29, 2005 Author Share Posted January 29, 2005 Thanks, it's appreciated. Link to comment
CamDawg Posted May 7, 2005 Share Posted May 7, 2005 This is included in the modder pack in alpha 5. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.