[MOD 0.18] Orbital Ion Cannon 1.8.2

Topics and discussion about specific mods
Supercheese
Filter Inserter
Filter Inserter
Posts: 841
Joined: Mon Sep 14, 2015 7:40 am
Contact:

Re: [MOD 0.14] Orbital Ion Cannon 1.4.5

Post by Supercheese »

Hmm, not sure what the problem could be, then. Perhaps try changing the scanning range in the config.lua file?

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.14] Orbital Ion Cannon 1.4.5

Post by Optera »

Why not make auto targeters also target nests in the always visible areas?

Supercheese
Filter Inserter
Filter Inserter
Posts: 841
Joined: Mon Sep 14, 2015 7:40 am
Contact:

Re: [MOD 0.14] Orbital Ion Cannon 1.4.5

Post by Supercheese »

Optera wrote:Why not make auto targeters also target nests in the always visible areas?
Performance reasons; the original incarnation of auto-targeters did this, but caused lag when many of them were built.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.14] Orbital Ion Cannon 1.4.5

Post by Optera »

Supercheese wrote:
Optera wrote:Why not make auto targeters also target nests in the always visible areas?
Performance reasons; the original incarnation of auto-targeters did this, but caused lag when many of them were built.
Does find_entities_filtered scale so bad when given a bigger area?

PS: I think I read it's finding all entities and filters the results, so performance wise using one find_entities with your own filter for spawner and worms might be faster.

MPeti1
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Tue Apr 12, 2016 5:38 pm
Contact:

Re: [MOD 0.14] Orbital Ion Cannon 1.4.5

Post by MPeti1 »

Supercheese wrote:
Optera wrote:Why not make auto targeters also target nests in the always visible areas?
Performance reasons; the original incarnation of auto-targeters did this, but caused lag when many of them were built.
But it could be more performance friendly in this way:
1. You place autotargeters around your base.
2. The mod sums up the area of the autotargeters range.
3. The mod starts to scan this area all in one, but multiplies the scan speed by the number of autotargeters.
Supercheese wrote:Hmm, not sure what the problem could be, then. Perhaps try changing the scanning range in the config.lua file?
It's on 10, i think it's needed to be enough. In my older maps (with older game and mod version) it worked properly.

MPeti1
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Tue Apr 12, 2016 5:38 pm
Contact:

Re: [MOD 0.14] Orbital Ion Cannon 1.4.5

Post by MPeti1 »

In this link you can find my config.lua and the zip file, you can try how it's working or you. I changed some settings before in the config file, but i don't think any of the changes causes the bug.
https://1drv.ms/f/s!ArvLKxtjzZnrld4snlnB_84PCZh7Ig

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.14] Orbital Ion Cannon 1.4.5

Post by Optera »

MPeti1 wrote:
Supercheese wrote:
Optera wrote:Why not make auto targeters also target nests in the always visible areas?
Performance reasons; the original incarnation of auto-targeters did this, but caused lag when many of them were built.
But it could be more performance friendly in this way:
1. You place autotargeters around your base.
2. The mod sums up the area of the autotargeters range.
3. The mod starts to scan this area all in one, but multiplies the scan speed by the number of autotargeters.
Summing up all chunks uncovered by auto targeters does not guarantee a rectangle, which is required for find_entities or find_entities_filtered.
You could store all chunks visible from auto targeters in a metatable with the last scanned tick and have only those evaluated at on_sector_scan_complete where game.tick - last scanned tick > scan time in ticks.

Supercheese
Filter Inserter
Filter Inserter
Posts: 841
Joined: Mon Sep 14, 2015 7:40 am
Contact:

Re: [MOD 0.14] Orbital Ion Cannon 1.4.5

Post by Supercheese »

A reminder that I gladly welcome pull requests, should anyone feel they want to have a crack at any improvements. :)

Chemistal
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Jan 28, 2017 12:09 pm
Contact:

Re: [MOD 0.14] Orbital Ion Cannon 1.4.5

Post by Chemistal »

I can't find how to mnufacture targeting device. Should I open some tech?
Or maybe it is in conflict with BOB mods pack?

Supercheese
Filter Inserter
Filter Inserter
Posts: 841
Joined: Mon Sep 14, 2015 7:40 am
Contact:

Re: [MOD 0.14] Orbital Ion Cannon 1.4.5

Post by Supercheese »

Chemistal wrote:I can't find how to mnufacture targeting device. Should I open some tech?
Or maybe it is in conflict with BOB mods pack?
You should first launch an ion cannon into orbit. :)

Sharkking
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sun Feb 05, 2017 8:24 am
Contact:

Re: [MOD 0.14] Orbital Ion Cannon 1.4.5

Post by Sharkking »

Hello supercheese,

i am not shure whats wrong. We launched a rocket with canon, it was firing manually without problems, then we built auto targeting stations and it was working well. Suddenly now the counter stopped for any reason.

Image

we are using the lates version of factorio.

Any suggestions ?
Kind regards

[edit] for any reason the counter started again :-) [/edit]

Incoming
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun Feb 05, 2017 4:38 pm
Contact:

Re: [MOD 0.14] Orbital Ion Cannon 1.4.5

Post by Incoming »

There is a bug where after you close Factorio, the next time you start it up the cooldown for all Ion Cannons in orbit stop counting down. They start again the next time you launch an Ion Cannon into space. This may just be because I don't have the newest version of the mod.

DevilXD
Fast Inserter
Fast Inserter
Posts: 213
Joined: Tue Aug 12, 2014 10:47 am
Contact:

Re: [MOD 0.14] Orbital Ion Cannon 1.4.5

