Thread: MoreCore Ruleset
-
May 27th, 2020, 00:59 #2341
- Join Date
- Nov 2019
- Posts
- 282
Got a question. I'm working on the Shadowrun 5e extension.
I have rolls working for it, but when I examine the rTarget it is always nil.
Is there something I need to do other than onLanded to get the rTarget to be populated?
I have a character in the combat tracker with two NPCs targeted.
Also when I do get rTarget working, will it roll once for each target or can I get it to do one roll for all targets?
-
May 27th, 2020, 01:54 #2342
Start at the start.
Start with performAction do you have rTarget info there?
Try something like:
aTargeting = ActionsManager.getTargeting(rActor, nil, rRoll.sType, { rRoll })
Debug.chat("aTargeting: ", aTargeting);
Unless you do something new with the roll it will roll once only.
-
May 27th, 2020, 04:21 #2343
- Join Date
- Nov 2019
- Posts
- 282
aTargeting ends up equaling { #1 = { } } no roll took place on when the code is run.
I checked the rRoll and it looks fine. It rolls using performAction.
I'm using the MoreCore ct with a slight change, I added some fields to be displayed on ct_entry.
Code:function performRoll(draginfo, rActor, nSkillDicePool, nDicePoolModifier, nForce, nLimit, nEdgeDice, sSpellName, sSpellPath, bSecretRoll) local rRoll = { }; rRoll.sType = "sr5spell"; rRoll.aDice = { }; rRoll.nMod = 0; rRoll.nSkillDicePool = nSkillDicePool; rRoll.nDicePoolModifier = nDicePoolModifier; rRoll.nEdgeDice = nEdgeDice; rRoll.nForce = nForce; rRoll.nLimit = nLimit; rRoll.sSpellPath = sSpellPath; rRoll.nDicePool = nSkillDicePool + nDicePoolModifier + nEdgeDice; rRoll.sDesc = "[CASTING SPELL] " .. StringManager.capitalize(sSpellName) .. " roll"; local count = rRoll.nDicePool; while count > 0 do table.insert(rRoll.aDice, "d6"); count = count - 1; end rRoll.bSecret = bSecretRoll; -- ActionsManager.performAction(draginfo, rActor, rRoll); Debug.chat(rRoll); aTargeting = ActionsManager.getTargeting(rActor, nil, rRoll.sType, { rRoll }) Debug.chat("aTargeting: ", aTargeting); end
-
May 27th, 2020, 13:33 #2344
Ive given you bad directions.
MoreCore has targeting support built into the rolls.
Have a look at any of the rolls that already use it - any of the damage rolls or attackac or thac0
-
May 27th, 2020, 14:32 #2345
- Join Date
- Nov 2019
- Posts
- 282
Looking at attackac and thac0 I see the following related to target, both have it in createRoll.
Code:if sTarget then rRoll.nTarget = tonumber(sTarget); Debug.console("nTarget: ", rRoll.nTarget); rRoll.sDesc = sDescriptionParam; else rRoll.sDesc = sParams; end
-
May 27th, 2020, 15:04 #2346
MoreCore and CoreRPG are collecting and presenting that data to the roll.
-
May 27th, 2020, 17:42 #2347
- Join Date
- Nov 2019
- Posts
- 282
Still not sure how sTarget is getting set. I'm guessing it's a global variable.
performRoll calls createRoll.
createRoll uses the above code to look at sTarget.
It never initializes it. So I'm guessing it's a global variable.
I try doing Debug.chat(sTarget) and I get nil.
-
May 27th, 2020, 17:47 #2348
I'm assuming you mean Resistance Rolls, which instead of a text result would be a Value. That Value would be the equivalent to the same roll you've already done except the output would be the equation [6 - highest-roll]. Or more specifically if the person creates a sheet with a variable called "Stress" (I have no idea where they may be tracking that, but call it C4 for now), it would be [C4 + (6 - highest-roll)] (it increases your Stress level, if you will). Except in the case of where you have "Critical Success" where the value would then become [C4 - 1] (where it decreases your stress level, you lucky dog). All of the other rules for the roll you already made otherwise apply (so if the modifiers reduced the number of dice to 0 or less it is the "unskilled" 2d6 roll taking the lowest of the two dice with no need to check for a Critical Success since it is not allowed in that instance.) If the person working on the sheet for this doesn't want to track Stress that way for some reason then the output would simply need to be either the [6 - highest-roll] result as "Gain x Stress", or for a Critical Success as "Reduce Stress by 1".
Last edited by zarlor; May 27th, 2020 at 17:58.
Lenny Zimmermann
Metairie, LA
-
May 27th, 2020, 18:13 #2349
- Join Date
- Dec 2018
- Location
- England, UK
- Posts
- 198
Attack Roll:
/attack 1d2006+1d6+(p1)+(a)+(b)>TN
The two different D6's are used so one will explode only if both roll a 6.
Parameter (p1) is manually entered and is the level of the skill used for the type of attack - Small Arms, Support Weapons, Melee Weapons, etc.
Ref Field (a) is linked to the primary attribute modifier for the skill being used. This is taken from the Stats block on the front MoreCore tab.
Ref Field (b) is linked to the secondary attribute modifier (if required) for the skill being used. This is taken from the Stats block on the front MoreCore tab.
The Target Number (TN) is dependent on the complexity skill being used. Simple Basic is 7 (such as Small Arms), Simple Advanced is 8 (such as Martial Arts).
Attack Roll.jpg
Damage Roll
/btdamage 2d6
The 2d6 determines the hit location on the target.
Parameter (p1) is manually filled in with the weapons Damage Value.
Parameter (p2) is manually filled in with the weapons Damage Type. For this, 1 = Melee, 2 = Ballistic, 3 = Energy, 4 = Explosive
Parameter (p2) is manually filled in with the weapons Penetration (AP) Value.
Damage Roll.jpg
Hopefully this helps explain the rolls for you.
-
May 28th, 2020, 00:35 #2350
- Join Date
- Nov 2019
- Posts
- 282
ok, I was able to get the ActionManager.getTargeting is now working.
I had to delete the character from the combat tracker and re-add the character, making sure it had a token and name. if it didn't have those it still didn't work.
No rolling of dice happens, but I'm getting the targeting information before the roll happens.
It looks like the targeting is now working. There must have been a disconnect between the combat tracker and the character that was causing the issue.
I must have done something to break it at some point and didn't notice.
Thanks, and sorry.
Thread Information
Users Browsing this Thread
There are currently 4 users browsing this thread. (0 members and 4 guests)
Bookmarks