OpenXcom Forum

Modding => OpenXcom Extended => OXCE Suggestions DONE => Topic started by: Nord on April 20, 2020, 02:40:56 pm

Title: [DONE][Suggestion]sightRange for bases or radar facilities.
Post by: Nord on April 20, 2020, 02:40:56 pm
I desperately need another way of detecting alien bases. Maybe it iss possible to add functionality of sightRange to X-com bases?
Title: Re: [Suggestion]sightRange for bases or radar facilities.
Post by: Meridian on April 20, 2020, 04:40:25 pm
1/ how often is the check performed? once a day? every hour?
2/ what's the detection chance? 100%? 20%?
Title: Re: [Suggestion]sightRange for bases or radar facilities.
Post by: Nord on April 20, 2020, 04:56:00 pm
1. As you want.
2. As you want
:-)
In fact, i think it is not really matters. If you have constantly sweeping radar on some area, measuret in thousands of miles, you can spend another hour or day to discover base.
So, lets say 15-30% chances per day is normal. I think.
But maybe other modders will want to choose chances by ruleset.
By the way, how it works with crafts? 100% once in a hour?
Title: Re: [Suggestion]sightRange for bases or radar facilities.
Post by: Meridian on April 20, 2020, 05:42:13 pm
Xcom crafts are checking every 10 minutes,
chance is RNG::percent(50-(craft->getDistanceTo(alienBase) / sightRange) * 50)
i.e. from 0% to 50% based on distance to alien base

Xcom bases are checking once every month,
chance is fixed 20% (to find the first undiscovered base).
Title: Re: [Suggestion]sightRange for bases or radar facilities.
Post by: Nord on April 20, 2020, 06:05:12 pm
Xcom crafts are checking every 10 minutes,
chance is RNG::percent(50-(craft->getDistanceTo(alienBase) / sightRange) * 50)
i.e. from 0% to 50% based on distance to alien base base).
Well, same formula once per hour looks ggod. Or once per day. Maybe day is better, so craft detectors still be useful.
Title: Re: [Suggestion]sightRange for bases or radar facilities.
Post by: Meridian on April 20, 2020, 08:54:29 pm
ok, will be done.
Title: Re: [Suggestion]sightRange for bases or radar facilities.
Post by: Nord on April 21, 2020, 04:14:38 am
ok, will be done.
This is great, thank you very much.
Title: Re: [Suggestion]sightRange for bases or radar facilities.
Post by: Meridian on May 14, 2020, 07:15:23 pm
sightRange = Range at which the facility can detect alien bases in nautical miles. Zero means "cannot detect".
sightChance = Chance (0-100%) of this facility detecting an alien base that enters its sight range.

Example:

Code: [Select]
facilities:
  - type: STR_SMALL_RADAR_SYSTEM
    sightRange: 2000
    sightChance: 40

Check is done once per day.


Special case: if sightChance = 0, it doesn't mean 0%, but it's a dynamic probability based on the distance between xcom and alien base, using the following formula:

Code: [Select]
chanceToDetect = 50 - (distance * 50 / sightRange); // dynamic 0-50% based on relative distance