PDA

View Full Version : Partysheet Help



Paul Pratt
July 7th, 2014, 16:35
Hello! I am adding some funcitionality to the party sheet to allow for NPC drops. I'd like to have henchmen and hirelings included in the group. So far so good. I have two issues though.

#1. In the order tab when you click a token to open its sheet, the standard CoreRPG will open a "charsheet" windowreference. That is fine, but for the NPC's it adds fields to the .db that just aren't needed. I can change that and have it open everyone as an NPC, again, not what I want but liveable. In the code below, if I could define something for the "xXX" variable I could open the proper sheet. Any ideas? This function is located in the manager_ps.lua and is coming from the ps_list.lua. ps_list is getting the drag info and sends it to addChar(nodeChar) in the manager_ps.lua.

function addChar(nodeChar)
local nodePS = mapChartoPS(nodeChar)
local xXX = Something needed here!!!;

if nodePS then
return;
end

nodePS = DB.createChild("partysheet.partyinformation");

if xXX == "npc" then
DB.setValue(nodePS, "link", "windowreference", "npc", nodeChar.getNodeName());
end
if xXX == "charsheet" then
DB.setValue(nodePS, "link", "windowreference", "charsheet", nodeChar.getNodeName());
end
linkPCFields(nodePS);
end

#2. The party loot works. It distributes coins and items directly to the inventory, but for the NPC's I get two curious things:
A. The item assigned to an NPC is distributed but not removed from the parcel list. PC's work fine.
B. The message does appear that items were distributed to the party, but not the specific assignment message for the NPC. Coins work fine, it reports for both PC's and NPC's.

Any one have any ideas on these two issues? I just started poking around in the party sheet and am not fully familiar with it.

-Paul

Paul Pratt
July 7th, 2014, 23:59
Got both issues resolved. It does require an edit to item_manager, manager_ps_loot, and moving the onDrop function from ps_list to manager_ps. If any one else is trying to do something similar, it comes down to making sure the lists in your npc sheets match the names of the lists in your pc sheets. Then some edits to have the major scripts work with handling the "npc" node of the .db.

Marching on!