[MOD 0.13.0] Satellite Radar

Topics and discussion about specific mods
Shrooblord
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Thu May 12, 2016 12:57 pm
Contact:

Re: [MOD 0.12.x] Satellite Radar

Post by Shrooblord »

Qon wrote:Qonsider
Lol

Thanks for your updates to another's mod, Qon! :D
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD 0.12.x] Satellite Radar

Post by Qon »

Shrooblord wrote:
Qon wrote:Qonsider
Lol

Thanks for your updates to another's mod, Qon! :D
Glad you like it!

I was seriously qonsidering not sharing my bugfixes with the community though because of the NC license. Maybe I won't do it another time. This time the changes was fairly small, but I want to avoid releasing things under NC if possible. Mods should be free. Mods restricting your freedom instead of increasing it is just backwards.

And I do like Q, but find it lacking in most words so I have to squeze it in whenever I can q:
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
TrojanEnder
Burner Inserter
Burner Inserter
Posts: 16
Joined: Fri May 06, 2016 8:41 pm
Contact:

Re: [MOD 0.12.x] Satellite Radar

Post by TrojanEnder »

Found a mod I'd like compatibility with. Orbital Ion Cannon has a recent feature with auto-targeting. It uses a radar type device kind of like the launch mod. As soon as I place it it get's replaced by your radar. Would love it if you could make this an exception. Thanks!
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD 0.12.x] Satellite Radar

Post by Qon »

TrojanEnder wrote:Found a mod I'd like compatibility with. Orbital Ion Cannon has a recent feature with auto-targeting. It uses a radar type device kind of like the launch mod. As soon as I place it it get's replaced by your radar. Would love it if you could make this an exception. Thanks!
I have made unofficial updates to both mods. Read last post on page 2 in this thread for the sat radar update.
Satellite radar: compatability with ALL mods (past, present, future)
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
TrojanEnder
Burner Inserter
Burner Inserter
Posts: 16
Joined: Fri May 06, 2016 8:41 pm
Contact:

Re: [MOD 0.12.x] Satellite Radar

Post by TrojanEnder »

Qon wrote:
TrojanEnder wrote:Found a mod I'd like compatibility with. Orbital Ion Cannon has a recent feature with auto-targeting. It uses a radar type device kind of like the launch mod. As soon as I place it it get's replaced by your radar. Would love it if you could make this an exception. Thanks!
I have made unofficial updates to both mods. Read last post on page 2 in this thread for the sat radar update.
Satellite radar: compatability with ALL mods (past, present, future)
Skimmed everything looking for the solution. Should have seen this. Thanks! Wish there was an appropriate way to make this version even more visible.
User avatar
Wakaba-chan
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Mon May 30, 2016 6:39 am
Contact:

Re: [MOD 0.12.x] Satellite Radar

Post by Wakaba-chan »

Hello,
Thank you for cool mod!
But tried it with Ion Cannon mod and your mod replaced all auto-tracking radars from that mod :c I wish I could have both of them in game. I corrected your control.lua like this

Code: Select all

function BuiltEntity(event)
  if event.created_entity.[b]name=="radar" [/b]and event.created_entity.name~="launch-control-center" and event.created_entity.name~="train-tracker" then  
    local e = event.created_entity
    local s = e.surface
    local p = e.position
    local f = e.force
    local d = e.direction
    level=CalculateLevel(0)
    if level>0 then
      e.destroy()
      s.create_entity{name = "radar"..level, position = p, force = f, direction = d}
    end
  end
end

script.on_event(defines.events.on_entity_died, function(event)
  local e = event.entity
  local X = e.position.x
  local Y = e.position.y
  local s = e.surface
  if [b]e.name=="radar" [/b]and e.name~="launch-control-center" and e.name~="train-tracker" then
    local ghost = s.find_entities_filtered({area={{X-0.5,Y-0.5},{X+0.5,Y+0.5}}, type = "entity-ghost"})
    if ghost[1]~= nil then
      ghost[1].destroy()
    end
    s.create_entity{name = "entity-ghost", position = {X,Y}, inner_name = "radar", force = e.force}
  end
end)
I.e. I changed "e.type = "radar" to "e.name = "radar" so that only vanilla radar would be replaced.
Is this correct? Or there are some more deep changes need to be done?
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD 0.12.x] Satellite Radar

Post by Qon »

