TALES of the VALIANT
  1. #1

    NPCs added to CT have attack weapons set to unidentified

    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. unident.PNG

  2. #2
    Why not just fix the code in the attacks that has problems with the identification state?

    "isidentified" is the name of the field that controls the identification state. You can force by using DB.setValue(node, "isidentified", "number", 1).

    Regards,
    JPG

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Cosmere RPG Beta Launch

Log in

Log in