• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
The command:

Code:
      command = { type = free_energy value = 10 }

Used in an event:

Code:
event = { #energy cheat
    id = 1337010
    random = no
    persistent = yes #can be fired more than once

    name = "FREE ENERGY"
    desc = "Free energy cheat"
    style = 2

    action = {
        name = "OK"
        ai_chance = 100
      command = { type = free_energy value = 10 } #10 off-map energy
    }
    action = {
        name = "No thanks"
        ai_chance = 0
        command = { }
    }
}

In the future, the Modding Questions thread is probably a better place for this sort of thing, but eh
 
Will it work if I add this to countries files in scenario folder, beacuse I've added that value and the game keeps crashing when i select country and click to start the game
 
Will it work if I add this to countries files in scenario folder, beacuse I've added that value and the game keeps crashing when i select country and click to start the game

For Scenarios folder, you need this command

Energy - as example

free = { Energy = 100 }