Zieg
July 14th, 2021, 16:52
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.
48194
I've tried writing it on category, after "Class Kit", before "Class Kit", and all other text boxes and nothing seems to work.
Zieg
July 15th, 2021, 13:35
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.addClassKit. 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
Trenloe
July 15th, 2021, 19:59
Good investigative skills! :)
Powered by vBulletin® Version 4.2.1 Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.