User Tools

Site Tools


traveller:roll20

Roll20 Scripts

Physics [!physics]

The Physics script is designed to provide aid in calculating basic things such as information on planets, or plotting travel times. It's not specifically tied to Traveller, but was written with that game in mind. As with my other scripts, it is available on GitHub.

The !physics command takes a sub-command and a number of arguments. It can be shortened if desired, down to !phy to save on typing. There are three sub-commands - thrust, rocket and planet.

The sub-commands can be shortened to the shortest unique word, which current is a single letter for all of them.

thrust

The thrust sub-command uses the equation of motion to calculate how long it takes to travel a given distance under constant acceleration.

!phy thrust 1g 1.2mkm

This will give information on how long to accelerate to the mid-point, then decelerate to the destination. It also gives the time taken for when you don't want to decelerate - for example a missile that will accelerate all the way to the destination.

If 'g' is not specified on thrust, then acceleration is assumed to be in ms-2.

The distance is assumed to be kilometres unless other units are specified. km, mkm (millions of kilometres) and au (astronomical units) are supported units.

rocket

The rocket sub-command will use the classical rocket equation to calculate the delta-vee for a rocket. This isn't used much in Traveller, but it's there in case it's needed.

!phy rocket 1000 200 350

It takes the wet and dry mass of the ship (units aren't important, since it's only the ration that matters), and the Isp (specific impulse) of the drive (in seconds).

planet

Can be used to display some basic statistics about a planet.

The simplest command can be used to calculate statistics for a planet.

!physics planet 6400 5.5

Displays statistics on a planet with a radius of 6400km, and a density of 5.5g/cm³. It will display the planet's mass, escape velocity and surface gravity.

You don't have to specify the full command. You can use !phy instead of !physics. You can also specify the first letters of the command word.

!phy planet 6400 5.5
!phy plan 6400 5.5
!phy p 6400 5.5

You can specify different units, for example you can use 'e' for Earth, 'j' for Jupiter or 'sol' for Sol. You can also specify, m (metres), km (kilometres), mkm (millions of kilometres) or au (astronomical units).

!physics planet 1e 1e

Orbits

Another option is to specify an orbit. If a third parameter is specified, then it is the distance to an orbit, which by default is from the centre of the planet. To specify a 7,000km orbit around a 6,400km radius planet you would use:

!physics planet 6400km 5.5 7000km

Alternatively, you can specify an orbit as an altitude by using +<altitude>.

!physics planet 6400km 5.5 +400km

Solar Orbits

You can also specify solar orbits, simply by using larger numbers.

!physics planet 1sol 1sol 1au
!physics planet 2sol 1.5sol 3au
!physics planet 5j 1.5j 1mkm
traveller/roll20.txt · Last modified: 2020/10/25 14:48 by sam