Skip to content

📒 Design Document

Arthur S. Muszynski edited this page Jul 17, 2022 · 1 revision

NOTE: This is the latest maintained design document made for the FIFE version of Unknown Horizons, with the last updates dated around 2017. For the Godot version (and with new bright ideas 💡 in mind) we need to revise all sections and determine what we want to keep, incorporate new thoughts and adapt technical aspects to Godot's way of development.

Since the document originated from MediaWiki pages, the layout may be broken here and there and will be fixed eventually as time goes by.

⚠️EDIT 17/07/2020: For better accessibilty, the Design Document is currently being migrated to a new external wiki.⚠️

Overview

The Unknown Horizons project aims at creating a free and open source realtime economy simulation with strategy elements in an isometric 2D engine loosely oriented towards Sunflowers' Anno / A.D. series.

Note: Please discuss everything concerning this document on the Issues tab of the repository. Never edit the document directly!

Terrain

Island Concept

Summary

The world in Unknown Horizons first consists only of water tiles. These tiles populate the space within the map size and the space behind the edge to create the illusion of an endless sea.

This void is filled with Islands. Islands are static chunks of terrain, but can be placed in the world at run-time. Technically, the terrain is defined by a flat 2D-Array of tiles. In this context, terrain means all kinds of land and water, so an island can create special water tiles like fishing grounds.

The island is an important logical entity, since every building has associated exactly one island to it. Therefore a city can be defined as a set of buildings of the same player on the same island.

Use Cases

Script places island into world, blocking units have to be handled in some way. Island is removed from worls by script.

Implementation stages

The island concept is fundamental and has to appear in the first milestone.

Climate

Summary

Each climate should look different and offer different conditions for resources - especially different fertility. Here we can collect ideas about what to implement for each of those climates graphically (including specific ambient sound effects). For fertility proposals a complete list of possible cultivation would be needed.

Climates might be: (looked up the terms)

climate vegetation animals ambient GFX ambient SFX fertility
temperate zone
✔️
✔️
mushrooms
subtropes / mediterranean pines, acacias, shrubs giraffes, elephants
tropes
monkeys, snakes ferns, orchids, butterflies
desert cactuses, briars camels
tundra conifers, berrie shrubs mooses/reindeers, caribous
subpolar region small white conifers seals penguins they living only on the southern hemisphere artic foxes polar bear

❌ denotes laziness or lack of ideas, not a missing implementation.

Overview

[A] Climate
People
Look & Feel Resources
P subpolar region
Inuit
snowy and icy, some mountains, shingly ground, small scrubs, ⛔trees, icebergs and floes in the water (treated as unpassable for units) stones, marble (?) coal fish, whales ⛔wood, ⛔crops
N tundra
Nomads (Wikipedia)
rugged ground and shore, snowy mountains, vast number of conifers, steppe grass of poor growth several lakes wood clay, coal, ores honey fish
T temperate zone
Gypsies
done already nearly all crops, fish clay, iron ore, salt (?)
M mediterranean, subtropes American Indian
J tropes
Aztecs
Mostly Jungle, lakes and hills here and there, wood gold ore tobacco, spices
D desert
Desert Nomads
Sandy soil, brownstone pillars, sand drifts, cliffs and canyons, ⛔hills, water is scarce gold ore, raw diamonds

Climates listed from North to South. Bold resources are unique to this particular region. ⛔ marked resources or tiles are, in contrast to other regions, not found there.

[A] Abbreviation which may be used in DD or comments/specifications (always with backlink).

Implementation notes

  • Resource deposits have to be spread over the island tiles depending on the availability within the climate
  • Fertility has to be set for each climate

Basically all climates contain the same parameters, but with different values.

Depending on the way the map editor generates a game map - respectively depending on how the map editor generates the islands - there are two ways climates can be set upon a map:

  1. The climates are set up for islands. Means every island has its own climate.
  2. The climates are set up in dynamically generated tile spaces. An island could have more than one climate zones with only graphical transitions from one zone to another.
  • Script places climate zones into world.
  • Depending on available climates other scripts have to consider quantity and typ of other things they place into world.

Mechanics

Before the map is generated the gamer might get the option to decide which climates are used for map generation and which are ignored.

Graphical content

Image sets for each climate containing images for:

  • ground tiles
  • vegetation
  • animals
  • resource deposits (?) (woods are covered by vegetation)
  • people
  • perhaps units (only partially)
  • perhaps buildings (only partially)

Audio content

As far as ambience sounds are used they might differ from climate to climate.

Implementation stages

One climate zone has to appear in the first milestone.

Fertility

Summary

Fertility determines the productiveness of resource deposits the player has to build upon - like fields and pastures. Depending on the climates, fertility has different values for those resource deposits.

Note:
A detailed list of resources affected by fertility is missing here.

dauerflucher 18:26, 27 September 2007 (CEST)

Implementation notes

Depending on how the map editor generates islands and climate zones the fertility is bound to

  1. whether the whole island - every island has its own climate and consequently fertility values according to this climate; fertility has to be displayed on the ingame GUI for the whole island only.
  2. or the tile space the climate is set up - every tile within this area has the fertility values for the climates zone; fertility has to be displayed for every single tile.

Whatever the ingame GUI will look like there should be a space where images of the resources are displayed with percentage values or different colored icons (e.g. green=good; yellow=medium; red=bad) for fertility.

There are two possible ways the fertility might affect the productiveness of companies:

  1. The companies working resources on the same speed but with less productiveness.
  2. The companies working resources with the same productiveness, but with less speed.

Workings

The player directly has no influence on how the map editor generates the fertility except of having the option to choose the climates used or ignored for map generation.

The display on the ingame GUI will show the player fertility values and the player can decide if the effects on companies are acceptable or not.

Graphical content

Fertility has no tile images just resource images for the productiveness display on the ingame GUI.

Note:
A detailed list of resource images is missing here.

dauerflucher 18:27, 27 September 2007 (CEST)

Audio content

None.

Implementation stages

Fertility should be implemented in the first milestone.

Resource deposits

Ingame UI

HUD (Heads-up display for resources)

The resource bar gives an overview over the resource status of the island. Gold as a player-wide, essential resource is always displayed. Important resources are not necessarily the same on every island/settlement, so we allow to customize (and save) the displayed resources based on what settlement is hovered.

Concrete proposal

  • The bar contains 6 slots for resources and the gold slot on the very left.
    • A slot consists of an icon and a label displaying the amount.
  • If the user is about to build something, another number appears below the other number.
    • This number shows how much of each displayed resource this building costs.
  • When a building is about to be placed, the resource bar will always only contain the resources necessary for construction (currently lumber, clay, bricks, tools, stone, marble => 6 at most).
    • This makes it easy to display the resource costs; else players might not see some of the costs if they have other resources selected in this settlement's resource bar.
  • Since the important resources aren't the same on every island, players can adopt them.
    • To change a resource, the user clicks on the resource icon or empty slot. A widget appears below the resource bar where you select the resource to be displayed in this icon slot.
    • The selection widget should be consistent with other resource selections in the game (e.g. buysell tab and trade routes).

Resource bar.png

Map navigation

Map rotation

Summary

The map can be rotated in four directions: North, east, south and west. The default rotation at the beginning of a game is north.

Implementation notes

Map rotation is part of FIFE.

Workings

Press the according button with mouse click and the map rotates in a certain direction.

Graphical content

Each image which can be rotated has to exist in all four directions except unit animations which will have eight directions.

Use Cases

The user cannot see a path behind a building

Implementation stages

This feature is already implemented.

Minimap

Summary

The mini map is a window in the ingame GUI showing the whole game map in very small size and with simplified gfx. Water should be displayed blue and land brown. Vegetation green; stone objects grey; units and buildings in different colored pixels. The use of a mini map should be clear. Jumping to a far away spot of the game map faster than scrolling there while you also can keep an eye on the whole map at once without zooming out.

Maybe a zoom function for the mini map would make sense as well.

Implementation notes

FIFE supports minimap. It can be generated dynamically and use viewports and zoom levels of all kinds. It is still unkown how or if it is possible to reduce this minimap to a minimalistic and schematic one as commonly used by games.

Workings

Clicking on the mini map (hitting a certain cell of the grid) with the mouse cursor will make the first viewport automatically jump to this coordinates.

Implementation stages

Depending on implementation difficulty we might be able to make the mini map already part of first milestone.

Zoom

Summary

Zooming the ingame map is a feature to provide a better overview for players in certain situations. There should be different degrees of zooming - how much exactly is hard to say for now. Maybe 100%, 75%, 50%, 25% or even some degrees in between.

Implementation notes

Zoom is already part of FIFE. The feature provides the possibility to zoom in and out as much as you want.

Unknown Horizons will not need the full feature, because it is not expected to zoom in from default view, but only out and in back again to default view. The original size of the gfx should be the maximum zoom level.

Obviously the level less zoom feature comes with the major flaw of required performance. It might be of help to limit zoom to certain degrees to avoid continous resizing of images.

Workings

Pressing the according button(s) on the ingame GUI, using a hotkey or the mouse scrolling wheel will activate this feature.

Implementation stages

This feature is already implemented.

Scrolling

Summary

Note:
This is one of the most common and well known features a game could have. That's why I forbear writing a detailed description of something everybody knows. Maybe "scrolling" the game map via mini map is also related to this scrolling feature but I personally can't see any relation there...

--dauerflucher 00:14, 22 October 2007 (CEST)

Implementation notes

Basic scrolling is already part of the FIFEngine. You only have to check if this feature already provides everything we need.

Workings

Pressing the according button(s) in the game GUI, using hotkeys or via cursor on screen edges.

Implementation stages

Scrolling should appear in first milestone.

Menus

Start menu interface

Summary

The start menu interface consists of several graphical elements:

  • screen background
  • menu background
  • button backgrounds
  • button icons
  • window decoration
  • window button icons
  • text

The current concept of composition can be seen below (graphical content).

Additionally, the interface uses windows to display content of the different menu items. Windows are moveable.

On mouse.hover the menu icons should display differently to make clear they are interactive menu elements. The menu item name is only displayed when the cursor touches the menu item.

Menu items (in braces are suggestions for later development):

  • Start game
  • Quit game
  • Settings
  • Credits
  • (License)
  • (Load game)
  • (Map editor)

Implementation notes

GUICHAN - shipped with FIFE - should provide all or at least most of the recommended functions to realise a pretty start menu.

Workings

The player can navigate the menu and widows via mouse control.

Graphical content

The current concept in preview:

![](Oa startmenu preview.png)

The current visualisation:

  • screen background: plain black
  • menu background: steering wheel ![Wheel](Oa startmenu wheel.png)
  • button background: black circle (alpha 50%) with plain black outline ![Button](Oa startmenu buttonbg.png)
  • button icons:
    • Start game: compass Compass
    • Settings: gears ![Gears](Oa startmenu gears.png)
    • Credits: log ![Log](Oa startmenu log.png)
    • Quit game: door ![Door](Oa startmenu door.png)
  • text: plain white sans-serif

Currently there are grayscale icons for menu items for hover effects.

Audio content

There could be sounds for activating buttons and for ambient music.

Implementation stages

A basic main/start menu could be part of milestone 1.

Build menu

At this page we will define two different visualizations of the buildmenu.

  • a buildmenu which has a tab for every increment. In every tab the buildings are sorted by categories -> increment grouping
  • a buildmenu that has a tab per category. In each tab you have the all buildings of the category -> category grouping

Incremental grouping

The building menu is the place where you select buildings to build. It's one of the most needed menus. It is one menu that has different tabs, one tab for every increment.

Summary

The build menu can be opened by using the hotkey b or press the buildmenuicon at the bottom of the minimap.

How it should look and work (view of the player):

    _____________________
    |---------------------| \
    |category I           |  \ one line
___| __    __    __   __ |  /
|_1_||__|  |__|  |__| |__|| /
|_2_|---------------------|/
|#3#|cat. II     cat. III |
|_4_| __    __    __   __ |
|_5_||__|  |__|  |__| |__||
|_6_|---------------------|
    |                     |
    |                     |
    |                     |
    |                     |
    |                     | 
    |_____________________|
  • --- don't have to be drawn
  • category name should be left aligned, orientated at the first placed icon of this category

At the left side you see the different tabs, one for every increment. In this case the third tab is chosen. In the menu you have different categories of buildings and there are the buildings, they are represented by an icon. If you hover the icon you get a tool-tip with a closer description. If you click on the icon, you choose this building and now you are theoretically able to place it one the map.

Implementation notes

This menu is already implemented, but its static. That means every icon is placed manually in the xml file. Take a look at this for details.

Whats the idea Change the static build-menu to a auto-generated one. As you know, we have a database with all game information. So, there is the following information stored for every building:

  • the name

  • the increment

  • the category

  • a link to the icon of a building

  • a small description, displayed as tooltip With this information it should be possible to generate content of the build menu on the fly.

  • create a tab for every increment

    • look how much categories are there for these increment
    • split the available space of the tab in the number of available increments, depending on the available buildings for these increment.
      • max. 4 icons (buildings) per line
      • only 4 icons per per category
      • max. 2 categories per line
      • only 2 categories per line if the is no other free line to place a new category
      • a line consists of header (category label) and icons (see above)
      • cause of a fixed width and height -> only 4 lines -> max. of 8 categories
      • the tab is filled from the top to bottom
    • write a header for every category (the name of the category)
    • add all icons with their tooltips below the header, one for every available building.
Graphical content
  • icons for every building (WIP)
  • the menu graphics (already done)

Categorical grouping

In contrast to the first idea, the player sees all buildings sorted by category, not by increment.

Summary

How it should look and work (view of the player):

     _____________________
    |                     |
    |     category XY     | 
 ___| __    __    __   __ |  
|_1_||__|  |__|  |__| |__|| 
|_2_|                     |
|#3#|                     |
|_4_| __    __    __   __ |
|_5_||__|  |__|  |__| |__||
|_6_|                     |
|_7_|                     |
    |                     |
    |                     |
    |                     |
    |                     | 
    |_____________________|

Instead of a number in the tab we will use icons, that represent this category.

Categories

We need some categories, so every buildings fits in one of them and no category gets too big (max. 16 per tab). This is only possible if fields do not show up in the main build menu but in the farm tab "Build related fields".

  • Infrastructure: tent, roads, storage buildings, fire service and other catastrophe prevention
  • Services: Everything incorporeal inhabitants desire (pavilion, school, tavern)
  • Montane Industry: clay pit, stone pit, mine and their refiners (carver, brickyard, smeltery, charcoal)
  • Raw resources: farm, garden as well as their refiners (distillery, tobacconist, butchery and so on)
  • Companies: last resource refiners (e.g. toolmaker). Distinction between Raw and Companies is hard. Combining them might cause a lack of space though.
  • Military: production of units and weapons
Implementation notes

Like the other view this one will be filled automatically, so every building needs a category.

  • one tab for every category, dynamically create a tab for every category with >=1 building
  • max. 4 icons(buildings) per row in each tab
  • one tab has space for up to 16 icons/buildings (4 icons per row * 4 rows)
  • every icon (building) has a tooltip
