Thread: TopSecret SI
-
January 25th, 2021, 04:10 #31
- Join Date
- May 2019
- Posts
- 53
Im trying to create a single field that will take one drag and drop of a single roll. Just like how you do all the rolls under <list_text/> but instead of it being a list, its one single item.
<string name="Weapon1">
<anchored to="weapons" position="insidetopleft" offset="30,40" width="100" />
<font>sheetlabel</font>
<class>cli_rolls</class>
<acceptdrop>
<class>cas</class>
<field>*</field>
</acceptdrop>
<frame>
<name>textline</name>
<offset>2,0,2,0</offset>
</frame>
</string>
-
January 25th, 2021, 06:25 #32
Look at Race and Class
MoreCore - Generic Ruleset
--- Projects ---
Extensions | Tutorials | MoreCore | MoreCore Themes | Call of Cthulhu | Maelstrom | FG Con
-
January 29th, 2021, 06:51 #33
- Join Date
- May 2019
- Posts
- 53
I think i figured it out. I tweaked a version of the cli_rolls class and just added all the weapon stats plus a roll bound to dbdamage. Works good in testing. Its kind of important to do it this way because the attribute links to the weapon skills and that links to the weapon. Each one with its own modifiers being added along the way. Worried it might be too complex without instruction.
Im going to start cleaning things up and try to get a initial copy out there. Hoping to get some feedback.
weaponstest.png
Quick question - is there a way to get the dbdamage to pick up the weapon name?
<stringfield name="weapondmg" >
<anchored to="weaponrng" position="left" offset="20" width="40" />
<tabtarget prev="weaponname" next="weaponrng"/>
<center/>
<frame name="fielddark" offset="7,8,7,8" />
<stateframe>
<hover name="rowshade" offset="7,8,7,8" />
</stateframe>
<script>
function onDoubleClick(x,y)
local dicerolltmp = tostring(window.weapondmg.getValue());
CustomDiceManager.processRoll("dbdamage", dicerolltmp)
end
</script>
</stringfield>Last edited by Pharo; January 29th, 2021 at 07:02.
-
January 30th, 2021, 21:52 #34
- Join Date
- May 2019
- Posts
- 53
Answered my own question .. given enough persistence ..
function onDoubleClick(x,y)
local sParams = tostring(window.weapondmg.getValue());
local rSource = tostring(window.name.getValue());
local rActor = ActorManager.getActor("pc", window.getDatabaseNode().getParent().getParent());
sParams = sParams .." "..rSource;
CustomDiceManager.performAction("dbdamage", nil, rActor, sParams)
end
-
January 31st, 2021, 01:40 #35
Sorry Pharo I missed that there was a Q in there. Well done!
MoreCore - Generic Ruleset
--- Projects ---
Extensions | Tutorials | MoreCore | MoreCore Themes | Call of Cthulhu | Maelstrom | FG Con
-
January 31st, 2021, 07:23 #36
- Join Date
- May 2019
- Posts
- 53
Still so much I want to fix but running out of free time.
Any feedback would be welcome.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks