[MOD 0.15.0+] Big Brother 0.4.2 - Radar & Surveillance

Topics and discussion about specific mods
User avatar
Afforess
Filter Inserter
Filter Inserter
Posts: 422
Joined: Tue May 05, 2015 6:07 pm
Contact:

[MOD 0.15.0+] Big Brother 0.4.2 - Radar & Surveillance

Post by Afforess »

Type: Mod
Name: Big Brother
Description: Radar Upgrades and Surveillance technologies
License: MIT License
Version: 0.4.2
Release: 2017-04-28
Tested-With-Factorio-Version: 0.15.03
Category: Gameplay
Tags: Radar, Electricity
Download-Url: https://mods.factorio.com/mods/Afforess/Big_Brother
Website: https://github.com/Afforess/Big_Brother
Long description
Version history
Contributions welcome.
Last edited by Afforess on Sat Apr 29, 2017 12:25 am, edited 11 times in total.
zytukin
Fast Inserter
Fast Inserter
Posts: 215
Joined: Sat Mar 12, 2016 12:14 am
Contact:

Re: [MOD 0.12.20+] Big Brother 0.2.0 - Radar & Surveillance

Post by zytukin »

Sounds like a great mod to help out with mega bases.
Going to download this and give it a try :)
User avatar
MiniMe943
Long Handed Inserter
Long Handed Inserter
Posts: 59
Joined: Mon Mar 02, 2015 5:24 am
Contact:

Re: [MOD 0.12.20+] Big Brother 0.2.0 - Radar & Surveillance

Post by MiniMe943 »

So with all the upgrades, the radar has an extra 27 sectors of range, and 675 kW of power consumption?

It might be nice to put the stats of a fully upgraded radar in the description somewhere, or at the very least, add some images to show what it looks like having all the upgrades.
User avatar
Afforess
Filter Inserter
Filter Inserter
Posts: 422
Joined: Tue May 05, 2015 6:07 pm
Contact:

Re: [MOD 0.12.20+] Big Brother 0.2.0 - Radar & Surveillance

Post by Afforess »

MiniMe943 wrote:So with all the upgrades, the radar has an extra 27 sectors of range, and 675 kW of power consumption?
Extra range is correct (so 14 base range + 27 extra ) but the power is 250KW base + 675KW extra (~1MW total)
MiniMe943 wrote: It might be nice to put the stats of a fully upgraded radar in the description somewhere, or at the very least, add some images to show what it looks like having all the upgrades.
Good point. I'll break out the list.
orzelek
Smart Inserter
Smart Inserter
Posts: 3922
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [MOD 0.12.20+] Big Brother 0.2.0 - Radar & Surveillance

Post by orzelek »

I added mod to existing game and I can build Surveillance center without any research.
Is that by design or I'm missing something ?
And what it would do in this case?
User avatar
Afforess
Filter Inserter
Filter Inserter
Posts: 422
Joined: Tue May 05, 2015 6:07 pm
Contact:

Re: [MOD 0.12.20+] Big Brother 0.2.0 - Radar & Surveillance

Post by Afforess »

orzelek wrote:I added mod to existing game and I can build Surveillance center without any research.
Is that by design or I'm missing something ?
And what it would do in this case?
Hmm, I may have forgotten to disable the recipe until research. I'll double check that and release a fix. It shouldn't do anything without the techs researched though.
User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2638
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: [MOD 0.12.20+] Big Brother 0.2.0 - Radar & Surveillance

Post by steinio »

Hello,

dies this work with RSORadar?

This mod extends the scabber range, maybe this mod could extend it again.

Greetings steinio
Image

Transport Belt Repair Man

View unread Posts
User avatar
Afforess
Filter Inserter
Filter Inserter
Posts: 422
Joined: Tue May 05, 2015 6:07 pm
Contact:

Re: [MOD 0.12.20+] Big Brother 0.2.0 - Radar & Surveillance

Post by Afforess »

steinio wrote:Hello,

dies this work with RSORadar?

This mod extends the scabber range, maybe this mod could extend it again.

Greetings steinio
It will "work" as in it won't do anything bad to your save, but it isn't going to extend the range of any radar except the vanilla 'radar'.

I recommend just using this mod, as radar-5 amplification is equivalent to the range of the RSO radar.
User avatar
Afforess
Filter Inserter
Filter Inserter
Posts: 422
Joined: Tue May 05, 2015 6:07 pm
Contact:

Re: [MOD 0.12.20+] Big Brother 0.2.0 - Radar & Surveillance

