Tuesday, December 26, 2017

Tracker - buying and selling spec trade

Both the purchase and selling go through the same control now - the difference is which DMs are you using (purchase or resale) and whether you are adding it or removing it from your cargo.

Basic part is there (and spent way too much time rotating that text - as it is in a grid that caused the text to get truncated until I figured that out). You can add your DMs, click the roll, and it will calculate the price based on tonnage and the actual value table.

Now, I need to make it actually buy or sell when you click the button, but that part is already written. What I need to do is now abstract that out from the ship tracking view so that I can buy or sell cargo from a ship in other places.

It was interesting getting the actual value tables in place as well. They will default to 100% when loading the first time, but then you can set than as you wish.

Still need to let the user add new versions and a bunch of things like that. And I need to get the basic how to document done. But that will be mostly an iteration of:

  1. create a ship class. This is where the tonnage, jump, maneuver, power, cargo and passenger information is stored. If you want to modify a ship in terms of any of these things you will need to create a new ship class.
  2. create your ship: select the version, the milieu, the date, the ship class. Set your location and initialize ship funds
  3. create any cargo you want. currently I am sticking in the original d66 table from book 2 but it does not include the trade code DMs.  
  4. go to the ship tracking (ship list, then select track for the ship) where you can edit your ship logs, see what worlds are in jump range, load cargo and passengers, jump to any world within reach.
I've got a few things there I'm not actually using. I've set up the trade codes as a table you can edit so yo can set the trade codes based on the world stats, but at the moment I am using the remarks field from the TravellerMap API so I am not sure I'll keep that.  I've an options button that does nothing.


No comments: