Running

Runtime modes

From inside IntelliJ

IntelliJ IDEA community edition is the IDE that we are currently using. To import the project, just check the code project (OpenPatrician folder) from the SVN repository by using File->New->Project from Version Control. To avoid problems with lombok annotations, you need to install the Lombok Plugin, which can be found in Settings->Plugins.

To run the application from within IntelliJ, open the Project Structure ->Modules ->OpenPatricianDisplay->Dependencies and add the two Directoreis $HOME/.OpenPatrician/plugins/maps and $HOME/.OpenPatrician/plugins/ai. To run the application create a starter for class OpenPatricianApplication with the VM options:

--add-modules javafx.controls,javafx.media
-p ~/.m2/repository/org/openjfx/javafx-controls/11/javafx-controls-11-linux.jar:
~/.m2/repository/org/openjfx/javafx-swing/11/javafx-swing-11-linux.jar:
~/.m2/repository/org/openjfx/javafx-graphics/11/javafx-graphics-11-linux.jar:
~/.m2/repository/org/openjfx/javafx-base/11/javafx-base-11-linux.jar:
~/.m2/repository/org/openjfx/javafx-media/11/javafx-media-11-linux.jar

Eventually you have to chose the correct classifier for your OS (linux, mac, win)

From within an IDE the following VM options must be applied:

Linux:

javafx.controls,javafx.media
-p
<user.home>/.m2/repository/org/openjfx/javafx-controls/11/javafx-controls-11-linux.jar:<user.home>/.m2/repository/org/openjfx/javafx-swing/11/javafx-swing-11-linux.jar:<user.home>/.m2/repository/org/openjfx/javafx-graphics/11/javafx-graphics-11-linux.jar:<user.home>/.m2/repository/org/openjfx/javafx-base/11/javafx-base-11-linux.jar:<user.home>/.m2/repository/org/openjfx/javafx-media/11/javafx-media-11-linux.jar

MacOs:

javafx.controls,javafx.media
-p
<user.home>/.m2/repository/org/openjfx/javafx-controls/11/javafx-controls-11-mac.jar:<user.home>/.m2/repository/org/openjfx/javafx-swing/11/javafx-swing-11-mac.jar:<user.home>/.m2/repository/org/openjfx/javafx-graphics/11/javafx-graphics-11-mac.jar:<user.home>/.m2/repository/org/openjfx/javafx-base/11/javafx-base-11-mac.jar:<user.home>/.m2/repository/org/openjfx/javafx-media/11/javafx-media-11-mac.jar

Windows:

javafx.controls,javafx.media
-p
<user.home>\.m2\repository\org\openjfx\javafx-controls\11\javafx-controls-11-win.jar;<user.home>\.m2\repository\org\openjfx\javafx-swing\11\javafx-swing-11-win.jar;<user.home>\.m2\repository\org\openjfx\javafx-graphics\11\javafx-graphics-11-win.jar;<user.home>\.m2\repository\org\openjfx\javafx-base\11\javafx-base-11-win.jar;<user.home>\.m2\repository\org\openjfx\javafx-media\11\javafx-media-11-win.jar

The <user.home> prefix has to be replaced with the correct path to the users home directory where the local maven repository lies.

From the console

The module OpenPatricianStandalone creates a executable jar that can be started with, replacing the actual version:

java --add-modules javafx.controls,javafx.media -jar OpenPatricianStandalone-[version].jar

Startup parameters

The following startup parameters can be used:

 -f,--fullscreen                fullscreen mode
 -h,--help                      Display help
 -l,--lang <arg>                Specify the locale to use, valid arguments are en, de

    --version                   Version of this application
    --windowed <widthxheight>   Windowed mode with optional definition of
                                window size like: 1280x780

Cheat modes

The cheat mode is only available in Singleplayer standalone mode. It can be toggeled on and off by F10, once the game has started.

  • CRTL+S: Create a new ship in the current town
  • CRTL+W: Add a weapon to the active ship. If there is no active ship, nothing happens.
  • CTRL+V: Toggle the log level for AI Trading and ship movement. Turning up the log level has serious impact on the performance.
  • CTRL+M: Become the mayor in the hometown.
  • CTRL+A: Become the alderman of the hanseatic league.

Game flow

Game flow