Page 1 of 1

Newbie modder looking for veteran advice: Applying visual indicators [willing to compensate for support]

Posted: Sat Feb 25, 2017 4:48 am
by Baheven
Hello! I am a newbie just starting to mod with XCOM 2. I am trying to locate the code related to the visual circle indicator surrounding civilians during retaliation missions.

I want to copy this indicator and place it on unactivated enemy units. Then, set the diameter of the circle indicator to the enemy unit's sight range.

I have read through a few mod guides and tutorials but I have yet to find any related to this idea.

If there are any veteran modders that have time this weekend for a few hours to discuss, I willing to offer some monetary compensation for some modding consultation.

Thank you.

Re: Newbie modder looking for veteran advice: Applying visual indicators [willing to compensate for support]

Posted: Mon Feb 27, 2017 12:54 am
by johnnylump
This isn't a simple request, and I'm afraid I don't have time to give you a full modding tutorial, but I'll toss down some places to start poking around.

The function XComUnitPawn.AttachRangeIndicator puts the rings around units.

The class X2UnitRadiusManager makes sure they are updated. In vanilla it's only active for terror missions; we added a config hook to let other missions add it.

You might also look at how we did the visual indicator ring for the range of the Close Encounters perk.

I should add the rings have been giving us some trouble on some of our new missions.