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

MichaelM

For the Glory lead
10 Badges
Jun 30, 2004
3.848
138
crystalempiregames.com
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • For The Glory
  • Heir to the Throne
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Victoria 2
  • 500k Club
Announcing EU2 Event Generator!

Features:
-Loads events (comments and all!)
-Generates many of the same event with incremented IDs and, optionally, incremented dates
-Random or non-random events
-Country- or province-based events
-Previewing when loading or saving
-Probably some others that I can't think of right now

What it doesn't do:
-Have a list of event commands and triggers (I considered it, but couldn't see how to do it in a non-labor-intensive way).
-Read country names from text.csv (so it's semi-hardwired to vanilla country names)
-Read provinces from province.csv (so it's semi-hardwired to vanilla map)

Where to get it:

Not currently available, sorry. Post on this thread if you would like the program or the source code. If one person does, I'll add it to my GitHub.

The source code is at the same page. The source code is perhaps the most valuable part; it can be used for loading/saving/editing almost anything related to Paradox games.

Credits:
The original EUG file handling (found in lib/eugFile.jar) was based on Chaingun's code from the alpha version of Eu2Vic. I have completely reworked most of it (based on JFlex), but eug.parser.CWordFile still retains its name and some of the code.

The GenericObject/SpecificObject framework is taken from Kinniken's VictoriaEditor (a collaboration with two other students). I have made some improvements and also added SpecificObjects for EU2 (and some non-functional ones for CK, which I don't own).

The actual parsing code (eug.parser.EUGScanner and most of eug.parser.CWordFile) is my own, done with the help of JFlex http://www.jflex.de). (For a little demonstration of how hard tokenizing was without JFlex, see eug.parser.Tokenizer) I have also added support for retaining comments while loading.


Feedback would be appreciated; so far, I've only gotten the input of my brother and myself. :)


EDIT: Latest version is 1.2 (Feb 24 07). It is still at the same site.

EDIT: Site was on a domain that no longer exists.
 
Last edited:

MichaelM

For the Glory lead
10 Badges
Jun 30, 2004
3.848
138
crystalempiregames.com
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • For The Glory
  • Heir to the Throne
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Victoria 2
  • 500k Club
cool-toxic said:
Nice;)
It's really easy to use:D
Glad you like it. :)

Any suggestions? Issues? Bugs?
 

cool-toxic

Alexander
25 Badges
Jun 25, 2004
4.957
0
www.eu2ftg.com
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II: Horse Lords
  • Magicka 2
  • Mount & Blade: Warband
  • Magicka: Wizard Wars Founder Wizard
  • 500k Club
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Lost Empire - Immortals
  • For The Glory
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Europa Universalis III
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
Could you add so when it generates say 5 of the same event that it also get a TAG switch? So One could do the same events but for other countries, so you don't have to do it with notebook.
And the ability to take the date off, if it's an event that doesn't have any triggers, but is triggered in another event.
And i think that one with adding x number to the ID is great;)

SunZyl said:
If I should be honest I don't even get how I should start the program... :eek:o


You run the batch file.
 

cool-toxic

Alexander
25 Badges
Jun 25, 2004
4.957
0
www.eu2ftg.com
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II: Horse Lords
  • Magicka 2
  • Mount & Blade: Warband
  • Magicka: Wizard Wars Founder Wizard
  • 500k Club
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Lost Empire - Immortals
  • For The Glory
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Europa Universalis III
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
Just double click it, it's named eg.bat
EDIT: id that doesn't work do as the README says:

README said:
Instructions:
Unzip anywhere, then double-click Event_Generator.jar.
If that doesn't work, try making a .bat file with the following:

----cut here----

@echo off
java -jar Event_Generator.jar

----cut here----
 

MichaelM

For the Glory lead
10 Badges
Jun 30, 2004
3.848
138
crystalempiregames.com
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • For The Glory
  • Heir to the Throne
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Victoria 2
  • 500k Club
cool-toxic said:
It would be nice if you added all the commands and triggers to the program so one doen't have to open Havards Event Bible.
And a description of what it does and how to use them.
Yeah, as I mentioned, I couldn't see an easy way to do it. Each command takes different "which =" or "value =", and I don't know how I would link them. Or do you just want a list of the actual commands/triggers?

