Page 1 of 1

[MOD 0.14 - 0.17] Scanning rocket with radars

Posted: Sun Jan 27, 2019 1:08 pm
by ZwerOxotnik
Image
ImageImageImage
Description
Scans surface after launching a rocket with radars. The radius increases if you launch a rocket with more than 20 radars.
You can change the radius in the mod settings.


Details Versions
  • For Factorio 0.17, use v0.5.3
  • For Factorio 0.16, use v0.3.0
  • For Factorio 0.15, use v0.2.0
  • For Factorio 0.14, use v0.1.0
images
Found an Issue
Want a Feature
Changelog on GitLab

Re: [MOD 0.14 - 0.16] Scan rocket with radars

Posted: Sun Jan 27, 2019 2:44 pm
by darkfrei
May be amount or radars makes scanning radius somehow? Amount = radius or with squares calculated.

Re: [MOD 0.14 - 0.16] Scan rocket with radars

Posted: Sun Jan 27, 2019 2:53 pm
by ZwerOxotnik
darkfrei wrote: Sun Jan 27, 2019 2:44 pm May be amount or radars makes scanning radius somehow? Amount = radius or with squares calculated.
Selecting a scan location after launch or before launch. (Most likely a separate mod)

But I can't do it fast.

Re: [MOD 0.14 - 0.16] Scan rocket with radars

Posted: Sun Jan 27, 2019 3:06 pm
by darkfrei
ZwerOxotnik wrote: Sun Jan 27, 2019 2:53 pm Selecting a scan location after launch or before launch. (Most likely a separate mod)

But I can't do it fast.
You can just get amount of radars and use it as radius.

Another example for satellite map opening you can find here:
https://mods.factorio.com/mod/FogRemover

Re: [MOD 0.14 - 0.16] Scan rocket with radars

Posted: Sun Jan 27, 2019 3:22 pm
by ZwerOxotnik
darkfrei wrote: Sun Jan 27, 2019 2:44 pm May be amount or radars makes scanning radius somehow? Amount = radius or with squares calculated.
code

Re: [MOD 0.14 - 0.16] Scan rocket with radars

Posted: Sun Jan 27, 2019 4:28 pm
by darkfrei
ZwerOxotnik wrote: Sun Jan 27, 2019 3:22 pm
code
Normally radar scans 7x7=49 chunks. It looks like that it has scan radius = 3.5. If this radar is two times powerful then it covers 98 (or 100) chunks, then the radius must be 5.

So:

Code: Select all

if count > 1 then
  local area_size = settings.global["radius-scan-rocket-with-radars"].value * 49
  local radius = area_size^0.5
  force.chart(rocket.surface, {{rocket.position.x - radius,rocket.position.y - radius}, {rocket.position.x + radius, rocket.position.y + radius}})
end