Page 1 of 1

How do I make a technology available from the start?

Posted: Wed Jul 10, 2019 2:12 pm
by NTaya
I want players to start with a certain technology already unlocked. This is not a technology that I made myself, it's from another mod. I'm not even sure what kind of script.on_event should I use if any, and I can't find anything about that in the docs. (I've never modded the game before, so please be patient with me.)

Re: How do I make a technology available from the start?

Posted: Wed Jul 10, 2019 2:39 pm
by NTaya
Update: while the topic was getting approved, I figured it out myself.

Code: Select all

script.on_init(function(event)
  game.forces["player"].technologies["<technology_name>"].researched=true
end)
I hope this would be helpful to other newbies like me in the future.

Re: How do I make a technology available from the start?

Posted: Wed Jul 10, 2019 3:10 pm
by darkfrei
You can enable the recipe in the data stage.