Jump to content


Photo

The Unkillables


  • Please log in to reply
23 replies to this topic

#21 seanas

seanas
  • Modder
  • 1906 posts

Posted 20 January 2007 - 09:04 AM

It's a problem between BG2 Fixpack and BP.

really? can you tell me where, so i can fix it for the next release?

"A simple test of the relative merits of science and religion is to compare lighting your house at night by prayer or electricity" - A. C. Grayling
"EFF files have saves, too." - CamDawg
|| this is radio seanas || BP Series v3 || seanas at work ||


#22 pro5

pro5
  • Modder
  • 722 posts

Posted 20 January 2007 - 09:30 AM

If we take KPTROL03 as example, Fixpack is doing this:


// new troll scripts to transform to dead versions at low HP
COPY_EXISTING ~troll01.bcs~ ~override/drshnl02.bcs~
~troll01.bcs~ ~override/eletro03.bcs~
~troll01.bcs~ ~override/kptrol23.bcs~
~troll01.bcs~ ~override/pptroll2.bcs~
~troll01.bcs~ ~override/sutroll2.bcs~
~troll01.bcs~ ~override/torgal2.bcs~
DECOMPILE_BCS_TO_BAF
REPLACE_TEXTUALLY ~ChangeAnimationNoEffect("TROLL02")~ ~ChangeAnimationNoEffect("%DEST_RES%")~
COMPILE_BAF_TO_BCS

// create 'dead' or 'knocked down' versions of 'special' trolls
COPY_EXISTING ~drshnl01.cre~ ~override/drshnl02.cre~
~eletro01.cre~ ~override/eletro03.cre~
~kptrol03.cre~ ~override/kptrol13.cre~
~pptroll1.cre~ ~override/pptroll2.cre~
~sutroll.cre~ ~override/sutroll2.cre~
~torgal.cre~ ~override/torgal2.cre~
WRITE_SHORT 0x24 1 // current HP
WRITE_SHORT 0x46 10 // natural AC
WRITE_SHORT 0x48 10 // effective AC
WRITE_BYTE 0x5a 100 // resist cold
WRITE_BYTE 0x5b 100 // resist electricity
WRITE_BYTE 0x5f 100 // resist magic cold
WRITE_BYTE 0x60 100 // resist slashing
WRITE_BYTE 0x61 100 // resist crushing
WRITE_BYTE 0x62 100 // resist piercing
WRITE_BYTE 0x63 100 // resist missile
WRITE_BYTE 0x23c 9 // dexterity
WRITE_BYTE 0x270 255 // enemy
PATCH_IF ("%SOURCE_RES%" STRING_COMPARE_CASE "kptrol03" = 0) BEGIN
WRITE_ASCII 0x248 ~kptrol13~ #8 // race script
END ELSE
PATCH_IF ("%SOURCE_RES%" STRING_COMPARE_CASE "drshnl01" = 0) BEGIN
WRITE_ASCII 0x248 ~drshnl03~
END ELSE
PATCH_IF ("%SOURCE_RES%" STRING_COMPARE_CASE "torgal" = 0) BEGIN
WRITE_ASCII 0x248 ~torgal3~ #8 // race script
END ELSE BEGIN
WRITE_EVALUATED_ASCII 0x248 ~%SOURCE_RES%~ // new script
END
WRITE_ASCII 0x250 ~~ #32 // blanks all other script references
// item changes
READ_LONG 0x2bc "itm_off"
READ_LONG 0x2c0 "itm_num"
FOR (index = 0 ; index < itm_num ; index = index + 1) BEGIN
READ_ASCII ("%itm_off%" + (0x14 * "%index%")) "item"
PATCH_IF (
("%item%" STRING_COMPARE_CASE "monhp1" = 0) OR // so they can die
("%item%" STRING_COMPARE_CASE "trollreg" = 0) OR // can't regenerate
("%item%" STRING_COMPARE_CASE "trollspi" = 0) // makes dead spirit troll invisible
) BEGIN
WRITE_ASCII ("%itm_off%" + (0x14 * "%index%")) ~trolldie~
END
END

// add monhp1 item to trolls to prevent death; assign script to force transformation to dead form at low HP
COPY_EXISTING ~drshnl01.cre~ ~override~
~eletro01.cre~ ~override~
~kptrol03.cre~ ~override~
~pptroll1.cre~ ~override~
~sutroll.cre~ ~override~
~torgal.cre~ ~override~
ADD_CRE_ITEM ~monhp1~ #0 #0 #0 ~NONE~ ~AMULET~
PATCH_IF ("%SOURCE_RES%" STRING_COMPARE_CASE "kptrol03" = 0) BEGIN
WRITE_ASCII 0x248 ~kptrol23~

END ELSE
PATCH_IF ("%SOURCE_RES%" STRING_COMPARE_CASE "drshnl01" = 0) BEGIN
WRITE_ASCII 0x248 ~drshnl02~
WRITE_ASCII 0x258 ~drshnl01~ // restore Nith's attack script, pt 2: assign script
END ELSE
PATCH_IF ("%SOURCE_RES%" STRING_COMPARE_CASE "eletro01" = 0) BEGIN
WRITE_ASCII 0x248 ~eletro03~
END ELSE
PATCH_IF ("%SOURCE_RES%" STRING_COMPARE_CASE "pptroll1" = 0) BEGIN
WRITE_ASCII 0x248 ~pptroll2~
END ELSE
PATCH_IF ("%SOURCE_RES%" STRING_COMPARE_CASE "sutroll" = 0) BEGIN
WRITE_ASCII 0x248 ~sutroll2~
END ELSE
PATCH_IF ("%SOURCE_RES%" STRING_COMPARE_CASE "torgal" = 0) BEGIN
WRITE_ASCII 0x258 ~torgal2~ #8 // race script
END


That last bit is undone by BP's reshuffling of this CRE:

COPY_EXISTING ~KPTROL03.CRE~ ~override~
WRITE_SHORT 0x24 ~88~ // CurrHP (was 70)
WRITE_SHORT 0x26 ~88~ // MaxHP (was 70)
WRITE_BYTE 0x234 ~8~ // HighestLevelPrimary (was 6)
WRITE_BYTE 0x235 ~1~ // HighestLevelSecond (was 30)
WRITE_BYTE 0x239 ~100~ // StrBon (was 0)
WRITE_ASCII 0x248 ~KPTROL03~ #8 // Override (was NONE)
WRITE_ASCII 0x250 ~BPPRIE8A~ #8 // Class (was KPTROL03)
BUT_ONLY_IF_IT_CHANGES

Edited by pro5, 20 January 2007 - 09:34 AM.


#23 pro5

pro5
  • Modder
  • 722 posts

Posted 20 January 2007 - 09:51 AM

Now that I've posted it, BG2 Fixpack isn't ideal either... :whistling:

This line
~kptrol03.cre~ ~override/kptrol13.cre~
should be
~kptrol03.cre~ ~override/kptrol23.cre~

otherwise the troll simply disappears instead of falling down.

#24 seanas

seanas
  • Modder
  • 1906 posts

Posted 20 January 2007 - 11:41 AM

cool. cool. looks like i've got some find/replace-ing to do.

"A simple test of the relative merits of science and religion is to compare lighting your house at night by prayer or electricity" - A. C. Grayling
"EFF files have saves, too." - CamDawg
|| this is radio seanas || BP Series v3 || seanas at work ||