alloowishus
June 21st, 2023, 04:40
I am using a custom modded Rolemaster Classic ruleset, but I think it still applies. In the Combat tracker there is a ct_host_entry_section.xml with a <script> tag. I was able to get to the PC from the window using this:
local rActor = ActorManager.resolveActor(window.getDatabaseNode() );
local nodeCreature = ActorManager.getCreatureNode(rActor);
nodeCTAttacker = ActorManager.getCTNode(nodeCreature);
local sClass, sNodeName = DB.getValue(nodeCTAttacker, "link", "", "");
local sActorType = ActorManager.getRecordType(rActor);
local nodeChar = DB.findNode(sNodeName);
However this doesn't work for an NPC, I am trying to find a piece of data (called "maxpace") on their character sheet, if I run the above code I can't seem to go any further than the CT entry, whereas I want the master NPC data sheet. Any ideas? Thank you in advance!
local rActor = ActorManager.resolveActor(window.getDatabaseNode() );
local nodeCreature = ActorManager.getCreatureNode(rActor);
nodeCTAttacker = ActorManager.getCTNode(nodeCreature);
local sClass, sNodeName = DB.getValue(nodeCTAttacker, "link", "", "");
local sActorType = ActorManager.getRecordType(rActor);
local nodeChar = DB.findNode(sNodeName);
However this doesn't work for an NPC, I am trying to find a piece of data (called "maxpace") on their character sheet, if I run the above code I can't seem to go any further than the CT entry, whereas I want the master NPC data sheet. Any ideas? Thank you in advance!