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

AKjeldsen

Transnational Progressive
104 Badges
Oct 21, 2003
924
126
endlessimmensity.wordpress.com
  • Cities: Skylines
  • Majesty 2
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Semper Fi
  • Sengoku
  • Victoria 2
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • 500k Club
  • Europa Universalis III Complete
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Mount & Blade: With Fire and Sword
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Stellaris: Necroids
  • Diplomacy
  • Cities in Motion
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Commander: Conquest of the Americas
  • Deus Vult
  • Hearts of Iron II: Armageddon
  • Europa Universalis III
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III Collection
A More Perfect Union is a very simple mod I made to explore how much of the federation behaviour is moddable.

Currently, the main feature is to require a vote for inviting new members into a federation, just as for alliances. This was very simple to do, just a matter of copying a line of code, and seems to work fine. Unfortunately, the voting system never activates the same way when someone asks to join a federation, I suspect because of how the federation president interacts with the asker, but at least it's something.

In addition, I have created a planetary edict ("Federal Proposal") that calls an event structure. At the moment it does nothing, but might be useful for doing some more advanced things, such as asking the president for a war declaration. The game appears to recognise e.g. declare_war as a valid command, but it's not clear to me how it works in terms of scope and such. Any further work will probably have to wait until smarter people than me work out the full details of scopes and commands, but at least it seems like there are some possibilities.

It's all very proof of concept at the moment, but perhaps you will find it useful/interesting. Use at own risk, etc.

Download:
http://www.scripturus.eu/projects/perfectunion/perfectunion.zip
Steam Workshop:
http://steamcommunity.com/sharedfiles/filedetails/?id=683417706

Screenshots:

T3Uikmd.jpg


AOpbhSn.jpg


92Gb23w.jpg


NAcGPg5.jpg
 
Last edited:
  • 10
  • 1
  • 1
Reactions:
Really excited to see how this mod progresses! Was kind of disappointing to realise that in vanilla, if anything, being in a federation just made the game more boring and less fun,,,
 
Is there a way to add voting for going to war? And a way to make the vote 66%-85% instead of 100%
I'm pretty sure there isn't, unfortunately. Alliances and federations actually use the same event in the script for declaring wars, so the voting mechanic is already "built in", as it were. It just doesn't get used by federations, so that's something happening in the code.
 
I've been looking into similar things, and found this thread. I've essentially got to the same stage, and am somewhat stuck on the idea of voting for federation president. I wish all these mechanics weren't hard-coded.

It turns out you can set federation president by effect, so the nearest I've got is electing the most 'well regarded' federation member as president every time an election rolls round (1 day after).

Watching this mod with interest, though, and if you make any progress, give us an update!
 
  • 2
Reactions:
It turns out you can set federation president by effect, so the nearest I've got is electing the most 'well regarded' federation member as president every time an election rolls round (1 day after).

Good to know. I wonder if it would be possible to do some sort of weighted function taking different factors into account, e.g. regard, population size, military power, etc. At least all those things should be accessible via conditionals, so I guess theoretically…? I don't know.

Do you have your code uploaded anywhere? If you don't mind, I would be interested in taking a look at it. Still trying to figure out exactly how all these parts work together.