Technologies of scenario

This subforum contains all the issues which we already resolved.
User avatar
Reygan
Fast Inserter
Fast Inserter
Posts: 177
Joined: Tue Jan 28, 2014 8:42 pm
Contact:

Technologies of scenario

Post by Reygan »

When save was exported to scenario, its researched technologies stay researched, but technologies with upgrades resets its bonuses.
Is there any way to editing technology tree in map editor?

Also, is any way to switching all alredy researched technologies to unresearched?
Instead of that -

Code: Select all

game.player.force.technologies["some-tech"].researched = false
Daniel V. Lenskiy
slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: Technologies of scenario

Post by slpwnd »

Map editor can't do this at the moment. The best is to attach a script that will put things in order on startup.

As for the second question. There is not explicit disable all function in the api. But you can simply iterate through the game.player.force.technologies table and set technologies to not researched in a cycle.

Something like (from the top of my head without trying):

Code: Select all


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

User avatar
Reygan
Fast Inserter
Fast Inserter
Posts: 177
Joined: Tue Jan 28, 2014 8:42 pm
Contact:

Re: Technologies of scenario

Post by Reygan »

Yeah, this is the only way. Will be better if exist one command like game.force.researchalltechnologies(), but with reverse acion.
Daniel V. Lenskiy
kovarex
Factorio Staff
Factorio Staff
Posts: 8298
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Technologies of scenario

Post by kovarex »

Hi, this is solved for 0.10.9, and the changes are described here: https://forums.factorio.com/forum/vie ... =30&t=5066
Reygan wrote:Yeah, this is the only way. Will be better if exist one command like game.force.researchalltechnologies(), but with reverse acion.
There is game.player.force.reset() now, it resets everything (in 0.10.9)
Post Reply

Return to “Resolved Problems and Bugs”