Quickadd and Domain/Choices?
Howdy!
Can anyone fill me in on how quickadd works? Is its function/key just the thingid of a pick? I am trying to do something with SW and Savage Rifts to implement the First Cooy process so that if an intelligent construct has multiple of the same pick, then it is only displayed once on the summary tab (but with an addition of xCount to the displayed name). The example I have is a +1 Attribute feature. The component has the UserSelect component as well, so i have usrChosen1 to work with. I can tag each one as a MultiCopy, and have them list separately. That has this as the summary: Code:
+1 Attribute (Strength) If a pick needs to have a selection, then I add a Helper.DomainCopy tag to it. Once usrChosen1.ischosen <> 0, the pick gets tagged with a User.HasChosen tag. If a pick doesn't have the User.HasChosen tag, then it gets the Helper.MultiCopy tag added otherwise it gets the Helper.ChosenCopy tag. With this, the selections display as: Code:
+1 Attribute (- Choose -) Code:
+1 Attribute (Strength) (x3) [field[xCount].value is 3] Code:
+1 Attribute (Agility) [expecting field[xCount].value is 1 and FirstCopy / OnlyCopy tags] |
These are my Components and scripts at the moment:
Code:
Eval Script from the Mechanic applied to the actor: |
In retrospect, I really wish we had never used "x" as the prefix for "this can be in many compsets". It just ends up looking really bad in the code. Pick a prefix based on the Id of the component these fields are really in, and use that.
From the description of what you need to solve, you don't need the full complexity of a level-based count and index (which looks to be copied from PF1). All you need is single-ability handling. Here's an example script that only needs a single script on this ability, and just needs a generic "value" field to store the number of copies beyond the first on the main copy of the ability - not a special script on a mechanic that has to run even if nothing it applies to is present on the character. Code:
~see if a quickfind has been created by another copy of this ability |
Thank Mathias!
That worked well, and I’m moving it and several other fields of two components into a common one so not doing the same thing twice. Only difficulty I’m seeing is that all versions of the same pick, no matter the Domain/Choice get grouped together with a single FirstCopy. Is there a way with quickadd to take that Domain/Choice into account, or would figuring a workaround with tags and +/- counts be best choice? |
Any ideas on this regarding domain/chosen selections?
|
How many choices are there? If the answer is something small, like 6 attributes, I'd build individual picks for each choice, rather than making the user fill in their names in text or select from a drop-down. This system isn't designed around that sort of test, and I'd need to spend a while figuring out how to adapt it to make the check of whether the quickfind was a matching copy before setting a quickadd, and then making sure that worked with all the combinations, because I think it'll work with one pair, but I think if there's a second set of the same pick you wanted to count, it may not work. For example, if agility is the first one that tries to set a quickfind, and it finds the proper firstcopy and then tests and verifies that that's also agility, so that 2x count will work, but then what about the strength copies - the quickfind will find the first agility copy, and you can verify that you're not a match, but then there's no way to try to quickfind again to tr to find another strength copy.
|
For one item, there's 5 attributes (this is for Savage Worlds) so doing the individual picks works for that. :)
A second item references skills, so that makes anywhere from 12-20 possible picks depending... It would be possible, but would really make for a huge list of selections. What about if I wasn't using quickadd for the whole FirstCopy thing and wanted to create my own procedure for that? In my mind, I'd have to create a sortset to sort by thingid.??? (is that possible?) and use a foreach to tag with Helper.FirstCopy whenever the id+domain changes (and set focus to this pick) and if the next eachpick is the same id+domain then would make it a SpecUp and increase the count on the focus pick... That wouldn't work with findchild[] though would it? because findchild[] uses the quickadd list? |
All times are GMT -8. The time now is 12:08 PM. |
Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.