Re researcher

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
User avatar
Bl4ckmail
Inserter
Inserter
Posts: 29
Joined: Sun Aug 16, 2015 10:31 pm
Contact:

Re researcher

Post by Bl4ckmail »

I was wondering if ther would be a way to re reseach all things with a script. So you could ad a mod later in game.

With re research i mean whenn you haf automation researched and you add a mod the unlocks stuff at automation you normaly wouldn't have accses to that stuff so by re researching a script would delet all researches and research them again so you have the same ass before.
Hope it made sens.

Mfg Bl4ckmail

Edit found it out by myself here is the comand for anyone that is interested

Code: Select all

for k, v in pairs(game.player.force.technologies) do
    if(v.researched == true)then
		v.researched = false
		v.researched = true
	end
end
Last edited by Bl4ckmail on Sat Sep 24, 2016 6:35 am, edited 2 times in total.
Koub
Global Moderator
Global Moderator
Posts: 7955
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Re researcher

Post by Koub »

Koub - Please consider English is not my native language.
daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: Re researcher

Post by daniel34 »

Moved to Gameplay Help.
quick links: log file | graphical issues | wiki
User avatar
Bl4ckmail
Inserter
Inserter
Posts: 29
Joined: Sun Aug 16, 2015 10:31 pm
Contact:

Re: Re researcher

Post by Bl4ckmail »

Koub wrote:https://forums.factorio.com/wiki/inde ... a_commands

search "Finish research"
I konw that but i am talking about a script or something like that to automaticly delet all research that has been made an then research it to this point again. Becouse some mods add recepies to aerly game technologies and whenn you add them later you have no accses to that receoie. i know it would be possible to do it by hand but i want to ad in dytech to my existing midgame gameplay so there would be many technologies so i thought a generell scipt to do that would be usefull for many people. But i dont now lua to well so i am asking if someone could do something like that.
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3749
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Re researcher

Post by DaveMcW »

Code: Select all

/c for _, player in pairs(game.players) do player.force.reset_technologies() end
Mods that add stuff to existing technologies should be doing this in on_init() already. If not, complain in the mod thread.
User avatar
Bl4ckmail
Inserter
Inserter
Posts: 29
Joined: Sun Aug 16, 2015 10:31 pm
Contact:

Re: Re researcher

Post by Bl4ckmail »

DaveMcW wrote:

Code: Select all

/c for _, player in pairs(game.players) do player.force.reset_technologies() end
Mods that add stuff to existing technologies should be doing this in on_init() already. If not, complain in the mod thread.
I tried this but it doesnot give me my recipe in the inventory.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Re researcher

Post by ssilk »

So it seems not to have a recipe?
Give use a little bit more information. Which mod? What recipe? What needed technology? ....
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
User avatar
Bl4ckmail
Inserter
Inserter
Posts: 29
Joined: Sun Aug 16, 2015 10:31 pm
Contact:

Re: Re researcher

Post by Bl4ckmail »

I have bobs mod and 5 dim mods on my savegame i researched the automation 4 and it gave me accses to the assembling machine 4 of 5 dim becouse the 5 dim mod overwrote the bob mods assebling achines. Now i would like to remove the 5 dim mods becouse i wnat hte stuff from bobs mod but after removing it the research automation 4 said it would give me accses to bobs assemblin machine but i cannot find it in the crafting window. the only may of solving the problem i found is

Code: Select all

game.local_player.force.technologies["automation-4"].researched = false
		game.local_player.force.technologies["automation-4"].researched = true
this is a way but whenn der are more things like this it would be cool to have a script that automaticly does that.

At the time i am trieng to write a script mysef but i dont know how to get a list of all resaerch in the game(includig mods).

Thanks for your halp
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Re researcher

Post by prg »

Maybe

Code: Select all

for k,v in pairs(game.local_player.force.technologies) do v.researched=false end
game.local_player.force.research_all_technologies()
would help?
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
User avatar
Bl4ckmail
Inserter
Inserter
Posts: 29
Joined: Sun Aug 16, 2015 10:31 pm
Contact:

Re: Re researcher

Post by Bl4ckmail »

prg wrote:Maybe

Code: Select all

for k,v in pairs(game.local_player.force.technologies) do v.researched=false end
game.local_player.force.research_all_technologies()
would help?
This would research it all.
I finaly made it my self

Code: Select all

for k, v in pairs(game.local_player.force.technologies) do
    if(v.researched == true)then
		v.researched = false
		v.researched = true
	end
end
Thanks for all your help and sugestions
Post Reply

Return to “Gameplay Help”