-
Notifications
You must be signed in to change notification settings - Fork 23
Server Setup
These instructions are for an Ubuntu Linux system. See the GM Guide for setting up the server and game creation basics.
-
compile, test and install the code as describe in the GM Guide.
-
Set up your game:
cd $ERESSEA/git s/install s/setup -g 5 -n -r e3
The arguments for the setup scripts are somewhat important: -g game identifier, creating game-5 in this example -n create a new eressea.ini configuration file (overwrite existing) -r rule set name. Sets supported by default, are e2, e3.
-
You can view scripts for world creation in
$ERESSEA/server/scripts/tools/build-e{3,4}.lua
- These scripts are not ready to use, but for reference on how to create your own.
-
Alternatively the long hand example below will allow you to manually create a data file
-
cd $ERESSEA/game-5
-
Open eressea command line
./eressea
-
You will be at an eressea command line
E>
-
Run the following commands to create a quick test world
require 'config -- clear the game data: eressea.free_game() -- make the world 11*11 hexes, and wrap at the edges -- with coordinates in [-5..5],[-5..5] pl = plane.create(0, -5, -5, 11, 11) -- create a new region: r = region.create(0, 0, "plain") -- ... ditto for "ocean", "mountain", "highland", etc. -- create a new player faction (humans, german language): f = faction.create("enno@eressea.de", "human", "de") -- create a 1-person unit for this faction, in that region: u = unit.create(f, r, 1) -- give it some stuff: u:add_item("silver", 1000) u:add_item("horse", 1) u:add_item("log", 5) -- write the game to disk: eressea.write_game("0.dat") -- export the world to the report format used by tools like Magellan write_map('world.cr') -- export the world to JSON (map only): eressea.export("map.json", 1) -- export the world to JSON (with factions and units): eressea.export("world.json", 7)
-
That export function at the end of the example script hints at another way to create the world. If you have another mapping tool, and you can convert its output to the same JSON format, then you could create a world by simply importing it from that interchange format.
-
If you created “world.json” outside of e> then need to import and write the the game file
eressea.import("world.json")
-
Whichever process you created “world.json” in you now need to write the data to eressea
eressea.write_game("0.dat")
-
The game does have a map editor which can now be used instead of scripting
-
You must still be at an eressea command line
E>
or run./eressea
again fromeressea/game-5
E> require 'config' E> eressea.read_game("0.dat") E> gmtool.editor()
-
This reads the configuration data, again, then reads the tiny world we created earlier, then starts the editor. It will look as if there is more than one plain on the screen, don't let that fool you - because the world wraps at the edges, this is all the same region. You can navigate the world with the arrow keys, and there are a lot of other keyboard combinations that are poorly documented. Try Ctrl-T for terraforming, Space to select/deselect a region, and semicolon followed by t to terraform the current selection. It's a little clunky, but it allows interactive map editing. Shift-S saves the game.
-
Each game has slightly different rules, and needs to know where the configuration data lives, so the game directory contains an eressea.ini file. The file looks somewhat like this:
[eressea]
report = reports locales = de,en [lua] install = /home/eressea/eressea/server paths = /home/eressea/eressea/server/scripts:/home/eressea/eressea/server/lunit rules = e4 kill_after = 3 maxnmrs = 5
-
You now need to get everyones first reports
-
Run the following to generate turn 0 reports
cd eressea/game-5 ./eressea reports.lua
-
You now have (hopefully) a fully functional game
-
The command line for running a turn is:
cd eressea/game-5 ./eressea -t $turn run-turn.lua – where $turn equals the turn number you wish to run-turn
-
Orders need to be compiled in
eressea/game-5/orders.$turn
to be executed -
After getting your first reports the orders would go into
eressea/game-5/orders.0/
-
The next orders will go into
eressea/game-5/orders.2
and then orders.3, orders.4, etc. -
The order.$turn folders need to be manually created after each turn.
Eressea Fantasy Strategy PBEM Game
- Visit our Website
- Like us on Facebook
- Follow us on Twitter @eresseadev
- Become a Patron on Patreon
- Thank the GM on Flattr