How do I make a technology available from the start?

Place to get help with not working mods / modding interface.
Post Reply
NTaya
Manual Inserter
Manual Inserter
Posts: 3
Joined: Wed Jul 10, 2019 2:06 pm
Contact:

How do I make a technology available from the start?

Post 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.)

NTaya
Manual Inserter
Manual Inserter
Posts: 3
Joined: Wed Jul 10, 2019 2:06 pm
Contact:

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

Post 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.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

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

Post by darkfrei »

You can enable the recipe in the data stage.

Post Reply

Return to “Modding help”