Coder Social home page Coder Social logo

factorio-lateupgrades-mod's Introduction

factorio-lateupgrades-mod's People

Contributors

doublespin avatar msakuta avatar

Watchers

 avatar  avatar  avatar

factorio-lateupgrades-mod's Issues

Bobs Mods Research

Bobs Mods adds a science-pack-4, any chance on a soft dependency on bobtech and if science-pack-4 exists then add it to the extension research? That is the research that slows me down the most so I would love to have it in as well to continue further into the late game.

In the ./prototypes/technology/common.lua file, the createupgrade function, it should be easy to add the science-pack-4 there, copied from science-pack-3 unless a params.pack_d (darkblue) exists as a simple one-off change to support it. His science-pack-gold also exists if you wish to use it, though it is just a combination of Science Packs 1, 2, and 3 (not 4, it is 'pre-4' tech) all combined to be used in his alien science lab, which also supports alien-science-pack-blue, alien-science-pack-orange, alien-science-pack-purple, alien-science-pack-yellow, alien-science-pack-green, and `alien-science-pack-red. Though those are good for specific purposes I do not think they have any real need unless you want to add in bobsmods extended research for his special alien ammo (which are the major users of those alien sciences based on the type of ammo for the type of color).

Overall, the science-pack-4 would be a fantastic add to all of the research this mod adds if Bob's Mods bobtech mod is installed, and if you wish to add more lategame research then the Bob's Mods bobwarfare has a lot of alien science that it would work well with (in addition to using science-pack-4's) for, say, his special ammo damage upgrades (he has none as I recall so it would be easy to add some there, a very small increase per research I'd recommend considering their existing power). Could be interesting to even add the color alien science packs in the order above to the existing higher research, they are basically 'unlocked' from biters in the above given order (so until you get to near 100% evolution you will not be getting red yet, but it does unlock the most powerful ammo, though the ammo also requires the red alien drops and a lot of processing to make so it is not an infinite ammo thing).

More configurable mod

In the file ./prototypes/technology/common.lua in the function createupgrade it sets the prerequisites via:

    prerequisites = {params.neededscience},

First problem I see is that a given upgrade could only have one prerequisite, which is probably fine in most cases but it might be better to do this instead:

    prerequisites = params.neededscience,

And in all the upgrade file wrap the existing pre-requisite up with {}.

However, have you thought about restructuring the mod to be more 'generally' configurable instead of specific sections like this, to instead of being called as it is to be called like this instead (based on the logistic-robot-speed.lua and logistic-robot-stacksize.lua files due to their different exponential styles):

-- This would be some helper file, just a couple examples, extend as wanted

function mult(m)
  return function(level, previousValue)
    return previousValue + (level * m)
  end
end

function expo(e)
  return function(level, previousValue)
    return math.floor(previousValue * (2 ^ (level * e)))
  end
end

-- This could be in the config.lua file, lots of lines like this for different researches

extendResearch(5, 25, "logistic-robot-speed-", {
  time=mult(10),
  count=expo(1/3),
  modifier=mult(0.05)
  }


extendResearch(5, 25, "worker-robots-storage-", {
  time=mult(10),
  count=expo(1/2),
  modifier=mult(0.05)
  }

-- and so forth more

Where extendResearch(template, final, baseName, options) or so, the template is the 'template' to copy, so since "logistic-robot-speed-5" exists it will then clone that, change it to 6, since it is not '1' it will update the pre-reqs from the '4' to '5', leaving the rest alone, then it will apply the above functions of options.time, options.count, options.modifier, and whatever other options you want to supply (with reasonable defaults for non-existing ones). Once it made 6 then it would make 7 by using 6 as the template (could just recursively call yourself until template>final then early return). This pattern would let it be completely configurable within the config file, keeps it small and readable, lets it be more expandable for other research lines that other mods may add, and if someone wants to do something custom they could just define the function inline like count=function(level, previousValue) previousValue * level end, or whatever they may want. And if someone wants to, say, add science-pack-4 starting on worker-robots-storage research 10 then they could just do extendResearch(5, 9, "worker-robots-storage-", {...etc...}) then add their own special 10 as normal factorio-lua way then do extendResearch(10, 25, "worker-robots-storage-", {...etc...}) to start using their new level 10 as the new template with their special research (although it would probably be better to have an option in extendResearch to add, remove, or completely override existing ingredients so you could do something like this instead of defining a whole new recipe extendResearch(9, 25, "worker-robots-storage-", {...etcOtherOptions... ingredient={add={{"science-pack-4", 1},}}) as this would allow an easy way to override starting right after your template level).

It would probably also be nice to ignore already existing researches entirely if detected (with an option to override defaulted to false) so it would fit properly within other mod setups.

This would make it a highly customizable and easy to mod setup though. :-)

`character-logistic-slots` and `character-logistic-trash-slots` counts

I've noticed the higher character-logistic-slots researches go up in 2, which is great, however it seems to end at 38 for its maximum value if I count correctly. Might be good to lower its max to 26 to make it an even 30 so it will finish with a full row in the inventory or to raise it to 31 to make it an even 40.

Same with character-logistic-trash-slots except it needs to be increased by 2 more, so its max should be 27 to make an even row if I count correctly.

`toolbelt-2` mod conflict

Bob's Mods already adds a toolbelt-2 addon (though his is cheaper oddly). Depending on the mod loading order between this mod and boblogistics it may or may not be applied. To fix this if you put a soft dependency (via ? boblogistics) then his mod will load first allowing yours to overwrite his with the more expensive recipe.

In addition, he also has a toolbelt-3, which is considerably more expensive than this mods toolbelt-2 due to his inclusion of science-pack-4. Any chance on adding a toolbelt-3 to this mod that overrides his with the same recipe as he already uses:

      count = 150,
      ingredients =
      {
        {"science-pack-1", 1},
        {"science-pack-2", 1},
        {"science-pack-3", 1},
        {"alien-science-pack", 1},
      },
      time = 30

However making the count much higher, say CountFactor * 1000 or so?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.