openmw.content issues with ingredient templates
If you use an ingredient's template for patching it, it retains the attributes/skills table and stops working with alchemy.
I was patching ingredients for the unofficial tamriel rebuilt spells and noticed that some ingredients didn't produce the new effects when brewing potions
What they had in common was that the originals had a skill/attribute affecting magic effect on the same slot that i was putting insight/fortifycasting on.
the method i used for patching was records[id] = {template = id, effects = newEffects} where newEffects was a freshly constructed table
for example:
["T_IngCrea_HagravenFeathers_01"] = {
{ id = "DamageMagicka" },
{ id = "FortifyAttack" },
{ id = "WeaknessToShock" },
{ id = "t_restoration_fortifycasting" }, -- originally FortifySkill Conjuration
},
["T_IngSpice_Cinnamon_01"] = {
{ id = "FireDamage" },
{ id = "t_restoration_fortifycasting" }, -- originally RestoreSkill Destruction
{ id = "DamageFatigue" },
},
The fix i settled on was not using template and assigning all the record fields manually. this fixed my problem
potions don't seem to have this problem