https://pastebin.com/dl/9gXKy7jz
and the source code for version 1.06 should be here:
https://pastebin.com/raw/9gXKy7jz
Hello everyone !
I have been working recently on a project that would allow us to play new ROTK11 Scenarios. Once, I discovered a random scenario creator on chinese ROTK11 forums. I decided to make one myself and a few days ago I spent a good amount of time programing a Python script that I am going to shortly present to you. In its current form, it is able to open a scenario file (SCEN0XX.S11, XX between 00 and 16) and turn it into a fully randomized scenario with a bunch of custom features that you can select.
I present you RandOTK11 v1.07
RandOTK11 v1.06
-- Features --
Supports Chinese, Japanese and English scenarios
Graphical User Interface !
Choose the starting year
Choose either historical or random leaders
Choose the number of forces and free cities
Choose how the forces share the cities
Choose to randomize the research level
Choose the IA Behavior : aggressive, moderate or random
Choose to add alliances or not
Change the officers lifespans, relationships, stats, weapons APT and skills randomly
Distribute randomly items among leaders and cities
Either spread cities owned by forces or only have neighboring cities distributed to each force
---------------------
-- Possible Upcoming Features --
Feel free to suggest features for this program. I will see if they can easily be implemented.
---------------------
Now to the main point : If I want to use it, how does it work ?!?
1) You need to download and install a program that can run Python 3.x scripts. I would suggest downloading the latest version of Python (3.4.2), since I developped this program with it. You can find it for free here:
https://www.python.org/ftp/python/3.4.2 ... -3.4.2.msi
(From the website: Python is a programming language that lets you work more quickly and integrate your systems more effectively. It is powerful... and fast; plays well with others; runs everywhere; is friendly & easy to learn; is Open.)
2) Once you have installed Python (or anything that can execute a Python program), please download RandOTK11.py which you can find HERE.
or the source code here, that you can copy, paste and save into a .txt file:
http://pastebin.com/9gXKy7jz (v1.06)
http://pastebin.com/SgANJeGR (1.05)
http://pastebin.com/X4375xd3 (v1.04)
http://pastebin.com/060D0UdJ (v1.03)
http://pastebin.com/uEe9DDLq (1.02)
http://pastebin.com/auY7pMVH (1.01)
http://pastebin.com/S9L2QzeT (v1.00)
3) Now, if you are using Python there are two ways to launch the program:
3.a) Go to your desktop and click: Start --> Programs --> Python 3.4 --> IDLE (Python 3.4 GUI)
Next, click on: File --> Open... and open the script RandOTK11.py
Then, go to: Run --> Run Module or simply press F5
3.b) Simply double click on the RandOTK11.py to launch it up with Python
4) A GUI should open up and look like this :

All you have to do is open a scenario file and enter your parameters. Then click Randomize button, and there you go ! When you are finished you can just use the Exit button to close the program. The file is automatically saved.
WARNING ! The previous scenario file will be lost ! Make sure you have a copy before randomizing !
... And that's it ! You should now be able to open and play your randomized scenario in-game ! I hope you'll have fun with it !
How the code actually works is quickly described HERE.
EDIT: I have already found a few bugs, and among them is one that will just create a blank scenario instead of a randomized one. Until I can find and fix this bug , I suggest you just re-launch the program and give it another try. I'll try to update it as soon as possible!
EDIT 2: Updated to v1.01 with a bunch of new features.
EDIT 3: Updated to v1.02 with a small GUI.
EDIT 4: Updated to v1.03, added options to randomize lifespans and city distribution, fixed a few bugs.
EDIT 5: Updated to v1.04 with japanese and chinese scenarios now supported !
EDIT 6: Updated to v1.05 with new item randomizer and a bit more balanced officer randomizer. Fixed a few bugs.
EDIT 7: Updated to v1.06 with a bunch of new features.