Re: Docking Tunnel Length
Posted: Wed Jan 10, 2024 9:40 am
Stumbled across this page in the wiki (Multiple Docks) which mentions a 4km long cone ahead of the docking port needing to be clear of objects.
For information and discussion about Oolite.
https://bb.oolite.space/
Kudos to you and your navigational skills to dig out such gems! It answers my questions and so much more I did not even think about...Cholmondely wrote: ↑Wed Jan 10, 2024 9:40 amStumbled across this page in the wiki (Multiple Docks) which mentions a 4km long cone ahead of the docking port needing to be clear of objects.
Code: Select all
"rrs_headquarters" = {
allegiance = "neutral";
name = "RRS Headquarters";
ai_type = "rescue_headquartersAI.plist";
model = "rrs_headquarters_asteroid.dat";
"scanner_display_color1" = "orangeColor";
"scanner_display_color2" = "greenColor";
scan_class = "CLASS_STATION";
materials = {
"rrs_hq_asteroid_diffuse.png" = {
diffuse_map = { name = "rrsfl_rock_cube.png"; cube_map = "true";};
normal_map = "rrsfl_rock_normal.png";
shininess = 2;
specular_color = (0.1, 0.1, 0.1, 1.0);
};
};
smooth = "yes";
roles = "rrs_galactic_hq rrs_group_spacestation";
frangible = 0;
max_energy = 25000;
energy_recharge_rate = 100;
is_carrier = 1;
defense_ship_role = "rrs-defender";
max_defense_ships = 12;
equivalent_tech_level = 0;
equipment_price_factor = 2;
has_shipyard = 0;
max_police = 0;
max_scavengers = 3;
"requires_docking_clearance" = yes;
"market" = "rescue_hq";
"market_script" = "rrs_market.js";
script_info = {
bgs_tunnel_texture = "rrsfl_hq_bgs_tunnel.png";
};
subentities = (
{
type = "standard";
subentity_key = "rrs_headquarters_construct";
position = "0 0 0";
},
{
type = "standard";
subentity_key = "rrs_headquarters_bay";
position = "750 836.5 1685.8";
},
{
type = "standard";
subentity_key = "rrs_headquarters_bay";
position = "250 836.5 1685.8";
},
{
type = "standard";
subentity_key = "rrs_headquarters_bay";
position = "-250 836.5 1685.8";
},
{
type = "standard";
subentity_key = "rrs_headquarters_bay";
position = "-750 836.5 1685.8";
},
{
type = "standard";
subentity_key = "rrs_headquarters_bay";
position = "750 86.5 1685.8";
},
{
type = "standard";
subentity_key = "rrs_headquarters_bay";
position = "250 86.5 1685.8";
},
{
type = "standard";
subentity_key = "rrs_headquarters_bay_dock";
position = "-250 86.5 1685.8";
is_dock = "true";
},
{
type = "standard";
subentity_key = "rrs_headquarters_bay";
position = "-750 86.5 1685.8";
},
{
type = "standard";
subentity_key = "rrs_headquarters_bay_ff";
position = "750 836.5 1685.8";
},
{
type = "standard";
subentity_key = "rrs_headquarters_bay_ff";
position = "250 836.5 1685.8";
},
{
type = "standard";
subentity_key = "rrs_headquarters_bay_ff";
position = "-250 836.5 1685.8";
},
{
type = "standard";
subentity_key = "rrs_headquarters_bay_ff";
position = "-750 836.5 1685.8";
},
{
type = "standard";
subentity_key = "rrs_headquarters_bay_ff";
position = "750 86.5 1685.8";
},
{
type = "standard";
subentity_key = "rrs_headquarters_bay_ff";
position = "250 86.5 1685.8";
},
{
type = "standard";
subentity_key = "rrs_headquarters_bay_ff";
position = "-250 86.5 1685.8";
},
{
type = "standard";
subentity_key = "rrs_headquarters_bay_ff";
position = "-750 86.5 1685.8";
},
// may need to shader these objects too
{ // bay 1
type = "standard";
subentity_key = "arafura";
position = "750 796.5 1650.8";
},
{ // bay 2
type = "standard";
subentity_key = "viper";
position = "305 776.5 1695.8";
},
{
type = "standard";
subentity_key = "viper";
position = "195 776.5 1695.8";
},
{
type = "standard";
subentity_key = "viper";
position = "305 776.5 1575.8";
},
{
type = "standard";
subentity_key = "viper";
position = "195 776.5 1575.8";
},
{ // bay 3
type = "standard";
subentity_key = "rescue_missile";
position = "-305 779.5 1705.8";
},
{
type = "standard";
subentity_key = "rescue_missile";
position = "-195 779.5 1705.8";
},
{
type = "standard";
subentity_key = "rescue_missile";
position = "-305 779.5 1590.8";
},
{
type = "standard";
subentity_key = "rescue_missile";
position = "-195 779.5 1590.8";
},
{ // bay 4
type = "standard";
subentity_key = "arafura";
position = "-750 796.5 1650.8";
},
{ // bay 5
type = "standard";
subentity_key = "cobra3-trader";
position = "750 35.5 1625.8";
},
{
type = "standard";
subentity_key = "mamba-escort";
position = "805 28.5 1705.8";
},
{
type = "standard";
subentity_key = "mamba-escort";
position = "695 28.5 1705.8";
},
{ // bay 6
type = "standard";
subentity_key = "arafura";
position = "250 46.5 1650.8";
},
// bay 7 is docking bay
{ // bay 8
type = "standard";
subentity_key = "python";
position = "-750 40.5 1635.8";
},
{
type = "standard";
subentity_key = "krait";
position = "-800 28.5 1695.8";
},
{
type = "standard";
subentity_key = "krait";
position = "-700 28.5 1695.8";
}
);
script = "rrs_hq_script.js";
};
"rrs_headquarters_construct" = {
model = "rrs_headquarters_construction.dat";
roles = "rrs_hq_component";
materials = {
"rrs_hq_construction_diffuse.png" = {
emission_map = "rrsfl_hq_construction_emission.png";
diffuse_map = "rrsfl_hq_construction_diffuse.png";
illumination_map = "rrsfl_hq_construction_illumination.png";
normal_map = "rrsfl_hq_construction_normal.png";
specular_map = "rrsfl_hq_construction_diffuse.png";
};
};
};
"rrs_headquarters_bay" = {
model = "rrs_headquarters_bay.dat";
roles = "rrs_hq_component rrs_hq_bay";
materials = {
"rrs_hq_dock_diffuse.png" = {
diffuse_map = "rrsfl_hq_dock_diffuse.png";
"vertex_shader" = "rrs-default.vertex";
"fragment_shader" = "rrs-hq-inside.fragment";
uniforms = {
uDiffuseMap = {
type = texture;
value = 0;
};
uPersonality = entityPersonality;
};
textures = (
"rrsfl_hq_dock_diffuse.png"
);
};
};
};
"rrs_headquarters_bay_dock" = {
like_ship = "rrs_headquarters_bay";
roles = "rrs_hq_component rrs_hq_bay rrs_hq_bay_dock";
materials = {
"rrs_hq_dock_diffuse.png" = {
diffuse_map = "rrsfl_hq_dock_diffuse.png";
normal_map = "rrs_hq_dock_normal.png";
illumination_map = "rrs_hq_dock_emission.png";
"vertex_shader" = "rrs-default.vertex";
"fragment_shader" = "rrs-hq-inside-activebay.fragment";
uniforms = {
uDiffuseMap = {
type = texture;
value = 0;
};
uLandingLightMap = {
type = texture;
value = 1;
};
uNormalMap = {
type = texture;
value = 2;
};
uTime = timeElapsedSinceSpawn;
};
textures = (
"rrsfl_hq_dock_diffuse.png",
{ name = "rrs_hq_dock_emission.png";
min_filter = "linear";
anisotropy = 1;
texture_LOD_bias = -1;
},
"rrs_hq_dock_normal.png"
);
};
};
};
"rrs_headquarters_bay_ff" = {
model = "rrs_headquarters_bay_ff.dat";
roles = "rrs_hq_component rrs_hq_ff";
materials = {
"rrs_forcefield.png" = {
"diffuse_map" = "rrs_forcefield.png";
textures = (
{
name="rrs_forcefield.png";
min_filter="nearest";
mag_filter="nearest";
}
);
"vertex_shader" = "rrs-default.vertex";
"fragment_shader" = "rrs-forcefield.fragment";
uniforms = {
uDiffuseMap = {
type = texture;
value = 0;
};
uTime = timeElapsedSinceSpawn;
uOffset = entityPersonality;
};
};
};
};
Code: Select all
"use strict";
this.author = "cim";
this.copyright = "2011-2015 cim.";
this.licence = "CC-BY-SA 3.0";
this.name = "RRS Headquarters Script";
this.dockposition = undefined;
this.initialiseStation = function() {
var busyness = Math.random()/2;
var subents = this.ship.subEntities;
var bays = new Array();
var ffs = new Array();
var positions = new Array();
for (var i=0;i<subents.length;i++) {
if (subents[i].hasRole("rrs_hq_bay")) {
bays.push(subents[i]);
if (!subents[i].hasRole("rrs_hq_bay_dock")) {
positions.push(subents[i].position);
} else {
var activedockpos = subents[i].position;
}
} else if (subents[i].hasRole("rrs_hq_ff")) {
ffs.push(subents[i]);
} else if (!subents[i].hasRole("rrs_hq_component")) {
if (Math.random() < busyness) {
subents[i].remove(true)
}
}
}
positions.sort(function(a,b) { return Math.random()-0.5; });
for (var i=0;i<bays.length;i++) {
if (bays[i].hasRole("rrs_hq_bay_dock")) {
for (var j=0;j<ffs.length;j++) {
if (ffs[j].position.distanceTo(bays[i].position) < 50) {
ffs[j].remove(true);
}
}
this.dockposition = bays[i].position;
} else {
bays[i].position = positions.shift();
}
}
system.addShips("rrs-hq-buoy",1,this.ship.position.add(activedockpos).add(this.ship.vectorForward.multiply(12E3)),1);
}
The RRS HQ is made to look like it's a multi-dock station, but actually, only one dock is active. The other docks have force-fields in place and you can see parked ships behind the field.Cholmondely wrote: ↑Wed Jan 10, 2024 1:09 pmQuestion: Can I link this oxp to the Multiple Docks wiki page as an example of how to do it?
Found these:
cim wrote: ↑Thu Jul 26, 2012 6:40 am"allow_player_docking" has become "disallowed_docking_collides" (with opposite sense!) in the new multi-dock code (still read-only for the moment, but I'll make it read/write at some point to give the "docking bay doors" requestors an easy answer). This simplifies the underlying code and fixes a couple of bugs. The JavascriptacceptDockingRequestFrom
method can be used to implement the old behaviour of "allow_player_docking" in a more flexible way.
Needless to say, the " http://compsoc.dur.ac.uk/~cim/oolite/Mu ... st_0.1.zip " link is long dead...cim wrote: ↑Fri Jul 13, 2012 11:19 amIt is now possible to assign multiple docks to a station or carrier.
Docks can be set up as launch-only, dock-only, or the default dual-use, and traffic control will reasonably intelligently route traffic to the appropriate docks for best docking and launching rates. Player docking can be explicitly allowed or disallowed at a particular dock. Docks can be given labels, which will be used when instructing the player on where to dock (unless the station only has one dock).
Docks which are set launch-only will repel and damage ships trying to dock with them.
A quick example OXP which adds the pictured ship to high planetary orbit - beacon M - and has it launch and recall traders.
When I requested docking permission, it directed me to dock #3.This is a test OXP which adds a basic multiple-dock carrier to high planetary orbit, hopefully out of the way of anything important, and has it launch and recall traders.
Dock 1 is set docking-only, Dock 2 is launch-only, and Docks 3 and 4 are dual-purpose.
Note that it intentionally has a design flaw (the docking corridors for Docks 1 and 4 are positioned such that ships docking in them will sometimes block launches from Docks 2 and 3)