Post by DevilXD »

Incoming wrote:There is a bug where after you close Factorio, the next time you start it up the cooldown for all Ion Cannons in orbit stop counting down. They start again the next time you launch an Ion Cannon into space. This may just be because I don't have the newest version of the mod.
Sounds like it.

Euphytose
Manual Inserter
Manual Inserter
Posts: 1
Joined: Wed Feb 15, 2017 8:50 pm
Contact:

Re: [MOD 0.14] Orbital Ion Cannon 1.4.5

Post by Euphytose »

Could you add a max number of shots for each cannon? That we can then configure in the options.

User avatar
Betep3akata
Inserter
Inserter
Posts: 40
Joined: Fri Sep 30, 2016 10:31 am
Contact:

Re: [MOD 0.14] Orbital Ion Cannon 1.4.5

Post by Betep3akata »

Hi, Supercheese,
Thanks for the C&C style late-game and swarms of the EMP aliens!

Could you please check the when_ion_cannon_fired event?

I tried to use it in the scorchedEarth mod through the remote interface and faced a number of problems:
1. The event fires not on the ion beam blast but on putting target;
2. The event.position is likely shifted upwards;
3. Could you please also add the ionCannonRadius into the event?

Thanks,
Alex
My mods: Scorched Earth, Will-o-the-wisps
//My nickname is some kind of transliteration from Cyrillic to Latin. Betep3akata stands for WindOfSunset.

Supercheese
Filter Inserter
Filter Inserter
Posts: 841
Joined: Mon Sep 14, 2015 7:40 am
Contact:

Re: [MOD 0.14] Orbital Ion Cannon 1.4.5

Post by Supercheese »

Betep3akata wrote:Hi, Supercheese,
Thanks for the C&C style late-game and swarms of the EMP aliens!

Could you please check the when_ion_cannon_fired event?

I tried to use it in the scorchedEarth mod through the remote interface and faced a number of problems:
1. The event fires not on the ion beam blast but on putting target;
2. The event.position is likely shifted upwards;
3. Could you please also add the ionCannonRadius into the event?

Thanks,
Alex
Sounds good, I'll make those changes as soon as I can.

Supercheese
Filter Inserter
Filter Inserter
Posts: 841
Joined: Mon Sep 14, 2015 7:40 am
Contact:

Re: [MOD 0.14] Orbital Ion Cannon 1.4.6

Post by Supercheese »

Updated to version 1.4.6 to address the issues above and a couple more.

Tired of "Ion Cannon Ready" spam? This update will greatly reduce it thanks to a new config option!

Config.lua is getting a bit long in the tooth -- can't wait for 0.15 and its new mod settings interface to clean things up!

User avatar
Betep3akata
Inserter
Inserter
Posts: 40
Joined: Fri Sep 30, 2016 10:31 am
Contact:

Re: [MOD 0.14] Orbital Ion Cannon 1.4.6

Post by Betep3akata »

Hi, Supercheese,
Thanks for update!

I have some questions about the following changes:
Renamed custom "on_ion_cannon_fired" event to "on_ion_cannon_targeted", to better reflect that it fires on target designation rather than actual blast impact.
I am concerned about two things about the current on_ion_cannon_targeted event:
1. Could the target be canceled eventually?
2. Most likely I cannot take into account the heat up time if it will be changed in the config.

Are there some technical restrictions to implement the on_ion_cannon_fired event?

Thanks,
Alex
My mods: Scorched Earth, Will-o-the-wisps
//My nickname is some kind of transliteration from Cyrillic to Latin. Betep3akata stands for WindOfSunset.

Supercheese
Filter Inserter
Filter Inserter
Posts: 841
Joined: Mon Sep 14, 2015 7:40 am
Contact:

Re: [MOD 0.14] Orbital Ion Cannon 1.4.6

Post by Supercheese »

Betep3akata wrote:Hi, Supercheese,
Thanks for update!

I have some questions about the following changes:
Renamed custom "on_ion_cannon_fired" event to "on_ion_cannon_targeted", to better reflect that it fires on target designation rather than actual blast impact.
I am concerned about two things about the current on_ion_cannon_targeted event:
1. Could the target be canceled eventually?
2. Most likely I cannot take into account the heat up time if it will be changed in the config.

Are there some technical restrictions to implement the on_ion_cannon_fired event?

Thanks,
Alex
There is currently no way to cancel a target site once designated.

The issue with determining exactly when the ion cannon actually fires stems from the fact that I just spawn a target entity and a projectile, and then Factorio itself takes care of accelerating the (invisible) projectile towards the target until impact. It is possible to monitor on_entity_died to determine when the target entity is destroyed, but then the issue arises when you rapidly designate two target sites in close proximity to each other -- the first ion cannon blast will destroy both target entities, leading to a false reading of on_entity_died.

User avatar
Betep3akata
Inserter
Inserter
Posts: 40
Joined: Fri Sep 30, 2016 10:31 am
Contact:

Re: [MOD 0.14] Orbital Ion Cannon 1.4.6

Post by Betep3akata »

Ok, thanks for the answer. Now I understand.

1. It seems that the event.position.y is still shifted up.
2. Could you please add the HeatupTime into the event too? (I'm going to add each onTarget event into a queue and execute it on HeatupTime expiration in onTick.)

Thanks,
Alex

P.S.: current scorch mark design:
Image
My mods: Scorched Earth, Will-o-the-wisps
//My nickname is some kind of transliteration from Cyrillic to Latin. Betep3akata stands for WindOfSunset.

Post Reply

Return to “Mods”