• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Sorting question

TCArknight

Well-known member
Howdy! :)

I have a question regarding sorting that I'm drawing a blank on.

I have a sortset for display with a choosesortset entry:
Code:
  <sortset id="AdvSort" name="Choose Advantages">
    <sortkey isfield="no" id="PointCost"/>
    <sortkey isfield="no" id="_Name_"/>
    </sortset>

Each Advantage may or may not also have a NatCost field to represent the reduced cost of an Advantage for heros from a particular Nationality. When a hero is of that nationality, I'd like the Advantage to show based on the NatCost rather than the PointCost tag.

Is there a simple way to do this? If not, could replacing the value for the PointCost tag with the NatCost value work best?

Thanks!
TC
 
I don't think there's a way to do this, because whether you want to use the NatCost or the PointCost varies depending on tags on the hero, and a sortset has no way to detect those - it can only act on tags and fields on the individual things. And because this is a choose sort set, you can't run any scripts to do any processing, in order to calculate the value of some final field value.
 
Hmmmmm.....

What if there was an ActCost.# tag which was assigned early based on the Nation comparison? By default, it would be assigned with the same value as the PointCost tag, but if the Nation matches, it's assigned with that value? And the sort set would use it instead?
 
You are sorting THINGS, not picks here. That means scripts can't make alterations to the fields and tags on those things before they're added to the character.
 
Last edited:
Back
Top