Page 1 of 1
[Solved]Map editor - Research
Posted: Fri Oct 24, 2014 12:20 pm
by Myaskol
Hey guys,
Short: Is there any way to set the research completed in the map editor?
Somewhat longer: I am creating some kind of playground for myself where i have a working factory and can expand from there. At the moment I was looking into oil, steel and therefore creating research pack 3. Now the 'problem' appears. You cannot make steel if you don't have the research for it.
Is there any way to have a research completed when you start the game? In my other post someone said something about a startup script so you can add items to the player. Is this also posible to add certain researches? If so, can someone explain to me how to do this?
Re: Map editor - Research
Posted: Fri Oct 24, 2014 12:51 pm
by Devcod
You can not do it in map editor (or i don't know how :) ). Yes, you can do it via script/mod
Here you have working (probably) script/mod:
Code: Select all
require "defines"
local techs = {
"laser",
"steel-processing"
}
for tech in techs do
game.player.force.technologies[tech].researched = true
end
The technologies you want to have at game start should be enclosed with "" and separated with "," char. The code above will research Laser and Steel processing technologies - technologies names are all lower-caps + - instead of space.
The issue is you need to create new mod that will run it (or modify code to make it work in single line and then use console). You can also use following code directly in console, without any scripts:
Code: Select all
game.player.force.technologies["technology-name"].researched = true
If you want all technologies researched then use in console:
Code: Select all
game.player.force.researchalltechnologies()
Re: Map editor - Research
Posted: Fri Oct 24, 2014 12:56 pm
by Myaskol
Thank you for the fast answer!
Where should I have posted this then? isnt the map editor gameplay as well? ( needed help with map editing right
)
I think i ll just stick with the command codes then. seems a lot easyer *lazy*
Thanks again!
Re: [Solved]Map editor - Research
Posted: Tue Feb 10, 2015 3:04 pm
by neetzow
Where I should put the file?
Is it a txt or I must put a different termination?
Will the game recognize it as a mod automatically, or there is more missing?
Re: [Solved]Map editor - Research
Posted: Fri Apr 01, 2016 7:06 am
by ozcolemans
hey guys
I have made a world on map editor is it possible for me to play that word.
thx
Re: [Solved]Map editor - Research
Posted: Sat Apr 02, 2016 10:51 pm
by daniel34
ozcolemans wrote:hey guys
I have made a world on map editor is it possible for me to play that word.
thx
After saving the map in the map editor go to Play --> Custom scenario, your map is then listed in the User scenarios.