mickabouille Posted October 15, 2022 Share Posted October 15, 2022 I'm under the impression there's a slight issue with the way single/two handed version of weapons is handled with the Breagar NPC. That's not really a big concern because you just have to not use it with this specific axe. There's an axe in this storyline which is a quest reward (and probably also a quest item). It's a single handed axe, and if you switch it to double handed, the dwarf panics and says (after a while) Spoiler I don't like the idea of not having Berronar's Axe with us I don't know how the switch is done. Does it maybe create a copy of the item and then the character detects that he doesn't possess the given item? Quote Link to comment
CamDawg Posted October 15, 2022 Share Posted October 15, 2022 Yeah, the engine doesn't allow for changeable items, so the various Two-Handed X components work by creating clones of existing items. That means that triggers that look for an item also have to look for the clone(s) created by this component--e.g. I had to account for all of the alternates in Item Upgrade, which was a bit of a pain. So, two changes: Tweaks generates these file names on the fly, but does come preloaded with a small set of items so that they get consistent, fixed file names. Tweaks will do this for Breagor's axes as of the next version. Second, I've sent a pull request to @jastey with the necessary changes on Breagar's end. Quote Link to comment
jastey Posted October 15, 2022 Share Posted October 15, 2022 Using the tweak means that Breagar can't use his own axe granted by (spoiler) for some time along the storyline, though - his one hand is insured due to story design. It's not the optimal tweak to go along with Breagar. Thank you for the compatibility fix, but I'm not sure it would work as intended. The line ActionOverride("ACBRE",TakeItemReplace("ACAXE3","ACAXE2","ACBRE") in ACCUT_14.baf should take the existing axe (assuming it's "ACAXE2" from the mod) and replace it with "ACAXE3". If Breagar now has ""c!ax44" instead of "ACAXE2", and you inserted a DestroyItem for that one, the new replacement axe will not be created. Can someone explain why making item changes by making new, differently called items is a preferable way to go? It will break any kind of item check where an axe is supposed to be recognized. You wrote the engine doesn#t allow for changeable items, I don't understand what this means. Maybe this tweak is just not such a good idea? Quote Link to comment
CamDawg Posted October 15, 2022 Share Posted October 15, 2022 25 minutes ago, jastey said: Using the tweak means that Breagar can't use his own axe granted by (spoiler) for some time along the storyline, though - his one hand is insured due to story design. Ah, that throws a wrench in things. I can either adjust the tweak to ignore these axes, or generate them but then make the two-handers unusable by Breagar. 26 minutes ago, jastey said: in ACCUT_14.baf should take the existing axe (assuming it's "ACAXE2" from the mod) and replace it with "ACAXE3". If Breagar now has ""c!ax44" instead of "ACAXE2", and you inserted a DestroyItem for that one, the new replacement axe will not be created. TakeItemReplace always creates the item. So if Breagar has c!ax44, it'll get destroyed by the explicit DestroyItem action, and then acaxe3 will be generated by the TIR even though acaxe2 doesn't exist. 28 minutes ago, jastey said: Can someone explain why making item changes by making new, differently called items is a preferable way to go? It will break any kind of item check where an axe is supposed to be recognized. You wrote the engine doesn#t allow for changeable items, I don't understand what this means. Maybe this tweak is just not such a good idea? It's no so much as the preferred method as it is the only method available. There's no way to make, say, ax1h01.itm be both a one-handed and two-handed axe, as it's a basic item flag that can't be changed via script or opcode. Tweaks ships with a list of known axes and designates known alternatives so if you really need to check for, say, Bala's Axe, you have to check for ax1h07, c!ax4, and cdax4. Two-handed bastard swords and katanas have their own lists, as does the PnP restrictions version of Wear Multiple Protection Items. If they're not on the known list, they get assigned the next available number, and the lists are stored locally in weidu_external/cdtweaks/2da. Yes, this is a colossal PITA--I had to account for all of these alternatives in Item Upgrade--but there's no other way to do it. Quote Link to comment
jastey Posted October 15, 2022 Share Posted October 15, 2022 55 minutes ago, CamDawg said: TakeItemReplace always creates the item. So if Breagar has c!ax44, it'll get destroyed by the explicit DestroyItem action, and then acaxe3 will be generated by the TIR even though acaxe2 doesn't exist. Ah cool, I didn't know that. I spent way too much time to debug this item replacement and got a bit scared it will start again. I should trust your scripting skills more. 55 minutes ago, CamDawg said: I can either adjust the tweak to ignore these axes, or generate them but then make the two-handers unusable by Breagar. This means, in EE Breagar can use two-handed even though the second hand is occupied? Like if equipping a shield, it would get ignored? I don't mind Breagar being able to wield a two-handed axe with one hand, tbh. It's a divine axe granted to him, he should be able to wield it. And if he can't - well, then it's not only a reward but also a punishment, gods are fickle, lol. To show my complete obliviousness: is this tweak also available for oBGII? People should be aware that it's not the best tweak if they want to play the full Breagar story (or that they'll have to carry a weapon he won't be able to use for quite a while, I think from BG1 up to ToB where his hand gets restored). So we just add the compatibility fix, a note in the readme that this tweak clashes with the design of Breagar but that it will work together, and ignore the matter. Quote Link to comment
mickabouille Posted October 15, 2022 Author Share Posted October 15, 2022 (edited) 3 hours ago, jastey said: Using the tweak means that Breagar can't use his own axe granted by (spoiler) for some time along the storyline, though - his one hand is insured due to story design. That's strange because Spoiler After an encounter with a giant, he gets a prosthetic arm? And the arm is equipped as a ring, so the offhand is free? In fact, it's the exact same encounter he gets the axe from Edited October 15, 2022 by mickabouille Quote Link to comment
jastey Posted October 15, 2022 Share Posted October 15, 2022 8 minutes ago, mickabouille said: In fact, it's the exact same encounter he gets the axe from I could have sworn that he got the axe at the first meeting. And the arm after doing something. And an axe upgrade somewhat in ToB. I guess I remember wrong. Quote Link to comment
mickabouille Posted October 15, 2022 Author Share Posted October 15, 2022 (edited) From memory, the giant stole 3 items, the arms from the guardian golem, the axe and a... bowl (was it?) Edited October 15, 2022 by mickabouille Quote Link to comment
polytope Posted October 16, 2022 Share Posted October 16, 2022 This can mess with AI scripts in other ways, two-handed katanas for instance; Hindo's Doom immunizes against Death Magic. Improved AI will not waste time trying to Power Word:Kill someone carrying the original, but may fail to recognize its two-handed copy. SCS tags all such items with ITEM_SLAY etc. but that's another stat to keep track of. Quote Link to comment
CamDawg Posted October 22, 2023 Share Posted October 22, 2023 The Breagar issue was fixed from Breagar's end in v12.1. SCS will either detect and assign proper stats to the dupes (if instaleld after Tweaks), or Tweaks will clone the appropriate stats from the base weapon (if instaleld after SCS). Quote Link to comment
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.