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

Taelyn

Cynic
82 Badges
Feb 8, 2003
1.381
105
Visit site
  • Crusader Kings II: Conclave
  • Warlock: Master of the Arcane
  • 500k Club
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Knights of Pen and Paper 2
  • Europa Universalis IV: Cossacks
  • Victoria 2
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: No Step Back
  • Europa Universalis IV: Art of War
  • 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
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Crusader Kings II
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis III Complete
  • Knights of Pen and Paper +1 Edition
  • Magicka
  • Majesty 2 Collection
  • Europa Universalis III Complete
This is a short python script to generate random leaders. You have to have python on your computer (available for free for linux and windows, this was written in windows) to run the script. It generates a file of leaders called leaders.xxx where xxx is the three letter code that you enter when the script asks. It also asks for the maximum fire, move, shock, and siege values that you want, as well as the number of generals, admirals, conquistadors, and explorers. Random numbers are generated using the time as a seed. Rank is random between 1 and 6, admirals and explorers have 0 siege value. Leaders are created throughout the period of 1419-1819, and live between 10 and 30 years. For simplicity, all leaders appear at the start of the year. No leaders are dormant. All leaders have generic names (generals are called "general" and so on).

A warning: This script automatically overwrites the original file. If you tell it to make leaders.fra, it will write over any leaders.fra in the directory that you're running the program.

Another warning: I haven't tested this. If you do test it, let me know if you have problems. If you have ideas for additional features, also let me know.

To use: If you have python installed, then its probably easiest to save this script to the directory you want to use it, and when saving it, rename it something.py so that you can run it simply by doubleclicking. Otherwise, you'll have to run from the command line.

I'll finish this up if there's interest in it. I'll also put up a random monarch generator in a few days. Good luck.

Beta 0_2 update:
Fixed extra space in file extension.
Tested, works fine when substituting for existing leader file.

Beta 0_3 update:
Random number changed from equal weight to standard distribution, max value of 8, minimum of 1.
 

Attachments

  • RandomLeader_beta_0_3.txt
    6 KB · Views: 436
Last edited:
Random Monarch Generator

This is the same type of script as the leader generator. It was also written using Python. It creates a list of monarchs from 1418-1819, all of whom live 1-40 years, decided randomly. It produces a file, monarchs.xxx where xxx is the 3 letter code tag. It creates monarchs with stats of 1-9, chosen randomly. Its only other input besides tag is the starting monarch id.

Monarch's always show up on Jan 1 for simplicity, later versions may include further randomization of the date. Monarchs have 18 random European monarch names, with suffixes I - X. I couldn't think of a better way to name the monarchs.

I tested it briefly, and it does appear to work fine.

Best of luck.

Beta 0_2 update:
Changed distribution from equal weight to standard distribution, maximum value is 10, minimum is 1
 

Attachments

  • RandomMonarch_beta_0_2.txt
    2,9 KB · Views: 192
Last edited:
Random Province generator

More scripts for EU2 here, also python, same deal as before. These scripts produce a file called randomized.txt. Inside there is a list of every province. You can cut and paste this list into a .inc file. I know its not the best solution, but it allows it the most flexible use. Both scripts ask for a maximum province value and then chooses a number between one and that randomly for each province.

There are two scripts (and I will likely add a third). I decided that I didn't want Europe to have slaves, cotton, ivory, tobbacco, or chinaware. The second (the Euromod) script replaces these 5 items in europe with furs, fish, fish, grain, and grain. Once I have time, I'll make a third mod that only changes the provinces outside of Europe (including OE and Russia) so that its possible to play games where you really do have to explore the world instead of knowing beforehand where all the best places are. The first script (the random_provinces places goods completely randomly.

Edit: The third one has been added, its the non-Europe one that shouldn't change values in Europe, only those outside.
 

Attachments

  • RandomProvince_beta_0_2.txt
    11,9 KB · Views: 193
  • RandomProvince_Euromod_beta_0_2.txt
    5,9 KB · Views: 306
  • RandomProvince_NonEurope_beta_0_1.txt
    5,8 KB · Views: 397
Last edited:
New Files

I have compiled an entire set of randomized leaders and monarchs. Within the zips are the python scripts that generated them. If run, these programs will generate an entire set for the pre-1.08 tags. The monarchs one generates monarchs, the leaders one generates the leader file.

BE CAREFUL, IF YOU RUN THE SCRIPTS IN YOUR LEADERS/MONARCHS DIRECTORIES THEY WILLL OVERWRITE WHATEVER IS THERE.

You have been warned.
 

Attachments

  • leaders.zip
    314,4 KB · Views: 188
  • monarchs.zip
    149,4 KB · Views: 135