Wakaba-chan wrote:Hello,
Thank you for cool mod!
But tried it with Ion Cannon mod and your mod replaced all auto-tracking radars from that mod :c I wish I could have both of them in game. I corrected your control.lua like this

Code: Select all

function BuiltEntity(event)
  if event.created_entity.[b]name=="radar" [/b]and event.created_entity.name~="launch-control-center" and event.created_entity.name~="train-tracker" then  
    local e = event.created_entity
    local s = e.surface
    local p = e.position
    local f = e.force
    local d = e.direction
    level=CalculateLevel(0)
    if level>0 then
      e.destroy()
      s.create_entity{name = "radar"..level, position = p, force = f, direction = d}
    end
  end
end

script.on_event(defines.events.on_entity_died, function(event)
  local e = event.entity
  local X = e.position.x
  local Y = e.position.y
  local s = e.surface
  if [b]e.name=="radar" [/b]and e.name~="launch-control-center" and e.name~="train-tracker" then
    local ghost = s.find_entities_filtered({area={{X-0.5,Y-0.5},{X+0.5,Y+0.5}}, type = "entity-ghost"})
    if ghost[1]~= nil then
      ghost[1].destroy()
    end
    s.create_entity{name = "entity-ghost", position = {X,Y}, inner_name = "radar", force = e.force}
  end
end)
I.e. I changed "e.type = "radar" to "e.name = "radar" so that only vanilla radar would be replaced.
Is this correct? Or there are some more deep changes need to be done?
I also updated this mod. Read the posts just above yours. No, you can't use BB code within a code tag. Code tags are there so that

Code: Select all

[b][/b]
doesn't get converted to bold. It's their purpose.

And no, that won't work. There are other places that needs fixes and you can't check for name = "radar" on some of them, like you do on on_entity_died, because the mod replaces all "radar" with satellite radars when built. So no vanilla radar entities will ever be placed down. It also has a script for replacing all satellite radars when you send up satellites that you did not update. Your changes will not be sufficient. Your radars will not be upgraded automatically by launching satellites. If your radars get destroyed they will not have a radar ghost placed, so your qonstruction bots will not rebuild it.

Use my unofficial update version or diff my changes. Good luck :)
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
User avatar
Wakaba-chan
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Mon May 30, 2016 6:39 am
Contact:

Re: [MOD 0.12.x] Satellite Radar

Post by Wakaba-chan »

Qon wrote:And no, that won't work. There are other places that needs fixes and you can't check for name = "radar" on some of them, like you do on on_entity_died, because the mod replaces all "radar" with satellite radars when built. So no vanilla radar entities will ever be placed down. It also has a script for replacing all satellite radars when you send up satellites that you did not update. Your changes will not be sufficient. Your radars will not be upgraded automatically by launching satellites. If your radars get destroyed they will not have a radar ghost placed, so your qonstruction bots will not rebuild it.

Use my unofficial update version or diff my changes. Good luck :)
Uh, sorry, my english is not very good, so I didn't understand the main point: is it possible that your mod will work with Ion Cannon mod or not? Thank you in advance for explanations.

-------
UPD: I mean, how to make them work together in correct way
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD 0.12.x] Satellite Radar

Post by Qon »

Wakaba-chan wrote:
Qon wrote:And no, that won't work. There are other places that needs fixes and you can't check for name = "radar" on some of them, like you do on on_entity_died, because the mod replaces all "radar" with satellite radars when built. So no vanilla radar entities will ever be placed down. It also has a script for replacing all satellite radars when you send up satellites that you did not update. Your changes will not be sufficient. Your radars will not be upgraded automatically by launching satellites. If your radars get destroyed they will not have a radar ghost placed, so your qonstruction bots will not rebuild it.

Use my unofficial update version or diff my changes. Good luck :)
Uh, sorry, my english is not very good, so I didn't understand the main point: is it possible that your mod will work with Ion Cannon mod or not? Thank you in advance for explanations.

-------
UPD: I mean, how to make them work together in correct way
Yes, my mod update should work with all radar mods! I have tested it with Orbital Ion Cannon and it works. :)
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
User avatar
Wakaba-chan
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Mon May 30, 2016 6:39 am
Contact:

Re: [MOD 0.12.x] Satellite Radar

Post by Wakaba-chan »

