DICE PACKS BUNDLE
  1. #1

    Creating Class Kits

    I'm currently trying to create class kits for all classes and I can't find where to write the class name in the item entry for the tracker to add it when prompting a player to add it automatically.

    class_kit_item.png

    I've tried writing it on category, after "Class Kit", before "Class Kit", and all other text boxes and nothing seems to work.

  2. #2
    Solved.

    I found the script that manages it and I found out that the item name must be [class name] + class kit.

    function addClassKit(_, nodeChar)
    GlobalDebug.consoleObjects("CharManager.addClassKi t. nodeChar = ", nodeChar);
    local sClassLevel = DB.getValue(nodeChar, "classlevel", "");
    if sClassLevel ~= "" then
    local sClass = string.match(sClassLevel, "^(.+)%s+%d+");
    if (sClass or "") ~= "" then
    local sItemName = sClass .. " class kit";
    local aItemPaths = { "reference.equipment", "reference.weapon", "reference.armor", "reference.magicitems", "item" };
    local nodeItem = nil;
    -- Get item nodes globally
    local itemMatchNode = ManagerGetRefData.getRecordGlobally(sItemName, aItemPaths);
    if itemMatchNode then
    nodeItem = ItemManager.addItemToList(DB.createChild(nodeChar, "inventorylist"), "item", itemMatchNode, false, 1);
    -- Trigger new_item automation on the added item
    AutomationManager.processAutomation(nodeChar, nodeItem, "new_item");
    end
    end
    end
    end

  3. #3
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,362
    Good investigative skills!
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

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
  •  
FG Spreadshirt Swag

Log in

Log in