Jump to content

RFC: the Weapon Changes component should read Proficiency, not Type


Recommended Posts

I have repeatedly run into install order issues, mostly between IR and Faiths & Powers, but also possibly/potentially with other mods, where the other mod will change some weapon’s item types and IR will then misread the weapon. 

Example: FnP tries to diversify the various Large Swords do that op181 can be used effectively; so it moves bastard swords to #22, formerly used by morning stars. IR then reads bastard swords as morning stars, and applies the morning star animation and damage. 

There are several possible solutions:

1) Faiths and Powers could just, not do what it does?

2) Users can make sure to install IR before FnP

3) IR’s code can read weapons by proficiency instead of type. 

I think #3 seems better for compatibility, and functionally identical for what it does. The item type numbers are totally arbitrary; players’ interaction is to choose proficiencies so weapon modifications should be responsive to that. 

This might require a bit of compatibility code if IR is installed after one of the CDTweaks components that merges proficiencies. Alternatively… I’ve never seen a mod pay attention to ITEMCAT.IDS but maybe 4) FnP could record its changes there, and IR could read weapon types from that file rather than using static values. 

Hmm, now #4 sounds like it might be best. I’m happy to code up the changes (planning to, in fact)… but I would appreciate any input as to which method would be the most effective/resilient/compatible.

EDIT - I’m not sure #4 is actually workable, as that IDS file lacks a bunch of entries by default, and has no way yo distinguish among various different “large swords.” Proficiency + animation seems like a much better way to handle the tricky cases (e.g. morning star vs. flail, or scimitar vs. wakizashi vs. ninja-tō).

Edited by subtledoctor
Link to comment
4 hours ago, subtledoctor said:

3) IR’s code can read weapons by proficiency instead of type. 

If you take a gander at item_rev\lib\identify_item.tpa, you'll see that its approach varies on a 'by need' basis. Some items are identified by item type, some by proficiency, some by both, and some by a combination of item type, proficiency, animation, and even strength requirement due to particularly tricky to identify item types (and the more elaborate it is, the more likely something will slip through the cracks, especially once you start throwing in mod-added content). It seems to be specifically designed around vanilla oBG2 and issues may indeed arise if another mod goes and makes changes to the ecosystem. Take, for example, your problematic morning star: in oBG2, morning stars and flails use the same proficiency and animation, and IR's Weapon Changes wishes to globally change all morning stars (including any added by other mods!) to the mace proficiency. Luckily, item type identifies the difference between morning star (0x16) and flail (0x17), so it just uses that...but if your mod or someone else's changed that, then how might you identify which is which? Different but similarly reliable methods would have to be determined that work across both oBG2 and the EEs (and hopefully the majority of mod-added content) if you want to go changing the item type identification process.

Edited by Bartimaeus
Link to comment
4 hours ago, Bartimaeus said:

If you take a gander at item_rev\lib\identify_item.tpa, you'll see that its approach varies on a 'by need' basis

Yes, I just adjusted that a bit. I have a version working now that modifies some of the checks to use proficiencies instead of item types, while using other checks to distinguish tricky ones like morning stars/wakizashi/ninja-to. This version works normally in an otherwise vanilla install, and gets 85% of the way to proper compatibility with FnP. A small function for targeted compatibility takes care of the last 15%. I have added the change to my branch of the mod. If anyone wants to look over the differences, they are within that file,  item_rev\lib\identify_item.tpa

Link to comment
3 hours ago, subtledoctor said:

Yes, I just adjusted that a bit. I have a version working now that modifies some of the checks to use proficiencies instead of item types, while using other checks to distinguish tricky ones like morning stars/wakizashi/ninja-to. This version works normally in an otherwise vanilla install, and gets 85% of the way to proper compatibility with FnP. A small function for targeted compatibility takes care of the last 15%. I have added the change to my branch of the mod. If anyone wants to look over the differences, they are within that file,  item_rev\lib\identify_item.tpa

Only obvious thing I can see is that flails can be animations FL, F0, F1, or F3. Beyond that, it's just testing across different game types with and without the main component installed to make sure that nothing funky happens (as IR's subcomponents, such as Weapon Changes, are largely supposed to be agnostic with regards to whether the main component is installed - i.e. they should still ideally work even if the main component hasn't done its complete .itm overwrite, which...at times can be troublesome when you're trying to get compatibility between all different game types). Realistically, it'd probably be difficult to identify any potential problems short of someone making a real install and playing while specifically keeping an eye out for anything weird.

Edited by Bartimaeus
Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...