How to install a ruleset on a local computer for local games

Advice, tricks, strategies and best practices about how to build a great empire.
Post Reply
wieder
Member
Posts: 1781
Joined: Thu Jan 01, 1970 12:00 am

How to install a ruleset on a local computer for local games

Post by wieder »

First you need to have a 2.6.x client. Longturn is currently using 2.6 client because of integration issues with the more recent clients. After installing it you can proceed to downloading and adding the ruleset files. The ruleset files define all the game specific actions and rules. The rules are usually changed between the games and you can see the changes listed on git.

You can find the 2.6 client from this link:

https://freeciv.fandom.com/

Get the ruleset from git. The rulesets can be found from here:

https://github.com/longturn/games/

The main branch we use is the LTT ruleset (Longturn Tranditional) and it can be found from here:

https://github.com/longturn/games/tree/master/LTT


From that address download the .serv file for the game you want to play. For example for LTT it's LTT.serv

You can also download all the game rulesets at once from the main page. If you want to download specific files by hand for some specific game you can get them by browsing the game specific directories. The directories are named like LT55, LT56, LT57 etc. and each of them contain the rules for that particular game. LT is a short form of longturn. Games prior to LT53 were Freeciv 2.5 based so you will need Freeciv 2.5 for those.

Save the .serv file on your local computer to the Freeciv game directory. For example on a 64bit Windows 7 computer the .serv files are stored on a location like this:

C:\Program Files (x86)\Freeciv-2.6.3-gtk2\data\

At there you can also see the .serv files for other other rulesets. The .serv file defines how big the world is, the speed of science etc.

Create a directory with the same name the ruleset has. This directory needs to be created in the same place the .serv file was saved. For LT58 the name of this directory would be LT58 and for LTT it would be LTT.

Next copy the actual .ruleset files on that directory you just created.

There are probably at least the following .ruleset files you need to copy:

buildings.ruleset
cities.ruleset
effects.ruleset
game.ruleset
governments.ruleset
nations.ruleset
techs.ruleset
terrain.ruleset
units.ruleset

There is also scripts.lua file but the current LT games do not use it. However it doesn't hurt if you copy it.

After doing all this you are almost ready to go. You could actually start a game with the new ruleset but it would have just one player. To fix that you will need to open the .serv file you saved on the game directory and make a small edit to it. For example with adding LTT ruleset you would need to edit LTT.serv file. From there look for the following line:

set aifill=0

For actual games this value is 0 because there are no AI players. You however may want to have AI players. For that replace 0 with the number of players you want to have in the game. If you would replace 0 with 24 you would have a game with you and 23 AI players.

If you want to cheat in the local test game, you can add the following like to the .serv file but add it becore the line with start command:

set cmdlevel hack

This will allow you to turn the edit mode on and change the map, units and everything.

You probably also want the turns to take a bit less than 23h. For that make the following changes for the .serv file:

Find the lines defining timeout and unitwaittime:

set timeout=82800
set unitwaittime=36000

Change timeout to define how many seconds each turn will be. On the test games we have been using 120 or 180 seconds but uyou can make that whatever you like. Also change unitwaittime to 0. You don't need that for a single player game. Unitwaittime is a way to prevent people from "double turning" in multiplayer games. Meaning that without it the players would be able to attack your lands 10 seconds before the turn change and then attack again 10 seconds after the turn change, giving the defender little chance to react.

You can also change the timeout during the game by writing

/set timeout value

on the in-game chat. Replace value with the number of the seconds you want it to be.

Now you are ready to go. Launch Freeciv and select Start new game. From ruleset select the ruleset you added and that should be it.
Last edited by wieder on Tue Feb 16, 2021 5:42 pm, edited 1 time in total.
Post Reply