Page 1 of 1

Resetting technology-techtree-research

Posted: Mon Aug 31, 2015 5:39 pm
by Gergith
Hello;

I'm having huge difficulties trying to figure this out.

I'm trying to figure out how to take a save game file that has everything researched back to a game wher enothing is researched.

I'm having troubles with the commandline/lua commands I've been finding.

Any help would be greatly appreciated!

EDIT:
To clarify a bit further: I cheated in a save game file where I was testing out a ton of new mods together (Bobs + 5dim + Yuoki). So to get the hang of what I was doing I used Test Mode to cheat heavily, including researching everything with the click of a button. Now that I am getting the hang of it, I want to actually go through the process of researching the technologies by hand (I know that sounds silly, but everyone plays differently! ;-))

I'm open to various suggestions/ideas. So for instance, if there is a way to copy my entire world into a new save game file that strips out the researched tech this way. Thansk either way!

Re: Resetting technology-techtree-research

Posted: Mon Aug 31, 2015 6:00 pm
by prg

Code: Select all

for _,v in pairs(game.player.force.technologies) do v.researched=false end

Re: Resetting technology-techtree-research

Posted: Mon Aug 31, 2015 7:14 pm
by Gergith
prg wrote:

Code: Select all

for _,v in pairs(game.player.force.technologies) do v.researched=false end

Didn't give me an error, but didn't seem to work :(

Re: Resetting technology-techtree-research

Posted: Mon Aug 31, 2015 7:21 pm
by MalcolmCooks
did you add /c in front? Otherwise it will just send as a chat message, not a command

Re: Resetting technology-techtree-research

Posted: Mon Aug 31, 2015 7:24 pm
by orzelek
Try this:

Code: Select all

/c game.player.force.reset()
Should reset everything for the force according to wiki.

Re: Resetting technology-techtree-research

Posted: Mon Aug 31, 2015 7:37 pm
by Gergith
MalcolmCooks wrote:did you add /c in front? Otherwise it will just send as a chat message, not a command

I didn't cause I'm stupid.

Code: Select all

/c for _,v in pairs(game.player.force.technologies) do v.researched=false end
works perfect