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

Victoria 3 - Dev Diary #28 - Flags

16_9.jpg

Hi folks, welcome to another dev diary, and get hyped for what I know you're longing for: flags. I'm Ofaloaf, one of the designers on the game, and somehow they let me write a dev diary. Let's go!

Let's start at the beginning. What is a flag?

20211201_103509_sm.jpg

A flag is a thing of beauty.
A flag is a decorative design on a bit of fabric, often used to communicate something, such as a message or identity, to the viewer. In Victoria 3, all flags are flags associated with countries. They're neat designs that serve as visual shorthand for a state, and they just look pretty too, most of the time.

orange free state.PNG

In the Victorian era, what counts as the flag of a country was a bit… vague, depending on who you were asking. Some countries, like the United States and France, very clearly had a single flag that served as the national flag that everybody knew them by, but others weren't so clear.

Look - here's some period examples of what people considered Russia's flag to be:

Selection from 'The maritime flags of all nations', 1832, as seen on Wikimedia Commons
The_maritime_flags_of_all_nations,_1832_(FOL_LA_ROQ_1542_NOR)_croppo.jpg


Selection from 'Pavillons et cocardes des principales puissances du globe d'apres des documens officials', 1850, as seen in the David Rumsey Map Collection.
russie.png

First thing that's noticeable is that it's not just one flag. The tricolor that is used as the Russian Federation's flag now was just one of several in use in the 19th century up through to the 1850s, as a merchant flag or civil ensign used to identify civilian ships in foreign ports. The Romanov dynasty's emblem is also used as a Russian flag, and then there's two naval jacks - the flags with the blue saltires or diagonal crosses stretching across them- which are also widely recognized. Eventually, the Russian government started trying to consolidate everything and issued a decree on June 23rd, 1858, proclaiming a single "state flag", a black-gold-white tricolor. In 1883, the white-blue-red "merchant" flag was officially accepted as a national flag to be used on special occasions, and in 1896 it wholly replaced the black-gold-white tricolor as Russia's state flag.

Man, ain't that a doozy of flags to pick from! How are we supposed to pick which one to use in Victoria 3? Well, good news there - we can use more than one flag! We got dynamic flags triggered by script!

russianflags.png

Any trigger which is valid for a country, like checking if a specific state is owned by the player or if a war is happening, can be used to trigger a different flag in the game. We've used that to spice up flag varieties in different situations - for example, a united Scandinavian monarchy has a different flag depending on whether the Danes are in charge or not:

scandinavia.png

Spicy! And that's on top of just using the usual checks like governments, the number of states in a country, and so forth - right, yes, you probably want to see the stars in the American flag, don't you? I know I do. They do change based on the number of states in the Union.

I can taste the freedom.
freedom.png

There's even some unique flags for when one country becomes the puppet of another. In some cases, a generic "oh no I am a puppet now" design is used for the puppeted country's flag with the "master" country's flag inserted as a canton in the upper-left corner of the puppeted country's flag, while in other cases a wholly unique flag is made for a particular combination of puppeteer and puppet.

puppeteer and puppet.png

There's also a sort of fallback system, to provide flags for every polity even if we can't really settle on one particular design, or if they're feisty dynamic rebels, or what-have-you. Flags can be randomly generated, with particular triggers set so some flag elements only appear if a tag is of a particular culture, religion, or ideology, among other things.

randomflags.png

And, for the modders out there, it shouldn't be difficult for you folks to put together more flags if you want (and of course you want to make more flags, right?) - we use a system similar to the one Crusader King 3 uses for its coats of arms. France's default flag is a simple example of how the system works:

Code:
FRA = {
    pattern = "pattern_solid.tga"
    color1 = "blue"

    colored_emblem = {
        texture = "ce_tricolor_vertical.dds"
        color1 = "white"
        color2 = "red"
    }
}

All that's going on there is that a plain blue field is set as the background, and then a single graphical element with the central third and right third of the tricolor as colorable sections is slapped on top, with white and red respectively added in there to make a nice and tidy blue-white-red tricolore. Magnifique!

And to plug that bad boy into the game, all you need is a little scripting in another file that goes a little something like this:

Code:
FRA = { # France
    flag_definition = {
        coa = FRA
        subject_canton = FRA
        allow_overlord_canton = yes
        coa_with_overlord_canton = FRA_subject        
        priority = 1
    }
    flag_definition = {
        coa = FRA
        subject_canton = FRA
        allow_overlord_canton = yes        
        overlord_canton_scale = { 0.337 0.337 }            
        priority = 10
        trigger = { 
            coa_def_republic_flag_trigger = yes
        }
    }
    [And so forth. Find more flags by playing the game!]    
}