Database related tasks
  • Add a new table or column to the database with the category of every building.
Graphical content
  • icons for every building (WIP)
  • icons for every category tab (missing)
  • the menu graphics (already done)

Additional Ideas

Some buildings, like path and tents are built very often so we could add 2 static icons in the header of the buildmenu. Then its available in every tab. Independent from which visualization you choose.

Build menu with additional icons for the most wanted buildings. Build menu with additional icons for the most wanted buildings. The path icon will always build the best available path. Tents always start in increment I. Both could be supported by introducing special hotkeys to build roads and tents.

Tear menu

Summary

The tear menu should be part of the build menu (seperated into build mode and tear mode). Its function is to provide the user interface to tear down buildings and similiar objects on the game map.

Additionally there should be a button in the infoboxes of each building and unit where you directly can demolish or kill the object (see according article for more details).

Implementation related notes

None so far.

Workings

The player enters the build menu via button press. The menus default mode is the set to build mode (select and place buildings on map). Pressing an additional button on top of the build menu switches to tear mode (select and demolish objects on map). In tear mode the player has two tabs: The main tab with a list of all selected objects which he might tear down at once by pressing a button on bottom of the tab; And another tab for thear mode settings where the player can choose which objects are affected by the tear function (like buildings, trees, streets and so on (maybe also units)).

To tear down an object the player just has to enter tear mode and select the according object on the game map by pressing left mouse button. This object will show up in the list and colorly overlayed then. If the player wants to deselect this object he just needs to click on it another time with left mouse button. This object will then dissappear from the list again. It is possible to select more than one object which will all show up in the list and be demolished when tearing is confirmed. To delete the whole list at once the player just needs to press right mouse button.

When tearing is confirmed all selected objects will be demolished on the game map and tear mode is quit automatically switching back to build mode.

Graphical content

Common gui navigation buttons:

  • Tear mode icon for build menu
  • Tear mode main icon for tear tab
  • Tear mode settings icon for tear tab
  • to be continued...

Implementation stages

This could be part of the next milestone.

Buildings menu

Summary

This menu exists for every building, it shows the play all important information about the building. There are 6 different tabs available, they are defined

  • Overview (These tab has the function, to show the player very fast all important information)
  • Lager (This is the overview of all goods are stored in this building, at the moment)
  • Production (Build/repair/produce; At this place it possible to make assignment)
  • Variable
  • Variable
  • Variable

The variable tabs should be identically by groups of buildings, which using these tabs.Like military buildings, the 4. tab could be named armery.

Implementation notes

Graphics

Every tab has his own small graphic.

Trade tab

Function

This Tab is used for trade resources from player to player. This costs gold.

Use

Used for own buildings and units. Note: This buildings can also have a exchange Tab. Like:

  • branch office
  • free trader
  • all trade ships

Details

Trade_ships (NOTEBYARTI: Link me to Trade Ships)

Onscreen features

Fog of war

Summary

Fog of war is a method of hiding terrain or activities of other players in order to create suspense and make the game more interesting.

There are 2 kinds of seeing, it can be enabled/disabled in setting menu. Only one can be enabled 1. or 2. For Multiplayer, the host has to decide what kind of settings are used.

  1. Fog of war: You can see all parts of the map, where you have or had units. But on the parts where you have no buildings or units, is not necessarily up to date. You can't see new build buildings or units. Only buildings are shown, you saw in the past, as you had a unit there. Unexplored parts of the map are black.
    1. Grey mist: This is an extra option for fog of war. This means that these parts of the map, which you can't see currently, have a gray mist over it.
  2. See whole map: At game start the player can see the whole map with everything, units buildings etc.

Implementation notes

By building a warehouse, you will now see the hole isle, not only in this radius that the branch office has for the collector. This depends on the fact, that you explore the isle, before you starting to build up a new settlement.

Fog of War: What you can see depends on the 'collector'-radius of your buildings and units.

Settlement range

The Wheel

Summary

By clicking and holding MMB on an object on the map a context menu appears. The player can set common settings here like pushing a building out of service.

Workings

First the player have to click one building with the MMB and hold the button. To activate an option he have to move the mouse on one button while holding the middle mouse button.

A few common functions are:

  • Push a building out of service
  • Upgrade a building to the next class
  • Forced request to pick up goods by a branch office cart
  • Pull down the building

Use Cases

This feature should allow the player to attend the most common functions with only one click.

Message system

Captains Logbook Widget

320px-Uh_msg_mockup.png Current layout

Currently Implemented
  • The logbook opens on each new arriving message.
  • Each single page represents a single message. That could mean the right page is empty e.g on the first log entry.
  • With the pistol buttons on the lower left you can switch through old messages.
  • The X Symbol closes the book and the game continues.
  • On closing the book the first time each new content section is added, a notification message appears summarizing your next objective.
  • As long as the book is open, the game is paused.
Need to be Implemented
  • Displaying images (as new line)
  • Bold / italics font

Ingame Chat Widget

Currently Implemented
  • It's only possible to chat with players in the same game (what would we want to change about this?)
  • All incoming messages are displayed for a specific time (some seconds) and disappear after that, if the widget isn't in focus.
  • answering via hotkey (c)
Need to be implemented
  • The Ingame Chat Widget shouldn't be merged with the Notification Widget.
    • the text could be displayed, with a transparent background in the lower middle of the screen, in the player color
    • maximum of ~ 5 messages (should be tested later ingame)
    • new messages are at the bottom
    • without time stamp, not necessary
    • see 2:00 as behavior/looks like example http://www.youtube.com/watch?v=BeGl2FUqC6c
  • message addressees:
    • all players (default and only possibility at the moment)
    • all allied players
    • one specific player. selection methods:
      • tab key on empty message input field (cycles through players)
      • dropdown in gui. thus, fix guichan dropdowns

Player statistics (for multiplayer)

Brainstorm

  • its an own widget
  • only used in multiplayer games
  • displayed in the left upper corner
  • should show statistics of the players
    • gold
    • inhabitants
    • islands (shows on how much different isles the player have a branch office)
    • balance
Mockup
____________________________________________________________________________________
|Team:      Player:       Gold:      Inhabitants:      Islands:      Balance:      |
|                                                                                  | 
|  1         max            15678         80              1            +  15       | 
|  1         hans wurst     56889        150              2            -  12       | 
|  1         fleischwolf     5895         37              1            +   5       |
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 
|  2         loser         100874       1349              5            + 134       | 
|  2         loser13        30978        103              3            +  67       |
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 
|  3         buddy          36479         56              1            +  32       | 
|  3         paddy          12445         42              1            +  34       | 
|  3         saddy           2199         28              1            -  17       | 
____________________________________________________________________________________
(internal) Sort example
  • sort
    • maybe define some rules to position a player in a list of 1 too 8, like this:
      • position smaller = better
      • set position for every value
      • summarize all positions of all values by a user
      • sort the players smaller sum = smaller position
    • or only sort by every value, click on the value and it will be sorted from lowest to highest (top to bottom), by this value, a second click = highest too slowest

Internal idea:

_________________________________________________________________________________________
|Team:  Player:       Gold:     Inhabitants:    Islands:    Balance:    Sum:   Position:|
|                                                                                       | 
|  1     max            5           4              4            5         18       5    | 
|  1     hans wurst     2           2              3            8         15       3    | 
|  1     fleischwolf    7           7              4            6         24       7    |
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -| 
|  2     loser          1           1              1            1         4        1    | 
|  2     loser13        4           3              2            2         11       2    |
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -| 
|  3     buddy          3           5              4            4         16       4    | 
|  3     paddy          6           6              4            3         19       6    | 
|  3     saddy          8           8              4            7         27       8    | 
_________________________________________________________________________________________

What the user should see:

_________________________________________________________________________________________
|Team:      Player:       Gold:      Inhabitants:    Islands:    Balance:     Position: |
|                                                                                       |       
|  2         loser         100874       1349            5         + 134          1      | 
|  2         loser13        30978        103            3         +  67          2      |
|  1         hans wurst     56889        150            2         -  12          3      | 
|  3         buddy          36479         56            1         +  32          4      |
|  1         max            15678         80            1         +  15          5      | 
|  3         paddy          12445         42            1         +  34          6      |
|  1         fleischwolf     5895         37            1         +   5          7      | 
|  3         saddy           2199         28            1         -  17          8      | 
_________________________________________________________________________________________

Specification of new features

Save/Load game

Summary

The save and load features can be accessed via the ingame menu.

The save dialog has to provide a possibility to enter a name for the save game and should display other saved games, so that they can be selected and overwritten.

Similarly to the save dialog, the load dialog displays all saved games. The user can select one and load it via a click on a confirm button.

Implementation notes

There are three types of savegames: autosave (automatic saves every n minutes), quicksave (saved by hotkey) and regular saves (saved via the save dialog in ingame menu). Everyone of those has it's own directory, which makes them easy to distinguish. In the load dialog, all of them are displayed.

Multiplayer

Concepts

Master-Server Communication Client-Client Communication Serialisation Optional multiplayer features

Game setup

Game flow

Optimisation

Maps distribution (sharing maps)

Systems to share own maps:

Solution 1

The player who starts the game sends a hash of the chosen map to a master-server wich checks it against a database of the maps he holds. If it is not there the client will start uploading it. All clients that want to join the game will be prompted if the want to download the map or not.

Advantages
  • Probably easier to implement
  • Lesser traffic for all users
Disadvantages
  • High traffic and hdd-space consumption on server-side.

Solution 2

The player who start the game, send his map to another player, who take part on the game. Then both send the map to the next players, it's like an avalanche or torrent. So it's easy to share maps to lot of players, wothout having a master server.

Advantages
  • No extra traffic on server-side
  • Less traffic on client side
  • The more clients the more speed is avaliable -> torrent concept
Disadvantages
  • Harder to implement as we would need a p2p based system (or would need to use torrent in background wich would result in another dep)
  • Vunerable for manipulations if you don't make use of hashes all the time

Lists of available buildings

Building ideas

List of possible buildings being of interest for Unknown Horizons

Unsorted by increments.

resource extraction
resource working
mines
  • ore mine
    • ore mine → deep ore mine
  • iron mine
    • iron ore mine → deep iron oremine
  • copper mine
    • copper ore mine → deep copper ore mine
  • tin mine
    • tin ore mine → deep tin ore mine
  • silver mine
    • silver ore mine → deep silver ore mine
  • gold mine
    • gold ore mine → deep gold ore mine
  • gem mine
    • gem mine → deep gem mine
  • coal mine
    • coal mine) → deep coal mine
  • salt mine
    • salt mine → deep salt mine
  • clay pit
    • clay pit → extended clay pit
stone pit
  • stone pit
    • stone pit → extended stone pit
  • marble pit
    • marble pit → extended marble pit
other
  • lumberjack
    • lumberjack's tent → lumberjack's shack → lumberjack's log house
  • shooting box
    • shooting tent → shooting box
  • saltworks
  • salt ponds
  • ragman
resource cultivation
agriculture
  • corn/grain farm
  • potato farm
  • cotton plantation
  • tobacco plantation
  • indigo plantation
  • purple snail breeding (currently unsure about this one at all :S)
  • conchenille lice breeding
  • sugar cane plantation
  • hops planatation
  • winery
  • orchard
  • vegetable farm
  • spice plantation
  • medical herb garden
  • cacao plantation
  • coffee plantation
  • silkworm plantation
  • hemp plantation
  • green house
  • apiculture/beekeeping
stock farming
  • sheep farm
    • herdsman tent → sheep farm
  • goat stable
  • cattle farm
  • hen coop
  • pigsty
  • horse stable
others
  • forester
    • forester shack → forester's lodge
oreworks
  • oreworks
  • ironworks
  • copperworks
  • tinworks
smithies
  • toolmakers
  • boiler maker
  • gunsmiths
  • armory
  • silversmiths
  • goldsmiths
foundries
  • cannon foundry
  • mortar foundry
  • bell foundry
  • tin foundry
  • mint
other
  • carpenter
    • carpenter's tent → carpenter's shack → carpentry → small sawmill → big sawmill
  • charcoal burning
    • small charcoal burning → medium charcoal burning → big charcoal burning
  • stonemason
    • small stonemason → stonemason
  • marble stonemason
    • small marble stonemason → marble stonemason
  • brickyard
    • small brickyard → big brickyard
  • pottery
  • salt pans
  • windmill
  • water mill
  • bakery
  • brewery
  • distillery
  • weaving mill
    • weaver's tent → small weaving mill → medium weaving mill → big weaving mill
  • tailoring
    • tailoring → big tailoring
  • cobbler
    • cobbler → cobbler workshop
  • saddler
  • dyeworks
  • vintager
  • tobacconist's shop
  • confectionery
  • coffee roastery
  • ropeyard
  • perfumery
  • tannery
  • butchery
  • whale oil production
  • ambergris production
  • sawmill [wind-/animalmill]
  • sawmill [water mill]
  • paper mill
recruiting
  • barracks
    • bulwark → fort → strong fort → castle → stronghold → citadel
  • boatyard/dockyard
    • boatbuilder tent → boatbuilder → small boatyard/dockyard → big boatyard/dockyard
agricultural areas
  • fields
  • cornfield
  • potato field
  • cotton field
  • tobacco field
  • indigo field
  • purple murex field
  • Cochenilleläusefeld (Translation needed!) (?)
  • sugarcane field
  • hop field
  • vineyard
  • orchards
  • vegetable field
  • seasoning field
  • medicinal herbs garden
  • cacao field
  • coffee field
  • silkworms field
  • hemp field
  • flower meadow
  • alvearies
services
resourceless services
  • educational institutions
    • village school → school → academy → university
  • religious institutions
    • sunsail → chapel → wooden church → stone church → big church → cathedral
  • abbey
    • small abbey → big abbey → noble abbey
  • fire brigade
    • volunteer fire brigade → professional fire brigade
  • drining water wells
    • village pond → well → deep well
  • pillory → gallows/gibbet → guillotine
  • stake (nicht unbedingt angebracht, weil von arg zweifelhaften Ruf --dauerflucher 23:53, 17 March 2008 (CET))
  • gendarmery
  • prison
    • jail → prison
  • townhall
    • citizen hall → town hall → city hall
  • Vogthaus Translation needed
  • court
  • consulate
  • rat catcher
  • library
  • abbey
resource based services
  • public bath
  • doctor
    • doctor → hospital
  • apothecary
  • lighthouse
    • flare → wooden lighthouse → stone lighthouse → big lighthouse
  • inn
    • tavern → inn → hotel
  • writer
    • scribbler → orderly office → printery
others
  • marketplace
    • miscellaneous configuration levels as special functions
    • sailors:main square → pioneers:main square → settlers:village square → citizens:town square → merchants:market square → aristocrats:city square
  • store
    • chandler → store
Warenumschlagplätze
harbours
  • habour
    • small branch office → moderate branch office → big branch office → grand branch office
  • fishing port
    • fishing tent → fishing lodge → small fishing port → big fishing port