SunZyl said:
If I should be honest I don't even get how I should start the program...
If you have Java Runtime Environment 1.5, you should be able to simply double-click the .jar file (or the .bat file, if you'd rather).

cool-toxic said:
Could you add so when it generates say 5 of the same event that it also get a TAG switch? So One could do the same events but for other countries, so you don't have to do it with notebook.
That was at the top of my to-do list. :)
cool-toxic said:
And the ability to take the date off, if it's an event that doesn't have any triggers, but is triggered in another event.
Ok... When I made it originally, it never occured to me that some events don't have dates. :eek:o

cool-toxic said:
Oh yeah i think i found a little bug, when the program have writen the file it only writes the year of the death date, not the month or day.
Oops... :eek:o
I'll fix that and the events-without-dates bug later today. Right now I've got to go to class. :)

Santiae said:
Sorry, I don't understood, what's the event generator. Better name is "Event editor".
Well, originally it was just a way to do a lot of events in a hurry (for example, AI-switching events that have to be able to trigger every 10 years). :)
 

MichaelM

For the Glory lead
10 Badges
Jun 30, 2004
3.848
138
crystalempiregames.com
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • For The Glory
  • Heir to the Throne
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Victoria 2
  • 500k Club
OK, version 1.01 is up. :)

Changelog:

Additions:
-Non-random events without start/death dates are now possible.
-Setting offset to -1 gives an event with no offset.
-Setting endyear to -1 gives an event with no endyear.

Bugfixes:
-Ending month and day are now printed correctly.
 

MichaelM

For the Glory lead
10 Badges
Jun 30, 2004
3.848
138
crystalempiregames.com
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • For The Glory
  • Heir to the Throne
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Victoria 2
  • 500k Club
Version 1.02 is now available. :)


Changelog:

Additions:
-Added several mnemonics and accelerators, for what they're worth. :)

Bugfixes:
-Ending month and day are REALLY printed correctly. :)
-Random events no longer have dates and deathdates printed (except in the trigger).
-Province-based events no longer have three decimal places after the province ID.
-Selecting "none" as the country for a random event now works correctly.
-Fixed several issues with loading events.
-The preview window now opens at the start of the text instead of at the end.


It can be found in the same place as before.

As always, feedback and comments would be appreciated. :)
 

MichaelM

For the Glory lead
10 Badges
Jun 30, 2004
3.848
138
crystalempiregames.com
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • For The Glory
  • Heir to the Throne
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Victoria 2
  • 500k Club
No, you're not being stupid; it really wasn't there. I had the worst time uploading it (it failed five times in a row, which is significant because I'm on dialup) but I thought it had finally succeeded. I guess it hadn't.

Anyway, I just re-uploaded it, so try it again. :)
 

MichaelM

For the Glory lead
10 Badges
Jun 30, 2004
3.848
138
crystalempiregames.com
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • For The Glory
  • Heir to the Throne
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Victoria 2
  • 500k Club
Version 1.03 is up!

Changelog:
Code:
Additions:
-Added some macros to event header comments; see Macros.txt for more info.
-Start and end dates can now be parsed from the triggers of random events.

Changes:
-Changed the layout of the event-loading window.
-Widened the preview window; now horizontal scroll bars will not always show.

Bugfixes:
-Start and end years will now work properly when "Increment dates" is selected.
 Previously, they would be incremented before printing the first one, so all
 dates would be off by <increment> years.
-Random events no longer print the start date when it is -1.
Info on the new macro feature:
Code:
Macros currently implemented:
	-${tag}		Prints the tag.
	-${country}	Prints the country's name.
	-${provid}	Prints the province ID number.
	-${provname}	Prints the province's name.
	-${id}		Prints the event ID number.
	-${startdate}	Prints the event's starting year.
	-${deathdate}	Prints the event's ending year.
	-${today}	Prints today's date.

Example:

Event ${id}
AI-switching for ${Tag} (${COUNTRY})
Start: ${startdate}
End: ${deathdate}
Created on ${today}

This produces the following headers:

##############################################
# AI-switching for FRA (France)
# Start: 1419
# End: 1429
# Created on 9/30/06
##############################################

##############################################
# Event 75001
# AI-switching for FRA (France)
# Start: 1429
# End: 1439
# Created on 9/30/06
##############################################


##############################################
# Event 75002
# AI-switching for FRA (France)
# Start: 1439
# End: 1449
# Created on 9/30/06
##############################################
Version 1.03 can be found in the usual place.

As always, feedback and comments would be appreciated. :)