pete_smith1229 Posted July 4, 2023 Posted July 4, 2023 I have an idea for a sword/shield combo. Both are non-cursed originally and it's possible to equip either one without repercussion. However, if the character has both equipped at the same time, both items become cursed. Is such a thing possible to do directly with a .BCS script or other means? I noticed opcode "Use EFF file as curse (283)" but no idea what this means. A possible workaround is to tie both items to a script where when both are equipped, it simply replaces the equipped items with a cursed version (meaning I will have to create a cursed and non-cursed version of each item). I'm hoping for a simpler solution... Quote
jmerry Posted July 4, 2023 Posted July 4, 2023 It's an item flag. Swapping it like that would be like turning a two-handed weapon into a one-handed weapon; the only way you can do it is to replace the items. Quote
CamDawg Posted July 4, 2023 Posted July 4, 2023 On the EEs, yes. You can check if both items are equipped, and then use TransformItem to swap the old item(s) to the new, cursed item(s). You can also do it on the originals, but you'll need a lot more commands to remove the old item, add the new one, and then equip it. Quote
jmerry Posted July 4, 2023 Posted July 4, 2023 As for opcode 283 - that's for spell-like curses, which inflict some condition on a creature and can only be removed with Remove Curse. For example, one of the cards in the game you play with Aesgareth inflicts a curse of weakness on you, setting your strength to 6. You can't dispel it; only a Remove Curse can restore your original strength. Quote
pete_smith1229 Posted July 5, 2023 Author Posted July 5, 2023 @CamDawg@jmerry That makes sense about it being an item flag. Currently using IW:EE so will try out the TransformItem() function. I'll ignore opcode 283 for now then but good to know how it's meant to be used. Thank you both! Quote
jastey Posted July 5, 2023 Posted July 5, 2023 21 hours ago, CamDawg said: On the EEs, yes. You can check if both items are equipped, and then use TransformItem to swap the old item(s) to the new, cursed item(s). You can also do it on the originals, but you'll need a lot more commands to remove the old item, add the new one, and then equip it. Wouldn't 278 TakeItemReplace(S:Give*,S:Take*,O:Object*) do the trick in the classic games? Quote
CamDawg Posted July 5, 2023 Posted July 5, 2023 Yes, but IIRC TakeItemReplace doesn't equip the new item so you'd still need to add a few equip actions. Quote
pete_smith1229 Posted July 6, 2023 Author Posted July 6, 2023 On 7/4/2023 at 9:51 PM, CamDawg said: On the EEs, yes. You can check if both items are equipped, and then use TransformItem to swap the old item(s) to the new, cursed item(s). You can also do it on the originals, but you'll need a lot more commands to remove the old item, add the new one, and then equip it. I tested it using 356 TransformItem(S:OldItem*,S:NewItem*), but it doesn't activate the cursed flag for the new item as per the description. Perhaps it's my setup. I'll continue testing before I resort to including additional equip functions... Quote
jmerry Posted July 6, 2023 Posted July 6, 2023 Are you saying that after transforming to the cursed item, you can just unequip it normally? Or are you saying that there's no "Cursed" portrait icon? Because if it's the latter, the portrait icon needs to be an explicit equip effect; you don't get one just for having an item with the "cursed" flag equipped. Quote
pete_smith1229 Posted July 6, 2023 Author Posted July 6, 2023 32 minutes ago, jmerry said: Are you saying that after transforming to the cursed item, you can just unequip it normally? Or are you saying that there's no "Cursed" portrait icon? Because if it's the latter, the portrait icon needs to be an explicit equip effect; you don't get one just for having an item with the "cursed" flag equipped. It's the former but there seems to be a conflict somewhere. Half the time it works, the other half it doesn't until I restart the game. Will need to check this. When it does work, the "Cursed" portrait icon doesn't show up so will have to remedy that too. Thanks! Quote
pete_smith1229 Posted July 6, 2023 Author Posted July 6, 2023 Yeah, there was a logic conflict within the .BCS script I wrote. TransformItem() works perfectly now. Thanks all for your help! Quote
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.