• 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.

T20 Ship calculation program

veltyen

SOC-14 1K
Not quite sure if this should be here, but...

While practising some skills I rarely use in my job I built a program to calculate the basics of ship design.

Basically
Given tonnage, jump, Maneveur rating, armor, tech level, and agility what do the minimum components weigh (it only does tonnage, not cost). This was built as a tool to calculate what was possible, and as a quick generator for a "base" ship that can then be kitted out properly. I mainly use it for thought experiments at the moment.

Basic T20 construction only.

Due to the copyright restrictions due to the OGL and that particular chapter restrictions I cannot with good conscience give out the code generally. While the output is free to release, a lot of the copyrighted works details exist inside the code (which is a script and therefore mostly readable).

I have decided that I can live with a restricted release. ie. If you ask for it I will send you a copy, and you can only ask for it if you have a copy of the book. This puts the onus of copyright breach on the person asking for the code, not on me.

The code is Perl, and can be used from the command line, or inside a cgi (it is much easier in a CGI container). The interface is also a little klunky, I make no apologies for that.

So anyone want a copy?
 
Doh!

It would make much more sense to show the output of the program to illustrate exactly what it does

http://localhost/cgi-bin/t20/ship.PL?8000&0&6&14&14&6
(8000dTon, Jump 0, Maneveur 6, TL14, AR14, Ag 6)

Output:
</font><blockquote>code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">Ship building information

Component Mass
Hull 8000 tons +8000
--------------------------------------------------
Computer M/1 -1
J-Drive 0 -
-> J-fuel -
Gdrive 6 -1360
Powerplant 960 EPs -960
-> Fuel for 4 weeks -960
Armor 14 -1200
---------------------------------------------------
Crew 70
Crewquarters -144
Controls -160
---------------------------------------------------
Remaining 3215

Capital Crew would be 63
Command 12
Command crew 6
Engineers assistants 21
Service Crew 24</pre>[/QUOTE]Example 2

200 dTon Jump 1 Maneveur 1 TL12 AR 0 Ag 1

</font><blockquote>code:</font><hr /><pre style="font-size:x-small; font-family: monospace;"> Ship building information

Component Mass
Hull 200 tons +200
--------------------------------------------------
Computer M/1 -1
J-Drive 1 -4
-> J-fuel -20
Gdrive 1 -4
Powerplant 4 EPs -6
-> Fuel for 4 weeks -4
Armor 0 -0
---------------------------------------------------
Crew 2
Crewquarters -8
Controls -20
---------------------------------------------------
Remaining 133

Capital Crew would be 18.6
Command 12
Command crew 6
Engineers assistants 0
Service Crew </pre>[/QUOTE]
 
Sounds pretty handy, but...

As with most such work I wonder about the accuracy and possible hidden bias at work. Maybe it just needs some checking.

In your first example the minimum computer for an 8,000 ton hull is a Model/2. Is this part of the script or manual input choice.

Also for the first example I'm not quite getting the crew and quarters to work. As in the quarters should be at least 150 tons for the crew listed. 12 full staterooms for the officers = 48 tons and 102 tons for shared staterooms for the rest of the crew. Or are you using some other solution?
 
Yeah, Computers aren't calculatd correctly by any stretch of the imagination. It just slaps Computer model equals jump rating in, which is far from accurate. It is the one value that tends to be always tweaked in my case, it helps to have it listed though.

70 is 144 tons under the under 1000 dTon rules (which it is optimised for, the capital crew listing was slapped on later) 144 tons is 36 staterooms 2 solo and 34 shared, as per the requirements, which state a solo stateroom for the captain, and shared for everyone else with the option of an extra solo rather then going to triple occupancy anywhere. The capital ship requirements don't back propogate to the crew listing.

The rest I am pretty sure is accurate.
 
Ah, fair enough, I should have figured that out. I take the "other command crew and officers are usually given their own staterooms" the other way.

Generally, subject to ship size, I give all the officers their own staterooms and the command crew shared staterooms. Regular crew have shared staterooms and may be forced to hotbunk to double up the crew, usually to add troops.

I say subject to size because for small ships (less than 1,000 tons) I require in design/theory a full stateroom for each of the stated crew and/or passengers, which of course in practice may be doubled or even hotbunked in some cases.

I wonder could the script be written to just allow the selection of the computer model? Just a basic full model of each if you know what I mean. Like a model/4 would be cpu m/4, avionics m/4, sensors m/4 and commo m/4. No messing with different levels of subsystems or maser or meson comms.

I'd ask for a copy but not at the moment, my computers are a mess and I need to do major backups and restores before I think about something new to play with
I'll get back to you ;)
 
The calculations for computer level wouldn't be too hard to do. Since the output is text anyway - to make it easy to cut'n'paste into an editor for further modifications, it is moot. I don't think it calculates energy requirements for computer systems either.

Next time I get enthused I might do another pass over the code and clean it up a little. The computer idea is a good one, though it is reaching the point where I will need to re-implement the interface to something a little friendlier before adding any more features.

The staterooms were always meant to be a minimum, spare space is a luxury reserved for passenger transports and non-serious ships. Anything trying to make a working wage (cargo hauler, refueler, militant) would want the pure minimum.
 
Back
Top