• 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

Clearing situational matrix fields

frumple

Well-known member
I have a template that removes situational modifiers for specific skills. I assume I am going to have to clear the matrices SitList, RacSitList, and NSBSitList. How would one go about doing this? Also how many columns are in these matrices what do the contain?
 
This should be accomplished by changing the original scripts that are adding those situational modifiers so that they no longer apply them under this circumstance, not by removing the entries once added.
 
This is for a template so it can be added to any hero with any race, class selection etc.

To do what you said means every single script (not just the ones I am writing) that adds situational modifiers will need to be changed. Obviously this is not feasible. This is why I need do do this after the fact.
 
Here is the rule: Creature loses all ranks and bonuses to Craft, Knowledge, and Profession skills.

Losing ranks is something that the user can do easily.

Removing bonuses is also easy enough. I just set each bonus field for the skill to 0 in a foreach loop. However, I also need to remove any situational bonuses on these skills as well.

There are also some instances where I need to remove certain other kinds of situational bonuses (for instance bonuses that depend on environment). I figure just comparing the situational text with the key words for what needs to be removed will need to be done to help achieve that.
 
Last edited:
This is a template - doesn't it therefore only affect the bonuses from the racial abilities? Templates normally only modify the race - they don't affect bonuses that were added by a class or feat.
 
Personally, I consider deleting information to be the wrong way to approach things in Hero Lab. I'd just leave it up to the user to ignore the situational modifiers if you can't reasonably use the proper solution of stopping the other things from adding their modifiers.
 
Mostly correct. I need to remove situational modifiers from the race or other templates once this one is applied.

I figured I could also script an adjustment to remove individual situational modifiers as needed.
 
Frumple, I think the best way to stop the situationals is to use an early foreach to disable the racial abilities which apply them. In case we missed including a stop for some of those scripts, Lord Magus' idea might be a good backup.
 
Aaron & Mathias

The problem is trying to do a foreach that catches all the different ways a situational can be applied. As I understand there is no tag I that specifies from what thing a situational is called.

It ties into the larger issue of order of applying templates. A template that changes situationals affects all that exist before it is applied, but not to ones that are applied after. In other words, there is an implied order of operations with templates that makes them different that how classes, feats, etc. are applied.
 
Looking at the stuff in the class level table, it looks like templates have a cIndex field which is set to be their line on that list. The higher it is, the "later" the template was added.

Could you use the cIndex of the current template, foreach through all the racial abilities which come from templates other than your own, and disable them if their templates cIndex field is lower? In the case of several templates with this behavior, only the latest applied will have undisabled abilities, which is what you are shooting for, no?
 
Back
Top