Page 1 of 1

[Not needed] Allow deactivation of radar nearby sector scanning

Posted: Sat Oct 12, 2019 2:38 pm
by Deadlock989
It's not currently possible to have a radar that doesn't have any remote viewing but only performs sector scanning. If max_distance_of_nearby_sector_revealed is set to 0, the chunk that the radar is in is still revealed (which looks really odd if the radar happens to be near one corner of the chunk). If it is set to a negative value, the game refuses to load the prototype.

Suggestion/request: setting a negative value for max_distance_of_nearby_sector_revealed disables "remote viewing" and nearby sector updates completely and energy_per_sector is therefore ignored.

Alternatively, a boolean property for whether active scanning is done at all.

Re: [Request] Allow deactivation of radar nearby sector scanning

Posted: Sat Oct 12, 2019 5:31 pm
by darkfrei
It's more simple to have revealing square diameter or side of the square:
scanning_side=0 for no chunks revealing at all, also obviously no energy per scanned chunk;
scanning_side=1 for only one chunk,
scanning_side=2 for area of 2x2 chunks,
scanning_side=3 for area of 3x3 chunks etc.

By the event event.on_sector_scanned must be the bool if the chunk was actually scanned. Why it's sector, but not the chunk?

The radar is one of best friends of modders: it makes an event every N consumed energy.

Re: [Request] Allow deactivation of radar nearby sector scanning

Posted: Sat Oct 12, 2019 5:40 pm
by Deadlock989
darkfrei wrote: Sat Oct 12, 2019 5:31 pm It's more simple to have revealing square diameter or side of the square:
scanning_side=0 for no chunks revealing at all, also obviously no energy per scanned chunk;
scanning_side=1 for only one chunk,
scanning_side=2 for area of 2x2 chunks,
scanning_side=3 for area of 3x3 chunks etc.
This would break every mod on the portal that works with radar.

You can't scan for 2x2 chunks because 2x2 chunks don't have a centre chunk. It's a radius parameter working out from the chunk the radar is in.

Re: [Request] Allow deactivation of radar nearby sector scanning

Posted: Sat Oct 12, 2019 5:43 pm
by darkfrei
Deadlock989 wrote: Sat Oct 12, 2019 5:40 pm This would break every mod on the portal that works with radar.
You can't scan for 2x2 chunks because 2x2 chunks don't have a centre chunk. It's a radius parameter working out from the chunk the radar is in.
Yeah, you are right. So radius=1 for one chunk, radius=2 for the square 3x3, radius=3 for square 5x5?

Re: [Request] Allow deactivation of radar nearby sector scanning

Posted: Sat Oct 12, 2019 5:48 pm
by Deadlock989
darkfrei wrote: Sat Oct 12, 2019 5:43 pm Yeah, you are right. So radius=1 for one chunk, radius=2 for the square 3x3, radius=3 for square 5x5?
That is exactly what max_distance_of_nearby_sector_revealed does now except you are asking for the value to be changed to mean (radius-1) instead, breaking everyone's code.

I requested something which allows for no chunks revealed, but doesn't break everyone's existing code.

Re: [Request] Allow deactivation of radar nearby sector scanning

Posted: Fri Oct 25, 2019 12:39 pm
by posila
Is this actually needed? setting energy_per_nearby_scan to some extreme value (1YJ) should have similar effect to disabling nearby scan entirely.

Re: [Request] Allow deactivation of radar nearby sector scanning

Posted: Fri Oct 25, 2019 3:03 pm
by Deadlock989
posila wrote: Fri Oct 25, 2019 12:39 pm Is this actually needed? setting energy_per_nearby_scan to some extreme value (1YJ) should have similar effect to disabling nearby scan entirely.
Yes, this works, thanks. I didn't think of it, I guess I thought it would just drain all of the energy trying to fulfil that demand.

Re: [Request] Allow deactivation of radar nearby sector scanning

Posted: Fri Oct 25, 2019 3:11 pm
by posila
Deadlock989 wrote: Fri Oct 25, 2019 3:03 pmYes, this works, thanks. I didn't think of it, I guess I thought it would just drain all of the energy trying to fulfil that demand.
We talked with Rseding and we agreed it would be better if there was explicit way how to disable the scanning, so I'll leave the thread here for time being.