DICE PACKS BUNDLE
Page 232 of 331 First ... 132 182 222 230 231 232 233 234 242 282 ... Last
  1. #2311
    Quote Originally Posted by damned View Post
    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.
    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

  2. #2312
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    24,754
    Blog Entries
    1
    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

  3. #2313
    Quote Originally Posted by damned View Post
    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
    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
    What I don't see is where sTarget is defined.

  4. #2314

  5. #2315
    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.

  6. #2316
    Quote Originally Posted by damned View Post
    Now how does this other Blades roll need to work?
    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

  7. #2317
    Quote Originally Posted by damned View Post
    Hey Brotherkelly

    Could you please provide a description of the rolls syntax?
    I have changed /attack to /atkatow to fit with the other rolls.
    I have added these two icons.



    Attachment 36075
    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.

  8. #2318
    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.

  9. #2319
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    24,754
    Blog Entries
    1
    Quote Originally Posted by zarlor View Post
    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".
    So confirming (ill use c5 for various reasons) the resistance roll will output the same graphical dice and will output
    Your Stress is increased by (6-highest result with exception for unskilled)
    - or -
    Your stress is reduced by 1.

    and it will adjust c5 by the same value?

    Thanks for the descriptions.

  10. #2320
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    24,754
    Blog Entries
    1
    Quote Originally Posted by Brotherkelly View Post
    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).


    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.
    Many thanks. Ill add this with caveat I have renamed the attack to /atkatow

Page 232 of 331 First ... 132 182 222 230 231 232 233 234 242 282 ... Last

Thread Information

Users Browsing this Thread

There are currently 4 users browsing this thread. (0 members and 4 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Refer a Friend

Log in

Log in