Post by Afforess »

orzelek wrote:I added mod to existing game and I can build Surveillance center without any research.
Is that by design or I'm missing something ?
And what it would do in this case?
This should be fixed in version 0.2.1
orzelek
Smart Inserter
Smart Inserter
Posts: 3922
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [MOD 0.12.20+] Big Brother 0.2.1 - Radar & Surveillance

Post by orzelek »

Mod is complaining about accessing LuaEntity when it's invalid on line 216.
It errored once when surveillance center was built and then frequently after center was removed.
Edit: I can see surveillance center working on trains so it works as intended. Seems it had some old no longer valid entities in list.
I added additional check on line 216:

Code: Select all

function update_surveillance(entity, follow)
    local surv_center
	if entity.valid then
		surv_center = get_nearest_surveillance_center(entity.position, entity.surface, entity.force)
	end
User avatar
Afforess
Filter Inserter
Filter Inserter
Posts: 422
Joined: Tue May 05, 2015 6:07 pm
Contact:

Re: [MOD 0.12.20+] Big Brother 0.2.1 - Radar & Surveillance

Post by Afforess »

orzelek wrote:Mod is complaining about accessing LuaEntity when it's invalid on line 216.
It errored once when surveillance center was built and then frequently after center was removed.
Edit: I can see surveillance center working on trains so it works as intended. Seems it had some old no longer valid entities in list.
I added additional check on line 216:

Code: Select all

function update_surveillance(entity, follow)
    local surv_center
	if entity.valid then
		surv_center = get_nearest_surveillance_center(entity.position, entity.surface, entity.force)
	end
Thanks, I'll make sure to get that fixed.
User avatar
Afforess
Filter Inserter
Filter Inserter
Posts: 422
Joined: Tue May 05, 2015 6:07 pm
Contact:

Re: [MOD 0.12.20+] Big Brother 0.2.1 - Radar & Surveillance

Post by Afforess »

orzelek wrote:Mod is complaining about accessing LuaEntity when it's invalid on line 216.
It errored once when surveillance center was built and then frequently after center was removed.
Edit: I can see surveillance center working on trains so it works as intended. Seems it had some old no longer valid entities in list.
I added additional check on line 216:

Code: Select all

function update_surveillance(entity, follow)
    local surv_center
	if entity.valid then
		surv_center = get_nearest_surveillance_center(entity.position, entity.surface, entity.force)
	end
That and another issue are fixed in 0.2.3.
DarkHelmet
Inserter
Inserter
Posts: 40
Joined: Sat Apr 16, 2016 5:46 pm
Contact:

Re: [MOD 0.12.20+] Big Brother 0.2.3 - Radar & Surveillance

Post by DarkHelmet »

With this mod active and radars all upgraded, Blueprints and bots seem to ignore it. Eg: deconstruction planner bots will ignore the radar, and making a blueprint leaves the radar out.

Its not a huge deal but I was wondering if this an easy fix?
A guide to planning your factory's space requirements:
1) Figure out how much space you need, double it to be safe.
2) Wrong! There's never enough space.
User avatar
Afforess
Filter Inserter
Filter Inserter
Posts: 422
Joined: Tue May 05, 2015 6:07 pm
Contact:

Re: [MOD 0.12.20+] Big Brother 0.2.3 - Radar & Surveillance

Post by Afforess »

DarkHelmet wrote:With this mod active and radars all upgraded, Blueprints and bots seem to ignore it. Eg: deconstruction planner bots will ignore the radar, and making a blueprint leaves the radar out.

Its not a huge deal but I was wondering if this an easy fix?
Hm, yeah, that's odd. I will take a look.
orzelek
Smart Inserter
Smart Inserter
Posts: 3922
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [MOD 0.12.20+] Big Brother 0.2.3 - Radar & Surveillance

Post by orzelek »

Afforess wrote:
DarkHelmet wrote:With this mod active and radars all upgraded, Blueprints and bots seem to ignore it. Eg: deconstruction planner bots will ignore the radar, and making a blueprint leaves the radar out.

Its not a huge deal but I was wondering if this an easy fix?
Hm, yeah, that's odd. I will take a look.
Do your radars have actual items? I recall this being an issue for blueprinting.
DarkHelmet
Inserter
Inserter
Posts: 40
Joined: Sat Apr 16, 2016 5:46 pm
Contact:

Re: [MOD 0.12.20+] Big Brother 0.2.3 - Radar & Surveillance

Post by DarkHelmet »

I'm not quite sure what you mean but here's what I see..

