BFT2020 Posted November 18, 2021 Share Posted November 18, 2021 What is the difference between the two? requirement name="!ItemHasTags" requirement name="ItemHasTags" I understand what happens with the bottom example. If the tag was perkSkullCrusher, then the effect would only apply to items that has that tag. Does the top example mean the opposite? Does it mean it applies to everything but perkSkullCrusher? Or is this just a typo I found in the code? Link to comment Share on other sites More sharing options...
Telric Posted November 18, 2021 Share Posted November 18, 2021 In code, the ! mark stands for not. So the first one says does not have item with the tag of ___. Link to comment Share on other sites More sharing options...
BFT2020 Posted November 18, 2021 Author Share Posted November 18, 2021 Great! Thanks. I thought that was the case but wanted to verify. Link to comment Share on other sites More sharing options...
meganoth Posted November 18, 2021 Share Posted November 18, 2021 (edited) Note that telric only told you about the general use of "!" in many programming languages, something you seem to have known already. And yes, this surely is the most logical explanation. But verified it isn't. Have you seen this used anywhere in vanilla or in a mod ? If yes, why not try it in game if it works as expected? Edited November 18, 2021 by meganoth (see edit history) Link to comment Share on other sites More sharing options...
BFT2020 Posted November 18, 2021 Author Share Posted November 18, 2021 Yes, in Hidden Strike perk. It is used with perkSkullCrusher tag so if it works as intended, swinging a sledgehammer should not grant you any bonuses. I will probably test it out later to verify. I missed it the first time I was looking at the hidden strike code and thought it only applied to items with that tag. I noticed it later and confirmed it was not preventing other weapons from using that perk. Link to comment Share on other sites More sharing options...
Telric Posted November 18, 2021 Share Posted November 18, 2021 A lot of the requirement checks can be used in this way, not just the item tags. You can do: <requirement name="!EntityHasMovementTag" tags="walking"/> for example... I use this to apply an idle animation to my modded entities. Sometimes it doesn't work for some requirements, but the invert="true" parameter usually works if the ! does not. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now