Qon wrote:
Wakaba-chan wrote:
Qon wrote:And no, that won't work. There are other places that needs fixes and you can't check for name = "radar" on some of them, like you do on on_entity_died, because the mod replaces all "radar" with satellite radars when built. So no vanilla radar entities will ever be placed down. It also has a script for replacing all satellite radars when you send up satellites that you did not update. Your changes will not be sufficient. Your radars will not be upgraded automatically by launching satellites. If your radars get destroyed they will not have a radar ghost placed, so your qonstruction bots will not rebuild it.

Use my unofficial update version or diff my changes. Good luck :)
Uh, sorry, my english is not very good, so I didn't understand the main point: is it possible that your mod will work with Ion Cannon mod or not? Thank you in advance for explanations.

-------
UPD: I mean, how to make them work together in correct way
Yes, my mod update should work with all radar mods! I have tested it with Orbital Ion Cannon and it works. :)
"Your update" - you mean 0.2.2 version, or something you mentioned above? (sorry, I didn't read all the thread :c)
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD 0.12.x] Satellite Radar

Post by Qon »

Wakaba-chan wrote:
"Your update" - you mean 0.2.2 version, or something you mentioned above? (sorry, I didn't read all the thread :c)
Latest version is 0.2.5 found at page 2: viewtopic.php?f=93&t=23704&start=10#p160661
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
catalyst518
Inserter
Inserter
Posts: 36
Joined: Thu Apr 14, 2016 2:01 am
Contact:

Re: [MOD 0.12.x] Satellite Radar

Post by catalyst518 »

Qon wrote:Try to make it compatible with all mods ever made or will be made in the future by at least checking if the item you are replacing is a regular radar or satellite radar.

You name the radars things like "radar2" which could potentially collide with someone elses mod though. Qonsider naming it "satellite-radar-2" or similar instead in case someone makes a Mk2 radar and calls it "radar2"
First off, thanks for the open criticism. When I first made the mod, I was really only thinking of my own personal use case. The first bug free version worked with everything I would ever use. Then when people started requesting compatibility, I took the shortcut and added in exceptions for the handful of mods people wanted.
Qon wrote:Isn't it possible to modify the radars instead of making new ones?
Nope. :( You can only set radar properties in the .lua files which are read at loadtime, so a new entity for every increment was my solution.
Qon wrote:I haven't tested balance yet but from the numbers it sounds like these are a very expensive way to get very underwhelming results. All other radar mods I've tried are more powerful than this without sending a single rocket.
Again, the default settings are balanced exactly how I want them for my personal use, but I realize people may not like with my settings. I added in a settings file in 0.2.0 for just this reason. You can change the progression curve as you see fit. I don't think it's fair to compare the power of this mod's radars with those of others. I wanted a progression curve that made sense logically, didn't alter the game too far away from a vanilla install, and allowed a large amount of playtime before maxing out.

Also, thanks for taking the time to update the mod for those that need your edits. I had realized the better method of naming and whitelisting before, but I've been away from the game and modding for a month with real life stuff taking up most of my time. I will be posting an official update today derived from your edits (by the way your solution to line 57 of control.lua is smart). Also, I will have a .13 compatible version posted shortly after the update is released by the devs, so don't worry about that.
Qon wrote:Please read http://freedomdefined.org/Licenses/NC
NC is not gaining you anything.
Thanks for pointing this out. I'll admit, this was the first time I've had to put a license on my work. I chose NC initially since I did not want future updated versions or other derivatives of the mod created by others such as yourself to require a purchase to use since all our mods should be free and I certainly don't plan on profiting from it. I'll be switching to CC BY-SA 4.0 as you suggested.
catalyst518
Inserter
Inserter
Posts: 36
Joined: Thu Apr 14, 2016 2:01 am
Contact:

Re: [MOD 0.12.x] Satellite Radar

Post by catalyst518 »

Update Released: Version 0.3.0

Download: SatelliteRadar_0.3.0.zip

Barring any major bug fixes, this will be the last release for 0.12.x. Look out for a 0.13.x version soon.

Changes:
  • Added compatibility with all mods. This mod will now never affect any entities created by other mods. Thanks to Qon for making the initial changes for this while I was away.
  • Added blueprint support. I'm surprised no one had reported this wasn't working.
  • Changed license from CC BY-NC-SA 4.0 to CC BY-SA 4.0 based on input from Qon.
  • Updated info.json with factorio-version=0.12 in preparation for 0.13 requirement.
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD 0.12.x] Satellite Radar

Post by Qon »

Welcome back catalyst! Glad you liked my input. Thanks.

I would like to request some screenshots that show comparison of vanilla radars to some of the different levels of satellite radars (with level and satellites required marked on the picture for each type). Max level and maybe every 25% of the levels might be enough.
Something like this: viewtopic.php?f=94&t=17072
But preferably with both ranges clearly visible (always scanned range and the exploration range)
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
catalyst518
Inserter
Inserter
Posts: 36
Joined: Thu Apr 14, 2016 2:01 am
Contact:

Re: [MOD 0.12.x] Satellite Radar

Post by catalyst518 »

Update Released: Version 0.4.0

Download: SatelliteRadar_0.4.0.zip

Changes:
  • Updated for 0.13.0
catalyst518
Inserter
Inserter
Posts: 36
Joined: Thu Apr 14, 2016 2:01 am
Contact:

Re: [MOD 0.12.x] Satellite Radar

Post by catalyst518 »

Qon wrote:I would like to request some screenshots
A picture has been added to the main post with some ranges drawn. In the current settings, the max scanning range is always 11 chunks outside the permanent visible range. Now that I have visualized what level 17 looks like, I may adjust the default (or at least my own private settings for now) scanning range parameters in the next update to keep the scanning range in the same ratio as the vanilla parameters.
TrojanEnder
Burner Inserter
Burner Inserter
Posts: 16
Joined: Fri May 06, 2016 8:41 pm
Contact:

Re: [MOD 0.12.x] Satellite Radar

Post by TrojanEnder »

catalyst518 wrote:Now that I have visualized what level 17 looks like, I may adjust the default (or at least my own private settings for now) scanning range parameters in the next update to keep the scanning range in the same ratio as the vanilla parameters.
Yes! This please! This is what I always expected this mod to be. It would also match better with RSO-Radar. Also maybe detect if RSO-Radar is present don't replace it until level 3 or whatever.
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD 0.12.x] Satellite Radar

