• Welcome to the new COTI server. We've moved the Citizens to a new server. Please let us know in the COTI Website issue forum if you find any problems.
  • We, the systems administration staff, apologize for this unexpected outage of the boards. We have resolved the root cause of the problem and there should be no further disruptions.

Dumb Question regarding speculative cargo

Hal

SOC-14 1K
Hello Folks,
I know this is a dumb question, yet, when it comes to programming, it isn't quite as dumb as it might sound ;)

If you look at the specualtive cargo rules given in book 2 Starships, you will see a disclaimer to the effect that quantity of items not vehicles are in dtons, while quantity for vehicles is PER VEHICLE. I stress that per vehicle part because it would appear that when someone rolls this result for their "find", that if they roll a 3, they found 3 vehicles for sale, and that the size of the vehicle itself times 3 determines how much cargo space is taken up in the ship's hold. Thus, an air/raft at 4 dtons, would take up anywhere from 4 to 24 dtons of cargo space depending on whether the die roll was a 1 on up through 6.

If I were writing a program (which I am) to automate the cargo generation rolls, which makes more sense?

Using the largest size possible for the vehicle type involved, or to use the average size per type involved, or use a sub-vehicle table to roll randomly what the size is. For example, a trader/merchant could discover that there are 3 helicopters for sale as speculative cargo. Each helicopter takes up 1 dton of cargo space per (Per book 3: Worlds and Adventures). Winged planes however take 10, and primative bi-planes take only 1. So do I roll randomly for type of craft and use the randomly generated results to specify if cargo tonnage per "unit" is 1 dton for biplanes, or 10 dtons for fixed wings, or even speeder/g-carriers?
 
Or just get heritical on it and go with Xdtons of ref's choice of vehicle type :)

So 24dtons of grav vehicle could be six Air/Rafts, or four Speeders, or three G-Carriers. Or ninety-six G-Bikes :D

But yeah, you probably want to make it canon, so I'd say use a subtable for type.
 
Or just get heritical on it and go with Xdtons of ref's choice of vehicle type :)

So 24dtons of grav vehicle could be six Air/Rafts, or four Speeders, or three G-Carriers. Or ninety-six G-Bikes :D

But yeah, you probably want to make it canon, so I'd say use a subtable for type.


What I could do? Is go the route of both - let a GM enter in what He'd like to, or let it be done automatically. All I'd have to do is code it such that an "options" page allows the user to decide which they'd prefer.

Right now I'm revisiting Visual Basic 6 and trying to teach myself how to use it effectively enough. I've gotten past the struggle of determining distance from a given hex to another hex. I've set it up such that I have a working "Current location" hex and Jump Drive number will list all available planets in the spinward marches within Jn of the current location. For now, I figure on making it so that the program keeps track of what ship the character is in command of, how many dtons of cargo space it has, how many staterooms it has, and how much in the way of required crew the ship has. I'll probably fill in a ship's roster "form" where the captain clicks on various buttons to list his current crew roster etc.

Once I get the CT book 2 version of trade working, then I want to see if I can make a version based on Merchant Prince.

This is as much a learning experience as it is trying to create something I can use for "solitaire" Traveller. If I work HARD on the vector math project, I can even probably put in a section regarding vector movement and ship combat - as in CT, max sensor distance is limited to what, a 1/2 light second or 1 full light second until a lock is secured, and from there, 3 light seconds? First, I needs must learn to wave my arms and gurgle a bit. Someday I'll learn to crawl, and finally, to walk (programming in Visual Basic 6 that is).

If I ever get the stuff done with vector movement and recording ship locations, planet locations, etc - THEN I'll even start working full bore on my pet project. Who knows, I might finish it before I die ;)
 
Subtable.

Airrafts at 4, speeders at 6, grav bikes at 1, 1.5, or 2...

Heavy airrafts at 6...
 
Subtable.

Airrafts at 4, speeders at 6, grav bikes at 1, 1.5, or 2...

Heavy airrafts at 6...

Part of the problem lies with the fact that in the example they give of a dton of rifles (I think it was rifles?) the cost factor of the speculative cargo was divided by the cost per unit and they arrived at 200 units per dton, on the presumption that the rest of the volume was packing material. When you roll for speculative cargo at its normal value - it remains a stable X Credits regardless of whether the unit uses 6 dtons or 4 dtons. This would imply then, that there should be only one "product" that fits the bill for the cost value. Am I making sense here?
 
If you are looking for a generic solution that can be later expanded try something like this.