commercial establishments
  • store
    • waretent → warehouse → depot → market hall
residents
  • residents
    • living tent → cottage → framehouse → half-timbered house → stone house → small estate → big estate
roads
road types
  • road
    • trail → lane → gravel path → cobbled street → prestige road
  • ascent
    • aggradation → wooden ascent → stoney ascent
  • bridge
    • bole → wooden bridge → stoney bridge → prestige bridge
piers
  • pier
    • wooden pier → quay bulkhead
walls
wall types
  • wall
    • dike → stockade → clayey composite wall → stoney wall
gates & portals
  • portal building
    • wooden portal → clayey portal → stoney portal
towers
  • sentry tower

    • lookout → wooden tower → clayey tower → stony tower
  • costal defence

Details

Shops

Summary

The idea of having shops is pretty simple. Normally the player would have to build a marketplace to fullfil the citizens' need for certain resources. Something that would mean the player would have to build marketplaces all over his island even for residents at the end of the world. To avoid this shops will be small service building working similar to market places just at a smaller radius.

Marketplaces are objects of prestige. Something to reflect the greatness of the player's settlement. They should not be just like any other service building.

Farms and plantations

Summary

Farms are handled differently than in in the Anno series. Instead of having one building for each agricultural purpose in UH there are companies being able to work a broader selection of fields an pastures - but also some stand alone companies. The following list shows roughly a possible disposition:

  • Farms (basic agriculture):

    • wheat/corn
    • potatoes
    • fruits
    • vegetables
    • hemp
    • sheeps
    • cows
    • hen
    • pigs
    • etc.
  • Stand alone (special purpose):

    • plantations (exotic agriculture)
    • green house
    • beekeeping
    • winery
    • medical herb garden
    • horse stable
    • etc.

While the stand alone companies are introduced to the game in one certain increment the farms are available over several increments. They differ in the amount of harvesters available and their reach radius. The harvesters limit the effectiveness of the companies to how many fields/pastures can be worked at one time. The reach radius defines the areas where fields/pastures can be placed to be worked by one company. Basically the radius is meant to be wider to provide the possibility not to place fields/pastures directly close to the companies. The disadvantage of far away agricultural areas is the time a harvester needs to get there and back.

Implementation notes

Fields and pastures are handled differently. Fields are buildable resource deposits where harvesters gather resources when "grown", meaning that the deposit's inventory is filled with resources. Pastures are just areas, which animals are bound to. The animals are the resource deposits, which harvesters gather when their inventory is filled.

Graphics

For farms, different graphics are needed for each increment, in which they appear. Stand alone companies will only need one graphical asset.

Instead of small 1x1 tile buildings, fields/pastures are bigger - most probably same size as the relevant company.

Implementation stages

Might be part of first milestone to some degree.

Fisher

Summary

Although this article is published under Buildings' Details it is linked to the Units category and the Resource Deposits article as well because in opposite to the known way of how Fishers are handled in the Anno series they are meant to be handled differently in Unknown Horizons. This is a special case.

Instead of having one buildings for a fisherman through all the tier the kinds of buildings will be split into two types: The fishermen housings (in early tiers) and the fishing port (in later tiers). The behavior of both types will be the same. (A whaler station might get number three.)

As the fishing port already explains in words the different types are not meant to be just companies with a certain reach but a mix from those and a harbors (like the branch office). Therefor they will not have fishing vessels as part of the company (like stock farms) but real units which need to be build in a dock.Those units can deliver their goods (food (fish and whale meat) and fish oil (from whales)) from the certain deposits (fishing grounds and whaling grounds) to a port while can be navigated like other sea vessels. The deposits will therefor be a mix of a common deposit and also a port. So the fishing vessels can select those deposits as destinations to set routes between the fishermen/fishing ports and the deposits itself to automatically deliver their goods. Alternatively oder additionally, the units might get the functions to set fishing routes automatically by just activating the fishing behaviour and let them search for their nearest according deposit.

Implementation related notes

  • Fishermen/Fishing port - Handled like ports only certain vessels can dock and unload resources which are delivered to the next branch office, storage or marketplace normally. Depending on how the fishing vessels handle the harvested resources (see below) they can wether be just ports or additionally companies which will refine the fishing resources to common resources (like fish to food). The docking function is limited to a certain sizes of vessels depending on the tier the building belongs.
  • Fishing vessels - Sea vessels in OA are all meant to be versatile units. They will have limited space (I like calling it "slots") depending on ship size and their primary pupose for certain extensions (like cargo/units load and cannons). This means fishing vessels need to be able to dock the branch office to unload common goods as well as the docks for repairs. So the fishing resources cannot be stored in the slot for common goods when being already refined on the ship itself - like resource(fish) == resource(food) because food could also be unloaded at branch offices. This would only make sense when totally deleting fishermen and fishing ports from the list of available buildings - not an option, I think. There might be an additional slot for the fishing resources then or the fishing resources are unrefined as fish and whale meat being refined in the ports to food and fish-oil. Optional there could be different behaviours for each type of unit like fishing vessels delivering unrefined resources and whalers being able to refine resources directly while not being bound to fishing ports at all.
  • Fishing grounds/Whaling grounds - Also depending on the way the resources for fishing and whaling units are handled (see above) there are different ways of how the deposits are handled themselves. Wether they provide unrefined resources or already refined resources to decrease complexitiy. Nevertheless they need an additional function as a port themselves to make them available as selection for ships. Moreover those deposits should move - like fish swarms do. Their resource hold should be quite limited to make them dissappear from the game relatively fast - like fish swarms do. Therefor there needs to randomly appear new deposits on the map's water tiles when others disappear.
Idea for assigning fishing boats to fisher huts

13:01 < chew-ie> just a thought: you could collect all boats in range x, dump them into a scrollable listbox and (here comes the actual idea ^^):
13:02 < chew-ie> - use a small additional FIFE-camera next to the GUI, centered on the fisher hut (zoomed out a bit to let the player watch radius x around the fisher hut)
13:03 < chew-ie> - outline boats in the new camera as soon as the user hovers the entries in the listbox

Workings

The player will have to build a dock first to make fishing and wahling vessels available to build. Then he/she needs an according port (fishermen, fishing port and eventually whaling station) where those ships can dock. The next step is to choose a destination deposit and the destination port - means, the player has to set a common route between two ports for cargo delivery. Optional the player might just click on the go-fishing-button to make the unit check for the nearest according deposit and after finishing harvest to check for the nearest according port. (Disadvantage, when the nearest according port is on a totally different island than where the resources are needed. So it might be a good idea to let the player choose a home port for all the fishing and whaling vessels.)

Graphical content

There needs to be graphical content for:

  • Fishermen and fishing ports for all tiers
  • When used, one set for a whaling station in a certain tier
  • Different fishing vessels (see List of Units)
  • Deposits: fishing and whaling grounds (appearing from the beginning of the game)

Audio content

There needs to audio content for:

According buildings ambient (when activating buildings' menues) Fishing and wahling vessel affirmation Eventually for fishing and whaling ground ambient (when activating deposits' menues)

Implementation stages

Details
  1. Docks
  2. Fishing port
  3. Fishing grounds
  4. Fishing vessels
General

To a certain degree this might be part of earlier development.

IRC logs

three parts of logs, 2010/AUG/26+27

(1)

2010-08-26T00:00:45 anybody up for a short brainstorm on fish swarms?
2010-08-26T00:16:08 <Kilian]> should be like clay deposit, but for water, with different amount of fish
2010-08-26T00:16:21 yup, I thought – now that we have bigger sea tiles there should be an upcoming solution
2010-08-26T00:16:39 <Kilian]> bigger fish tiles ^^
2010-08-26T00:16:43 swarms of size 10x10 are big :o
2010-08-26T00:17:00 <Kilian]> u can place a small tile in a big one ?
2010-08-26T00:17:08 hope so. Nihathrael?
2010-08-26T00:17:20 we need smaller ones and a check to only place them near shallow water
2010-08-26T00:17:28 then fishermen can have them in range
2010-08-26T00:17:49 need to talk about the boats again then.
2010-08-26T00:17:59 and what they are supposed to do / change
2010-08-26T00:18:06 <Kilian]> dauerflucher wanted to make them ^^
2010-08-26T00:18:26 maybe a fisher of tier 1 has small range, then you build a boat and assign it to a fisher → expanding the range
2010-08-26T00:18:35 <Kilian]> yep
2010-08-26T00:18:45 <Kilian]> there should be a solution in the DD, if not i can tell u:
2010-08-26T00:19:09 <Kilian]> 1.tier fisher has only a rod
2010-08-26T00:19:17 <Kilian]> can walk at the beach
2010-08-26T00:19:39 <Kilian]> 2.tier u can build a boat, send it to the fisher
2010-08-26T00:20:44 but small range expandable by building a boat would suit that
2010-08-26T00:20:45 <Kilian]> and now he can go fishing with his boat and the rod, he has only a bigger radius
2010-08-26T00:20:50 in my opinion, hehe
2010-08-26T00:21:05 later on we'll need some extra code for switching animations

(2)

2010-08-27T08:43:03 concerning the new comment about fish in trac: if we really require a fisherboat, then we have to figure out how to supply the settlers in lvl 1 with food
2010-08-27T08:43:27 the hunter isn't that productive and stable
2010-08-27T08:44:20 however if we do this: http://trac.unknown-horizons.org/t/ticket/510
(note: hunter breed wild animals; is implemented)
2010-08-27T08:44:37 and have a basic fisher with a fishing rod, it could suffice
2010-08-27T08:45:11 the tab of the fisher could display a hint, that later, fishing boats can be added
2010-08-27T08:45:32 that might interest the user, so that he/she wants to work on that, and get that boat
2010-08-27T08:45:42 which might be good for gameplay..
2010-08-27T10:39:44 <eoc_> totycro: the fisher in incr. 1 has a smaller range, without a boat
2010-08-27T10:40:12 <eoc_> he should still work, just get more effective later on
2010-08-27T10:40:26 <eoc_> better boats assigned make production faster and increase range
2010-08-27T10:42:43 I would propose the same for the fisher stuff

(3)

2010-08-27T10:52:16 concerning fisher: i don't want to propose much, cause else we'd have to discuss for hours again..
2010-08-27T10:52:36 i just wanted to point out that our first tier is called sailors, and sailors live at least partly off of fish
2010-08-27T10:53:24 <eoc_> when implementing the fish swarm resource, we should make sure that they are close enough to land .. to some degree
2010-08-27T10:53:41 <eoc_> so that incr.1 fishers could nourish about 30 tents for quite a time, that's right
2010-08-27T10:53:53 30 tents? how many fishers are you thinking of?
2010-08-27T10:55:14 <eoc_> for a "big" island like in demo there should be at least three fish tiles reachable by incr.1 fishers
2010-08-27T10:55:50 <eoc_> you can however place more than 1 fisher at the same field to have it faster (and also empty faster / no regeneration at some point)
2010-08-27T10:56:42 we could set the fish regeneration as high as 2 lvl 1 fisher can collect
2010-08-27T11:24:04 <Kilian]> Nihathrael: is it possible to show a small tile on a big sea tile ?
2010-08-27T11:24:50 yes
2010-08-27T11:25:02 we might need an extra layer though

(end)

Market place

Summary

The market place is or rather should be the center of a town. Its main and most probably only function is to supply the inhabitants of a settlement with needed goods. Inhabitants can collect goods there and only there. So, the market place will be the first requirement to fullfil for a working settlement. Market places are also limited by their range (a pretty big range) which will consequently mean you will need more than one market place to completely cover all residents in you settlement. Several market places in bigger cities are not uncommon.

To avoid having too many market places - especially for closing small gaps in your accommodation - building class will additionally feature smaller buildings with less range (like shops, small basars or something) which will work very much like the market places.

Moreover the market place is an object of prestige. It will change every increment to reflect the settlements state of development. To make this happen successfully the size of the market place ist the SAME in EVERY increment.

Finally the inventory of the market place will not be the settlement wide inventory used by branch offices or warehouses. The market places' inventory will only contain goods available for inhabitants resp. needed by them. To extend the functionality of this inventory it should be possible for players to:

  • restrict goods avaiability for inhabitants.
  • restrict the amount of avaiable goods for habitant.
  • raise value-added taxes for goods (maybe!).

Restrictions might be very helpful to avoid inhabitants using all available goods to update the residents in a new increment, or when the production of a new good has just started and the player want to ensure the full accommodation first.

Implementation notes

See also Supplying buildings with goods.

Graphics

  • The market place needs individual graphics for each increment. The graphic features to reflect the development will be the ground, the market stalls and a well/fountain/statue (depending on increment.)
  • The additional buildings (shops, basars and so on) will need graphics depending on which increment they will be available.

Sounds

Nice ambient sounds for crowded places will increase game depth.

Implementation stages

Details

First:

  • First implement market place inventory and make inhabitants using the market place only to gather goods.
  • Implement restrictions for goods.

Then:

  • Implement the update function as soon as it is figured out how increments and buildings' updates will work in detail.
  • Implement taxes (if accepted by dev team) as soon as it is figured out how taxes will be handled.
General

Hopefully, next milestone.

Storages

Summary

The warehouses' function is to collect and store all resources as well as extendings the settlement area. Except the functionality of a habor (including trade settings) it provides the same features as the branch office.

  • Provides access to the settlement inventory.
  • Provides carrier/collector units to gather resources from all kinds of production buildings.
  • Provides carrier/collector units to supply service buildings with resources.
  • The amount of carrier/collector units depends on building's level.
  • The radius limits the reach of carrier/collector units.
  • The radius extends the settlement area!
  • The radius depends on building's level.
  • The size of the building depends on building's level.

The warehouses also allows production buildings with a warehouse in reach to gather their resources there. If an appropiate working building is in reach it is preferred, but if in reach with no resources in inventory the production building will check for resources in a warehouse.

Implementation related notes

None so far.

Graphical content

Graphics for each increment level.

Audio content

Ambient sounds.

Implementation stages

Next milestone.

Lookout

Summary

The lookout is a easy wooden building. It can detect units on land and water, in a special radius.

Implementation notes

The lookout works as a detector, is a foreign object in his radius, it will be popup a message "Pirates are detect" something like this. It will be detect all foreign units. Means ships like trader and pirates and also units like soldier etc. The player must be have the option to enable/disable the notification, buts enabled by default. The lookout increase the radius of that what is the player seeing but not so much like the signal fire!

Graphics

Are available.

Sounds

No sounds.

Implementation stages

Details

It has one inhabitant in this stage.

General

This building will be available till the second grade. It has one inhabitant in this stage.

Signal fire

Summary

Jobs:

  1. The signal fire increase the radius of what the player can see. The radius is bigger then this one of the lookout.
  2. It will be allure the free trader, every time the free trader ships into the radius of the signal fire, it will be drive to the nearest branch office.

Implementation notes

Increase the radius, means the black and the fog of war will be hidden. to 3. that means it changes the behaviour of the free trader. Normally he will ship randomly to the branch office, but now every time he gets randomly in the radius of the signal fire, he ships to the nearest branch office, but only if also the branch office is the radius of the signal fire. If the trader will sell or buy something that will be stay randomly, but the chance that the trader trades will be become bigger.

Graphics

Are ready. :)

Sounds

Implementation stages

Details

The signal fire has no inhabitant.

General

Available in the first grade.

Combat/Battle

Combat

This article should explain the actual combat mechanics and not the different possibilities of unit interaction within a combat. Combat is only possible with units (sea units and land units), so see List of units for these that are able to fight.

Overview

In a combat there are different factions fighting against each other. They try to lower the health of the opposing units or buildings with attacks. Once health reaches zero, the unit dies resp. the building is destroyed. Damage and injuries have no effect on production, inhabitants or fighting capability. Discuss this!

We will from now on also refer to attacked buildings when talking about units.

Attack mechanisms

Each unit has one possible attack. Discuss this!

Attacks are categorized to fit a certain type. Propose categories and (roughly) their stats!

These attack categories have properties such as

  • impact radius/diameter
  • attack distance (often referred to as attack range)
  • scatter factor & damage behaviour
  • actual impact value that are the same for each attacked unit. Discuss this! We explain them below in #Attack modifiers.
Defense mechanisms

Each unit can defend against various attacks. For now, we will only implement one possible defense but later on, different defense types (against the corresponding attack) are possible. Discuss this! Each unit has a defined (and to be balanced) chance to

  • totally evade an attack
  • reduce damage suffered from an attack that are the same for each attacked unit. This is explained below in #Defense modifiers.
Fight

Each attack has a target which can be a unit or a range. Ranges are defined by clicking (center) and the attack's impact radius. If this range is zero, you need to directly click on units to target them.

Attacks have two properties that slow down the fight:

  • duration until impact happens
  • cooldown, duration until you can launch a new attack. They are discussed on the Talk page. You can also propose new properties there.
Combat modes

There are two different combat modes for units planned right now: Aggressive and Passive. Discuss this!

Players toggle this mode on a per-unit or per-selection basis. When a unit in aggressive mode is sent to a spot on the map, it will attack any hostile unit or building that gets into their attack range while finding a path to their destination. They will not chase these units in case the player gave a movement order though. Discuss this!

When in passive mode, units will only attack if they get attacked. We need to discuss if units should be chasing their attackers.

Automatic Fights

This is similar to the previous paragraph, but addresses unit behaviour when positioned somewhere and not following a move order.

In both modes, the unit won't care when an allied or neutral unit gets in its range. Players can still attack everything, but they will need to explicitly click on an 'attack' button and a target. This attack will declare war and turn all units of the two involved players mutually hostile.

Especially: If you have multiple units at a location and one of them gets attacked, all of your units will fight back.

Aggressive units will chase any enemy (maybe we add a small AI here to find out the best victim) until players interrupt that by giving a movement task.

Passive units will attack the aggressors as long as any of them is in attack range, but not try to chase.

Automatic retreat

Another feature to consider is introducing some kind of danger measurement function. As long as the player didn't explicitly order units to attack (read: the units are ambushed by an evil warmonger) they could move away if getting aware of the dangers.

We could imagine to rate the damage taken in a certain time and qualify it with the amount of attackers and the damage the unit itself can deal, but there is a lot more possible thoughts. Discuss this!

Interface

Selecting units happens via LMB. If single own units are selected, a tab is displayed. It contains stats and properties, a small portrait as well as certain buttons to switch this unit's mode. Discuss this!

If more than one own units are selected, the tab displayed should not differ too much from the above. It will contain a list of the selected units (maybe small portraits and their health). The possible interactions in this list are discussed here (together with its look).

Since we already feature grouping of selections to shortcut keys (0-9), we could somehow display these, too. Discuss this!

If you have selected own units and perform a right click on free terrain, units will move there. If you click on an enemy[?] unit instead, the whole selection will try to perform its attacks from where they currently are located. This includes moving in case the target is far away (not in attack range).

^ enemy means that either of you declared mutual war, not just a different player / side

Exact specifications

Attack modifiers

Players can enhance these modifier values by doing research, buying upgrades etc. Scenario writers could use modifications they can grant in code (to either a certain unit or the player).

impact radius/diameter & damage behaviour

Defines the attack's area of effect. Uses the real missile impact zone (scatter) as center.

  • If zero, this attack can only be performed at a single unit which the player needs to select then. Units in this area are dealt damage. This damage depends on the distance units had to the impact zone center when the missile landed. Discuss how!
attack distance (often referred to as attack range)

Only units that are in a certain range can be targeted for attacks at all. If a target unit is too far away, units might move until they can attack. Also important for ship-to-shore battles.

scatter factor

Scatter factor describes the various reasons why a certain missile, mainly a cannonball, will not precisely hit the area you target. It is implemented as a radius (invisible to the player? Discuss!) which gets larger for a high scatter factor. This means that the missile has the same probability to hit any ground spot in the circle determined by the actual target (player input) and the scatter factor. With higher value of scattering, the mean thus stays where it is but the variance grows.

actual impact value

Finally: the basic damage an attack deals by default. Higher value means more damage dealt -> health lost. If we implement resistances, we either want to define different impact values for each defender type or define resistances against each attacker type.

Defense modifiers

Read more here: Fighting_units

Health System

In general Every unit, ship and building has a health bar, it represents the health of this thing. Its displayed above of it. If you built a unit or whatever the health is complete, 100%. The health is counted in healthpoints. Depending on the physical characteristics different units have different healthpoints.

For example: a brigantine can have 6000 healthpoints a huker only 4500 So if both lost the half of there healthpoints the huker has 2250 points left and the brigantine 3000. How much points a unit should have is not point in this article.

×××××× O / _/_ Possible actions Furthermore should you know:

It's possible to increase the max. healthpoints, for example by upgrading a ship (increase) in the other direction, while downgrading, the max. will be decrease (decrease) Possibility to repair/heal a unit, so it will get back lost health points (add) While fighting or a catastrophe it can be loose health points (loss) Implementing related notes it should be possible to store the default value for healthpoints in the database the actual count of healthpoints have to be stored while saving a game the healthpoints are displayed via the healthbar and in the overview tab of the building/unit in digits like: 1650/3200

Units

Building units

Summary

Every unit requires an according building where it can be trained:

Docks for sea vessels Military facilities for infantry, cavalry and artillery. Academies for certain special units. to be continued... Ready units leave the building and troop up at an assembly point which can be manually set for each building.

The time for training will differ from units to units as well as the required resources.

Note Note: A musket e.g. build by a gunsmith will not automatically generate an infantry unit. The musket will only be a required resource to train a unit at the according building. --dauerflucher 19:37, 13 November 2007 (CET)

Implementation related notes

None so far.

Workings

The player will have to click on an according building and bring up the build menu for units (possibly the build menu will already be part of the building's main menu). Chosing a certain unit and activating the training process will make the building start creating one unit. Activating the process a second time before it is finished will set a second unit into the queue - and so on. (Also known from other RTS games.) Clicking on the assembly point icon in the building's main menu will give the player the opportunity to place an new assemlby point somewhere on the map on a tile not blocked and within his/hers settlement's reach just by clicking on this tile.

Graphical content

Like in all build menus the different units should be displayed with different icons. Because of the smaller size of the icons simple renders of units as used ingame might not be significant enough why a more clear icon might be required.

Note Note: Extra icons consequently mean extra work. I would suggest to stick to text only for menus during the early development. --dauerflucher 19:37, 13 November 2007 (CET)

Implementation stages

Building units should be part of later development - unless it is a pretty easy to implement function.

Navigating units

Summary

Select one or more units and click on a location at the map. The unit(s) will move there on the shortest way avoiding blocked tiles. This should possibly also work on the minimap. The selected units can perform actions by clicking on an object instead of a tile. The actions depend on the according objects. When a unit is not in range of an object it will move towards this object until it is in range and perform the action then. Moreover some units might perform automated actions like attacking depending on several stances like agressive or defensive. A group of units might be set into different formations to change effects of attacks or improving the defence. Units can be given a route to patrol or on which they perform actions like delivering goods from one port to another. Selected units should be displayed in a menu or via icons on the GUI. Possibly there should be an option to give grouped units a hotkey.

Some examples:

Light Infantry:

actions - move, attack stances - aggressive (attack everything in sight), defensive (attack nothing), guarding (attack when under fire onl y) formation - carret, diamond, line etc. Merchant vessel:

actions - move, attack (when armed), load/unload goods stances - none or aggressive, defensive, guarding (when armed) formation - line

Implementation related notes

Currently FIFE does not support the function to run an action depending on a tile or object clicked on. Actions are bound to keys only. But this could be solved by an additional script checking the tile or object the cursor is clicked on to decide which action will be runned.

Workings

The player selects a unit by clicking on it with the cursor, drawing a bounding sqare around group of units or using an additional metakey (like shift) to select more than one unit with the cursor. By clicking on a tile the unit(s) move there on the shortest way ignoring blocked tiles for pathfinding. Clicking on an object will make the unit(s) perform an previously from a menu or icon selected action or move until the object is in range and perform the action then. When pressing a for grouping available hotkey the currently selected unit(s) is(are) (yes, listen up) grouped. The player will now just have to press this hotkey to reselect all units grouped for this hotkey. From a menu or icons on the GUI the player can choose with the cursor (or hotkeys) stances, formations and so on for the currently selected unit(s). From a menu or icons on the GUI the player can set up a route for the unit(s). Clicking with the cursor on the according icon will activate the option to place a starting point, intermediate points and the end point on the map. As soon as he presses the GO-button the unit will start moving along this route. Accordingly the player might choose actions the unit(s) should perform on certain route points. The unit(s) will use this route as long as they are told to do something different. The GO-button will change to a STOP-button as soon as pressed and vice versa. When the unit(s) are given another target to move to the button will change automatically. The route will exist until it is deleted from the menu by clicking on a button that will for look like an X or a trashbin for sure. Along the route in an additional route menu the player can define certain actions the unit will perform at the according route points - like loading and unloading cargo or staying for a period of time at a certain location before going onwards.

Graphical content

There should be an icon or an outline around the unit(s) displayed on the game map when selected. Several icons on the GUI and possibly a unit menu will be required to place all the options somewhere.

Audio content

Every type of unit should have unique sounds for selection, moving, attacking and so on.

Implementation stages

Navigating units could partially occur in first milestone.

Speed of units

Summary

Depending on terrain (including different climates) and performing action units will have different speeds. E.g. Woods will be more difficult to walk through like open plains and when advancing enemies in a close formation units will maybe walk slower to holf formation or at least the speed of a group in formation is depending on the slowest unit in this group.

Some units might move faster through difficult terrain like others or perform actions at higher speed.

Streets might provide speed modifications.

Implementation notes

As unit of speed in the database we use the number of ticks, that it takes for one straight move, e.g. from (0,0) to (1,0). Technically speaking, this is not speed as such, but it suits our needs. Please keep this in mind when working on unit speed.

Every unit has a base speed(float) and every ground a modifier(float). Those are multiplied and inserted in the unit_velocity table(int). Due to the float to int conversions, rounding errors occur. To fix those or to create special conditions, these final values can be edited manually.

Whenever a new ground or unit is introduced, or a base velocity is changed the values have to be recalculated and manual changes will have to be redone. The recalculation will be done by a script, that is yet to be written. This script will also warn the user if the rounding error is to big (probably between 0.4 and 0.6).

Acceleration (basically different speeds for steps of the path) will be implemented later or never.

Implementation stages

Later development.

Grouping of units

Summary

The basic idea is to form groups of units which can be selected via keypress to simplify the navigation of more than one unit at once. For those groups certain features from the unit menu will be avaiable to send commands to the whole group - like combat, formation, route and such - while stuff like cargo and ship details are not displayed. Most probably groups of units will be handled by an own menu with slightly different content from the unit menu.

Due to the amount of number keys on a keyboard there will be 10 possible groups - with the marks 1 - 0.

Implementation notes

None so far.

Workings

The player can select units wether using the bounding box or by selecting one, hold down CTRL(or maybe SHIFT) and select another. With CTRL + KEY 1-0 the unit(s) is(are assigned to one of the available group "slots". When pressing the according KEY 1-0 again (w/o CTRL) the group is reselected when wanted. To delete an existing group the player just select no unit and assign this to the group "slot" he wants to delete.

To add a unit to a group the player just need to select the group and the additional unit(s) and assign all to the same group "slot" again.

To delete a unit from a group the player just need to select the group and deselct the unit(s) he wants to remove and assign the remaining ones to the same group "slot" again.

Graphics

The group number will be display like the health bar via ingame rendering.

Gfx for an additional group menu will be needed.

Implementation stages

Might be part of first milestone to some degree.

List of units

Note Note: This list is more like a brainstorming of what might be interesting. It's still lacking detailed descriptions and has abolutely no liability. --dauerflucher 01:12, 22 October 2007 (CEST)

A rough list of possible land units featured by UH. Military units: infantry: militia (lightly armed, badly trained voluntary civilists) light infantry (lightly armed, trained soldiers) heavy infantry (heavily armed, well trained soldiers) grenadiers (heavily armed elite soldiers trained in use of granades - bonuses when attacking fortified place) sharpshooters (lightly armed former hunters, elite soldiers - bonuses when attacking from woods or fortified place) mercenaries (units which are bought for gold only instead of other resources) cavalry: light cavelry (lightly armed mounted soldiers with sabres) dragoons (lightly armed mounted soldiers with carbines) heavy cavelry (heavily armed mounted soldiers with sabres and cuirasses) Artillery: canons (artillery for direct fire - most effective against units) howitzer (artillery for less direct fire - similar effective against units and buildigs) mortars (artillery for indirect fire - most effective against buildings) Civil units: prospectors (special unit to find ore deposits in mountains) carting traders (unit to carry stock over land) Special units: explorer (I have no idea what i was thinking about when adding this unit...) spies (special unit to be placed in enemy territory to see what's going on there) saboteur (special unit to sabotage or rather destroy enemy facilities) treasure hunters (when a treasure feature is implemented this is the unit to dig for treasures) balloon (?) (possible special unit to reduce fog of war - only one available) A rough list of possible sea units featured by UH. Note Note: Due to the pretty small size of a real building compared to a bigger ship it might be a good idea to avoid big ships and just use a variation of smaller vessels for OA instead to imply a little bit realism. --dauerflucher 01:12, 22 October 2007 (CEST)

Fishing vessels: fisching boat - common one- or two-masted sailing boat for fishing close to the coast like a pinnace, yawle or longboat cutter - generally one-masted small ship with higher fishing capacities herring fisher - two- to three-masted ship for independent fishing on open sea like a scooner, sloop, brig or hagboat whaler - two- to three-masted ship carrying the whaling boats and directly processing the haul Merchant vessels: boat - common one- or two-masted sailing boat like a longboat, yawl or pinnace courier ship - one- to two-masted ship like a sloop, scooner, galleass or billander small merchant ship - two-masted ship like a snow, ketch or brig big merchant ship - three-masted full rigged ship like a frigate War ships: small gunboat - small one-masted sailing boat like a yawl armed with a gun big gunboat - bigger one-masted sailing boat like a pinnace or barge armed with two or more guns naval cutter - generally one-masted small ship lightly armed with serveral guns sloop-of-war - two-masted unclassified warship like a snow, ketch or brig corvette - three-masted unclassified warship smaller but similar to a frigate frigate - three-masted most common classified war ship with one gun deck ship-of-the-line - three-masted heavy warship able to stand a line of battle with two gun decks bombadiere - two-masted ship like a ketch armed with mortars galley - sailing ship with rowing capacities like a xebec Special units: submarine - unarmed vessel for espionage activities (still open to discussions)

Fighting units

This article will cover the mechanisms of attacking and defending.

A description of how stressful we plan the combat to be.

Details

Animals

Summary

This article covers the behaviour of cattle and wild animals (including fish). They are all like independing units moving around freely and randomly in a certain area the are bound to (pastures, hunting grounds and so on).

Cattle: Cattle (sheeps, cows and so on) is bound to a pasture. This pasture represents the area the single units are moving around. The animal will grow (graphically) indicating the amount of resources already present in the animals inventory. When grown up the farmer will go and get a grown up unit. Its resources are put into the inventory of the farm and the animal is deleted. After some time a new animal will appear on the pasture and start growing.

Wild animals: Wild animals are bound to the hunting-grounds. The are harvsted by a hunter and have generally more space to move around (depending on the general bigger size of a hunting ground). In opposite to cattle wild animals will start the game grown up and the growing process will foremost start after respawn. Their respawn after harvested is depending on the size of the hunting-ground.

Fish: One fish is not very much therefore fish will appear as shoals of fish which are bound to the ground type water - resp. deep water. Like wild animals the inventory of shoals is full at game start, but bigger - more like other resource deposits. Moving around at water ground shoals will wether grow nor shrink. When empty they disappear and a new one will appear somewhere else on the map.

Implementation notes

None so far.

Graphics

Cattle - animation and resource (e.g. cows are resources before being slaughtered) gfx Wild animals - animation gfx Fish - shoal animation gfx

Implementation stages

Further development.

People

Overview

American Indian

They are a warlike folk, living in the northern steppe of America. If you come across them with respect, you do not have to fear anything.

Appearance

American Indians live in the northern territories and sometimes also in the tepid latitudes. They have compact settlings up to the size of a little village.

Structure of a settlement All productional and living space tents are built around (one or more) chieftain tents. There is a maximum of three chieftains per Indian settlement. The settlement consists of tents with different size and design. There are only tents, no buildings made of stone, clay etc.

Goods They mostly deal with coats and leather goods. There also exists the possibility of getting tobacco by a clever trading tactic. Because the Indians consume tobacco on their own, they are not very generous with it and can only help the player to bridge the gap until own production has been set up.

Exposure to strangers The Indians are a gentle folk. Visiting them many times causes your reputation to raise. If the player however decides to make an enemy of them, he can get serious trouble. Indians are veterans apt in battle and with bows and horsemanship as well. A long tradition of tribal wars made them keep up practising well enough to be respected far and near.

Inuit

The Inuit are friendly but like to be on their own and sometimes act a bit reclusive. Guests are tolerated as long as they do not arrive too often. This may result in fights and the trial of putting the invaders to flight.

Appearance

The Inuit settlements are small and compact, they are mostly located between mountains in the polar region.

Structure of a settlement A settlement consists of some small wooden hoods and igloos with a maximum of 2 main buildings.

Goods Because of their meagre living territory, the Inuit are only able to offer goods produced out of hunting the little animals which decided to share their habitate with the Inuit. Those goods enfold:

Blubber / Walspeck Tallow as lamp oil / Talg/Fett als Lampenöl Food / Nahrung Ivory (whale and walrus) / Elfenbein (v. Walrossen und Walen) Skin (seals, polar bears and foxes) / Felle v. Robben, Eisbären, Polarfüchsen Exposure to strangers Well trained armies should have no problems with calming the Inuit down, but small to medium troops can feel the toughness which an environment of this kind provides it's stout inhabitants with.

Aztecs

CONTENT TO BE ADDED-

Appearance

Structure of a settlement Goods Exposure to strangers Nomads CONTENT TO BE ADDED-

Appearance

Structure of a settlement Goods Exposure to strangers Desert Nomads CONTENT TO BE ADDED-

Appearance

Structure of a settlement Goods Exposure to strangers Gypsies CONTENT TO BE ADDED-

Appearance

Structure of a settlement Goods Exposure to strangers

Buildings

Here the list of all buildings in UH will be developed. Currently eoc is working on the basic structure and sorting. After this is done, that list (mostly created out of Building ideas) will reside here for common discussion. I (eoc) have the dream that some day we will have all much time, meet and discuss each of them and the production lines. To ease this process as much as possible, please contribute your ideas and share your thoughts after there is something to do here! --~eoc. 21:59, 27 May 2010 (UTC)

Shipyards Automatic building development Manual building updates List of building updates List of building ideas

Diplomacy

Artificial Intelligence

Computer Players in Unknown Horizons To allow for a better single-player experience, it is important to offer computer players that the human player can play with/against.

Those computer players (AI [Artificial Intelligence] in the following) will have to act as similar as possible as humans playing the game.

For the human player it should feel like he is be playing against other human players and not versus a computer.

For this it is important that the AI acts upon certain goals, which are similar to goals humans set themselves when playing the game.

Requirements for an AI in Unknown Horizons Has to be able to follow certain goals (settle on island, etc) Has to be able to judge goals quality based on the current game state Should be able to solve problems (like not enough building space available) Once a problem is detected, fixing it could be described as a goal and pushed through the same mechanics (problem (no more space) -> goal (find more space)) so problems are necessary for detection but solving could be done simply through (high priority) goals. A goal is a something the AI wants to achieve. When finding out which goal to pick, the AI has to judge the value of all the goals and pick the goal that is best suited for the current world state. A goal is then accomplished by solving a set of Problems. Goal: Build School, Problems: Enough gold, enough wood, enough space, find best place to build, build school). Problem solving is done by creating action plans, these consist of a set of commands that the AI has to execute in order to solve the problem. Has to be able to coordinate multiple action plans at the same time (move ship, build stuff) but: Should "feel" like a human player is playing when watching it act (not 10 actions in one turn etc.) Should be flexible in order to implement different difficulty levels Possibly have subgoals in one goal having some hierarchical abstraction with subgoals is really a key feature if you want to keep the whole thing manageable. Otherwise you'll fail to formulate more advanced goals Problems should be able to depend on other problems, in order to allow dependencies. Problems have to know if they are already solved for the current context Awareness of Plans that won't work any longer e.g. of interaction of other players. So the system will have to check regularly if the plans are still possible to fulfill and re-evaluate if they are not. For »feeling« Human, I consider it useful to give the computer players some kind of personality. The blue player on the map will maybe tend to solve some problem similarly if confronted again while the red player does something entirely different each time. We will use a system like in the newer Anno games witch characters representing AI players. Probably we should transfer the complete AI stuff into a separate "file" and just implement interfaces into the game. This will give interested players the ability to create own AI or modify it. We could create a special language (like the scenario markup) to write those control scripts for the AI. The language should use an intuitive syntax and should be action-based. For example an action could be "run out of wood" and then a few commands what should be done next ("build lumberjack near a forest or plant trees?"). OK really hard to do right but would help make the opponents feel real would be to have them interact with the player forming teams and have some common coordination. this could be done by using a different utility function for judging the goals for example. Will not be easy to do though i guess. I guess the easiest step towards such customization would be to use different weights that could just be loaded from some file. Different Algorithms for the calculation are a bit more complex but as python supports the notion of functions as data it should™ be possible. The hard part probably will be to make the different sets of weighting functions roughly comparable in player strength so no option is way superior to another (although one could implement some difficulties this way). Specific technical requirements Has to work with the game internal tick system Should be threaded to make use of multi core processors and to make sure it does not cause the game to lag when calculating possibilities Some Game AI related books I have lying around here 1 suggest AI had back then an impact of at most 5-7% of computational resources so I'm not sure making that part parallel is really worth the trouble (if you want this IMHO just push the complete AI stuff into one single thread so you at least don't need to have lock between different AI internals). I wanted to go with one thread per AI, not multiple per AI. That would be overkill and make more problems that solve them. But i think using threads is pretty important as the game-play is laggy enough already when building stuff, etc. We don't need extra lags when the AI is calculating it's possibilities. Should use the Command classes to invoke changes on the world, possible derived classes are needed for special AI use If you go for a distinctive AI Thread make that a must, having a single interface to care for all the loking stuff is really beneficial ;) I already added the interface for world data lookup to the UML diagram in Folder.png development/uml/ on the AI branch.

christoph: AI Game Programming Wisdom, Charles River Media IMHO the first part of the series is really worth reading

Ships

This class has the two children classes: pirates traders The AI class ships This class should have all methods that are used in general for AI supported ships, like driveAroundRadomly. This class should represent all basic features of a ship, which are used for every ship.

Methods that this class should have:

create_ship load save load_ship_states get_ship_count send_ship_random ...

Trade ships

Note: all of this is additional to the manual load/unload tab of a ship.

Trade routes Its possible to define a trade route for these kind of ships. They can transport goods from one branch office to another. They are defined in the branch office. This could be possible for:

own branch offices offices of allies free traders offices The defined trade route is shown, if the user clicks on the ship (while its trading) via a line of buoys (use standard buoy here):

            ship                        

BO1 . . . . . _____/ . . . . . . . BO2 . . . . . . . . = buoy . . . . . . . . . . . . . .BO3 . . . . . . . Additional stuff, that have to be discussed ship will be drive the route all the time it stops if there aren't the goods to trade anymore if the goods are available again it starts moving again Define what have to be trade any where Trade ships have an own tab for this kind of trading. This tab should have predefined blocks, they show a combination of the branch offices:

You can add a new block with the combination of the towns like you want. If you add an own branch office as destination, its not possible to add there gold information about sell/buy. Trade Tab a sell entry:

good amount sell gold$ (pick it up) from (sell it) to

to, here you can specific a player, a special town or nearest

from, here you can specific a special town or nearest (you can only sell your own goods)

nearest = the nearest own branch office

specific bo is necessary to get goods from a specific isle

a buy entry:

good amount buy gold$ (buy it) from (bring it) to

from, here you can specific a player, a special town or nearest

to, here you can a special town or nearest

nearest = the nearest own branch office

the overview:

wood 75 sell 20$ town1 nearest (u take 75 wood of town1 and try to sell it, for a min. of 20$ per tonne) 30 sell 15$ nearest player74 (pick up wood everywhere) fish 15 buy 10$ nearest town6 (u want to buy 15 fish for a max. of 10$ per tonne and bring it to town6) iron 40 buy 60$ town12 nearest (bring it to the next BO) you can't buy/sell goods at your own BO's you can choose three options (to/next/all) all means split the bought amount to all own BO's on the route and sell with (from/all)) if you select buy or sell from/to is set automatically from/to: here you can set a specific BO or set all(only for selling)/next(only for buying), ship takes the amount from all BO's depends where is it available, a bit like collecting, and if you have set buy and next, the bought stuff will be unload at the next own BO, what is reached by the ship define the trade route say the ship the where it has to go

way 1 via the tab

way 2 you can set points like bus stations, one after another this will be done directly via the map, click on the define_trade_route button of the ship and mark one BO after another NOTE: a trade ship has not the same behavior like a bus, it will not drive back, it will drive in a circle. Example:

Bus: 1 --> 2 --> 3 --> 4 --> 3 --> 2 ... Trade ship: 1 --> 2 --> 3 --> 4 --> 1 --> 2 --> 3 ... implementations notes ship needs a three-state-button (define/start/stop) to set it into define_trade_route state Could also be solved by a two state button (like reloading the config of a webserver after you modified it) then you can set the route by clicking on BO's one after another click button again to start trading now you could click the button again to stop trading if you click on the ship, the route will be displayed by a line of buoys

Free traders

The Free Trader is a simple Artificial Intelligence in the game whose main topic is trading. He is a supply for goods - each deal however needs to yield profit. By establishing trading connections with all involved parties and with the Old World, too, the Free Trader is a valuable connection and good relations to him can decide a match.

Function The function of the Free Trader is to ensure the availability of goods which under normal circumstances are needed, but can not be produced at all or as extensively as necessary by the player in early stages of development. An example for this necessity are Tools.

Trading terms & Cargo control The Free Trader needs to optimize the limited space of the ship's hold, the stock slots and the overall weight of goods to reach highest possible efficiency. Therefore remainders have to get sold quickly and surpluses are not welcome, player's offers and demands need to be analyzed. In general the Free Trader's purpose is to earn much money with little effort.

Cultivation of FT's Base Post Possessing enough money and construction material, the Free Trader is able to extend storage capacities. Later in the game the Free Trader is also able to build shipyards, producing self-required ships (merchant/escort) and other ships to sell them. Players can have their their ships repaired at the Free Trader's shipyard as well, but it is more expensive than repairing them in an own yard. We should discuss the possibility of the traders putting up own buildings (like farms or improvement buildings) to produce goods on their own. [ The trade colonie is rising up all the time, it exist out of storages and harbours and also out of weir systems to defend the base against pirates or adverse players. ]

Trade ... ... on island [Depending of the size of a port, the free trader as a different mount of slots for selling. The free trader will sell there remainders and other goods, which not easy to sell.]

... with natives The Free Trader can highly benefit from bartering with natives. Thus the AI tries to bargain over best contract conditions and then exchanges the maximum quantity of those goods. Furthermore, if the Free Trader sees advantages in it, he also may offer support to the natives and help them extending their settlement. This often happens if they can provide badly needed goods which promise high profit margins.

... with the Old World From time to time, ships of the Old World arrive to supply the Trader with goods and deal with colonial produce.

Diplomacy The initial mood of the Free Trader towards any player is 'Neutral'. Players can increase their reputation by selling goods which are barely needed, cutting deals of which the Free Trader benefits a lot or some other factors (to be added). Increasing the reputation leads to the Free Trader preferring to trade with the player, trading ships more frequently stopping by and, of course, having better chances of fair deals. Pirates however are initially set as 'Hostile'. There will be bounties put on them depending on the heaviness of particular threats the Free Trader encountered. Annihilating whole Pirate Islands is also rewarded well.

Legwork (and Quests?) Having the Free Trader's mood increased, the player may get asked to provide informal support sometimes. Accepting this job, the player tries to afford specific goods and deliver them as fast as possible.

Conditions The Free Trader needs some conditions to act well. Those are, first of all, a list of all player's settlements (updated after each new foundation, release and extinction) and a list of all goods' average prices. It is advantageous for the Free Trader to possess an own storage, but he can work on-the-fly without having any base, too.

List of Demands&Offers One table for each city. Entries are one row per trading operation and the attributes are as following: BUY/SELL - AMOUNT - PRICE - DATE Goods which are not bought or sold receive blank entries or do not show up at all.

Starting Procedure At game start the Free Trader creates the city list and then visits all branch offices to connect them with data. This being done, job choice starts.

Job Choice As soon as the current job is completed, this routine takes effect. The following steps are executed in this order and determine what happens next.

Current branch office offers good-value-goods: Buys goods which are sold below the popular price if close enough to a branch office and own stock does not already have enough of this good. The amount which already is in stock should modify the decision-making. Ship stock full: As the ship's load reaches 85% of maximum limit, the Free Trader sails to his base and unloads the goods which were in stock longest time and are needed nowhere. If there are goods aboard which can be sold profitably, the next step follows. New settlement founded: Encountering a new settlement not present in the list of cities, an entry is added and the Free Trader visits this city. Then the lists are filled with data. Job finished after visiting all new-founded settlements. Lucrative business possible: If one city offers goods at good price or there are goods in ship stock / Free Trader storage and another city is buying those goods expensively (exceeding average value), this deal is cut. If target branch office offers cheap goods as well, those are bought, too. Default: If none of the above is true, the Free Trader visits the branch office he did not visit longest time.

Pirates

This is only representing the AI for the pirate ships self, nothing about the isle infrastructure or trading.

Brainstorm The pirates will be shipping around. They can capture ships to increase their fleet or destroy ships of the other players. With special ships (with large cannons) they also are able to attack buildings coastlines like fishers or branch offices. The possibility's of pirates are linked to the increment of the player/players. A higher increment for the player results in stronger or more pirates. Pirate ships can increase their arming like other ships. Maybe the player cant see what arming a pirate ship has, so a fight become more exiting.

AI details the AI should depend on the players skills, maybe on: game difficulty amount of gold / acount balance inhabitants amount of battleships used area of the map bigger area of the player -> stronger AI ability to define the pirate AI skills, a good place could be the map file -> we should define some numerical terms for a kind of stages

what does "strong" mean -> ability's of pirates ! NOTE: all this stuff depends on battleship's speed ! attack time interval becomes shorter for higher stages

Stage 1: one pirate ship drive around follow the players ship

Stage 2: up to 3 pirate ships drive around follow the players ship, attack from time to time player ships, but doesn’t destroy them

Stage 3: up to 5 pirate ships drive around follow the players ship, attack from time to time player ships, destroy them start attacking buildings in the near of the coast

Stage 4 : up to 10 pirate ships (only for really large maps) drive around follow the players ship, attack from time to time player ships, destroy them start attacking buildings in the near of the coast and destroy them Implementation details Following methods are needed for the AI of pirates: driveAround the ship will be drive around randomly maybe theres something like this alreaady implemented for the trader ?! follow follow another ship, this can be every ship, expect of ships of there own pirate clan example: traders, player ships, another pirate ship (from another clans) can be followed, same for attack and destroy -> new method: need to specify if a ship belongs to a friendly or an enemy's side tryToAttack(target,intensity,suicidal=0) targets might be players at all, attacking certain structures or ships as well as attacking everybody hostile to protect others. If suicidal, no escape calculations are needed which might alter the AI behaviour. A low intensity will not cause sunk ships. driveBack after an attack attempt the ship will want to drive to the fortress or cave on the home isle gfx first pirate ship [1] a cave old fortress

Development of buildings (and units)

Automatic building development

THIS CONTENT IS, ALAS, OUTDATED AND NOT SUBJECT TO DISCUSSION ANY MORE

Summary

With every increment there are new buildings available. They either are completely new building or advanced versions of already existing classes. All those buildings will have to be placed manually with two exceptions:

Marketplace Resident Those two types will automatically update when a new increment is reached. While branch offices and marketplaces will just update to the new version residents will need resources. It's like the citizens of the settlement advancing their houses on their own. There should be the possibility to lock resources to prevent them being wasted for updating residents while required for something else.

Besides the eye candy there are some features which will also be updated. Marketplaces might extend their reach and residents provide more space for population as well as pay more taxes.

Implementation related notes

None so far.

Workings

The player won't have much exertion of influence. Those buildings will update as soon as a new increment is reached. There's only the option to lock the resources citizens would use to advance their houses.

Graphical content

Different images will be need for every increment.

Implementation stages

Increments won't be part of first milestone. Can be implemented in later development.

Manual building updates

List of building updates

List of data in production buildings, that can change on upgrade This list should contain anything, you'd like to buy as an upgrade. This also means negative effects of upgrades, such as an increase in a buildings running costs.

concerning acctual production (line) These values are specific to a production line:

production time production amount concerning building running costs add a collector more storage space building costs

Buildings, Settlement

Founding settlements

Summary

Starting with a ship, the player starts to investigate and sail through the world. If he encounters an island, he will examine which natural resources are available on it and how plants grow there. In the case he decides to settle there, he can order his ship to build an outpost at the designated position. Therewith he has founded a new settlement. Of course the player can repeat this process on any additional islands he wants to settle. In the next step, he builds the basic buildings required for a successful colony (e.g. a lumberjack, a fisher etc.). As soon as he has accomplished that, he continually tries to raise the level of his population, for example by building new buildings, importing goods not found on the island and so on. However, there is a limit how far goods will be transported from and to the branch office. Nevertheless, the player has the possibility to build warehouses to extend the area of the island belonging to him. The warehouse, just like all buildings, has to be in the radius of the branch office or in the radius of another warehouse.

Implementation notes

For founding new settlements it have to be possible to build the branch office as the only building without dependencies on other buildings and/or an existing reach of a former settlement. Only the vessel has to be in range of an island and a potential place to build on while being supplied with the according resources.

The vessel itself needs to have an own reach.

Workings

The player will have to navigate the starting unit to an island of his choice. As soon as the vessel is in range of the island the player will be able to choose a place where he can build but only in the reach of the vessel.

Implementation stages

The first milestone will feature one island only. The whole exploration part with a vessel will miss and it should only be possible to decide where to freely place the branch office.

Extending settlements

Summary

Branch offices can only be build on island coasts. The first branch office radius marks the reach of a settlement. The reach is the radius around the branch office where new buildings can be placed. To gros the settlement you will have to extend its reach. Wether you can build another branch office on the coast which radius of reach is added to the one of the first branch office or you can build a warehouse which in opposite to the branch office includes no port function for sea vessels but can be build upcountry. Warehouses can only be build when there is already a branch office.

As soon as a warehouse or branch office is destreoyed or demolished the reach of the settlement will decrease by the radius covered by this building. All other buildings in that former reach will stop their production and the player loses his/her ownership as long as he/she does not reconquer the reach by building a new warehouse or branch office. Meanwhile another player will have the opportunity tho occupy those buildings by merging them into his settlement's reach by building up a warehouse or branch office himself.

Brach offices and warehouses are basically the same kind of buildings with little differences. As long as there is one of them left the player will not lose the game.

Implementation notes

Overlapping radiuses of the buildings are ignored. The reach of both buildings is compatible of course. Ownership of buildings should not be dependent on who build them but in who's reach they are.

Workings

The player will just have to build the according buildings within the reach of the current settlement.

One way to win a game is to destroy all branch offices and warehouses of one and/or all other players.

Implementation stages

Extending settlments could but not nessessarily needs to be part of first milestone.

Buildsystem

Building streets

Summary

Streets are very important to the infrastructure in Unknown Horizons, therefore building them should be as easy and intuitive as possible.

Implementation related notes

The time a good needs to be delivered from building A to building B is measured by the length of the shortest road connecting those buildings.

Workings

If the player decides to build a road, he has to click with the left mouse button on the point where he wants the street to start first and then hold the button until the process is finished. If the button is released, the road planning is immediately considered done. He then moves the pointer to the place where it shall end. If these two points are not in a direct line, there are two possibilities how the road can go: Either clockwise or counterclockwise (see the picture). The user can easily switch between those two options by pressing the right mouse button. The setting the player last used is saved as initial option when he builds the next street. If there is no such setting saved, the behaviour defaults to counterclockwise.

Graphical content

For every kind of street there has to be a set of images featuring 8 directions with turns, crossroads and possibly gateways for buildings.

The most likely streets are (contingently build from different materials?!):

trails roads streets avenues

The 8 directions are (clockwise):

north northeast east southeast south southwest west northwest

Implementation stages

This feature is already implemented to a certain degree.

Building walls

Building houses

Summary

Select a building from the menu and place it with the cursor somewhere on the map. An unbuild house should be displayed semi-transparent with wether a red colored overlay (can NOT be placed there) or a green colored overlay (can be placed there). The building can only be played at a location where is enough space and all condidtions are satisfied (for mines or similar companies) - as well as the locations has to be within the settlement's reach.

A building has 4 different sides. The backalley probably should not face the street but the gateway. There are three ways this could be handled:

We give a shit about and all buildings face the same direction. (Inacceptable!) The buildings automatically face the closest street. In the build menu there is an area where you can chose the image you want to have displayed for the current camera view.

Implementation related notes

Beside of the color overlay (red or green) a tile grid should be displayed to show where exactly space is unavailable.

Workings

The player enters the build menu from the GUI and choose the building he wants to place by clicking on it. Moving the cursor back onto the map there is the building displayed as a semi-transparent image at the cursor which can be moved freely over the map. When the player found a location he/she like the building can be build by clickinig again.

Depending on the way building's direction is handled the player might have the opportunity to choose in the build menu with direction should face the current cam view.

Graphical content

Each building needs two additional semi-transparent images displayed in green and red at the cursor before the building is finally placed.

Implementation stages

Should be part of first milestone to a certain degree.

Autotear rules

Summary

Those rules are made to ensure that some objects will not be automatically teared down and others will for sure when building other objects over them.

Implementation related notes

All terrain objects (like mountains, streams, common resource deposits and such) which can not be build and are pre-definied in a map are not tearable at all. Buildings (in the meaning of real buildings and buildable resource deposits) can be build over trees and nothing else. Trees (due to buildable objects mentioned here) can be build over no other object - including trees themselves. Streets can be build over trees and nothing else. Walls can be build over trees and nothing else. Basically you can say buildable objects can be placed over every natural object which can be teared down in no time in reality. This includes small rocks, ponds, bushes and such.

Trees are some kind of special object, because optically this is a terrain object, in function a buildable ressource deposit, but can be found already on the map in large amounts at game start like pre-defined deposits. Trees can be worked for resources, teared down manually and are affected by autotearing in every case except of building trees oder trees.

Implementation stages

Should be implemented as soon as possible.

Tiers

List of tiers Sailors Pioneers Settlers Citizens Merchants Aristocrats Proposal Ideas for new buildings are found at Building ideas.

Summary

QUESTIONS TO COVER HERE: If this is specified in another article, link to it Not really. But for additional details have a look at Automatic building development of residents, Building upgrades of marketplaces and branch offices and Manual building updates of companies and service institutions. Both articles are not completely uptodate, but might help to answer some basic questions or at least to raise new crucial ones.

Production: speed, capacity Not sure about this one. The speed of collectors - especially carriers - is influenced by the streets used. The producers could work a bit faster with each tier or need less resources to finish their production - e.g. a lumberjack could make 2 quantities of boards from 2 quantity of wood in less time or 2 quantities of boards from 1 quantity of wood in the same time. The capacity of producers should be changed in two ways with each tier - a) the company's inventory should be able to store more resources to take more time before company is idling full - b) the amount of carrier units should be increased with each tier like the warehouse having 2 carriers in tier 2.

storage capacity This one should be increased with every tier by a certain amount while this mainly affects warehouse and storage tents. As said in 1.2 the inventory of companies should also be slightly increased in every tier.

buildings: size? This will not change. Although buildings will upgrade or will be able to be upgraded (depending on how we will handle this issue) the dimensions will be the same. Newer versions of companies with bigger dimensions will be available via build menu as a whole new building, but NOT as an upgrade. Also have a look at Building dimensions.

available buildings (new menu for new buildings?) Each tier will have its own tab in the build menu (the ones with the roman numbers).

gui looks? (different colors, slightly different style?) This is currently NOT planned. Might happen in later development, but do not care about right now.

When is an tier reached? As soon as all (demand) requirements of the current level ans these below are reached, a resident will upgrade its housing. Although it might only be just one of the residents this will unlock the new tier. An tier represents the maximum of "technology" available for a settlement, and although a resident might downgrade to a lower tier (due to a lack of happiness) or even all the current tier residents (like already reached settler tier, but due to downgrades only pioneer residents in settlement) this will NOT affect the tiers!

Inhabitants do they need building material for leveling up, and do they have to get it themselves? Settlers need certain resources (depending on reached tier) to upgrade and yes, they have to get them on their own from the main square. Those resources should be defined as limited needs. Some more information on how this is meant to work can be found in the article about the Main square.

Implementation related notes

Currently none.

Workings

This will happen automatically if the player successfully set up the economy of the settlement. Depending on how we handle upgrades some buildings will need manual upgrades made by the player while residents will ALWAYS upgrade automatically as soon as all needs are fulfilled (including the availability of the resources needed to upgrade).

Graphical content

The gfx sets for each tier differ.

Implementation stages

Soon.

1st Tier / Sailors

First Tier - Sailors Motto Create basic infrastructure, a few settlers, some food productions and enough wood as building material.

Detailed Description It's about setting up the real essential stuff. At first you need wood to be able to build anything. Then the only task that's left is to produce some food to not let the settlers starve and boost their happiness to the second tier with a small church. For upgrading, one needs wood as building material.

Requirements to level up Buildings: Market place, Chapel Goods: Community, Food, Faith 1 Happiness: ≥ 70 Inhabitants: 3 Upgrade Material: 2 tons of wood (no tools because it is a rare resource) Settlement Size: 50 inhabitants List of Buildings Economy Lumberjack + Trees Hunter Fisher Residential Settler tents Ministry Market Place Infrastructure Storage Building Trails and Bridge Signal fire Military Lookout

2nd Tier / Pioneers

Second Tier - Pioneers Motto The settlers can already survive - now make their life a bit more pleasant

Detailed Description Since the settlers have survived the first few weeks in their cotton tents, they now start to build homes and other buildings made from wood. Now textiles are available. This makes them payer higher taxes, which enables a bit more complex production changes, e.g. farms instead of fishermen/hunters or the clay pit. Out of this clay bricks will be produced which make buildings "better" in a lot of ways. The settlers will want to live in buildings made of bricks too, so this is required for leveling up to tier 3.

Requirements to level up Buildings: village school Goods: Cloth, alcohol, 2+ different kinds of food Happiness: ≥ 70 Inhabitants: i Upgrade Material: 2 tons of wood, 1 ton each of: bricks, tools and clay Settlement Size: s inhabitants List of buildings Economy Farm Potatoe field Pasture with sheep Weaver Clay Pit Brickyard Boat Builder Upgraded lumberjack Residential Upgraded housing Infrastructure Wooden Storage Military Wooden wall Wooden tower Maybe collectors/carrier could use wheelbarrows -> quicker transportation

3rd Tier / Settlers

