Page 1 of 1

[Request] Add new effects to Modifier

Posted: Thu Feb 08, 2018 2:52 pm
by Ejsstiil
I tried to make plugin for laser turrets range research similarly as artillery ranges.

But I found that for laser turrets there are missing modifier for modify range. Artillery has this modifier (although it is NOT documented).
technology.lua

Code: Select all

  {
    type = "technology",
...
    effects =
    {
      {
        type = "artillery-range",
        modifier = 0.3
      }
    },
....
 
I could made new turrets mk2 mk3 mk4 etc. but i want it to be infinite so making new entities is kinda odd here.

Please consider add some new effects to http://lua-api.factorio.com/0.16.22/Con ... l#Modifier
so these can be modified via plugins with researches like other stuff, robot cargo, artillery range etc.

Effects:
  • gun-turret-range
    laser-turret-range
    personal-laser-turret-range
Names here are only examples.

not sure if this is correct definition, but some like this:

Code: Select all

technology.lua
    effects =
    {
      {
        type = "laser-turret-range",
        modifier = 0.2
      }
    }, 
Would be this possible?

Re: [Request] Add new effects to Modifier

Posted: Fri Feb 09, 2018 9:14 am
by bobingabout
I think the closest thing that exists that does what you're suggesting there is... gun turret damage, that defines a damage increase specifically to gun turrets.

you can also specify +damage or +firing speed to ammo categories (all gun ammo, you have one for laser turrets, etc.)

The only thing that has a range bonus that I know of is the artillery weapon, I can't check right now (if what I'm thinking of actually exists, or look at how the code works), but you should look at that to see how it works, and if you can assign it to a different weapon type.

if not, you could request it to be done.

there is also the possibility that there is a type to do this, but isn't used anywhere.

Re: [Request] Add new effects to Modifier

Posted: Fri Feb 09, 2018 1:32 pm
by Ejsstiil
I could not find such modifier type anywhere, but yes, there is a chance that is already here, but is not documented in api-doc, just like "aritllery-range"

Re: [Request] Add new effects to Modifier

Posted: Sat Feb 10, 2018 12:43 pm
by Ejsstiil
Oops. This should be probably moved to "Ideas and Suggestions"

Re: [Request] Add new effects to Modifier

Posted: Mon Feb 12, 2018 9:41 am
by bobingabout
According to Posila on a bug report...

Although you can make a technology to increase the range of any ammo category... The effect only works if used on an artillery turret/wagon at the moment.
posila wrote:I have looked through the code and could see that range modifier is specific only to artillery turrets. That sucks
viewtopic.php?f=30&t=57700#p342244