-
July 22nd, 2020, 18:19 #1
Is there a reason why holder/owner of NPC cannot end turn?
I loathe overwriting ruleset code but sometimes its the only way I can get something done the way I want it. But this one I just had to overwrite - I'm curious why this is not part of the coreRPG ruleset already. Nobody who controls an NPC can end turn because of this code. Is there any logic to why it is not doing what I've written below?
Code:-- overwritten version of CoreRPG\scripts\manager_combat.lua handleEndTurn() because it would not allow player controlled NPC's to advance next round. function handleEndTurn(msgOOB) local rActor = ActorManager.getActorFromCT(CombatManager.getActiveCT()); local sActorType, nodeActor = ActorManager.getTypeAndNode(rActor); if sActorType == "pc" then if nodeActor.getOwner() == msgOOB.user then CombatManager.nextActor(); end else -- Allow holder of npc to advance to next turn. if nodeActor.getOwner() == msgOOB.user then CombatManager.nextActor(); else local aHolders = nodeActor.getHolders(); for _,sHolder in pairs(aHolders) do if sHolder == msgOOB.user then CombatManager.nextActor(); break; end end end end end
[Anything I talk about ever is UNITY and 5E or coreRPG - in this case coreRPG code here]Last edited by SilentRuin; July 22nd, 2020 at 18:25.
Free(Forums/Forge) Extension(FGU 5E):
Paid (Forge) Extension(FGU 5E):
-
July 22nd, 2020, 22:00 #2
I think it's becasue the player doesn't actually 'own' the character; it's still owned by the DM.
If there is something that you would like to see in Fantasy Grounds that isn't currently part of the software or if there is something you think would improve a ruleset then add your idea here https://www.fantasygrounds.com/featu...rerequests.php
-
July 22nd, 2020, 22:25 #3
By that reasoning I should not be able to see it either then? For sure, we do see it and depending on the holder status (true (can unlock), false (stays locked)) we can actually modify the entry itself when its a true holder. But we can't advance the tracker? That sounds... less than optimal
Gist being - if I can own it (as a holder or in testing as my same login) I should be able to advance the turn for sure. You can't. I'd argue that even if I'm a holder where its locked (as it is when you control an NPC in my case) I should still be able to end the turn.
Keep in mind it does not work when you "own" it or when you are a holder with ownership privileges. The DM always has to advance to next actor in the combat tracker for you - this seems unreasonable to me.
But - I don't know all the in's and out's of coreRPG just use in 5E - so maybe there is an underlying "owner" reason as you state. If so though, I'm not understanding what it could be.Free(Forums/Forge) Extension(FGU 5E):
Paid (Forge) Extension(FGU 5E):
-
July 23rd, 2020, 00:06 #4
There are many, many things that could (shoudl?) be included but arent.
It could be because no one has ever asked, or because it just hasnt climbed to the top of anyones list or because it conflicts with something else.
Who knows?
-
July 23rd, 2020, 03:09 #5
Well, part of this modification was that the NPC was not even considered as something a player could end turn on even if they owned it - was hoping I could add a holder on the combat tracker NPC node for the player is using...
Code:nodeEntry.addHolder(nodeChar.getOwner(), false);
But something in code I can't see prevents that from ever happening.
You can only do all or nothing. So I'm forced to give the ability to unlock and edit the CT NPC node with...
Code:nodeEntry.addHolder(nodeChar.getOwner(), true);
Free(Forums/Forge) Extension(FGU 5E):
Paid (Forge) Extension(FGU 5E):
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks