• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

ADS crosshair removal not... removing?

Shino

New member
Kinda what the title says. Tried to do something simple on xml modlet and remove the crosshair from ironsights. 
In theory it should be as simple as just setting the CrosshairOnAim property as false. Unfortunately that isn't happening for me.

I have tried using the xpath as 
 

<set xpath="/items/item[contains(@name, 'gun') and not( contains(@name,'Bow') or contains(@name, Nail) or contains(@name, 'Explosive'))]/property[@name='CrosshairOnAim']/@value">false</set>



But ultimately settled for readability and went for 

<set xpath="/items/item[contains(@name, 'gun') or contains(@name,'Gun')]/property[@name='CrosshairOnAim']/@value">false</set>
<set xpath="/items/item[contains(@name, 'Bow')]/property[@name='CrosshairOnAim']/@value">true</set>
<set xpath="/items/item[contains(@name, 'Nail')]/property[@name='CrosshairOnAim']/@value">true</set>
<set xpath="/items/item[contains(@name, 'Explosive')]/property[@name='CrosshairOnAim']/@value">true</set>



And also went into the item_modifier xml and did a

<set xpath="/item_modifiers/item_modifier/item_property_overrides/property[@name='CrosshairOnAim']/@value">false</set>




All enclosed into <config> tags.


Problem is, it isn't working. Tested in A21 and V1.0 and neither seem to be doing it.
What's worse, checked the logs and the game ISN'T complaining about anything regarding that modlet.

What could I be doing wrong? Any advice is welcome and thanked before hand!

 
Is it not working at all? Also, are you meaning to be setting the lines for Bow, Nail, and Explosive to true and not false? I don't see any obvious issues, and if the game isn't throwing any yellow warnings, I'd think it is working. Only other thing is look at the ConfigDumps for the save you are testing in and see what they look like.

 
Is it not working at all? Also, are you meaning to be setting the lines for Bow, Nail, and Explosive to true and not false? I don't see any obvious issues, and if the game isn't throwing any yellow warnings, I'd think it is working. Only other thing is look at the ConfigDumps for the save you are testing in and see what they look like.
Not at all. The configdumps show no change being made on neither of those and the console doesn't even throw a warning. I've tried writing an incorrect xpath syntax to see if it would, and it does then. But other than that, I'm actually confused as to what could be happening here. This should remove the ADS crosshair, leaving you with the actual weapon sight. But after loading into a world, the sight is still there. 

Also, didn't remove the Bow and nailgun bc neither of those have sights (compound bow and crossbows are better with sights) and the rocket launcher has its sights slightly misaligned so I decided to keep it.

 
Not at all. The configdumps show no change being made on neither of those and the console doesn't even throw a warning. I've tried writing an incorrect xpath syntax to see if it would, and it does then. But other than that, I'm actually confused as to what could be happening here. This should remove the ADS crosshair, leaving you with the actual weapon sight. But after loading into a world, the sight is still there. 

Also, didn't remove the Bow and nailgun bc neither of those have sights (compound bow and crossbows are better with sights) and the rocket launcher has its sights slightly misaligned so I decided to keep it.
I'm dumb and forgot the load-order for modlets goes BOTTOM UP instead of TOP DOWN. 
That's why no changes were being made, they were being overriden by another mod. Lmao.

Anyways, added a 1. in front of the modlet name and it magically worked. 

 
Back
Top