Page 1 of 1

Request: Research based drop access.

Posted: Sat Jun 30, 2018 5:55 am
by Buggi
While the Subject of the thread was tough to decide on, here's basically what I want to do. I'm using Bob's mods and have alien artifacts enabled so the biters drop little colored orbs.

I wanted to mod in a research branch that MODIFIED the drop count and chance of these orbs. I scoured the WIKI for possible ways to do this and discovered either it's not possible, or not well documented.

Basically on research complete, run a function that parses through the enemies and modifies the variables I need, with a multiplier on the level of research completed.

Any help would be appreciated, and if it is indeed not possible, consider it a request :D

Re: Request: Research based drop access.

Posted: Mon Jul 02, 2018 9:07 am
by bobingabout
A research that increases the drop rate/count of loot. Interesting. I'd probably have to actually mod in the support for this research too.

Re: Request: Research based drop access.

Posted: Mon Jul 02, 2018 3:11 pm
by eradicator
Sounds like you could get the result by simply adding a few preprocessing recipes for the loot items. Or you could add high-evolution biters that drop loot.

I'm not a fan of the whole "infinite research for everything" movement. Magically upgrading all of your existing stuff just feels wrong in a game all about building more factory.

Re: Request: Research based drop access.

Posted: Mon Jul 02, 2018 8:46 pm
by Buggi
It'd be nice if it was possible, but as I've seen no way to do it I'm not sure.

and @eradicator I get what you're saying, but in multiplayer games it's VERY hard to gather the thousands of artifacts you need to outfit everyone with nice gear, so I thought late-game (non-infinite) expensive research could bridge the gap.

Re: Request: Research based drop access.

Posted: Tue Jul 03, 2018 1:05 am
by Rseding91
This seems to specific for adding to the base game. Mods can already hook entity died and spawn additional loot should they want to do so.

Re: Request: Research based drop access.

Posted: Tue Jul 03, 2018 1:10 am
by eradicator
If it's suppoesed to be both late-game and finite that's can be nicely modded the way Rsed suggested. If you don't like (control-)scripting then adding recipes like i said is an option. You'd have to introduce a new drop item though that then gets processed into the old one to not end up with a circular recipe. So Rseds idea is cleaner. If you need help with modding there's a forum for that ;).

Re: Request: Research based drop access.

Posted: Tue Jul 03, 2018 3:54 pm
by Buggi
Rseding91 wrote:This seems to specific for adding to the base game. Mods can already hook entity died and spawn additional loot should they want to do so.
Yes, but can research control when those hooks are called?

That's the basis of the request, that on-research-complete not be limited to hard-coded variable changes, but allow me to change other variables.

Re: Request: Research based drop access.

Posted: Tue Jul 03, 2018 5:01 pm
by eradicator
on_research_finished has nothing to do with any "variables". It is raised for every technology, even if that technology has no effects at all. There's https://lua-api.factorio.com/latest/Con ... l#Modifier "nothing" to add a custom symbol to a technology to make it look nicer in the tech tree. You'd then use something like:

Code: Select all

script.on_event(defines.events.on_entity_died,function(event)
  if event.force and event.force.technologies['more-loot-tech'] and event.entity.type == 'spawner' then
    --spawn loot!
    end
  end)