Modding Research lab speed?
Modding Research lab speed?
Is it possible to change the speed of research labs? I could find no "speed" property in the base files.
I'm trying to write a mod that slows down most aspects of the game. But I figure this could be useful, for example, for a mod that has several lab types with different speeds.
I'm trying to write a mod that slows down most aspects of the game. But I figure this could be useful, for example, for a mod that has several lab types with different speeds.
Re: Modding Research lab speed?
You could probably lower the energy usage, and/or add a technology that uses the laboratory-speed modifier and try giving it a negative modifier amount, but those are both guesses, I'm not certain either would work.
Re: Modding Research lab speed?
This idea crossed my mind as well but I thought for sure it wouldn't work... But it turns out it does!FreeER wrote:You could probably lower the energy usage
Using this upsets the balance a bit (since for other buildings I'm keeping the same power consumption), but labs aren't a big power consumer anyway.
I do have another question though: One of things I tried is to loop over all technologies and increase the time it takes to research them. However, it seemed that once the technologies are defined in the base, they're immutable and can't be changed - any assignment I made had no effect. Is it possible to change technology parameters?
-
- Filter Inserter
- Posts: 402
- Joined: Fri May 23, 2014 8:54 am
- Contact:
Re: Modding Research lab speed?
Code: Select all
game.player.force.resettechnologies()
game.player.force.resetrecipes()
game.reloadscript()
Re: Modding Research lab speed?
Thanks! That's what I was missing. I loaded a saved game to do experimentations, I needed to start fresh or else run these commands.JamesOFarrell wrote:This might work. It is designed to be used in amigration script but may work outside of it. Look at the Lua/Force wiki page for more info: https://forums.factorio.com/wiki/inde ... =Lua/ForceCode: Select all
game.player.force.resettechnologies() game.player.force.resetrecipes() game.reloadscript()
Re: Modding Research lab speed?
probably misread what you wrote and all of this is useless
-
- Filter Inserter
- Posts: 402
- Joined: Fri May 23, 2014 8:54 am
- Contact:
Re: Modding Research lab speed?
I read it and found it quiet useful. Thanks FreeER.FreeER wrote:probably misread what you wrote and all of this is useless
Re: Modding Research lab speed?
Oh good, I didn't waste my time then Glad you found it helpful, I thought about deleting it but figured that it was possible for someone who didn't know to find it (but I still put it in a spoiler since it doesn't directly solve Holy-Fire's problem lol)JamesOFarrell wrote:I read it and found it quiet useful. Thanks FreeER.
Re: Modding Research lab speed?
Yes, that's a good reference but the part about looping through all technologies I figured out independently, I was missing reloading the new definitions in an already running game.FreeER wrote:Oh good, I didn't waste my time then Glad you found it helpful, I thought about deleting it but figured that it was possible for someone who didn't know to find it (but I still put it in a spoiler since it doesn't directly solve Holy-Fire's problem lol)JamesOFarrell wrote:I read it and found it quiet useful. Thanks FreeER.
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Modding Research lab speed?
You've gone through this huge convoluted process here.
I cloned the lab, and added the tag "crafting_speed = 2," and it seems to work.
I cloned the lab, and added the tag "crafting_speed = 2," and it seems to work.
Re: Modding Research lab speed?
I'd say cloning is a way, yet the less "clean" solution as it adds another item eventually.
The way that has been described above is interesting as you can basically affect everything that has to deal with recipes, even the ones that are done in special labs like DyTech I guess.
The way that has been described above is interesting as you can basically affect everything that has to deal with recipes, even the ones that are done in special labs like DyTech I guess.
Re: Modding Research lab speed?
Interesting, thanks.bobingabout wrote:You've gone through this huge convoluted process here.
I cloned the lab, and added the tag "crafting_speed = 2," and it seems to work.
Re: Modding Research lab speed?
Are you sure this works? I tried adding the tag to the lab and it had no effect.bobingabout wrote:You've gone through this huge convoluted process here.
I cloned the lab, and added the tag "crafting_speed = 2," and it seems to work.