If I take an old blueprint with a radar in it that was created without the mod active, I can place it with the mod active and it is turned into the upgraded radar on placement.

If I place a radar on the ground with the mod active and try to create a blueprint of it, the blueprint comes out with the radar missing from the print - everything else is there. Yes, there are radars in my inventory and obviously on the ground when I'm trying to create the blueprint.

And likewise with the deconstruction planner.. I can use the red "deconstruct" print and drag it over the structure. The bots will remove all the entities except the upgraded radar.

I have a new problem now too. This seems to interact poorly with FARL. When FARL places big power poles, they don't get upgraded to surveillance power poles by this mod so there's no line of sight radar on FARL-placed lines. To work around this I have to remove and re-deploy the power poles. If the FARL placement can't be hooked, perhaps add a way to iterate over the big-power-pole entities for an upgrade?
A guide to planning your factory's space requirements:
1) Figure out how much space you need, double it to be safe.
2) Wrong! There's never enough space.
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.12.20+] Big Brother 0.2.3 - Radar & Surveillance

Post by Choumiko »

DarkHelmet wrote:I have a new problem now too. This seems to interact poorly with FARL. When FARL places big power poles, they don't get upgraded to surveillance power poles by this mod so there's no line of sight radar on FARL-placed lines. To work around this I have to remove and re-deploy the power poles. If the FARL placement can't be hooked, perhaps add a way to iterate over the big-power-pole entities for an upgrade?
I'll make FARL raise an event when it places a pole. Seems like the cleanest solution.

As for the blueprint issue, looks like BigBrother has no items for the upgraded radars, which seems to be needed for them to be blueprinted.
User avatar
Afforess
Filter Inserter
Filter Inserter
Posts: 422
Joined: Tue May 05, 2015 6:07 pm
Contact:

Re: [MOD 0.12.20+] Big Brother 0.2.3 - Radar & Surveillance

Post by Afforess »

Choumiko wrote:
DarkHelmet wrote:I have a new problem now too. This seems to interact poorly with FARL. When FARL places big power poles, they don't get upgraded to surveillance power poles by this mod so there's no line of sight radar on FARL-placed lines. To work around this I have to remove and re-deploy the power poles. If the FARL placement can't be hooked, perhaps add a way to iterate over the big-power-pole entities for an upgrade?
I'll make FARL raise an event when it places a pole. Seems like the cleanest solution.
Yeah, that should fix that particular issue.
Choumiko wrote: As for the blueprint issue, looks like BigBrother has no items for the upgraded radars, which seems to be needed for them to be blueprinted.
I'm not sure I have a good solution for this... The way Big Brother works is that there is only 1 item, the vanilla radar item, and the radar entity that is needed it placed based on the current research level. Unless Factorio has a way to associate the same placement item to multiple entities, which I am unaware of, then blueprints are never going to work with the current design.
DarkHelmet
Inserter
Inserter
Posts: 40
Joined: Sat Apr 16, 2016 5:46 pm
Contact:

Re: [MOD 0.12.20+] Big Brother 0.2.3 - Radar & Surveillance

Post by DarkHelmet »

I looked at the code and removing and replacing the surveillance looked like it might do the trick but that didn't work as it used the previously known entity list. I stole the one-time-upgrade code and placed it in a remote.call handler instead. This did solve my problem.

Code: Select all

-- Manually deal with entity creation by other mods that were not hooked.
-- Console:  /c remote.call("Big_Brother", "upgrade_all")
function upgrade_all()
	-- track all radars
	table.each(Surface.find_all_entities({name = 'radar'}) or {}, function(entity) track_entity('radars', entity) end)
	table.each(game.forces, upgrade_radars)

	-- track electric poles
	table.each(Surface.find_all_entities({name = 'big-electric-pole'}) or {}, function(entity)
		track_entity('power_poles', entity)
		if entity.force.technologies['surveillance-2'].researched then
			update_surveillance(entity, false)
		end
	end)
end
remote.add_interface("Big_Brother", { upgrade_all = upgrade_all })
Don't laugh too much..
A guide to planning your factory's space requirements:
1) Figure out how much space you need, double it to be safe.
2) Wrong! There's never enough space.
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.12.20+] Big Brother 0.2.3 - Radar & Surveillance

Post by Choumiko »

This: https://github.com/Choumiko/FARL/commit ... 0714160cf2 should solve the issue with FARL and big poles, enjoy :D Gonna hold off with a new release until 0.13 hits though
Post Reply

Return to “Mods”