| The Black Wyrm's Lair Terms of Use |
Help
Search
Members
Calendar
|
Jul 11 2006, 05:39 PM
Post
#1
|
|
![]() Mod Developer Posts: 210 Joined: 3-December 05 |
Hello
I want to remove all equipment from my creature when it dies. There are 2 solutions: - Set all items to undropable - Use a script The last one doesn't work : IF Die() THEN RESPONSE #100 DestroyAllEquipment() ReallyForceSpellDead(Myself,RED_HOLY_MIGHT) END Any idea? |
|
|
|
![]() |
Jul 12 2006, 11:27 AM
Post
#2
|
|
|
Forum Member Posts: 59 Joined: 22-July 04 |
The creature will drop all of its equipment on death, so the script won't fire until after it's already dropped everything. Undroppable flags are pretty easy; below are examples to flag a single item or all items on a creature.
CODE // for a specific item, replace itemname with resref
COPY_EXISTING foo.cre~ ~override~ READ_LONG 0x2bc "itm_off" ELSE 0 READ_LONG 0x2c0 "itm_num" ELSE 0 FOR (index = 0; index < item_num; index = index + 1) BEGIN READ_ASCII ("%itm_off%" + (0x14 * "%index%")) "item" PATCH_IF ("%item%" STRING_COMPARE_CASE "itemname" = 0) BEGIN READ_BYTE ("%itm_off%" + 0x10 + (0x14 * "%index%")) "flags" WRITE_BYTE ("%itm_off%" + 0x10 + (0x14 * "%index%")) ("%flags%" BOR 0b00001000) // adds undroppable flag END END BUT_ONLY_IF_IT_CHANGES // for all items COPY_EXISTING foo.cre~ ~override~ READ_LONG 0x2bc "itm_off" ELSE 0 READ_LONG 0x2c0 "itm_num" ELSE 0 FOR (index = 0; index < item_num; index = index + 1) BEGIN READ_BYTE ("%itm_off%" + 0x10 + (0x14 * "%index%")) "flags" WRITE_BYTE ("%itm_off%" + 0x10 + (0x14 * "%index%")) ("%flags%" BOR 0b00001000) // adds undroppable flag END BUT_ONLY_IF_IT_CHANGES This post has been edited by CamDawg: Jul 12 2006, 11:28 AM -------------------- The Gibberlings Three - Home of IE Mods
The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release. |
|
|
|
aigleborgne Remove all equipment on death Jul 11 2006, 05:39 PM
Vlasák As for script solution try to read my Non-lethal c... Jul 11 2006, 08:14 PM
aigleborgne Thanks for answer
The trigger "Die" work... Jul 11 2006, 08:50 PM
devSin In Baldur's Gate II, you could use DestroyAllE... Jul 11 2006, 10:15 PM
jastey You could use the area script, with something like... Jul 11 2006, 10:17 PM
aigleborgne It's a mod for BG2-Tutu / BGT, so it should wo... Jul 12 2006, 09:13 AM![]() ![]() |
|
Lo-Fi Version | Time is now: 13th May 2026 - 03:11 AM |