Discussion [Project] Trading/Shipyard Addon

reoze

New member
Joined
Sep 10, 2012
Messages
5
Reaction score
0
Points
0
Hey guys, as you can probably tell by my post count this is my first addon. I come from a long history of C/C++, Objective C, Java, and pretty much every other high level language in existence. The orbiter SDK is probably one of the easiest SDK's I've picked up and started using. Within a day I have a fairly functional trading mod. I've seen a similar mod on orbithangar, but unfortunately it relies on reading save state configs and is a bit dodgy in that respect as the game needs to be closed down.

I understand this goes against much of the core of orbiter, but I got bored with simply launching my ships into orbit and choosing a planet at random, at least this gives the game a bit of direction if nothing else.

Here were my ideas for the final product.
  • Trade with any spaceport, cargo, prisoners (passengers), and even ships.
  • Accept cargo, delivery, orbital, and rescue missions.
  • Use space stations as factories to build new ships
  • Dockable space station modules that will modify build times/resource costs
  • Ship upgrades: Add extra main, hover, retro engines, omnidirectional thruster packs, and larger fuel tanks
  • Sync your economy with a master server

Will depend on :
SSBB 4.1B
IMU 2.3


I would be interested in hearing from other people as to whether or not the upgrades portion of the addon is feasable? I couldn't imagine why it would not be possible to change the ISP on the main engine of a ship that I don't necessarily "own". But have yet to see it done before. Just completed the POC of this, Adding engines to existing group works fine, no reason it wouldn't work for any other thruster groups

I'm sure plenty of people have seen one posters come on here with pipe dream addons that never see the light of day, but I have already made some good progress and fortunately have the development experience far already under my belt.

Unfortunately where I am falling short is how to create a playable economy. Right now each station and base sells various goods. Each "good" has a fixed price, a "demand" floating point value, and a storage amount. Specifically what I am having issues with is formulating the "demand" value. Has anyone seen any "known" algorithms that could accomplish what I am trying to do fully procedurally?

The only thing I can think of personally is to create a map with each base/station weighted by distance from each other. Then set certain planets as "producers" of certain resources. All while having a simulated "distribution" by building a table of very approximate trip times and shuffling around resources with invisible "space truckers". Though this easily throws a lot more work than I was anticipating into the entire project.

I would love to hear anyone's thoughts. The ship construction and trading are already complete.
 
Last edited:

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,885
Reaction score
2,139
Points
203
Location
between the planets
Somewhat of the nth try at an add-on like this, but if you can deliver, by all means, bring it on!

You might want to take a look at IMS to see what is possible with the orbiter API. And maybe you can even put it to good use in your mod...
 

reoze

New member
Joined
Sep 10, 2012
Messages
5
Reaction score
0
Points
0
I've kind of gotten that impression, not that I demand any respect over anyone else but I have been a professional developer for almost ten years. With over 20 releases under my belt. The actual process of writing the code is a non-issue for me, and I have yet to see any limitations in the SDK that would prevent such a mod from being created.

The trick is honestly, to not put that much work into it. I've maybe sunk a total of 8-12 hours worth of code into the entire project. The current competitors release on orbithangar that I have seen easily must have been more work to parse through the scenario files versus doing it internally with the SDK. Which is why creating a giant simulated distribution system is kind of off the table. The idea was to make this a simple addon (simple being a very loosely defined term). But moving into the realm of a simulated space trucking company, I may as well build an entire trucking company simulation.

Out of the features I listed, these, fully work:

  • Station Trading
  • Ship purchase/construction
  • Main Engine Upgrades


The only things left before releasing a fully functional release with these features is cleaning up the GUI on the MFD. I could release this with a non-functional "economy" and still allow trading and it would work 100%.

Which is why I actually created this topic as a discussion rather than a "[Project]", because the only brick wall I actually face is the economy creation. Though at the same time I would love to hear other people's ideas as the core functionality is very close to 100% and would love to expand on the idea.

I should have a release ready to go by the end of the week (if my boss asked me), if not the end of the day (if my wife asked me). I'm sure that would convince a few people that this could go much farther than previous ideas.

Edit:Just to clarify a few things after talking with jedidia, This mod is intended to be as generic as possible with the hopes of working with as many mods as possible, with next to zero "configuration", this limits the feature set, but also increases the likelihood it will be released. It is intended for personal satisfaction and if I had to do extra work every time I downloaded a module for my own game I wouldn't be very satisfied. I will fix edge cases as they arise with other addons. I also fully intend to integrate IMS into the system, as it is a perfect module that would require little to no effort to integrate, as well as providing for what I think will be a personally satisfying experience.
 
Last edited:

Hielor

Defender of Truth
Donator
Beta Tester
Joined
May 30, 2008
Messages
5,580
Reaction score
2
Points
0
I would be interested in hearing from other people as to whether or not the upgrades portion of the addon is feasable? I couldn't imagine why it would not be possible to change the ISP on the main engine of a ship that I don't necessarily "own". But have yet to see it done before. Just completed the POC of this, Adding engines to existing group works fine, no reason it wouldn't work for any other thruster groups.
This depends entirely on how the ship is coded. Config file vessels can easily be changed at runtime without problems, assuming your addon is the only non-vessel addon changing things. SC3 vessels are probably safe, too.

