alloowishus
January 8th, 2025, 14:55
Having attacks set to identified causes problems, I am trying to find out how to make sure they are all set to identified when added to the CT. There is a function in the manager_combat2.lua in my ruleset called "onNPCPostAdd"
-- Setup Attacks
for _, nodeWeapon in pairs(DB.getChildren(tCustom.nodeCT, "weapons")) do
if DB.getValue(nodeWeapon, "name", "") == "" and DB.getValue(nodeWeapon, "type", "") == "" then
nodeWeapon.delete();
else
ItemManager2.UpdateToCoreRPG(nodeWeapon);
DB.setValue(nodeWeapon, "open", "windowreference", "item", "");
DB.setValue(nodeWeapon, "locked", "number", 0);
end
end
Any ideas on how I would set the weapons to "identified" and make sure that the DB.xml is populated with the information as if I clicked on "identified" icon? Thanks. 63166
-- Setup Attacks
for _, nodeWeapon in pairs(DB.getChildren(tCustom.nodeCT, "weapons")) do
if DB.getValue(nodeWeapon, "name", "") == "" and DB.getValue(nodeWeapon, "type", "") == "" then
nodeWeapon.delete();
else
ItemManager2.UpdateToCoreRPG(nodeWeapon);
DB.setValue(nodeWeapon, "open", "windowreference", "item", "");
DB.setValue(nodeWeapon, "locked", "number", 0);
end
end
Any ideas on how I would set the weapons to "identified" and make sure that the DB.xml is populated with the information as if I clicked on "identified" icon? Thanks. 63166