Miloch, on May 11 2009, 04:01 PM, said:
Not at all.
Quote
I'm afraid that's hardcoded. A failed pickpocket attempt is treated as an attack by the engine.
Posted 11 May 2009 - 06:48 AM
Miloch, on May 11 2009, 04:01 PM, said:
Quote
Posted 18 May 2009 - 03:26 AM
aVENGER, on May 11 2009, 02:48 PM, said:
BACKUP ~picking/backup~ AUTHOR ~Taimon and Miloch~ BEGIN ~Pickpocketing Patch~ COPY ~BGMain.exe~ ~BGMain.exe~ READ_BYTE 0x5438c3 p1 READ_LONG 0x5438c4 p2 PATCH_IF (p1 = 0xe8) AND (p2 = 0xffc75935) BEGIN WRITE_BYTE 0x5438c3 0x90 WRITE_LONG 0x5438c4 0x90909090 PATCH_PRINT ~Patched BGMain.exe at address 0x5438c3.~ END ELSE BEGIN PATCH_PRINT ~No patches made to BGMain.exe.~ INNER_ACTION BEGIN AT_EXIT ~setup-picking.exe --uninstall~ END END BUT_ONLY_IF_IT_CHANGESThis works on a patched ToB executable (including the one used in Tutu and theoretically BGT) - a failed pickpocketing attempt does not turn the target hostile. Thank Taimon for the hex references.
Posted 18 May 2009 - 04:54 AM
Miloch, on May 18 2009, 01:26 PM, said:
Quote
Posted 18 May 2009 - 06:55 AM
aVENGER, on May 18 2009, 12:54 PM, said:
Posted 20 May 2009 - 11:00 AM
COPY "bgmain.exe" "bgmain.exe" PATCH_IF ((LONG_AT 0x5437B2) == 0xAA5E6C) THEN BEGIN WRITE_LONG 0x5437B2 0xAA5F22 END ELSE PATCH_PRINT "0xBAADF00D" BUT_ONLY
Posted 20 May 2009 - 11:22 AM
Taimon, on May 20 2009, 07:00 PM, said:
Posted 20 May 2009 - 12:12 PM
Taimon, on May 20 2009, 10:00 PM, said:
Edited by Jarno Mikkola, 20 May 2009 - 12:14 PM.

Markaan Raneshark said:
Darpaek, on 26 January 2010 - 09:58 PM, said:
Miloch, on 07 July 2010 - 07:06 PM, said:
Posted 20 May 2009 - 12:21 PM
Jarno Mikkola, on May 20 2009, 08:12 PM, said:
Posted 21 May 2009 - 01:07 AM
Jarno Mikkola, on May 20 2009, 10:12 PM, said:
Posted 21 May 2009 - 07:19 AM
Taimon, on May 20 2009, 09:00 PM, said:
COPY "bgmain.exe" "bgmain.exe" PATCH_IF ((LONG_AT 0x5437B2) == 0xAA5E6C) THEN BEGIN WRITE_LONG 0x5437B2 0xAA5F22 END ELSE PATCH_PRINT "0xBAADF00D" BUT_ONLY
Quote
Posted 21 May 2009 - 07:25 AM
Miloch, on May 20 2009, 09:22 PM, said:
Posted 21 May 2009 - 09:57 AM
aVENGER, on May 21 2009, 03:25 PM, said:
Posted 21 May 2009 - 10:23 AM
Miloch, on May 21 2009, 07:57 PM, said:
// Taimon and Miloch's EXE patch for re-enabling the PickPocketFailed() trigger COPY "bgmain.exe" "bgmain.exe" PATCH_IF ((LONG_AT 0x5437B2) == 0xAA5E6C) THEN BEGIN WRITE_LONG 0x5437B2 0xAA5F22 END ELSE PATCH_PRINT "0xBAADF00D" BUT_ONLY_IF_IT_CHANGES COMPILE ~RR/RR_CORE/COMPILE/RR#PICKP.BAF~ // compile the new anti-pickpocketing script COMPILE ~RR/RR_CORE/COMPILE/RR#PICKP.D~ // RR's new pickpocket related dialogue // Extend creature scripts COPY_EXISTING_REGEXP GLOB ~^.+\.cre$~ ~override~ // parse through all creatures in the game PATCH_IF (%SOURCE_SIZE% > 0x2d3) THEN BEGIN // file size sanity check (filters out 0 byte files i.e. ALLOW_MISSING) READ_ASCII 0x248 "ovrscript" READ_BYTE 0x270 "allegiance" READ_BYTE 0x271 "general" PATCH_IF (%allegiance% = "128" AND %general% = "1") BEGIN // only patch non-hostile humanoid creatures PATCH_IF NOT FILE_EXISTS_IN_GAME ~%ovrscript%.bcs~ THEN BEGIN // if the override script doesn't exist WRITE_ASCII 0x248 ~RR#PICKP~ #8 // assign RR#PICKP.BCS as the new override script END ELSE INNER_ACTION BEGIN ACTION_IF FILE_EXISTS_IN_GAME ~%ovrscript%.bcs~ AND NOT FILE_CONTAINS_EVALUATED (~%ovrscript%.bcs~ ~RR#PICKP~) BEGIN EXTEND_TOP ~%ovrscript%.bcs~ ~RR/RR_CORE/COMPILE/RR#PICKP.BAF~ // otherwise just extend the script unless it was already done END END // ends inner action END END // end file size sanity check BUT_ONLY_IF_IT_CHANGES
IF
PickPocketFailed([PC])
Allegiance(Myself,NEUTRAL)
See([PC])
!StateCheck(Myself,CD_STATE_NOTVALID)
THEN
RESPONSE #100
StartDialogOverride("RR#PICKP",LastTrigger)
END
Edited by aVENGER, 21 May 2009 - 10:27 AM.
Posted 21 May 2009 - 11:00 AM
aVENGER, on May 21 2009, 05:19 PM, said:
Quote
Edited by Taimon, 21 May 2009 - 11:05 AM.
Posted 21 May 2009 - 12:10 PM
aVENGER, on May 21 2009, 06:23 PM, said:
COMPILE ~rr/rr_core/compile/rr#pickp.baf~ COPY_EXISTING_REGEXP GLOB ~^.*\.cre$~ ~override~ PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN READ_BYTE 0x270 g1 //Allegiance READ_BYTE 0x271 g2 //General PATCH_IF (g1 = 128) AND (g2 = 1) BEGIN //Neutral humanoids only PATCH_IF (~%SOURCE_RES%~ STRING_EQUAL_CASE ~charbase~ = 0) BEGIN //Exclude charbase.cre READ_ASCII 0x248 ~vs~ //Override script PATCH_IF FILE_EXISTS_IN_GAME ~%vs%.bcs~ BEGIN //If override script exists PATCH_IF NOT VARIABLE_IS_SET $df(EVALUATE_BUFFER ~%vs%~) BEGIN //And not already marked SPRINT $df(EVALUATE_BUFFER ~%vs%~) ~%vs%~ //Add to extend buffer END END ELSE BEGIN WRITE_EVALUATED_ASCII 0x248 ~rr#pickp~ #8 //Otherwise add new script END END END END BUT_ONLY_IF_IT_CHANGES ACTION_PHP_EACH df AS i => xs BEGIN EXTEND_TOP ~%xs%.bcs~ ~override/rr#pickp.bcs~ ENDMaybe Taimon has some clever trick that's even more efficient. But whichever method you use, you probably want to exclude charbase.cre as above.
Edited by Miloch, 21 May 2009 - 12:36 PM.
Posted 22 May 2009 - 05:20 PM
Taimon said:
Quote
// part1
OUTER_SET off_part1 = 0x00543667
OUTER_SET len_part1 = 0x1a
OUTER_PATCH_SAVE orig_part1 "" BEGIN
INSERT_BYTES 0x00 len_part1
WRITE_LONG 0x00 0x958b006a
WRITE_LONG 0x04 0xffffff10
WRITE_LONG 0x08 0xcc0d8b52
WRITE_LONG 0x0c 0x8100b773
WRITE_LONG 0x10 0x006c48c1
WRITE_LONG 0x14 0x5b7ce800
WRITE_SHORT 0x18 0xffc7
END
OUTER_PATCH_SAVE patch_part1 "" BEGIN
INSERT_BYTES 0x00 len_part1
WRITE_LONG 0x00 0x90909090
WRITE_LONG 0x04 0x90909090
WRITE_LONG 0x08 0x90909090
WRITE_LONG 0x0c 0x90909090
WRITE_LONG 0x10 0x90909090
WRITE_LONG 0x14 0x90909090
WRITE_SHORT 0x18 0x9090
END
// part2
OUTER_SET off_part2 = 0x005438a2
OUTER_SET len_part2 = 0x44
OUTER_PATCH_SAVE orig_part2 "" BEGIN
INSERT_BYTES 0x00 len_part2
WRITE_LONG 0x00 0xfe6c958b
WRITE_LONG 0x04 0x9589ffff
WRITE_LONG 0x08 0xfffffeac
WRITE_LONG 0x0c 0x858b006a
WRITE_LONG 0x10 0xfffffeac
WRITE_LONG 0x14 0xcc0d8b50
WRITE_LONG 0x18 0x8100b773
WRITE_LONG 0x1c 0x006c48c1
WRITE_LONG 0x20 0x5935e800
WRITE_LONG 0x24 0x8d8bffc7
WRITE_LONG 0x28 0xfffffd44
WRITE_LONG 0x2c 0x8d8b118b
WRITE_LONG 0x30 0xfffffd44
WRITE_LONG 0x34 0x891052ff
WRITE_LONG 0x38 0xfffd9c85
WRITE_LONG 0x3c 0x9c858bff
WRITE_LONG 0x40 0x8afffffd
END
OUTER_PATCH_SAVE patch_part2 "" BEGIN
INSERT_BYTES 0x00 len_part2
WRITE_LONG 0x00 0x8b51006a
WRITE_LONG 0x04 0xb773cc0d
WRITE_LONG 0x08 0x48c18100
WRITE_LONG 0x0c 0xe800006c
WRITE_LONG 0x10 0xffc75947
WRITE_LONG 0x14 0x958b006a
WRITE_LONG 0x18 0xffffff10
WRITE_LONG 0x1c 0xcc0d8b52
WRITE_LONG 0x20 0x8100b773
WRITE_LONG 0x24 0x006c48c1
WRITE_LONG 0x28 0x592de800
WRITE_LONG 0x2c 0x8d8bffc7
WRITE_LONG 0x30 0xfffffd44
WRITE_LONG 0x34 0x52ff118b
WRITE_LONG 0x38 0x90909010
WRITE_LONG 0x3c 0x90909090
WRITE_LONG 0x40 0x8a909090
END
COPY "bgmain.exe" "bgmain.exe"
READ_ASCII off_part1 current_part1 ELSE 0 (len_part1)
READ_ASCII off_part2 current_part2 ELSE 0 (len_part2)
PATCH_IF ("%current_part1%" STRING_EQUAL "%orig_part1%")
AND ("%current_part2%" STRING_EQUAL "%orig_part2%")
THEN BEGIN
WRITE_ASCIIE off_part1 "%patch_part1%" (len_part1)
WRITE_ASCIIE off_part2 "%patch_part2%" (len_part2)
END ELSE PATCH_PRINT "Target bytes don't match. Aborting ..."
BUT_ONLY
Posted 23 May 2009 - 12:35 AM
Taimon, on May 23 2009, 01:20 AM, said:
Posted 23 May 2009 - 01:49 AM
Miloch, on May 23 2009, 10:35 AM, said:
