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

adonys

Sergeant
88 Badges
Apr 5, 2008
85
2
  • BATTLETECH: Season pass
  • Shadowrun: Dragonfall
  • Empire of Sin
  • Mount & Blade: With Fire and Sword
  • Knights of Pen and Paper 2
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Surviving Mars: First Colony Edition
  • Steel Division: Normandy 44
  • Steel Division: Normandy 44 Deluxe Edition
  • Knights of Honor
  • Crusader Kings Complete
  • BATTLETECH
  • Prison Architect
  • Crusader Kings III
  • Stellaris: Necroids
  • Tyranny - Bastards Wound
  • Stellaris: Humanoids Species Pack
  • Surviving Mars: Digital Deluxe Edition
  • Imperator: Rome Sign Up
  • Imperator: Rome - Magna Graecia
  • Stellaris: Federations
  • BATTLETECH: Heavy Metal
  • Stellaris: Lithoids
  • Age of Wonders: Planetfall Sign Up
  • BATTLETECH: Flashpoint
  • Shadowrun: Hong Kong
  • Europa Universalis III Complete
  • Steel Division: Normandy 44 -  Back to Hell
  • Shadowrun Returns
  • Europa Universalis III Complete
  • BATTLETECH - Digital Deluxe Edition
  • Surviving Mars: First Colony Edition
  • Imperator: Rome Deluxe Edition
  • Stellaris: Megacorp
  • Teleglitch: Die More Edition
  • Rome: Vae Victis
  • War of the Roses
  • Stellaris: Distant Stars
  • 500k Club
  • Pride of Nations
  • Mount & Blade: Warband
  • Tyranny: Archon Edition
  • Stellaris: Galaxy Edition
[TECH] - Elections! v1.0

A working example of a complete Elections mechanism for a Second Consul for Rome.

The elections are held, and after the winner is decided, it will be given the Second Consul title. After his office term expires (45 days), he will have the Second Consul title removed, and a new election will be held.

In order to make this work, I had to develop a special mechanism which actually keeps the elections in a random AI country (in order to have access to AI throwing the dices for the options, as only AI can fire the ai_chance effect) and sends the results back to the republic! :) Also, as this is a [TECH] example, it is filled up with testing messages and you'll have to don't get upset on me because of them) (they could be made as silent AI events for display purpose, but I'm lazy and I don't have time for cosmetics) :p

Be careful though, the conditions required to participate in the Second Consul Elections conditions are VERY HARD to meet:
1) the character must a male having over 42 years, no ruler or prisoner in order to can hold the Second Consul title and participate to Elections
2) to win the Elections for the Second Consul title having:
- Senate and Patricians support (with the biggest chance to win the elections) a candidate must be from the biggest party (to get Senate's support), be a patrician (have a family prestige over 1000 in order to get Patricians' support) and be known (have a popularity over 60)
- Senate, Equestrian and Plebeian support (with a modest chance to win) a candidate must be from the biggest party (to get Senate's support), be an equestrian (have a family prestige over 500 and bellow 1000 in order to get Equestrian's support) and be popular (have a popularity over 80)
- Plebeian support (with an almost impossible chance to win) a candidate must not be patrician or equestrian (have a family prestige bellow 500) and be very popular (have 100 popularity)

Of course this process can, must and will be enriched. A few quick things I think I'll do:
- have several Elections sequences (events), allowing candidates meeting more different conditions to participate in the Elections process (an event will check first conditions for A, B and C social election interest groups and will pick up a candidate 1 for the second Elections round; another event will check the last conditions for D, E and F social election interest groups and will pick up another candidate 2 for the second Elections round; and finally, a final Elections round event will chose between the candidate 1 and candidate 2 picked up in the first elections round, resulting a winner picked up from 6 possible condition groups (the ai_chance function only allows atm only 3 options, at least never saw it used with more than 3, and I didn't had time to check if having more than 3 options works)(LATER EDIT: actually I've found at least one case in which PI uses an ai_chance function with more than 3 options, so it can be made to have more than 3 of them on a round)
- have several special characters marked during the time between two consecutive elections by special events (for example: character X becomes a New Man!) and participating by default in the second Elections round
- some more things (don't have time to detail all of them right now)

The screenshots bellow are illustrating this mechanism with the Plebs winning the Elections for a Second Consul : (please take not that the message stating the Plebeian elections victory contains a wrong description (I've modified the conditions and forgot to fix the description in the test example I've got the screenshots from).

PS: I've also added an easy version, with relaxed conditions and greater class historical accuracy for learning (just 18 years old required for Second Consul position; in martial, civic or religious party and just 20 popularity for Senate and Patricians; in mercantile party and just 30 popularity for Equestrians, Senate and Plebeians and in popular party with just 40 popularity for Plebeians)

Changelog
v1.01
easy version fixed/tweaked
 

Attachments

  • Elections_1.jpg
    Elections_1.jpg
    333,2 KB · Views: 48
  • Elections_2.jpg
    Elections_2.jpg
    335,8 KB · Views: 46
  • Elections_3.jpg
    Elections_3.jpg
    332,7 KB · Views: 36
  • [TECH] Elections v1.0.zip
    1,4 MB · Views: 21
  • [TECH] Elections v1.01 easy.zip
    7 KB · Views: 21
Last edited: