Style guide - Imperia-Development-Victoria-3/Victoria-3-dev-utilities GitHub Wiki

Coding Practices

When adding new elements to the game code:

  • Prefix new effects, variables (used in multiple files), conditions, modifiers, and other game objects with babylon_.
  • Place such elements in a file with babylon_ prefix.

Example:

If you're creating a new file, name it babylon_newfile.yml and if you're adding something to an existing file, it should look like babylon_new_variable = {.

Indentation

Paradox script uses a javascript-like language, therefore we adopt one of the style formats. The indentations has very few rules though:

every opening = {
    should result in indented code = {
        and further indented code
    }
    and return after closing
    and restart = {
        for further code
    }
    
    additionally = {
        multiple objects after another
    }

    Should have a newline inbetween = {
        But only on the same level = {
            so not here
        }
    }
    single elements don't have this whiteline 
}