Nutter4Ever
April 30th, 2019, 00:00
I'm working on the Starfinder starship dice rollers. Not sure how many are familar with it. But heres what I've got so far:
27219
On the screen shot when you click the dice at the end it calls a function that I've traced down that calls:
local nodeChar = window.getDatabaseNode();
local rActor = ActorManager.getActor("pc", nodeChar);
ChatManager.SystemMessage(rActor.sType .. "", false);
ChatManager.SystemMessage(rActor.sName .. "", false);
ActionSkill.performRoll(draginfo, rActor, sSkill, nValue);
Now this is after 3 hours of poking around and on the fly learning Lua, so bear with me.
The chatManager.SystemMessagers were just messages to me so see what the values held, as the dice roll wasn't for Bob, but was for "Audacious Gambit", so I figure that it's taking that part of the screen and trying to make an actor out of it, which given they aren't a PC then it falls flat.
However in the DB.xml we have:
<id-00001>
<public />
<actions>
<public />
<audacious_gambit>
<public />
<attackmod1 type="number">0</attackmod1>
<attackmod2 type="number">0</attackmod2>
<attackmod3 type="number">0</attackmod3>
<attackmod4 type="number">0</attackmod4>
<name type="string">Audacious Gambit</name>
<skill1 type="string">piloting</skill1>
<type type="string">skill</type>
</audacious_gambit>
...
</actions>
<link type="windowreference">
<class>charsheet</class>
<recordname>charsheet.id-00001</recordname>
</link>
<minoractions>...
</minoractions>
<name type="string">Bob</name>
<role type="string">Pilot</role>
<roleclass type="string">officer</roleclass>
<token type="token"></token>
<tokenscale type="number">1</tokenscale>
</id-00001>
As far as I can make out, I need to do something to get up a level in the DB, and then get the name which will return Bob, then I can find Bob as a character sheet, and use that same logic to get the skill required, get the skill from Bob, and then make the dice rolls. But can I figure out how to even get the message box to tell me Bobs name, I cannot.
If anyone has an insight that they could off that would be cool. I need to get some sleep.
Thank you all in advance.
27219
On the screen shot when you click the dice at the end it calls a function that I've traced down that calls:
local nodeChar = window.getDatabaseNode();
local rActor = ActorManager.getActor("pc", nodeChar);
ChatManager.SystemMessage(rActor.sType .. "", false);
ChatManager.SystemMessage(rActor.sName .. "", false);
ActionSkill.performRoll(draginfo, rActor, sSkill, nValue);
Now this is after 3 hours of poking around and on the fly learning Lua, so bear with me.
The chatManager.SystemMessagers were just messages to me so see what the values held, as the dice roll wasn't for Bob, but was for "Audacious Gambit", so I figure that it's taking that part of the screen and trying to make an actor out of it, which given they aren't a PC then it falls flat.
However in the DB.xml we have:
<id-00001>
<public />
<actions>
<public />
<audacious_gambit>
<public />
<attackmod1 type="number">0</attackmod1>
<attackmod2 type="number">0</attackmod2>
<attackmod3 type="number">0</attackmod3>
<attackmod4 type="number">0</attackmod4>
<name type="string">Audacious Gambit</name>
<skill1 type="string">piloting</skill1>
<type type="string">skill</type>
</audacious_gambit>
...
</actions>
<link type="windowreference">
<class>charsheet</class>
<recordname>charsheet.id-00001</recordname>
</link>
<minoractions>...
</minoractions>
<name type="string">Bob</name>
<role type="string">Pilot</role>
<roleclass type="string">officer</roleclass>
<token type="token"></token>
<tokenscale type="number">1</tokenscale>
</id-00001>
As far as I can make out, I need to do something to get up a level in the DB, and then get the name which will return Bob, then I can find Bob as a character sheet, and use that same logic to get the skill required, get the skill from Bob, and then make the dice rolls. But can I figure out how to even get the message box to tell me Bobs name, I cannot.
If anyone has an insight that they could off that would be cool. I need to get some sleep.
Thank you all in advance.