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

For technical discussions and help
Post Reply
Baheven
Posts: 1
Joined: Sat Feb 25, 2017 4:14 am

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

Post 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.
User avatar
johnnylump
Site Admin
Posts: 1262
Joined: Wed Nov 11, 2015 4:12 am

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

Post 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.
Post Reply