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