now I can modify the A.O.E. for startup option, but I still don't know how to increase it by technology.. please help me
can I make a technology for the AOE of Shell?
can I make a technology for the AOE of Shell?
I try to make a Mod for Artillery shell, And i did it for damage, thanks to ammo-damage modifier. but I couldn't find Area of effect modifier or even solution of increasing things... can't I get solution for it?
now I can modify the A.O.E. for startup option, but I still don't know how to increase it by technology.. please help me
now I can modify the A.O.E. for startup option, but I still don't know how to increase it by technology.. please help me
- NotRexButCaesar
- Smart Inserter

- Posts: 1141
- Joined: Sun Feb 16, 2020 12:47 am
- Contact:
Re: can I make a technology for the AOE of Shell?
you could spawn multiple small shells and move them outward/add more for a larger radius.
Last edited by NotRexButCaesar on Sat Nov 07, 2020 3:16 am, edited 1 time in total.
Ⅲ—Crevez, chiens, si vous n'étes pas contents!
- Deadlock989
- Smart Inserter

- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: can I make a technology for the AOE of Shell?
If you are asking if there is a technology effect that increases the size of projectile AOE effects, the answer is no, there isn't. The full list of built-in effects is here. Projectile parameters aren't accessible at runtime so there is no way to change them in the control stage.seolisky wrote: Fri Nov 06, 2020 6:27 pm I try to make a Mod for Artillery shell, And i did it for damage, thanks to ammo-damage modifier. but I couldn't find Area of effect modifier or even solution of increasing things... can't I get solution for it?
now I can modify the A.O.E. for startup option, but I still don't know how to increase it by technology.. please help me![]()
The only thing I can think of is giving the projectile a large AOE and then process the things struck by it in a scripted ScriptTriggerEffectItem and handling it in on_script_trigger_effect - e.g. ignoring things that are too far away from the source_position. You could then have techs which, if researched, effectively increase the radius in which something actually happens to the targets. But that might get expensive and to be honest I wouldn't touch it with a bargepole.
Re: can I make a technology for the AOE of Shell?
Thanks to your reply, and It sounds very sad...Deadlock989 wrote: Sat Nov 07, 2020 12:23 am
If you are asking if there is a technology effect that increases the size of projectile AOE effects, the answer is no, there isn't. The full list of built-in effects is here. Projectile parameters aren't accessible at runtime so there is no way to change them in the control stage.
The only thing I can think of is giving the projectile a large AOE and then process the things struck by it in a scripted ScriptTriggerEffectItem and handling it in on_script_trigger_effect - e.g. ignoring things that are too far away from the source_position. You could then have techs which, if researched, effectively increase the radius in which something actually happens to the targets. But that might get expensive and to be honest I wouldn't touch it with a bargepole.
- Deadlock989
- Smart Inserter

- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: can I make a technology for the AOE of Shell?
Actually I just ran a couple of tests and it's not too painful.
This replaces the entire artillery shell effect with this action:
And then for your event:
So it's not an AOE effect at all but just strikes a location. This shows up in the on_script_trigger_effect as a target position. (If instead you ran the script on every entity in an area effect, you don't necessarily know where the shell landed.) Searching an area radius 10 (you would modify this depending on the technology level esearched) around where the shell lands and filtering only for enemy force, with shells being fired about once every 2 seconds, I was seeing something like an additional 0.003s load on UPS. You could maybe reduce that with better filtering and of course it depends on what you're doing with all the entities, I had a nasty full distance function with math.sqrt which you could easily avoid (just compare squared distances).
I don't know how this would all stack up in a big endgame base with multiple artilleries firing constantly.
This replaces the entire artillery shell effect with this action:
Code: Select all
data.raw["artillery-projectile"]["artillery-projectile"].action= {
action_delivery = {
target_effects = {
{
type = "script",
effect_id = "artillery-test",
},
},
type = "instant"
},
type = "direct",
}Code: Select all
script.on_event(defines.events.on_script_trigger_effect, function(event)
if event.effect_id == "artillery-test" then
local surface = game.surfaces[event.surface_index]
for _,entity in pairs(surface.find_entities_filtered{force="enemy", radius = 10, position = event.target_position}) do
-- whatever
end
end
end)I don't know how this would all stack up in a big endgame base with multiple artilleries firing constantly.
Re: can I make a technology for the AOE of Shell?
Oh! I'm soooooooooo thanks for your code! I'll try it base on your code, and if i find something great to apply then I'll feed back that code! thank you bery much!Deadlock989 wrote: Sat Nov 07, 2020 2:25 am
So it's not an AOE effect at all but just strikes a location ...
...
I don't know how this would all stack up in a big endgame base with multiple artilleries firing constantly.