Post by Qon »

catalyst518 wrote:
Qon wrote:I would like to request some screenshots
A picture has been added to the main post with some ranges drawn.
Nice! That makes comparison so much easier. What are your map settings? (Terrain segmentation and water size, or just map string)

Now I just have to make my 1 second rocket base and run it for a game half-hour [:
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
catalyst518
Inserter
Inserter
Posts: 36
Joined: Thu Apr 14, 2016 2:01 am
Contact:

Re: [MOD 0.12.x] Satellite Radar

Post by catalyst518 »

Qon wrote: What are your map settings?

Code: Select all

>>>AAAMACMAAAADAwYAAAAEAAAAY29hbAMDAgoAAABjb3BwZXItb3Jl
AwMCCQAAAGNydWRlLW9pbAMDAgoAAABlbmVteS1iYXNlAwMCCAAAAGl
yb24tb3JlAwMCBQAAAHN0b25lAwMCbvc1eOcmAAB5LgAAAAAAAAAAAA
ADAL+2clo=<<<
I'm using RSO 1.0.3 with everything default in RSO and in world generation.
catalyst518
Inserter
Inserter
Posts: 36
Joined: Thu Apr 14, 2016 2:01 am
Contact:

Re: [MOD 0.12.x] Satellite Radar

Post by catalyst518 »

TrojanEnder wrote:
catalyst518 wrote:Now that I have visualized what level 17 looks like, I may adjust the default (or at least my own private settings for now) scanning range parameters in the next update to keep the scanning range in the same ratio as the vanilla parameters.
Yes! This please! This is what I always expected this mod to be. It would also match better with RSO-Radar. Also maybe detect if RSO-Radar is present don't replace it until level 3 or whatever.
Alright, I have updated the formulas in both the .12 version and the .13 version. I've updated the picture and the table in the main post as well. Level 17 will have 41x41 visible range and 169x169 scanning range, the same ratio as the vanilla radars and quite the increase from the original formula of this mod.

I don't really want to get back into supporting exceptions for various mods, such as RSO radar. Both mods are meant to completely replace vanilla radars, so they are inherently incompatible with each other. You can do several things to get them to work together such as: waiting to enable my mod until you are at the level 3 threshold, editing my mod so that you skip the first 3 levels, or editing RSO radar so that it creates a new entity rather than reusing the vanilla entity.
Post Reply

Return to “Mods”