The problem comes with dll-powered vessels. Since they have the full access to the Orbiter API, they could be doing all kinds of weird tricks behind the scenes, and if you naively try to change the ISP of a thruster or add more engines you could cause any of a number of problems, both technical (vessel goes and changes its own ISP at some point after your addon did) and conceptual (vessel has two main fuel tanks, one in each wing, used for a realistic simulation of weight & balance. Which fuel tank do you wire up your new engines to?).

I suspect that any generic solution will only work with a subset of vessels available for Orbiter, and it will be frustrating to the user when they find vessels that don't work.

Ideally, any addon that includes things like ship upgrades/ship purchasing would actually provide its own set of ships that are guaranteed to work within the system, and "fit together" well in terms of design and capability.
 

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,923
Reaction score
230
Points
138
Location
Cape
Will there be pirates and SS police?
 

reoze

New member
Joined
Sep 10, 2012
Messages
5
Reaction score
0
Points
0
Donamy said:
Will there be pirates and SS police?
Scarier.

Packers Fans, in a sealed tin can, with enough cabbage and beer driving a space tanker filled with video games to pluto.

In reality I when I said a simulated "trucking" company, I meant all of this on the back end, no visual, or even simulated representation of them would exist. It would mearly be a means to time when to shuffle resources back and forth.

Heilor said:
Ideally, any addon that includes things like ship upgrades/ship purchasing would actually provide its own set of ships that are guaranteed to work within the system, and "fit together" well in terms of design and capability.

What I could do is disable that functionality for non compliant ships, if I were to make an online stats server as I intended this config could be downloaded automatically. I have a feeling most addons most likely do not (take that with a grain of salt). Procedurally add/remove engines. I could see a major problem with unaligned engines, though I am averaging the positions and thrust directions of all "main", so theoretically, if their thrust balances, the new engine should be abeam to the ship.

I do see your point though, I would just like to work around it as much as possible.
 

PhantomCruiser

Wanderer
Moderator
Tutorial Publisher
Joined
Jan 23, 2009
Messages
5,603
Reaction score
168
Points
153
Location
Cleveland
This reminds me quite a bit of the portion of Freelancer and (old school) Privateer, it took the player many missions that were not part of the storyline to "build" a vehicle that could survive long enough to perform storyline missions. Then still the player would need to pull missions to get from point A to point B (just to make some extra cash in addition to moving locations).

I like the idea, and I hope you have success with it.
 

reoze

New member
Joined
Sep 10, 2012
Messages
5
Reaction score
0
Points
0
This is exactly, 100% nail on the head where I have MOST of my inspiration from. I wish I could say I could pull it off as good as them, but it's just not possible. I loved that game, apparently a lot of people still play online.
 

Hielor

Defender of Truth
Donator
Beta Tester
Joined
May 30, 2008
Messages
5,580
Reaction score
2
Points
0
Freelancer is still the yardstick by which I measure any other similar game, and nothing I've tried has measured up yet.

One of the downsides of projecting something like that onto Orbiter would be the scale of things--the longest trade run in the stock Freelancer universe takes like ~15-20 minutes max, whereas in Orbiter the realistic scale means you won't have gotten much at all done in 20 minutes. This could severely constrict the "fun-ness" of the simulation.
 

Eccentrus

Geekernaut
Joined
Jun 26, 2009
Messages
859
Reaction score
27
Points
28
Location
Jakarta or Bandung
well somebody have fun by doing all the routines and such, it's not everybody's piece of the cake, but still.
 

PhantomCruiser

Wanderer
Moderator
Tutorial Publisher
Joined
Jan 23, 2009
Messages
5,603
Reaction score
168
Points
153
Location
Cleveland
There was a set of scenarios [ame="http://www.orbithangar.com/searchid.php?ID=3997"]Jupiter 2061: ShuttleA Scenarios[/ame] that was released that I used when I was learning IMFD. Granted, such a mission set wouldn't exactly allow for pizza delivery, but perhaps (much like Privateer and Freelancer) medical supplies, raw materials, booze, and other things would be OK after a LEO -> LLO transfer, or Phobos to Deimos to Olympus supply run.

How valuable would sugar and flour be on a base located on Callisto? (I would have mentioned the booze, but they'd probably have figured out how to make their own already)
 

reoze

New member
Joined
Sep 10, 2012
Messages
5
Reaction score
0
Points
0
Freelancer is still the yardstick by which I measure any other similar game, and nothing I've tried has measured up yet.

One of the downsides of projecting something like that onto Orbiter would be the scale of things--the longest trade run in the stock Freelancer universe takes like ~15-20 minutes max, whereas in Orbiter the realistic scale means you won't have gotten much at all done in 20 minutes. This could severely constrict the "fun-ness" of the simulation.

This is where it becomes less of trying to turn orbiter into a game, and more of trying to give the undirected player some purpose of randomly scouring the solar system.

I have no intention whatsoever of trying to turn orbiter into freelancer, as much as I wish I could, nobody can, and it's not the goal of the project. There's no point in "trading" without rewards, which is where the ship construction/upgrades comes in. I know as well as anyone else that they could pop open the scn editor and "cheat" any type of game that was put in place.

If anything, placing factories up in space and facilitating the trade of goods between planets would be the next logical step to colonizing space, so I don't see this as so much as a "gameification" as other people would. Futuristic, definitely...Sci-Fi..not quite, but close. I'll let you guys know when the 'fricken' laser beams and warp drives get added and then we can officially call it science fiction.
 
Last edited:
Top