Thread: Targeting Complication...
-
February 15th, 2016, 21:51 #1
Targeting Complication...
I'm working on a piece of my Champions Ruleset where it does a secondary roll based on the results of the Damage Roll. This roll generates something called 'Knockback' which is modified by certain aspects of the target (knockback resistance, if they are 'clinging' to something, if they are 'flying'... stuff like that). Anyway... I need to reference the Target but it seems to be getting lost on me and I'm having trouble tracking down where the target is captured. My ruleset is a subRuleset of CoreRPG and was originally based on but does not share code with 3.5E (code was duplicated and modified, not inherited). Is there a getTarget function or something?
I'm following the 3.5E DamageManager code through and it seems to not need rTarget for some functions but has it at the end when it's time to applyDamage. PerformAction (where it starts) doesn't seem to give a hoot about targets. I am guessing, the target gets retrieved along the way... or is out there floating around somewhere as a variable.. but it seems like the easiest thing to do would be to call rSource and ask it who it's target is when I need it.Last edited by Blackfoot; February 15th, 2016 at 22:02.
Full License Operator - You must have a 'Lite' License to play in my games.
Member and GM in the Fantasy Grounds Pathfinder Society Group.
PFS Fantasy Grounds Forum
FG Community Teamspeak Server: ts.fg-con.com
Interested in Custom Character Portraits and Tokens? Contact me.
-
February 16th, 2016, 01:03 #2
I got around this issue, sort of, by doing my calculations earlier and making the result a Mod.. but it isn't really the 'right way' to do it.. and I can't apply automatic effects or apply damage based on the results since I don't have a target. I do see that PerformAction seems to have the target hidden in the draginfo.. and I presume that the draginfo for my secondary roll is nil. Then I guess the question would be is there an easy way to build draginfo. I also found in the TargetingManager a function for finding an array of targets. I can probably work with that... it's more complicated than I'd like but I think I can sort it out.
Full License Operator - You must have a 'Lite' License to play in my games.
Member and GM in the Fantasy Grounds Pathfinder Society Group.
PFS Fantasy Grounds Forum
FG Community Teamspeak Server: ts.fg-con.com
Interested in Custom Character Portraits and Tokens? Contact me.
-
February 16th, 2016, 01:37 #3
Hrm. New twist... it's only drag targeting that isn't working... so what I really need help with understanding is drag targeting for secondary rolls apparently.
Full License Operator - You must have a 'Lite' License to play in my games.
Member and GM in the Fantasy Grounds Pathfinder Society Group.
PFS Fantasy Grounds Forum
FG Community Teamspeak Server: ts.fg-con.com
Interested in Custom Character Portraits and Tokens? Contact me.
-
February 20th, 2016, 07:47 #4
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,561
Both the token and CT code call CombatManager.onDrop with the parameters ("ct", <CT entry node name>, <draginfo object>).
When the callback registered to ActionsManager.registerResultHandler for the action type is called, the callback is passed the parameters (<source actor>, <target actor>, <roll structure>).
You would want to pass the source and target actor records on to the next roll via ActionsManager.roll(<source actor>, <target actor>, <roll structure>)
The "critconfirm" roll type in the 3.5E ruleset is a good example of this. (see ActionAttack script in the 3.5E ruleset)
Regards,
JPG
-
February 21st, 2016, 03:49 #5
Thanks. That helped a lot. My issue seems to be worked out now.
Thanks again.Full License Operator - You must have a 'Lite' License to play in my games.
Member and GM in the Fantasy Grounds Pathfinder Society Group.
PFS Fantasy Grounds Forum
FG Community Teamspeak Server: ts.fg-con.com
Interested in Custom Character Portraits and Tokens? Contact me.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks