Project Economic in Orbiter

Shakal

Member
Joined
Apr 28, 2010
Messages
42
Reaction score
0
Points
6
I searched for some economics addons, Orbitrader does not work with the 2010th Orbiter and Orbinomics is impossible to find. So I decided to make my own economic addon.

Configuration files for bases are located in the "Trader" folder and can be used as a model for the creation of new trading bases.

In order to trade you must land on the landing pad, turn off the Orbiter, launch an application "Trader" and select the "(Current state).scn" save.

In the future, I going to add ability to trade with the space station, maybe some missions and blackjack

This thing was done in spare time, as part of my learning of VB2010, so I would appreciate bug reports and suggestions for improvement.


Updated 03.01.2014 12:25

Changelog:
v.0.9.5
+Now you can buy/sell stations.
+When you are docked to your own station, refueling is free and you can use the station as a warehouse.
+Your stations will try to "sell" fuel and goods to other merchants. Every day they will transfer random
amount of money to your account.
+Purchased stations will appear using your ship as homing beacon, so make sure that you are on the desired orbit.
+Config file for purchasable stations - "Shipyard.cfg"
+Fixed wrong target of test mission.
V.0.0.7.1
+Fixed bulletin board.
V.0.0.7
+Fixed bug with shipyard.
V.0.0.6
+added missions system.
V.0.0.4.2:
+fixed bugs.
+added ability to trade with space stations.
V.0.0.4.0:
+fixed bugs.
+Dynamic stock and prices, stock updates every 30 days, prices depends on amount of wares: supply goes down, the price goes up, and vice versa.
+Now row "price" in configuration file of base means maximum price.
V.0.0.3.0:
+fixed bugs.
V.0.0.2.0:
+fixed bug.
added "Shipyard" menu. All purchased ships will appear at Brighton Beach, added config file for purchasable ships - "Shipyard.cfg".
V.0.0.1.0:
+Initial release.
 

Attachments

Last edited:
I searched for some economics addons, Orbitrader does not work with the 2010th Orbiter and Orbinomics is impossible to find. So I decided to make my own economic addon.

This is the first version, you can only trade with the planetary bases, for example: Cape Canaveral, Brighton Beach and Olympus. Configuration files for bases are located in the "Trader" folder and can be used as a model for the creation of new trading bases.

In order to trade you must land on the landing pad, turn off the Orbiter, launch an application "Trader" and select the "(Current state).scn" save.

In the future, I going to add ability to trade with the space station, shipyard, where you can buy or sell ships, maybe some missions and blackjack

This thing was done in spare time, as part of my learning of VB2010, so I would appreciate bug reports and suggestions for improvement.

The program requires .Net Framework 3.5

That sounds really cool, Im going to try this first chance I get.
 
Cool. Does it support bases that are not stock, such as Niven Base, Wideawake International, etc?
 
Cool. Does it support bases that are not stock, such as Niven Base, Wideawake International, etc?

This is the first version, you can only trade with the planetary bases, for example: Cape Canaveral, Brighton Beach and Olympus. Configuration files for bases are located in the "Trader" folder and can be used as a model for the creation of new trading bases.

:cheers:
 
Cool. Does it support bases that are not stock, such as Niven Base, Wideawake International, etc?

Yes, you can make a new bases using templates from "Trader" folder. New files names must match the names of bases.

I think, when I finish this, I'll try to learn C++ to make internal application with the same functionality.
 
Last edited:
Cool. I see another usage for this:

- add a kind of pilot's log to it, so that you can someday derive statistics (spacecraft used, bases visited, etc, etc)
- add the ability to upload those log files into a server
- make the product prices change by supply x demand, depending on the actual transported cargo done over time, using the uploaded logs
- add some random factors or "news" that will spike demand on certain bases

I see no problem with having access to data outside Orbiter. I'd personally like to be able to see what's the demand for X for what base during my daily commute :thumbup:
 
Sweet! What kinds of items can be traded? And can I add new items?

Only if you add same items in the "Ship.csv" file and in every base.

- add a kind of pilot's log to it, so that you can someday derive statistics (spacecraft used, bases visited, etc, etc)
- add the ability to upload those log files into a server
- make the product prices change by supply x demand, depending on the actual transported cargo done over time, using the uploaded logs
- add some random factors or "news" that will spike demand on certain bases

My programming skills is very low, actually I'm learning VB during the work on this project.

Tested on XP and find a bug.

It seems that if you using WinXP, "Trader" folder must be in the Scenarios folder, and if Win7 it must be in Orbiter directory.
 
Last edited:
OK, that's why I started to set up a "Master Reference" file to track this. So, I can create anything I want, like "Vacuum Grease" or "Software"?

No issues. It's in the Orbiter root folder and I'm on Win7.

---------- Post added at 09:33 ---------- Previous post was at 09:30 ----------

Also, I'm curious as to what the numbers mean. For example, from the Brighton Beach file,
Code:
Food;300;1750
Power Tools;1000;4375
O2;5000;350
Medical Suplies;821;7000
RTG;20;350000
Life Support;531;52500
Exploration SAT;20;175000
Electronics;5000;300
I'm assuming that the first value is the amount in stock, and the second value is going price?
 
Yes, the first value is the amount and the second is the price.

I'll fix the folder issue on Monday.
 
Last edited:
Cool. I'm already throwing together a .csv for Wideawake International. I'll test it out, then I'll put it out here for everyone who wants it.
:cheers:
 
If you add new items to the market, you must add same items in the "Ship.csv", or it wouldn't work.

Also I made file "Ships.cfg", it contains information about cargo space and fuel tanks of the ships. You can add new types of ships.
 
Last edited:
It's part of Windows API and my program contains some parts from it. I tested it on PC without Framework and it don't work. But if you have at least Framework 2.0 it would work. Maybe.

Anyway, I can't fix it until Monday. My home PC doesn't have Visual Studio, it's on my work PC.
 
Last edited:
It's ok, it works here.
I'm trying to add the new UCGO Arrow Freighter to the list of "approved" ships, with a HUGE freight capacity. However, it seems to be limited to 4 when I input 400. Is there a limiting factor, like 256, 128, 64, etc?
 
It's ok, it works here.
I'm trying to add the new UCGO Arrow Freighter to the list of "approved" ships, with a HUGE freight capacity. However, it seems to be limited to 4 when I input 400. Is there a limiting factor, like 256, 128, 64, etc?

No, there is no limits, but type of ship is taken from line in main menu and it is something like "UCGO\Vessels\UCGOArrowFreighter", so in Ships.cfg it must be like :

Code:
UCGO\Vessels\UCGOArrowFreighter
Cargo:999
Fuel:800000
#

And make sure that line:
Code:
BEGIN_PRESET
    Cockpit:[FONT="Arial Black"]Arrow[/FONT]:50.00
  END_PRESET

from current save doesn't contains name of your freighter.
 
Last edited:
As I said my programming skills are very low, so when program parses save for the name of your ship it takes the name from
Code:
BEGIN_FOCUS
  Ship AR01
END_FOCUS

then adds a ":", searches for name+: and first what it finds is

Code:
BEGIN_CAMERA
  TARGET Ar01
  MODE Cockpit
  FOV 49.51
  BEGIN_PRESET
    Cockpit:[FONT="Arial Black"]AR01:[/FONT]50.00
  END_PRESET
END_CAMERA

and it types "50.00" in the "ship type" field. For some reason only Arrow Freighter causes this bug.

P.S.

I just found how to fix it. Program will be updated on Monday evening.
 
Last edited:
Back
Top