How to create a new Educational Scenario
step by step tutorial
Step 1: Open Eclipse and create a new Eclipse Plug-in. Click on
File -> New -> Project...
Select
Plug-in project and press
Next button.
Fill in the Project name: e.g
MyScenario and press
Next button.
Check off both the Plug-in Options, we don't want any of these. Press the
Finish button.
Step 2: The screen should look as this. If you cannot see the plug-in overview, double click
the Manifest.mf on the left. Now switch to the
Dependencies tab (highlighted by red ellipse).
We have to add several plug-ins this scenario is dependent on. Click the
Add button.
Add these plug-ins:
- ant-nodeps-1.6.5_1826341794,
- antlr-runtime-3.0_859803478,
- com.seisw.util.geom.gpcj,
- cz.cuni.amis.pogamut.core,
- cz.cuni.amis.pogamut.edu.core,
- cz.cuni.amis.pogamut.jars,
- cz.cuni.amis.pogamut.scenarioaddons,
- cz.cuni.amis.pogamut.ut2004,
- cz.cuni.amis.pogamut.ut2004.scenarioaddons,
- drools-ant-4.0.7_603737,
- drools-compiler-4.0.7_1049271115,
- drools-core-4.0.7__1934971701,
- drools-decisiontables-4.0.7__1868601427,
- drools-jsr94-4.0.7_461709462,
- janino-2.5.10__894162300,
- jsr94-1.1__520686911,
- jxl-2.4.2__189085757,
- mvel-1.3.1-java1.4__745484984,
- org.eclipse.jdt.core,
- xercesImpl-2.4.0__1358228867,
- xml-apis-1.0.b2_794376095,
- xpp3_min-1.1.3.4.O__336787163,
- xstream-1.2.2_1977046618
You can select them by one and repeatedly push the Add button or press Ctrl while selecting to select multiple plug-ins.
The screen should look like this.
Step 3: Add the main package. Right-click the
src folder and select
New -> Package
Fill in the package name, e.g.
mypackage. You can use only small letters and numbers.

Step 4: Add the main java file. Right-click the mypackage package and select
New -> Other....
Select Educational Scenarios main Java file from the Educational Scenarios folder.
Press the Next button.
Fill in the name for the main java file. Use Main.java. The press the Finish button.
Step 5: Add the configuration file. Right-click the project folder and select New -> Other....
Select Educational Scenarios Config from the Educational Scenarios folder.
Fill in the name for the config file. Use the same as the project name with xml extension, e.g. MyScenario.xml.
Press the Finish button.
Step 6: Add the first rules file. Right-click the project folder and select New -> Other....
Select Rule Resource from the Drools folder.
Fill in the name for the rules file, e.g. MyRulesFile.dslr. Check the Use a DSL checkbox
and fill in the package name, e.g. mypackage. Then press the Finish button.
Step 7: Now copy the citymap.xml and edu-english.dsl files
to the project folder. Then correct the expander in rules file and add the necessary imports and the global as you can see below.
If you have not used the suggested names, you have to alter them in the main java file and in the config file.
Now run the UT2004 with low-priority and wait until the game has started. Then you can start the scenario by right-clicking
the main java file and selecting Debug As -> Drools application.