For each possible item in the list, create a data record that lists the individual size (in displacement tons) and the expected unit of measurement (count or displacement tons). Once that is done you can put all these in a data file (XML, database, text file, whatever) and simply change the list to change the possible cargo.

Lets consider a simple example with 4 and 6-ton air rafts, rifles, and some trade good. For simplicity lets assume that the rifles fit 100 per displacement ton and the trade goods are one displacement ton per unit.

So the data records will be:

Description: "4 ton air/raft"
Size: 4.0
Units: Count

Description: "6 ton air/raft"
Size: 6.0
Units: Count

Description: "Rifles"
Size: 0.01
Units: Displacement tons

Description: "Trade Good"
Size: 1.0
Units: Displacement tons

So, you can simply use the unit of measurement to determine what to roll; number of size. Note that in this example rifles are treated like trade goods; they are really individual items and if you want to treat them as such you can always determine how many will fit into the space that was generated.

Does that help?
 
<snipped stuff>

So, you can simply use the unit of measurement to determine what to roll; number of size. Note that in this example rifles are treated like trade goods; they are really individual items and if you want to treat them as such you can always determine how many will fit into the space that was generated.

Does that help?

That helps to a degree. It won't be Strict "classic" rules per se, but close enough to the spirit and intent that I won't complain much ;) If I'm going to go with database set ups, probably the best way to handle it would be:

Item ID (integer)
Description (as string)
Usual Quantity (as string)
Multiples (as integer)
Cost per displacement ton (double)
Volume (integer)
Buy Modifiers (as string)
Sell Modifiers (as string)

Then use the random generator and rules as presented, such that it points to the Item Id number. The "cost generator" will then generate how many units are required per the Usual quantity multiplied by its cost per displacement ton, and append the buy modifiers and sell modifiers string info to the data itself (cargo manifest probably).

Then, if the buyer buys it, he has to buy it in usual quantity values in multiple values (if present).

Example: Air Raft: 4 dton multiples, with a per unit cost of 6 MCR/4 (the multiple value) or 1.5 dtons. If for example, a player generated an air raft result on the speculative cargo, it would look like this:

Air Raft(4): 24 dtons In-3,Ri-2:Ni+2,Po+1 Purchase Price: 70% Unit Price: 1.5 MCr.

When asked how much the speculative trader wants to purchase, the trader enters in say, 15. As it is not a multiple of 4, the program comes back saying "you must buy in units of 4 - please re-enter how many you desire". If the trader then enters in 12, it will multply .70 x 1,500,000 x 12 x 1.01 (for breaking up the lot) and get a final result of 12,726,000 credits.

I probably should include some prospect for including as an "optional rule" the use of currency exchange rates for the program as well.

The thing is, it permits me to use a function to calculate all speculative cargo costs instead of having to have one function for one type, and another function for another type.


When asked how much of that lot the buyer wants to purchase it for.
 
Well I have found that implementing the rules "as is" is frequently rather difficult. The business process derived from the rules is (as you mentioned) much closer to the spirit rather than the literal.

If you are a developer, get to one of the Microsoft 2008 launches. They are giving away some great software (including VS 2008). I think they give this away so you can study for the certification exams. I find Traveller to be great study material (even the simple tasks are rather complex logically), and it is certainly more interesting than taking work problems home!
 
Well I have found that implementing the rules "as is" is frequently rather difficult. The business process derived from the rules is (as you mentioned) much closer to the spirit rather than the literal.

If you are a developer, get to one of the Microsoft 2008 launches. They are giving away some great software (including VS 2008). I think they give this away so you can study for the certification exams. I find Traveller to be great study material (even the simple tasks are rather complex logically), and it is certainly more interesting than taking work problems home!

As it turns out, I'm just working with Visual Basic 6 that I purchased years ago on a Not for Resale program (since discontinued alas). I figure this will help me keep my sanity or help me to lose it entirely, as I teach myself how to make it do what I want it to do. If I get to where I can consistently get it to do what I'd like, the next project will be to try and create a self-consistent vector addition program where the computer does all the hard work instead of my having to do it by hand. I'm not technically a "Developer" so much as a hobbyist. Who knows, maybe the hobby may develop into something better. Time will tell.
 
Visual Basic 6 was published in 1998. It was very popular, and the market has resisted Microsoft terminating support (there is a lot of VB 6 code out there).

If memory serves, VB 6 is supported until 2012. You should still get some use out of it.
 
Back
Top