[MOD 0.13.0] Satellite Radar
Re: [MOD 0.12.x] Satellite Radar
Good changes. This is definitely my defacto radar mod now. Any chance you also mod Space Engineers ? I dont even have that game yet but considering getting it soon and for me it scratches the same type of playing 'itch'.
-
- Inserter
- Posts: 36
- Joined: Thu Apr 14, 2016 2:01 am
- Contact:
Re: [MOD 0.12.x] Satellite Radar
Update Released: Version 0.2.1
Download: SatelliteRadar_0.2.1.zip
Changes:
Download: SatelliteRadar_0.2.1.zip
Changes:
- Added compatibility with Launch Control 0.1.2-unofficial.
Re: [MOD 0.12.x] Satellite Radar
Hey man, love your idea, but I ran into a problem.
You coded the mod using game.player.gui.left.rocket_score to find the amount of satellites (if any) that have been launched.
However, if the map you are playing on has ever been played in multiplayer, this will not work, since game.player can't be used anymore (after all, there is no longer a THE player, there are/have been multiple)
I fixed this for me by replacing game.player with game.players[1].
This appears to be working consistently, even if you create a new map with only you in single player mode.
Since it appears that all players in the map have the same score, you don't need to index over all players to get the proper score (at this time).
Just thought I'd let you know so you could apply it in a future update for multiplayer compatibility.
You coded the mod using game.player.gui.left.rocket_score to find the amount of satellites (if any) that have been launched.
However, if the map you are playing on has ever been played in multiplayer, this will not work, since game.player can't be used anymore (after all, there is no longer a THE player, there are/have been multiple)
I fixed this for me by replacing game.player with game.players[1].
This appears to be working consistently, even if you create a new map with only you in single player mode.
Since it appears that all players in the map have the same score, you don't need to index over all players to get the proper score (at this time).
Just thought I'd let you know so you could apply it in a future update for multiplayer compatibility.
Re: [MOD 0.12.x] Satellite Radar
Another single player only mod? That sucks, I had to delete this from my server. :/
https://www.dropbox.com/s/hpcleidhodwo7 ... .35.27.png
Error while running the event handler: _ _ SatelliteRadar _ _/control.lua:6: Map doesn't contain 1 player, this function can't be used
EDIT: Wild dog's fix did not work, placing a new radar crashes the game with the same error.
https://www.dropbox.com/s/hpcleidhodwo7 ... .35.27.png
Error while running the event handler: _ _ SatelliteRadar _ _/control.lua:6: Map doesn't contain 1 player, this function can't be used
EDIT: Wild dog's fix did not work, placing a new radar crashes the game with the same error.
You can get my mods by clicking here, and use discussions there or PMs here to suggest or report issues.
Want some blueprints made by me? Click here then!
Want some blueprints made by me? Click here then!
Re: [MOD 0.12.x] Satellite Radar
Really? and the error was control.lua:6: even after you did what i did?Vas wrote:Another single player only mod? That sucks, I had to delete this from my server. :/
https://www.dropbox.com/s/hpcleidhodwo7 ... .35.27.png
Error while running the event handler: _ _ SatelliteRadar _ _/control.lua:6: Map doesn't contain 1 player, this function can't be used
EDIT: Wild dog's fix did not work, placing a new radar crashes the game with the same error.
i have had to replace it in 6 instances on my side, in line 5, 7, 8, 15, 17, and 18, but that may not have been his latest version.
Lemme check and get back to you.
EDIT: on his latest release (0.2.1) i've had to eddit it at 3 lines, line 6, 8 and 9.
it became this:
Code: Select all
function CalculateLevel(a)
satellites=0
if game.players[1].gui.left.rocket_score==nil then
satellites=0
elseif tonumber(game.players[1].gui.left.rocket_score.rocket_count.caption)>=0 then
satellites=tonumber(game.players[1].gui.left.rocket_score.rocket_count.caption)
end
satellites=satellites+a
level=LevelEquation(satellites)
if level<=0 then
return 0
elseif level>=maxlevel then
return maxlevel
else
return level
end
end
could you link mod file that you fixed so i could take a look?
the only pitfall that i can think of right now is that you eddited it to player[1] when it should be playerS[1], but to say more i would need your mod file and latest crash report.
Re: [MOD 0.12.x] Satellite Radar
I've updated this mod for multiplayer compatibility, and added this thread to the "homepage" in the info and updated the version number as well.
EDIT: Wild Dog, you were right, I did miss the S. I release this unofficial update so that no one makes the mistake again. xP
EDIT: Wild Dog, you were right, I did miss the S. I release this unofficial update so that no one makes the mistake again. xP
- Attachments
-
- SatelliteRadar_0.2.2.zip
- Updated to multiplayer compatibility, added "homepage" to info.
- (9.93 KiB) Downloaded 209 times
You can get my mods by clicking here, and use discussions there or PMs here to suggest or report issues.
Want some blueprints made by me? Click here then!
Want some blueprints made by me? Click here then!
-
- Inserter
- Posts: 36
- Joined: Thu Apr 14, 2016 2:01 am
- Contact:
Re: [MOD 0.12.x] Satellite Radar
wild_dog wrote:
Just thought I'd let you know so you could apply it in a future update for multiplayer compatibility.
Thanks to you both for pointing this out. I've never played a multiplayer map and don't really intend to, so this could have been overlooked for a while. I've released an official patch with the changes you both figured out correctly.Vas wrote:I've updated this mod for multiplayer compatibility, and added this thread to the "homepage" in the info and updated the version number as well.
-
- Inserter
- Posts: 36
- Joined: Thu Apr 14, 2016 2:01 am
- Contact:
Re: [MOD 0.12.x] Satellite Radar
Update Released: Version 0.2.2
Download: SatelliteRadar_0.2.2.zip
Changes:
Download: SatelliteRadar_0.2.2.zip
Changes:
- Added multiplayer support. Thanks to Vas and wild_dog.
- Added compatibility with Train tracker 1.0.0.
- Updated info.json with link to this thread.
Re: [MOD 0.12.x] Satellite Radar
Bugs:
Also you say "tiles" in your description when I think you mean "chunks".
- Makes all items made from radars into satellite radars. I see you have updated it for train tracker compatability, but this isn't the only mod that your mod destroys. Instead of making your mod compatible with each mod it destroys one by one as it is reported, 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. Whitelist instead of blacklist, please. It destroyed Train Tracker, STRS radars, Factorio Basics/Extended, Item Collector and every other radar mod or mod that makes things by modifying radars...
- "Factorio Extended 0.1.3 - Upon reaching level 1 in Satellite Radar, all special radars (Mk2 and surveillance radars) will be replaced with the appropriate level of satellite radar."
It was replaced with the same level as every other radar. This is not working. I'm not convinced even max level satellite radar is superior to the surveillance radar but I don't have the numbers. - Uninstalling will probably remove all radars since you chose to make each upgrade a separate item. Not sure if this can be fixed with the current API but it would be nice if it didn't destroy all my radars twice... Also it's messy. Isn't it possible to modify the radars instead of making new ones?
Also you say "tiles" in your description when I think you mean "chunks".
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
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Re: [MOD 0.12.x] Satellite Radar
Well this is easily fixed. My version is basically compatible with all mods ever made or ever will be made unless they do something that is inherently incompatible (also replaces vanilla radars instead of making a new entity type with separate recipe). So it works with all the things I listed above and the Ion cannon targeter too. And fusion power "safety zone" would probably also have been destroyed in the old version.Qon wrote:Bugs:
- Makes all items made from radars into satellite radars. I see you have updated it for train tracker compatability, but this isn't the only mod that your mod destroys. Instead of making your mod compatible with each mod it destroys one by one as it is reported, 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. Whitelist instead of blacklist, please. It destroyed Train Tracker, STRS radars, Factorio Basics/Extended, Item Collector and every other radar mod or mod that makes things by modifying radars...
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" because think like you q:
Edit: please read http://freedomdefined.org/Licenses/NC
NC is not gaining you anything. No one will sell your mod. You are only potentially interfering with people who make youtube videos of your mod and other similar grayzones where someone might make an indirect profit. And with SA the NC spreads :/
If you decide to remove NC then I give v0.2.3 the CC BY-SA 4.0 license as well with this statement.
Edit: Bugfix. Use 0.2.4 instead of 0.2.3.
Edit: Bugfix. Use 0.2.5 instead of 0.2.4.
- Attachments
-
- SatelliteRadar_0.2.5.zip
- Fixed an incomplete variable rename at control.lua:80
- (9.58 KiB) Downloaded 221 times
-
- SatelliteRadar_0.2.4.zip
- Fixed a bug in 0.2.3 where more than normal radars were whitelisted.
- (9.58 KiB) Downloaded 219 times
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
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
-
- Long Handed Inserter
- Posts: 55
- Joined: Thu May 12, 2016 12:57 pm
- Contact:
Re: [MOD 0.12.x] Satellite Radar
LolQon wrote:Qonsider
Thanks for your updates to another's mod, Qon!
Re: [MOD 0.12.x] Satellite Radar
Glad you like it!Shrooblord wrote:LolQon wrote:Qonsider
Thanks for your updates to another's mod, Qon!
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
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
-
- Burner Inserter
- Posts: 16
- Joined: Fri May 06, 2016 8:41 pm
- Contact:
Re: [MOD 0.12.x] Satellite Radar
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!
Re: [MOD 0.12.x] Satellite Radar
I have made unofficial updates to both mods. Read last post on page 2 in this thread for the sat radar update.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!
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
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
-
- Burner Inserter
- Posts: 16
- Joined: Fri May 06, 2016 8:41 pm
- Contact:
Re: [MOD 0.12.x] Satellite Radar
Skimmed everything looking for the solution. Should have seen this. Thanks! Wish there was an appropriate way to make this version even more visible.Qon wrote:I have made unofficial updates to both mods. Read last post on page 2 in this thread for the sat radar update.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!
Satellite radar: compatability with ALL mods (past, present, future)
- Wakaba-chan
- Long Handed Inserter
- Posts: 96
- Joined: Mon May 30, 2016 6:39 am
- Contact:
Re: [MOD 0.12.x] Satellite Radar
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
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?
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)
Is this correct? Or there are some more deep changes need to be done?
Re: [MOD 0.12.x] Satellite Radar
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 thatWakaba-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 thisI.e. I changed "e.type = "radar" to "e.name = "radar" so that only vanilla radar would be replaced.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)
Is this correct? Or there are some more deep changes need to be done?
Code: Select all
[b][/b]
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
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
- Wakaba-chan
- Long Handed Inserter
- Posts: 96
- Joined: Mon May 30, 2016 6:39 am
- Contact:
Re: [MOD 0.12.x] Satellite Radar
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.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
-------
UPD: I mean, how to make them work together in correct way
Re: [MOD 0.12.x] Satellite Radar
Yes, my mod update should work with all radar mods! I have tested it with Orbital Ion Cannon and it works.Wakaba-chan wrote: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.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
-------
UPD: I mean, how to make them work together in correct way
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
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
- Wakaba-chan
- Long Handed Inserter
- Posts: 96
- Joined: Mon May 30, 2016 6:39 am
- Contact:
Re: [MOD 0.12.x] Satellite Radar
"Your update" - you mean 0.2.2 version, or something you mentioned above? (sorry, I didn't read all the thread :c)Qon wrote:Yes, my mod update should work with all radar mods! I have tested it with Orbital Ion Cannon and it works.Wakaba-chan wrote: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.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
-------
UPD: I mean, how to make them work together in correct way