You can create as many flag definitions as you like, and you can plug the same flag design into multiple definitions or make a unique one for every definition if you want to go insane scripting it all up. Triggers are straightforward to plug in (and you can script generic triggers if you don't want to write the same combination of checks over and over again). If you want to mod flags, there's a delightful amount of flexibility with this system.

So there you have it! We got flags. We got lots of flags! We got randomized combinations of flags that go on for days! You could script more flags if you really want to poke at the game's innards! Flags.

Now, as we march towards the Holiday season, the dev diaries are taking a bit of a break. We will be back in January with a brand new topic in our first dev diary for 2022. Happy Holidays and a Happy New Year!
 
  • 256Like
  • 170Love
  • 20
  • 4
  • 2Haha
  • 1
Reactions:
Let's say I think the US flag is too cluttered, and it is in fact demeaning to use your own flag as a tally paper. I assume there is a way to mod a decision into the game so I can switch over to the Betsy Ross flag?
You can trigger a flag on anything, so having a decision that sets a flag that tells the game to always use a particular flag would be pretty trivial.
 
  • 31Like
  • 13
  • 2Love
  • 1
Reactions:
You can trigger a flag on anything, so having a decision that sets a flag that tells the game to always use a particular flag would be pretty trivial.
decisions confirmed!
 
  • 7Haha
  • 2Like
  • 1Love
Reactions:
like checking if a specific state is owned by the player or if a war is happening
Oh, so we'll get proper Philippines flags? This whole system is way more than I expected and I'm super excited to see it in action. <3
 
  • 1
Reactions:
Hi folks, welcome to another dev diary, and get hyped for what I know you're longing for: flags. I'm Ofaloaf, one of the designers on the game, and somehow they let me write a dev diary. Let's go!

Let's start at the beginning. What is a flag?

View attachment 786428
A flag is a thing of beauty.
A flag is a decorative design on a bit of fabric, often used to communicate something, such as a message or identity, to the viewer. In Victoria 3, all flags are flags associated with countries. They're neat designs that serve as visual shorthand for a state, and they just look pretty too, most of the time.

In the Victorian era, what counts as the flag of a country was a bit… vague, depending on who you were asking. Some countries, like the United States and France, very clearly had a single flag that served as the national flag that everybody knew them by, but others weren't so clear.

Look - here's some period examples of what people considered Russia's flag to be:

Selection from 'The maritime flags of all nations', 1832, as seen on Wikimedia Commons
View attachment 786430

Selection from 'Pavillons et cocardes des principales puissances du globe d'apres des documens officials', 1850, as seen in the David Rumsey Map Collection.
View attachment 786431
First thing that's noticeable is that it's not just one flag. The tricolor that is used as the Russian Federation's flag now was just one of several in use in the 19th century up through to the 1850s, as a merchant flag or civil ensign used to identify civilian ships in foreign ports. The Romanov dynasty's emblem is also used as a Russian flag, and then there's two naval jacks - the flags with the blue saltires or diagonal crosses stretching across them- which are also widely recognized. Eventually, the Russian government started trying to consolidate everything and issued a decree on June 23rd, 1858, proclaiming a single "state flag", a black-gold-white tricolor. In 1883, the white-blue-red "merchant" flag was officially accepted as a national flag to be used on special occasions, and in 1896 it wholly replaced the black-gold-white tricolor as Russia's state flag.

Man, ain't that a doozy of flags to pick from! How are we supposed to pick which one to use in Victoria 3? Well, good news there - we can use more than one flag! We got dynamic flags triggered by script!

Any trigger which is valid for a country, like checking if a specific state is owned by the player or if a war is happening, can be used to trigger a different flag in the game. We've used that to spice up flag varieties in different situations - for example, a united Scandinavian monarchy has a different flag depending on whether the Danes are in charge or not:

Spicy! And that's on top of just using the usual checks like governments, the number of states in a country, and so forth - right, yes, you probably want to see the stars in the American flag, don't you? I know I do. They do change based on the number of states in the Union.

I can taste the freedom.
View attachment 786435
There's even some unique flags for when one country becomes the puppet of another. In some cases, a generic "oh no I am a puppet now" design is used for the puppeted country's flag with the "master" country's flag inserted as a canton in the upper-left corner of the puppeted country's flag, while in other cases a wholly unique flag is made for a particular combination of puppeteer and puppet.

There's also a sort of fallback system, to provide flags for every polity even if we can't really settle on one particular design, or if they're feisty dynamic rebels, or what-have-you. Flags can be randomly generated, with particular triggers set so some flag elements only appear if a tag is of a particular culture, religion, or ideology, among other things.

And, for the modders out there, it shouldn't be difficult for you folks to put together more flags if you want (and of course you want to make more flags, right?) - we use a system similar to the one Crusader King 3 uses for its coats of arms. France's default flag is a simple example of how the system works:

Code:
FRA = {
    pattern = "pattern_solid.tga"
    color1 = "blue"

    colored_emblem = {
        texture = "ce_tricolor_vertical.dds"
        color1 = "white"
        color2 = "red"
    }
}

All that's going on there is that a plain blue field is set as the background, and then a single graphical element with the central third and right third of the tricolor as colorable sections is slapped on top, with white and red respectively added in there to make a nice and tidy blue-white-red tricolore. Magnifique!

And to plug that bad boy into the game, all you need is a little scripting in another file that goes a little something like this:

Code:
FRA = { # France
    flag_definition = {
        coa = FRA
        subject_canton = FRA
        allow_overlord_canton = yes
        coa_with_overlord_canton = FRA_subject       
        priority = 1
    }
    flag_definition = {
        coa = FRA
        subject_canton = FRA
        allow_overlord_canton = yes       
        overlord_canton_scale = { 0.337 0.337 }           
        priority = 10
        trigger = {
            coa_def_republic_flag_trigger = yes
        }
    }
    [And so forth. Find more flags by playing the game!]   
}

You can create as many flag definitions as you like, and you can plug the same flag design into multiple definitions or make a unique one for every definition if you want to go insane scripting it all up. Triggers are straightforward to plug in (and you can script generic triggers if you don't want to write the same combination of checks over and over again). If you want to mod flags, there's a delightful amount of flexibility with this system.

So there you have it! We got flags. We got lots of flags! We got randomized combinations of flags that go on for days! You could script more flags if you really want to poke at the game's innards! Flags.

Now, as we march towards the Holiday season, the dev diaries are taking a bit of a break. We will be back in January with a brand new topic in our first dev diary for 2022. Happy Holidays and a Happy New Year!
Was not expected such a deep system for Flags. I am very pleasantly surprised.
 
Excellent! The moddability of the system is going to be great.
 
Oh hey, another question: are there any flags other than the American flag which change the number of stars they have depending on the amount of incorporated states? The CSA "stars and bars" flag for example?

And actually, on the topic of the confederacy, are all three of its historically used flags going to be available for use in game?
 
  • 3
  • 2Like
Reactions:
Yes and no. Each variant has to be scripted with properly positioned elements, but it's a lot less work than making and exporting an entire new flag image as you really just have to add and position the correct number of star elements.
Hm. Wish I could see this example. So I'm supposed to position each star element individually in the script, like decals?
 
Hm. Wish I could see this example. So I'm supposed to position each star element individually in the script, like decals?
Yeah. CK3 is a good guide to see how that all works, since the backend script systems are fairly similar.
Roman Mars wants to have a word with you
But Roman Mars doesn't understand: that's the flag of Michigan. I am from Michigan. Ergo, it is a beautiful flag.
 
  • 30Haha
  • 13Like
  • 3Love
  • 2
  • 1
Reactions:
"Serve as a visual shorthand for a state"
[Vic3 Anarchists will remember that]
But yes looks excellent
"What is this state you speak of? Sounds reactionary."

But seriously, I really hope we can build basically anarchism, having a flag for it (regardless of which country you are(n't anymore)) would be the cherry on top.
 
  • 2
  • 1Haha
Reactions:
Will there be a political map mode with flags? I know this like the least important thing but i think it would be cool to pause the game and zoom out and switch my map mod to see a map like this but with good graphics, shadows and better ocean.
Flag-map_of_the_world_(1900).png
 
  • 10Like
  • 4
  • 2Love
  • 2
Reactions:
Will there be a political map mode with flags? I know this like the least important thing but i think it would be cool to pause the game and zoom out and switch my map mod to see a map like this but with good graphics, shadows and better ocean.
View attachment 786785
Seems like plenty of work just for a screenshot.

Maybe modders will do something with that system that places transparent flags on land during wars
 
  • 6Like
  • 1
Reactions:
Great!
Would you like to share more ready-made flag pictures? And could you please tell me the pixels and proportions? (I can't wait to make some V3 flags in advance. lol) :p
 
  • 1Love
Reactions:
Let's say I think the US flag is too cluttered, and it is in fact demeaning to use your own flag as a tally paper. I assume there is a way to mod a decision into the game so I can switch over to the Betsy Ross flag?

Treason!

Yeah. CK3 is a good guide to see how that all works, since the backend script systems are fairly similar.

But Roman Mars doesn't understand: that's the flag of Michigan. I am from Michigan. Ergo, it is a beautiful flag.

You do realize that you pretty much have to have Pocatello as a releasable country now, don't you? You can't not have the indisputable champion of 'world's ugliest flag' after all of this.

Also, glad that the team went through the work to make sure everything works out for a 100-state US.

I think @Wizzington has been fielding most of the US flag questions, so I'll ask: at release, have you gone in the other direction, as well? Are there flags all set for a US that has - and excuse me while I vomit at the notion - lost states? In other words, can you have a 1 star flag?

And, on that sickening notion, does the Civil War change the flag? The Union, of course, would never have changed their flag when the Confederacy seceded, so hopefully there is some flag to check to make sure that the flag stays constant.
 
  • 1Like
  • 1Haha
  • 1
Reactions: