Thread: Need CustomData in 3.5E Ruleset
-
April 9th, 2019, 16:22 #1
Need CustomData in 3.5E Ruleset
Hi everybody
I'm using the 3.5E (latest version) rule set for a custom ruleset and I need to send custom data when the player rolls a die.
In the "buildThrow (...)" function, I think it's a good place to insert custom data. But after, in the function "onDiceLanded (draginfo)", no way to find them!
In the function "buildThrow (...)", I add my data in the following way (in 2 different places!?):
Code:local rThrow = {}; rThrow.type = rRoll.sType; rThrow.description = rRoll.sDesc; rThrow.secret = rRoll.bSecret; rThrow.customData = rRoll.aCustomData; ... local rSlot = {}; rSlot.number = rRoll.nMod; rSlot.dice = rRoll.aDice; rSlot.metadata = rRoll; rSlot.customData = rRoll.aCustomData; rThrow.slots = { rSlot }; return rThrow;
Code:function onDiceLanded(draginfo) local sDragType = draginfo.getType(); draginfo.setSlot(1); local vRoll = draginfo.getMetaDataList(); vRoll.sDesc = draginfo.getStringData(); vRoll.aCustomData = draginfo.getCustomData(); Debug.console ("onDiceLanded-decodeActionFromDrag vRoll.sDesc: " .. vRoll.sDesc); OK Debug.console ("onDiceLanded-decodeActionFromDrag vRoll.aCustomData: " .. vRoll.aCustomData); NIL Value !! ...
-
April 9th, 2019, 22:43 #2
I think you will want to append the customdata to the description and then split it back out in onDiceLanded.
-
April 9th, 2019, 22:48 #3
Archangel
- Join Date
- Apr 2008
- Location
- Virginia Beach
- Posts
- 3,096
Yep. That is the only way I have found to do it. Maybe we can sweet talk MW into preserving custom data across a roll in FGU
-
April 10th, 2019, 09:05 #4
-
April 10th, 2019, 09:55 #5
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks