The KsirK Handbook

# The KsirK Handbook

Gaël Kleag de Chalendar `<kleag@free.fr>`

Nemanja Hirsl `<nemhirsl@gmail.com>`

Revision KDE Gear 21.08 (2021-10-14)

Copyright © 2002-2012 Gaël de Chalendar

Copyright © 2013 Nemanja Hirsl

Legal Notice

KsirK is a computerized version of a well known strategy game.

List of Tables

2.1. Bonus due to the continents

Chapter 1. Introduction
Introduction

# Chapter 1. Introduction

KsirK is a computerized version of a well known strategy game. Commercial and other Free Software versions exist but I (Gaël de Chalendar) created this game initially as a C++ learning exercise and so, I developed it up to this point (see `README` for details).

In the current version, KsirK is a multi-player network-enabled game with an AI. (see `TODO` for details)

This documentation gives only the major information you need to start playing. Please read the tooltips and the status bar messages to complete your information.

The goal of the game is simply to conquer the World... It is done by attacking your neighbors with your armies. Peaceful, isn't it ? :-)

Chapter 2. Using KsirK
Using KsirK

# Chapter 2. Using KsirK

## Playing KsirK

Preliminary note: the map can be scrolled by three methods:

- You can put your mouse near a border of the window and the map will scroll in that direction

- You can use your mouse wheel: with no modifier, it will scroll vertically; when pressing the Alt key, it will scroll horizontally

- You can use the keyboard arrows

### Starting a game

When KsirK starts, you are presented with a main menu.

New Local Game

  Starts a new game.

New Standard TCP/IP Network Game

  Start a new game using Internet protocol suite.

Join Standard TCP/IP Network Game

  Join to the created by other user game using Internet protocol suite.

Load…

  Use this to load a previously saved game.

Quit

  Maybe you finally don't want to play?

If you hit New Local Game you will be presented with the New game properties dialog where you will be able to choose the number of players, the skin (or theme) to use, the game type (conquer the goal or have a specific goal) and finally if this game will be played with online players or if it is purely local. New skins can be downloaded using Download New Skins… button.

To start a TCP/IP network game, choose the New Standard TCP/IP Network Game option on introduction screen. After pressing this button you will be able to choose the network parameters: number of local players and TCP port on which waiting for connections.

Then, network players will be able to connect by choosing Join Standard TCP/IP Network Game on the introduction screen and by indicating the IP or hostname of the host and the port number you just set.

Each connection is indicated by a new row in the Players table below the map thumbnail.

Let's suppose you keep all the default settings and hit Next. You will then setup two players, one after one. For each one, you'll choose a name, a nationality and, if you want, setup a password such that nobody else than you can reuse this player when reloading this saved game. Lastly, you will here specify if this player is played by the computer or by a human being.

Then, after press Start, if you choose to play with goal, the goal of each local player is displayed, preceded by a warning such that other players looking at the same computer can discreetly turn away while the goal is being viewed.

### Distribution

At the beginning of the game, countries are distributed to all the players. Each country contains one army (represented by an infantryman) at the start. Each player has some armies to distribute to his countries at their turn (indicated by the presence of their name and their flag in the status bar). Note that five armies are represented by a cavalryman and 10 by a cannon.

To put an army on one of your countries, click on it with the left mouse button. To remove an army, click with the right mouse button. Note, as a general rule, that you will never be able to remove more armies than the number you placed.

When a player has distributed all there armies, the next player is automatically selected to do the same task. When all players have finished to distributing their armies, there is two possibilities that can be selected by two buttons showed in the right panel:

Recycle

  One player wants to change some of his choices. The first player can then remove an army he just put in a country with the right mouse button and put it in another one with the left mouse button. When he finishes, he gives control to next player with the Valid button. When all players have finished their redistribution, the two buttons are displayed again.

Done

  The redistribution is finished and the game can continue.

### Fight

After the redistribution, a turn starts. Each player plays at his turn. He has the choice to:

Next Player

  The turn of the current player finishes and it's the turn of the next one.

Attack with one, two or three armies Auto attack

  To attack, drag with the mouse from the attacking country and drop to the attacked one. You will then be presented with a contextual menu showing the above entries.

  For a country X to attack a country Y with x armies, 2 conditions must be fulfilled:

  - the two countries must be neighbors;

  - country X must have at least x+1 armies before the attack.

  If the attack is valid, a dialog is displayed if necessary for the defender to choose if he wants to defend with one or two armies or let the computer decide.

  When the defenders choice is done, the fight will occur and be completed. This will described below.

Move Armies from one country to another

  This is the last action of a player's turn. It gives the possibility to move some armies from one of his country to another, neighboring the first one. To choose the two countries, please drag and drop like you use during an attack. When both countries are selected, a slider is displayed on which you can choose how many armies there will be on each country afterwards.

### Outcome of the fight

For each army in the fight there is a corresponding die cast. The player who rolls a higher number on the dice, whether being from the attacker or defender, wins and the one to roll a smaller number on the dice loses armies according to the number of dice thrown.

If the number of armies in the defender country reaches 0, the ownership of this country changes to the attacker: his flag is set up and one of his attacking armies is installed in his new country. The "Move armies" slider is displayed as for the moves of the end of the turn.

### End of the turn

To finish your current turn, if you don't want to move armies, you can hit the Next Player button in the toolbar.

When everybody has played, the turn is finished. Some armies are distributed to the players, in function of the countries they own: 1 for each group of three countries, with a minimum of 3. There is also a bonus for players that own a complete continent, different for each one. The values of the bonuses for the default skin are:

Table 2.1. Bonus due to the continents

Continent | Bonus
--- | ---
North America | 5
South America | 2
Europe | 5
Africa | 3
Asia | 7
Pacific Area | 2

When a player has finished distributing his armies, he clicks the Valid button to allow the next player to distribute his bonus armies. As for the initial distribution, when all player have placed their armies, they can start a new redistribution cycle or start a new turn…

Chapter 3. Command Reference
Command Reference

# Chapter 3. Command Reference

## The main KsirK window

### The buttons

Quit

  Causes the program to quit.

New Game

  Starts a new game. It will cause the displaying of a dialog asking the number of players. After that, each player will be asked its name with another dialog.

Chapter 4. Developer's Guide to KsirK
Developer's Guide to KsirK

# Chapter 4. Developer's Guide to KsirK

Please refer to https://api.kde.org/ for the documentation of the API. It was quite complete but is currently a little bit outdated. There are no comments in the `.cpp` implementation files.

Note that I originally developed this game under Windows® with Borland C++ and WinG. I ported it to Java™ before converting back to C++ and KDE. At the beginning I used French or a mix of French and English to name the identifiers (classnames, methods, members, etc.). I also used French for the comments. When I decided to distribute this game, I decided to convert all to english... but I am clearly not a native English speaker: please suggest or make and submit corrections, to the code comments or to this documentation.

Chapter 5. Creating new skins
Creating new skins

# Chapter 5. Creating new skins

KsirK comes with a skin editor, named ksirkskineditor, that allows to edit all skin data, as soon as graphics (map, sprites, etc.) are available in a SVG file. Please see the KsirK Skin Editor manual for further details.

Chapter 6. Questions and Answers
Questions and Answers

# Chapter 6. Questions and Answers

This document may have been updated since your installation. You can find the latest version at https://docs.kde.org/.

Chapter 7. Credits and License
Credits and License

# Chapter 7. Credits and License

KsirK

Program copyright 2002-2012 Gaël de Chalendar `(kleag AT free.fr)`

Program copyright 2013 Nemanja Hirsl `(nemhirsl AT gmail.com)`

Contributors: Robin Doer, Albert Astals, Michal Golunski (Polish translation).

Documentation copyright 2002-2008 Gaël de Chalendar `(kleag AT free.fr)`

This documentation is licensed under the terms of the GNU Free Documentation License.

This program is licensed under the terms of the GNU General Public License.

Appendix A. Installation
Installation

# Appendix A. Installation

## Configuration

The Settings → Configure KsirK… menu item opens a dialog that allows you to:

- enable or disable the sounds ;

- set the speed of the sprites (from slow to immediate) ;

- enable or disable the contextual helps displayed in popups ;

- show or hide the number of armies on each country. The following snapshot shows the map when the number of armies are displayed.