pioneerspacesim/pioneer — pull request #1505 by fluffyfreak (2012-09-12 08:36:57+00:00)
Title: Factions

This is the result of work I originally discussed in issue #1266.

This is a preliminary pull request to get feedback and ideas from fellow developers about the things they love, like, dislike and loathe about the implementation so far... also there is the outside hope that it's already good enough ;)

# Data
It's reached the stage where factions can be defined in Lua files that are currently located in the "data/factions" folder and I have supplied 4 so far:
00_default.lua
01_federation.lua
02_CIS.lua
03_red.lua

The StarSystems' use a very simple distance test to determine which Faction they belong to and which is only limited in scope by a radius defined using the date they were founded and a rate of expansion.

Outside of any of the factions defined within the Lua files the game will still create random systems based on the older Polit code although it has been modified slightly.

# Known issues
1. The year used to calculate the radius of a factions volume is hard coded to the year 3200.
* the reason for this is that on loading a saved game the game object is not yet accessible when the star systems are recreated.
2. Goods prices are not uniquely priced across different factions.
* I imagine in future a system could work like the legal/illegal goods system where a base price is overloaded on a per item basis.
3. Independent systems (light pink) have no illegal goods - an unlikely situation.
4. There is no translation route for a factions descriptions or names (police, military, etc).

There are a number of parameters stored on a Faction that are not in use at the moment such as the police and military names, also the descriptions for a faction are not shown anywhere.
It might be wise to have the ships log that records crimes to also show more information about each faction that you can have a crime against display information about that faction. Suggestions are welcome!