Page 1 of 1
Specific Research Pack Item
Posted: Sun Apr 09, 2017 12:42 pm
by redlabel
So I was talking with some Factorio friends today and we thought it would be nice if there was a way to get a finished research pack as an item.
This would be used server side by the makers of a certain map. Imagine you capture a shipwreck and you get a "Military 4" technology, or "Assembler 3 technology" which is an item (it can have a common icon with different names.. maybe a "golden" science pack. You would need to have the previous tech researched to use it but if you put that pack inside a research lab you automatically acquire the tech or perhaps it needs to "load" for a bit like other science packs.
This could be neat for "conquer" scenarios where you have to capture certain areas of the map to get items and advance.
Thoughs?
Re: Specific Research Pack Item
Posted: Sun Apr 09, 2017 3:01 pm
by ssilk
This is nothing that must be implemented, cause it is already possible; a mod can say "If some user has item X in his pockets, Z is researched."
But in practice no modder would do it like so, cause the pockets needs to be checked several times, which costs time.
A modder would do it more like: "You found the wreck, now you have Z researched".
Which is already done like so in the tutorial. More or less...
And you can do this in every case, so the detour over the item is useless (for Factorio).
Edit: And to avoid answer like "But I want it as a map-creator, not as a modder": I don't think this feature would be implemented, cause it also means for the vanilla game to implement some mechanism that enables "If item X is in inventory, then fire an event".
Which costs a lot CPU resources for questionable functionality.
It is much more likely to do it like other games: The map-editor enables to have "zones", that triggers events. That makes much more sense, cause such mechanisms are already in game. Think to the gates, that implement this already more or less.
Re: Specific Research Pack Item
Posted: Sun Apr 09, 2017 3:06 pm
by redlabel
ssilk wrote:This is nothing that must be implemented, cause it is already possible; a mod can say "If some user has item X in his pockets, Z is researched."
But in practice no modder would do it like so, cause the pockets needs to be checked several times, which costs time.
A modder would do it more like: "You found the wreck, now you have Z researched".
Which is already done like so in the tutorial. More or less...
And you can do this in every case, so the detour over the item is useless (for Factorio).
Ah ok so there are already ways to do this in vanilla. My bad then..
Re: Specific Research Pack Item
Posted: Sun Apr 09, 2017 3:14 pm
by ssilk
I edited the above and now I remember, there is also a functionality for modders, that implement an event on change of any inventory.
See for example
http://lua-api.factorio.com/latest/even ... ry_changed
But then the inventory still needs to be scanned, if the wanted item is inside. That for every inventory change for every player takes a lot of CPU time.