Third Tier - Settlers Motto Half-timbered buildings and the first touch of luxury. Economy doubled.

Detailed Description Settlers want more. This includes drinking alcohol not only at home but together with pals, so a tavern is necessary.

Slowly but surely your Settlers realize that food tastes better if appropriately spiced, so they demand to be supplied with salt.

Additionally, one of tobacco products and condiments is demanded to reach the next tier, if you can provide both, happiness (and tax income) will rise.

An awareness for the dangers of life here sets in, so you can further increase the general happiness by providing apothecary and/or doctor buildings.

New construction material theme in this tier is clay together with wood (better known as half-timbered style) and buildings will grow in size and color. It is possible to have clay (yes, raw clay) as a construction material in this level.

The economy has some upgrades to half-timbered houses (extended clay pit/shooting box/small boatyard/..) as well as new buildings, not necessarily in this look:

the carver to dress stone, salt ponds (in warm climates, built like fisher) to evaporate salt of the sea, tobacconist and tobacco fields for the farm (warm climates only) cattle run/pig run (pigs need wood in middle ages' pig farming!) butchery (cattle / pigs meat, hides, horns), tannery (salt+hides leather herbs and hemp plantations for garden, spices for farm the carpenter (which is necessary because now the lumberjack/forester only provides wood). If we add a research feature, you should ned to research doctor, apothecary and weaving mill before you are able to build them. Research then however becomes available in this tier.

Now iron mining is possible and the whole production line iron mine, smeltery, toolmaker gets available. The first barracks can be built, too, but the only unit you can produce there now (without serious weapons) is a minor footman.

Requirements to level up Buildings: (doctor/apothecary)1, tavern (consumes alcohol) Goods: salt, (condiments/tobacco products)1, ... Happiness: ≥ 70 Inhabitants: ≥ i Upgrade Material: 4 tons of dressed stone, 1 ton of tools Settlement Size: ≥ s inhabitants List of Buildings Moved here.

4th Tier / Citizens

Fourth Tier - Citizens Motto Mining and weapons, buildings of stone, industrial food production and a bit more luxury. Roads are made of cobblestone now.

Meetings Not necessarily exhaustive list of meetings with discussions about tier 4:

2011-06-12 (game design, walls) 2011-11-06 (as part of 2012.1 discussion) Detailed Description New construction material theme in this tier is stone and buildings will get more massive and strong with certain accessories to cover the grayish gloom.

Sanitary facilities get important, so please build a public bath for your Citizens.

Demands get way more extraordinary. Provide 'better food' (this means have at least three different kinds of food), confectionery and one of (candles/lamp oil) as well as the missing part of tier 3 (spices/tobacco products)!

As in level 3, providing both lamp oil and candles probably helps your financial situation.

To fulfill all these needs, here is a short overview of your new economy branches:

Upgrades: deep iron mine, extended stone pit, brickworks, charcoal burning, professional fire brigade, inn, quay wall, ... New:

the pastry shop, using sugar and (almonds/cocoa)1 for pastry or honey, ropes and (almonds/cocoa)1 for pastry and candles corn fields for bread, cocoa fields/vineyard/alvearies for confectionery (alvearies produce honeycombs, thus if these are used, the pastry shop will produce candles as well. Source) almond groves and alvearies for garden mill and bakery to produce bread (most effective food production, only one climate!) cobbler (shoes), apiary (trees to honey), copper mine, tin mine, brass foundry, boatyard II If we add a research feature, you should need to research doctor, apothecary and weaving mill before you are able to build them. Research then however becomes available in this tier.

Now tin and copper mining is possible, resulting in brass foundry, arsenal, gunsmith. Barracks get better with this new equipment now, too

Requirements to level up Buildings: public baths (virtually consumes water, needs a pond in range) Goods: 3+ kinds of food, (spices/tobacco products)2, (candles/lamp oil)1, confectionery Happiness: ≥ 70 Inhabitants: ≥ i Upgrade Material: 2 tons each of tools and dressed stone, 1 ton of randomly (wood/bricks)1 Settlement Size: ≥ s inhabitants

5th Tier / Merchants

Fifth Tier - Merchants Motto Senseless, sparkling... we need it! Lots of possibilities to satisfy lots of different desires.

Detailed Description Construction material theme in this tier is still stone, but not that massive as in the previous level. The looks should be more colorful and the shapes of buildings are allowed to differ a lot.

Better (and bigger) versions of previously sufficient service buildings are available, of which big church (which requires, among others, bells to construct) as well as academy are necessary to reach the last tier.

There are not much goods demanded in this tier, you however still should try to supply your Merchants with as much of them as possible because otherwise you will not have any tax profit.

Upgrades: deep copper/tin mine, sawmill, carver, large weaving mill, stronghold, big boatyard, hospital, ... New:

faith II, eduction II, lighthouse II (consume candles, books, lamp oil) tea garden consuming tea, coffee and water. Provides society salt, gold, silver and gem mine, marble pit saline and goldsmith whale station, whale processing coffee and cotton fields for farm, flower and indigo fields for garden horse stable, saddler (ragman, paper mill, writer) tailor, perfumery, coffee roastery, candlemaker rat catcher In this tier, most research will enhance military technology both for ships and land units.

Requirements to level up Buildings: big church, academy, tea garden Goods: jewellery Happiness: ≥ 70 Inhabitants: ≥ i Upgrade Material: 3 tons of marble, 1 ton each of randomly chosen: (wood/bricks/tools/dressed stone)2 Settlement Size: ≥ s inhabitants Desired (overview): (apothecary/doctor)1, (candles/lamp oil)1, shoes, garments, perfume, representation

6th Tier / Aristocrats

Sixth Tier - Aristocrats Motto You will fall into despair trying to keep us alive. Final tier.

Detailed Description Construction material theme is marble, finally. This does not mean that all buildings should look white and have no texture - it just adds bright elements and a representation factor. Try to have it look nice!

Roads look like avenues now.

There are only desired goods in the last tier obviously, but you still need to supply as many of them as you can. Your aristocrats are very selective about their way of living and will not dare to simply leave where they don't get served well.

Upgrades:

deep salt/gold/silver/gem mine, extended marble pit, custom tailor, printery, big charcoal burning, hotel, pharos, cathedral, university, citadel That's it Desired (overview): (apothecary/doctor)1, (candles/lamp oil)1, shoes, coffee, perfume, representation, garments, horses, almond milk, culture

Economy

Running costs

Summary

Every building and unit has individual running costs in resources (gold). Those costs have to be paid in regular intervals (e.g. like every 10 minutes). As soon as the object is demolished or destroyed those costs are deleted. A company building lacking according resources for production or a unit standing around with no orders (what units will do most if the playing time) will still need the full runnning costs as an object in action.

The only way to decrease running costs is to decomission the building or unit.

Implementation related notes

None so far.

Workings

The costs are deducted automatically.

Implementation stages

Running costs might be part of first milestone.

Decommissioning

Summary

To decrease running costs to a certain amount the player has the option to decomission a building or unit. The intention is to give the player the opportunity to have no need to demolish buildings or destroy units just to save gold or because their capacities are not needed at the current time.

There is a different behaviour for decommissioning buildings or units:

Decommissioning buildings:

This can be done at any time with any building. The building will stop its prodution immidiatly.

Decommissioning units:

This can also be done at any time but only if the units are in reach of an according building - like a ship in reach of a friendly harbor. Decommissioned units can be moved with half of their movement speed but no other action can be performed - this includes defending from enemy attacks.

Implementation related notes

None so far.

Workings

Within the building or unit info window the player can press a button to decomission buildings or units. Decommissiones objects will be display ingame differently - e.g. in grayscale or with an overhead icon.

Graphical content

Button gfx and eventually overhead ingame icons.

Implementation stages

This can be implemented in later development.

Working resources

Purifying resources

Fulfilling citizens' needs

Settler happiness

Summary

Each settler building should have an own happiness value. It's influenced by what they get and how much they have to pay(taxes). Also, a certain value should be necessary so that the settlers can enter a new level.

Points to Fulfill Happiness increases when goods are got by settler's collector. Happiness decreases when consumed goods are used up. Settlers have to die or decrease in level when happiness reaches a certain minimum. A certain value of happiness is required for entering a new level. Happiness is influenced by the tax setting Implementation details Happiness is an integer, ranging from 0 to 100. You can think of it as "percent". The settler collector will notify the building, that new goods have arrived. The building will then react in terms of raising the happiness value. Every x ticks, the building checks which resources are missing (depends on the increment level), and decreases the happiness aproprietly. This could be done each time the taxes are paid.

See also Taxing of settlers

Settler taxing

Summary

The only way to get money aside from selling resources is by taxing the settlers. This is the main part of the income and therefore most important for a player. The taxing is tightly coupled with the happiness of settlers. The more goods they get, the more tax will they pay.

Detailed Description Each settler pays taxes regularly. The amount of taxes paid is calculated according to the formula below: happiness * tax_rate. It will be calculated for each residential building since the happiness values are bound to certain inhabitants. The general tax rate is not equal for all inhabitants of a settlement, so it matters to which increment they belong. See why

The user can set a tax_setting between 0.5 (low) and 1.5 (high) in steps of 0.1 where 1.0 denotes medium level. A higher tax setting has the effect of increasing tax income and reducing happiness at the same time.

As one can see in the formula, the happiness will heavily decrease when tax level is set to high, so this setting is to be used only for short periods of time (when the player urgently needs money).

A small tax rate is also contemplated. It would increase happiness, which could make settlers level up, even when certain needed resources are missing.

Open to discussion: Paid taxes depending on inhabitant amount per building? As in, should a building with 3/5 inhabitants pay the same amount as one with equal happiness and 5/5 inhabitants? Discuss this!

Taxing and Happiness The influence to the happiness of the tax_setting is the following - 8:

difference to 1.0 times 6 when low taxes (for 0.5 happiness decreases by 5) difference to 1.0 times 18 when high taxes (for 1.5 happiness decreases by 17) where - 8 resembles that paying taxes in general causes discontent.

Check #Formulae for the current formula. At medium 1.0 tax setting, happiness does not change if most desired resources are provided. A plot of above graph can be found here.

Implementation related notes

Every increment has a base tax (it's 2 for sailors).

Since happiness is an integer ranging from 1 to 100, it would influence the tax amount too much if we used "happiness * tax_rate". Therefore, we will use a modifier of

(1 + ((happiness-50)/100)) = 0.5 + happiness/100 This way, the modifier stays between 0.5 and 1.5 and at medium happiness, it's 1.

Data Balancing values [hide]increment max inhabitants tax base rate I Sailors 2 2 II Pioneers 3 3 III Settlers 5 6 IV Citizens 8 10 V Merchants 13 18 VI Aristocrats 21 30 Formulae def modify_happiness(increment, tax_level) """ increment int 1 .. 6 tax_level float 0.5 .. 1.5 """ difference = 1.0 - tax_level modify = 12 * difference - 6 * abs(difference) return modify - 8 def tax_income(increment, tax_level, happiness, inhabitants_of_building) """ increment int 1 .. 6 happiness int 1 .. 100 tax_level float 0.5 .. 1.5 inhabitants_of_building int: for e.g. Citizens this would be between 5 and 8 """ happy_mod = 0.5 + happiness/100 inhabitant_mod = inhabitants_of_building / max_inhabitants[increment] return base_tax[increment] * happy_mod * tax_level * inhabitant_mod

Supply citizens with resources

Summary

Settlers are getting their resources at the Marketplace (i.e., their collector gets them). When a settler collector arrives at the settler, the happiness increases right then.

It will take some time, until the res disappear. The collector can also get res, where some are already in the settlers inventory, in order to build a repository of this res. The resource will disappear gradually.

The more inhabitants a settler building has, the more res they consume. The realistic approach here is to say that 2 inhabitants consume twice the amount of 1 inhabitant. Since it has been decided that a building will contain up to about 20 inhabitants, this would lead to really big numbers, and the player would have trouble supplying them all.

Therefore we will use a different approach. Example: 1 inhabitant eats 1 food in 60 secs. The consumption time changes with the number of settlers according to this formula:

consumption_time = (6/7) * log(1.5 * (inhabitants + 1.2)) A plot of above formula can be found here.

Given a base_time of 60 sec, 2 inhabitants in the same building will consume 1.35 food in 60 seconds and thus equal 1 food in 45 seconds 3 inhabitants will consume 1.58 food in 60 seconds and thus equal 1 food in 38 seconds 21 inhabitants will consume 3 food in 60 seconds and thus equal 1 food in 20 seconds This is unrealistic, but provides a better game experience.

Implementation related notes

Each res, that is consumed, is implemented as a production line, that consumes 1 amount of this res, and produces happiness (the amount of happiness is related to the value of the res).

Data Balancing values See settler taxing#Balancing_values for a tabular overview of max_inhabitants per increment.

Formulae def modify_consumption_time(prod_line_duration, inhabitants) """ prod_line_duration float 1.0 .. 3600.0 duration of processing this line in seconds inhabitants int 1 .. 21 amount of people in a residential building """ new_amount = (6/7) * log(1.5 * (inhabitants + 1.2)) # log = base e return 60 / new_amount See also Settler taxing Settler happiness

It would make sense to distinguish between resources the inhabitants demand and such they desire. The latter are not necessary for development, but providing them will give you more tax income. A demand for resources needs to be fulfilled in order to reach the next increment.

We can additionally put those concepts together sometimes and let inhabitants desire at least one (or more) resource of a whole block. This was introduced in Anno 1602 afaik and has a huge potential, allowing us to add more diversity to the game while not forcing the player to keep up an over-complicated economy depending on many fertilities. --~eoc. 23:34, 27 May 2010 (UTC)

Supply citizens with services

This works very similarly to supplying inhabitants with resources.

A service building produces a resource that inhabitants treat like food, cloth etc. - they pick it up at the corresponding service building, then consume it and after a certain period of time go and look for replenishment.

The service buildings have a storage limit, thus can maybe not serve many housings in time. This means that one needs to build more service buildings of that kind, adding not only the range factor as delimiter to the game. The player will need to have a look from time to time, maintain the settlement and react where bottlenecks occur.

Some buildings may consume resources to provide their service resource. This production line is similar to any other, so the consumption is not depending on time but on fetched ( = need to reproduce) service resource units.

Distinguish between services the inhabitants demand and such they desire. The latter are not necessary for development, but providing them will give you more tax income. A demand for services needs to be fulfilled in order to reach the next increment. A desired service may also become demanded in later increments.

Supply buildings with goods

Summary

We have basically 2 kinds of buildings that need goods: settlers and production buildings. The latter ones additionally produce goods, which have to be collected.

For those two kinds, we have two kinds of storages, where collectors of those buildings can get their goods: market place and storage building.

The storage building extends the reach of the settlement, collects goods from producers and supplies produces with goods. The branch office is in this regard just a normal storage buildings.

The market place is only there to supply settlers, i.e. they can get food/textiles/etc. from the market place and only from there. (So this building is absolutely necessary as soon as you build 1 settler). The market place has no other special purpose, it does not extend the reach of the settlement

Implementation The market place and the storage building inherit both from the storage building class. To restrict settlers to the market place, we can subclass the buildingcollector class, and get_buildings_in_range() should only return market places. We also need to make all other collectors ignore the market place. (see Open Questions)

Balance

Summary

The economical balance is roughly defined by 2 extends:

The settlers have to pay enough, so that running costs are covered and a small profit exists. The production buildings have to produce enough for the settlers. Note Note: Please note that the following examples are only suggestions, if you experienced a different gameplay, please add the examples which in your opinion suit better or best! Also note that since the game is in dynamic development some changes may have altered the gameplay hugely after those proposals were done. the current values can be viewed in balance.sqlite or using the tool

user@pc: unknown-horizons$ ./development/print_db_data.py with various options. ~eoc. 22:22, 10 May 2010 (UTC)

At pioneer level I (totycro) suggest, we define 1 or more example settlement with a reasonable economic structure and number of buildings, and make sure, that the balancing requirements are fulfilled.

A settlement at pioneer level with this buildings should work:

Example 1: totycro 1 branch office 2 lumberjacks 1 farm + 4 potato fields and 1 sheep field 1 weaver 1 market place 8 settlers Example 2: eoc (running costs displaying the sum of each line) plus fail @ understanding resource needs calculations (-,

1 each: branch office, market place, storage tent 0 2 lumberjacks 10 / 0 12 settler tents (max. inhabitants: 30) 0 needing (per minute): 8 textile, 8 faith 1, 12 food. 2 fishermen (producing 6 food each) 10 / 0 «« too little efforts to get food here. potato field should be more effective since we have a farm at that point of the game anyways, so why not have 3 potato fields and one fisher producing enough food? 1 chapel (producing 15 faith 1) 15 / 5 1 farm + 3 pasture (producing 8-9 wool) 10 / 5 1 weaver (producing 8 textile) 15 / 5 So a total value of running costs 50 (without the lumberjacks since they are not needed steadily) should be paid as taxes on normal tax regulation in my opinion, therefore 4 - 5 Icon gold.png per tent or 1.5-2 per inhabitant.

Example 3: Atomicbomb (This example is for Unknown Horizons Version 2011.1 and above.)

IMPORTANT: To maximize the storaging speed, you can make the at least 6 fishermens / 3 Farms / etc. to have access to only one storage or two storages(depending on how many production buildings you have, but I recommend 3 storages per 3 farms). The collectors will tend to store in random storages if you give them access to many storages. This is my key strategy.

If you're on Sailor (first) Increment, this should works.

IMPORTANT: Do not worry too much about money flow now, since your food production is limited to hunters and fishermens.

(I recommend you to build this in order)

1 Branch office. 1 Marketplace. I recommend to put your marketplace with at least 8 to 10 tiles far to any un-buildable terrains (like oceans) so, you can optimize space to build your houses/tents. 6-12 Houses. I'm not sure how many food that the settlers will demand, I usually adapt the amount of fishermen buildings with my food requirements. 6-12 fishermens. Try to adapt the fisher number with the food requirements. I don't like to build hunter buildings, since they look useless to me. 1 Chapel to keep your citizens happy. Build it near houses and it must have an access to roads and houses. If you had done that, then you will advance to Pioneer(second) increment soon. If you still not make it, try to build more houses and fishers.

If you're on Pioneer (second) increment:

(This is based on a condition if you have built all things in previous suggestion.)

IMPORTANT: This is the hardest part of the game, you need to build a large town and a strong economy.

First, build your houses, a lot of. Put it near the house, this should be done carefully to maximize the usage of space, Build a lot of farms with POTATO fields. If your income went negative, build more houses, counter it with farms if the food went low. I don't like to build the sheep or sugar farms in this increment because it don't affect so much in this increment (build it if you want to and if your income supports you). If you want to advance, just purchase some goods(that are required for advance) from the free trader. If you're on Settler (third) increment:

Build 2 or 3 distilleries, the build taverns(a lot)

Animations

Audio

Voices

Implementation The current implementation uses the direct paths to the speech-files. This means, we need a lot of database entries. This should be changed to the following implementation:

every event has an own folder, named self-explanatory, like "savegame_loaded" or "found_settlement_ally" the event folder covers all language files, they should be named by official locale like de for German the same event can have different speech files for the same language, _0 .. _1 etc. So we have a folder structure for every event like this:

.../example_event/ de/0.ogg de/1.ogg en/0.ogg ... [show]

All event names: IRC Discussion summary I'd say it's best to have a slightly different design than we now have: top level (1) group by event; in there (2) group by language <Kilian]> looks like there isn't any code to load speeches depending by language? yes. I'd like to only link directories to events as we do now with action sets. Then the code looks if there's at least one language-specific file for this ... and else uses an English one we should name the event directories accordingly, then no database relation is necessary at all English Game start [hide]Map created (random) 0 A new group of islands is waiting to be conquered! [1] 1 A new world has been created! [2] 2 A new group of islands is waiting for your settlement! [3] 3 A new group of islands lays before you for exploration! [4] [hide]Map loaded (savegame, free) 0 x No.png [hide]Scenario/Campaign map loaded 0 x No.png Founding settlement [hide]Player found settlement 0 Strive so that this settlement shall evolve stately. No.png 1 Your inhabitants will certainly feel comfortable on this island. No.png 2 Call this patch of ground yours from now on. No.png 3 This region now belongs to our colors. No.png 4 This piece of ground is now ours. No.png Meta: Somebody not player found settlement 0 Another player has settled on an island. No.png 1 A player develops a new settlement. No.png 2 One of your fellow players founded a settlement. No.png Rival found settlement 0 A rival of ours seems to have founded a settlement. No.png 1 We've been informed that one of our rivals snared new land. No.png 2 One of our opponents is said to have expanded. No.png Ally found settlement 0 Our ally settles on another island. No.png 1 One of our allies cultivates an island. No.png 2 Our ally passes news about successfully founding a settlement. No.png [hide]Meta: Somebody found settlement on your island 0 This island no longer is all ours. No.png 1 Scouts found out that guests settled on one of our islands. No.png 2 We got new neighbors on this island! No.png Rival found settlement on your island 0 Scouts report that uninvited guests beleaguer our island! No.png 1 Should we really accept our rival as new neighbor? No.png 2 One of our enemies settles on our ground! No.png Ally found settlement on your island 0 One of our allies seems in desperate need of our ground. No.png 1 We share this ground with our ally for now. No.png 2 Our ally settles on one of our islands. No.png Resources [hide]Construction material missing 0 You need more $RES to build this. No.png 1 This construction project needs more $RES. No.png 2 Construction is impossible without sufficient amounts of $RES. No.png 3 The amount of $RES in your inventory is not sufficient to build this. No.png German Game start [hide]Map created (random) 0 Eine neue Welt wurde erschaffen! [5] 1 Ein neues Archipel steht zum Spiel bereit! [6] 2 Eine neu entdeckte [erschaffene] Inselwelt wartet auf die Besiedlung durch Euch! [7] 3 Es liegt eine neue Inselgruppe zur Erforschung vor Euch! [8] [hide]Map loaded (savegame, free) 0 x No.png [hide]Scenario/Campaign map loaded 0 x No.png Founding settlement [hide]Player found settlement 0 Auf dass sich diese Siedlung prächtig entwickle! No.png 1 Euer Volk wird sich auf diesem Eiland sicher wohl fühlen. No.png 2 Ihr könnt dieses Stück Land nun euer Eigen nennen! No.png 3 In diesem Gebiet weht nun unsere Flagge. No.png 4 Dieser Flecken Erde ist nun der Unsere. No.png Meta: Somebody not player found settlement 0 Ein fremdes Volk scheint eine neue Siedlung gegründet zu haben. No.png 1 Ein anderer Herrscher hat eine Insel besiedelt. No.png Rival found settlement 0 Unser Feind hat neues Land erschlossen. No.png 1 Einer unserer Konkurrenten hat sich neues Land unter den Nagel gerissen. No.png 2 Einer unserer Kontrahenten soll seine Ländereien erweitert haben. No.png 3 Euer Konkurrent hat eine neue Siedlung gegründet. No.png Ally found settlement 0 Unser Partner hat eine neue Insel besiedelt. No.png 1 Unser Verbündeter hat eine neue Siedlung gegründet. No.png 2 Einer unserer Partner macht neues Land urbar. No.png [hide]Meta: Somebody found settlement on your island 0 Diese Insel gehört nun nicht mehr nur uns alleine! No.png 1 Unsere Späher berichten, dass wir dieses Eiland nun mit Anderen teilen. No.png Rival found settlement on your island 0 Achtung, unser Gegner hat sich auf unserem Eiland niedergelassen! No.png 1 Einer unserer Kontrahenten will wohl unser Nachbar werden. No.png 2 Unser Gegner versucht wohl, uns diese Ländereien) zu stehlen! No.png Ally found settlement on your island 0 Unser Verbündeter will unser Nachbar werden. No.png 1 Einer unserer Verbündeten scheint dringend unser Land zu benötigen. No.png Conquest [hide]Rival conquered a foreign settlement 1 Wir haben erfahren, dass unser Gegner eine Siedlung erobert hat No.png 2 Spione berichten, dass unser Feind dabei ist, fremde Ländereien zu annektieren No.png 3 Unser Gegner hat eine Siedlung erobert No.png Ally conquered a foreign settlement 1 Unser Bündnispartner hat erfolgreich eine fremde Siedlung übernommen No.png 2 Unser Partner lässt ausrichten, dass er unserem Feind Land abgerungen hat No.png 3 Unser (Kommulitone) hat Feindgebiet annektiert No.png Rival attacks your settlement 1 Unser Gegner will uns wohl herausfordern No.png 2 Gott möge uns beistehen! Die Streitmacht unserer Gegner greift an No.png 3 Unsere Siedlung wird von feindlichen Truppen überfallen No.png 4 Landetruppen unseres Feindes plündern unsere Siedlung No.png 5 Haltet aus! Wir werden diese Halunken aus unserer Stadt jagen No.png 6 Schnell, ruft die Truppen zusammen - der Feind hat seine Landetruppen abgesetzt No.png 7 Haltet ein, die feindlichen Truppen sind in durch die Stadtbefestigung gebrochen No.png 8 Verschanzt euch! Die gegnerische Streitmacht ist in unsere Stadt eingedrungen No.png 9 Konzentriert die Truppen! Die feindliche Armee ist durch unsere Stadtmauer eingefallen No.png

Diplomacy [hide]Relationship of two rivals 1 Ein Spion hat uns mitgeteilt, dass zwei unsere Gegner einen Bündnisvertrag unterzeichnet haben No.png 2 Zwei unserer Gegner haben sich, wie ich soeben in Erfahrung brachte, den Krieg erklärt No.png 3 Man munkelt, dass sich zwei unserer Kontrahenten verbrüdert haben No.png 4 Unsere friedliche kleine Welt wird vom Krieg zweier unserer Gegner überschattet No.png 5 Unsere Kapitäne berichten von kriegerischen Aktivitäten zwischen zweier unserer Gegner No.png

Own politics 1 Zieht dir Truppen zusammen, uns wurde der Krieg erklärt! No.png 2 Gott möge uns schützen - wir stehen nun im Krieg No.png 3 Eines unserer Handelsabkommen wurde aufgelöst No.png 4 Ein gegnerischer Herrscher hat uns den Krieg erklärt No.png 5 Eines unserer Bündnisse wurde vom Gegner gekündigt No.png 6 Macht alles bereit! Wir werden es diesen Halunken schon zeigen! No.png

Units [hide]Ships 0 Pullt die Riemen No.png 1 Hisst die Segel No.png 2 Ei Ei, Sir No.png 3 Zu Befehl! No.png 4 Setzt neuen Kurs! No.png 5 Leinen los! No.png

Inhabitants requirements [hide]Religion 1 Unsere Bevölkerung möchte, dass ihr ein Gotteshaus errichtet No.png 2 Unser Volk wünscht sich einen Ort zum Beten No.png 3 Ein Gotteshaus würde den Wohlstand unserer Zivilisaton wiederspiegelen No.png 4 Wir sollten eine Kirche errichten, um das Volk zu Frieden zu stellen No.png Community 0 Ein Siedler besitzt keinen Marktplatz in seiner Reichweite No.png

Resources [hide]Construction material missing 0 Für Euer Bauvorhaben reichen die Vorraete nicht aus. No.png 1 Die Bauarbeiter verlangen nach ausreichend Material. No.png 2 Eure Handwerker können ohne genug Baumaterial nicht arbeiten! No.png French Game start seblabel voice [hide]Map loaded 0 Un nouveau monde attend que vous partiez à sa conquête! [9] 1 Un nouveau groupe d’îles attend d’être colonisé! [10] 2 Un nouveau groupe d’îles attend d’être exploré! [11] 3 Un nouveau groupe d’îles attend d’être colonisé! (different tonality) [12] 4 De nouvelles îles se tiennent devant vous et attendent d’être explorées! [13] (thanks to Feldegast for his help, seblabel)

mafalda voice [hide]Map loaded 0 Un nouveau monde attend que vous partiez à sa conquête! [14] 1 Un nouveau groupe d’îles attend d’être exploré! [15] 2 Un nouveau groupe d’îles attend d’être colonisé! [16] 3 De nouvelles îles se tiennent devant vous et attendent d’être explorées! [17]

Sounds

Implementing Sound in Unknown Horizons [coming soon]

Event Handling in Unknown Horizons [coming soon]

Licensing Sound in Unknown Horizons You can contribute and include sound assets either created/recorded/used by you if and only if they do not violate any third party copyright and are legally usable by you.

All our own audiovisual media content is published under the terms of the Creative Commons Attribution Sharealike 3.0 Unported License.

If you are contributing sound assets that can be used in Unknown Horizons by you, but you are not the copyright owner of them, please ensure that they are available under a suitable license (preferably: CC-By-SA).

Read the Unknown Horizon License for updated, specific and exact details.

Creating new sound assets [coming soon]

Types of Sound Assets Object Event State Interface Button Click (NA) Naming your Sound Assets [coming soon]

Preferred Audio Formats [coming soon]

Requesting New Sound Resources The fastest way of requesting a new sound asset for the game is to create a new ticket for those assets on our project management tool. When you create that ticket, ensure that the following is definitely done on it:

The component is selected as "music/sound" Add one of the developers mentioned below in the CC list in the ticket. Roadmap for Sound Sound is being implemented in unknown Horizons from the ground up. We are currently building a scalable system that will support adding new sounds within the game rapidly. Once the base system for sound is done, we will start with interface sounds, then tier 1 buildings and their walkers.

For a detailed listing of whats coming next in sound in Unknown Horizons, please see the Roadmap for Sound in our project management tool.

Go to Developers Following developers are currently working on implementing sound in the game, for any details feel free to contact them on #unknown-horizons:

totycro kinshuksunil If you want to take up the responsibility of managing sound in UH, contact one of the developers mentioned above on the IRC channel.

Clone this wiki locally