Aurora is on version 2.5.0 C#, available at the Aurora Forums.

Contact Erik on the forum for a wiki account.

C-Civilian Economy

From AuroraWiki
Jump to navigation Jump to search

Trade Goods

Trade Good Modifiers

In VB6 Aurora, civilian production of trade goods is affected by the population size, the race wealth creation rate, the production rate of each specific trade good, the political status of the colony and the wealth modifier of the planetary and sector governors.

In C# Aurora, it will also be affected by radiation and unrest. [Date 16.07.2016]

Low Gravity Infrastructure

Civilian infrastructure production on a low gravity world will be LG Infrastructure, produced at one third of the normal rate (same overall cost). Trade in infrastructure will be low gravity to low gravity or acceptable gravity to acceptable gravity . [Date 06.12.2018]


Shipping and Taxes

Shipping Line Construction

A Shipping Line will start building freighters and colony ships when the parent race has two colonies (including the capital) with populations greater than zero.

A Shipping Line will start building passengers liners when the parent race has two colonies (including the capital) with populations greater than zero in two different systems.

A Shipping Line will start building harvesters when the parent race has two colonies with populations greater than zero and there is Sorium present at any gas giant or superjovian in a system with a parent race population of at least ten million (including the capital).

The number of civilian freighters and colony ships will be kept relatively even.

Date 21.02.2018

Shipping Line Earnings and Tax

For C# Aurora, the distance a civilian ship has travelled (in terms of systems) will affect how much the shipping line receives in payment and how much tax is generated.

All VB6 payment rates will be halved as a baseline but multiplied by the number of systems travelled. So a civilian ship travelling to a destination two transits away will receive the same payment as in VB6 Aurora. A ship travelling to a destination five transits away will receive 250% of the current payment. This applies to trading and to player contracts.

A civilian ship travelling within the same system will be paid half of the one-system rate (which is half what is currently paid in VB6).

This should reduce some of the early game bloating of civilian traffic but make it workable for the later game with longer distances (especially with the new jump point generation in v7.1 of VB6 Aurora). Date 02.10.2016


Transportation

Civilian Trade

For C# Aurora, I've updated civilian trade to use a better algorithm.

In VB6, civilian freighters without orders will move to a 'Trade Location', which is defined as a population with a balance in one or more trade goods that is greater than the capacity of the freighter. On arrival, the freighter will check the trade balances and try to find a suitable destination for one of them. If a destination is found, the move will be plotted. If not, the freighter will search for a new trade location. It could be more intelligent but not without a larger performance overhead.

In C# Aurora, a freighter without orders, regardless of current location, will search known space for the closest population that has export trade goods, taking into account any other freighters already en route to collect that trade good (and any path finding restrictions such as danger). If a suitable trade good is located, the freighter will look for the population closest to the pick up point which has an import requirement for that trade good (again taking into account any freighter already en route to drop off the same good at that destination). If no destination is found, the freighter checks the pick up point for any other trade good options with suitable destinations. If that doesn't work, the freighter checks the next population based on distance, etc., until it has checked every possible combination of populations and trade good routes in known space. If a valid route is found, all the orders are plotted including any Lagrange short-cuts. Then the next freighter repeats the process, etc..

Infrastructure is checked first at each population before any other trade good. Freighters understand the difference between low gravity infrastructure and normal infrastructure and will move the correct type of infrastructure to appropriate destinations.

Given that every civilian freighter without orders is checking every system, population and trade good in known space to find a suitable trade route, there might be a concern regarding performance. My current campaign is an ideal test bed, as I have removed every order from every fleet due to the incompatibility of the VB6 and C# database structures. Which means in the first trade phase after program start, the code is checking all 364 civilian freighters in a universe with 495 star systems, 1343 jump points, 380 Lagrange points, 345 populations and 23 different races. That first trade phase, including identifying routes for all freighters and creating 1896 individual movement orders (including load/unload, transits and LG points) required 1.01 seconds.

Date 01.03.2018

Unload Colonists

I've completely rewritten the standing order (VB6 default order) for unloading colonists (used by shipping lines, NPRs and your own ships if desired). The process is as follows:

  • 1) Colony fleet looks for a suitable population with less than 25m pop and no other colony fleets inbound, checking its current system first and then using the path finding algorithm to search everywhere else in the empire.
  • 2) Same as 1) but without the check for inbound colony ships.
  • 3) Searches for any suitable population with a status of Colonist Destination (which you can set for any pop of at least 25m).

When determining if a population is a suitable destination, the fleet checks the following:

  • 1) How many colonists it is carrying.
  • 2) If the species is the same as the colonists.
  • 3) The available capacity of the system body on which the population is situated, taking into account other populations.
  • 4) The available capacity of the infrastructure (normal or LG depending on the gravity), taking into account the current population size.
  • 5) The lesser of 2) and 3) is used as the base capacity of the population to accept new colonists.
  • 6) Any available space in orbital habitats is added to that capacity.
  • 7) The total number of colonists on ships already inbound to the colony is deducted from that capacity.
  • 8) if the capacity exceeds the number of colonists in the checking fleet and the species match, the colony is suitable.

This should prevent the current problem of many colony ships delivering to a colony without the capacity to support them all. As soon as a fleet determines a colony is suitable, the orders are issued, which means other fleets checking in the same increment will be aware of the extra inbound colonists.

Because of these changes, Passenger Liners will no longer search their current system for a potential destination (otherwise they could load and unload at the same population).

Date 24.02.2018

Appendix: NPR

Quote from: MarcAFK on Today at 06:36:14

Bankrupting the civilians is a good solution to endgame lag, but what about the NPRs? They still build hundreds of hsits. I don't know if they use similar mechanics in regards to hipping lines, do they even have 'civilians"?

For freighters and colony ships, they only have civilians. There didn't seem to be any point in having two types of AI for NPR colony ships and civilians, so they are all created in shipping lines. This is true for C# too. 10.01.2019

Doesn't that mean NPRs can't carry minerals from a system to another, or is that abstracted for them?

Mineral movement is automatic, although it does mean they won't create colonies or move automated mines. Date 10.12.2019