Murgh - Obnoxicorp Inc.

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: another_commander, winston

User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Murgh - Obnoxicorp Inc.

Post by Svengali »

Cody wrote:
Cody wrote:
<decides to take a look>
<awards himself a cookie>
<awards himself a cookie for drawing Cody to the dark side>
User avatar
Mauiby de Fug
---- E L I T E ----
---- E L I T E ----
Posts: 847
Joined: Tue Sep 07, 2010 2:23 pm

Re: Murgh - Obnoxicorp Inc.

Post by Mauiby de Fug »

As I've decided to not allow various OXPs to overwrite the main station of a planet, but wanted to see these ones in the game, I cannibalised Thargoid's script for spawning the Superhub to spawn the stations as additional stations around the same planet (in the same way that the Superhub is...). So I copied the locations from the planetinfo.plist (which I then deleted) into the script and added this script into the world-scripts.plist. No doubt some improvements can be made, but early indications are that it's working. Just thought I'd share in case anyone else is of the same odd mindset as me... (The originator of this was that when I was last dedicatedly playing Oolite a few years ago, I would rarely see Ico stations, as the Torus oxp had replaced them.)

Code: Select all

this.name         = "Mauiby Murghs_Stations2.0 station spawner";
this.author       = "Mauiby de Fug, based upon a script by Thargoid";
this.copyright    = "This script is hereby placed in the public domain.";
this.version      = "1.0";
this.description  = "Script to spawn Globestations and Torus stations as extra stations";

this.shipWillLaunchFromStation = function(station)
   {
   if(station.isMainStation)
      {
      this.spawnMurgh();
      }
   }

this.shipWillExitWitchspace = function()
   {
   this.spawnMurgh();
   }

this.spawnMurgh = function()
   {

   this.$murghStationRole = "noStation";
   switch (galaxyNumber) {
      case 0:
         if (system.ID === 23) this.$murghStationRole = "globestationxl";
         if (system.ID === 33) this.$murghStationRole = "toriB";
         if (system.ID === 246) this.$murghStationRole = "globestation";
         if (system.ID === 250) this.$murghStationRole = "toriA";
         if (system.ID === 151) this.$murghStationRole = "toriB";
         break;
      case 1:
         if (system.ID === 66) this.$murghStationRole = "globestation";
         if (system.ID === 98) this.$murghStationRole = "toriA";
         if (system.ID === 231) this.$murghStationRole = "globestation";
         break;
      case 2:
         if (system.ID === 5) this.$murghStationRole = "globestationxl";
         if (system.ID === 36) this.$murghStationRole = "toriA";
         if (system.ID === 38) this.$murghStationRole = "globestation";
         if (system.ID === 42) this.$murghStationRole = "globestationxl";
         if (system.ID === 54) this.$murghStationRole = "globestation";
         if (system.ID === 69) this.$murghStationRole = "toriB";
         if (system.ID === 79) this.$murghStationRole = "globestationxl";
         break;
      case 3:
         if (system.ID === 141) this.$murghStationRole = "globestation";
         if (system.ID === 197) this.$murghStationRole = "toriA";
         break;
      case 4:
         if (system.ID === 39) this.$murghStationRole = "toriA";
         if (system.ID === 70) this.$murghStationRole = "toriB";
         if (system.ID === 99) this.$murghStationRole = "globestationxl";
         if (system.ID === 126) this.$murghStationRole = "globestation";
         if (system.ID === 249) this.$murghStationRole = "globestationxl";
         if (system.ID === 198) this.$murghStationRole = "globestationxl";
         break;
      case 5:
         if (system.ID === 6) this.$murghStationRole = "toriA";
         if (system.ID === 40) this.$murghStationRole = "toriB";
         if (system.ID === 50) this.$murghStationRole = "globestationxl";
         if (system.ID === 144) this.$murghStationRole = "globestation";
         if (system.ID === 204) this.$murghStationRole = "globestation";
         if (system.ID === 149) this.$murghStationRole = "globestationxl";
         break;
      case 6:
         if (system.ID === 6) this.$murghStationRole = "globestation";
         if (system.ID === 71) this.$murghStationRole = "globestation";
         if (system.ID === 87) this.$murghStationRole = "globestation";
         if (system.ID === 103) this.$murghStationRole = "globestation";
         if (system.ID === 119) this.$murghStationRole = "toriA";
         if (system.ID === 184) this.$murghStationRole = "toriB";
         if (system.ID === 229) this.$murghStationRole = "globestationxl";
         if (system.ID === 53) this.$murghStationRole = "toriB";
         if (system.ID === 66) this.$murghStationRole = "globestationxl";
         break;
      case 7:
         if (system.ID === 251) this.$murghStationRole = "globestationxl";
   }


   if( this.$murghStationRole == "noStation" || system.countShipsWithRole("toriA") > 0 || system.countShipsWithRole("toriB") > 0 || system.countShipsWithRole("globestation") > 0 || system.countShipsWithRole("globestationxl") > 0 || this.murghBlock)   
      {
      this.murghBlock = true;
      return;
      }
   else
      {
      this.xOffset = (system.scrambledPseudoRandomNumber(27) * 10000) + 10000; // x offset between 10 and 20km
      this.yOffset = (system.scrambledPseudoRandomNumber(18) * 10000) + 10000; // y offset between 10 and 20km

      if(system.scrambledPseudoRandomNumber(28) > 0.5) // 50:50 chance of offsetting in the other direction
         {
         this.xOffset = -this.xOffset;
         }
      if(system.scrambledPseudoRandomNumber(183) > 0.5) // 50:50 chance of offsetting in the other direction
         {
         this.yOffset = -this.yOffset;
         }

      system.legacy_addShipsAtPrecisely(this.$murghStationRole, 1, "abs", system.mainStation.position.add([this.xOffset, this.yOffset, 0]));
      }
   }

this.shipWillEnterWitchspace = function()
   {
   this.murghBlock = null;
   }
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16058
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Murgh - Obnoxicorp Inc.

Post by Cody »

Mauiby de Fug wrote:
The originator of this was that when I was last dedicatedly playing Oolite a few years ago, I would rarely see Ico stations, as the Torus oxp had replaced them.
I only use the Torus stations, but I thinned them out for the same reason - I have only two or three Torus stations per octant.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
CaptSolo
---- E L I T E ----
---- E L I T E ----
Posts: 909
Joined: Wed Feb 23, 2011 10:08 pm
Location: Preying Manta
Contact:

Re: Murgh - Obnoxicorp Inc.

Post by CaptSolo »

Torus Stations v2.02 is now available via the in-game Expansion Pack Manager or by direct download:
http://wiki.alioth.net/img_auth.php/c/ce/Tori2.02.oxz

Changes:
New high resolution textures: diffuse, specular, and normal map.
Main Hull shaders borrowed from Griff's Stations Bundle.
Docking bay model, textures, and shaders borrowed from Griff's Dodecahedron Station.
Both Torus Stations have

Code: Select all

station_roll = 0.05;
in shipdata.plist.

planetinfo.plist locations:
Chart 1: Onrira (23), Inera (33), Ceesxe (151)
Chart 2: Onatbeza (66), Laribebi (98), Recexela (231)
Chart 3: Lezaer (5), Orzaedve (42)
Chart 4: Gebiisso (141), Dicebe (197)
Chart 5: Tetiri (70), Xevera (198), Gesolaon (249)
Chart 6: Bearrabe (40), Enqura (50), Diesanen (149)
Chart 7: Quandixe (53), Maraus (66), Bionbiin (119), Articeso (229)
Chart 8: Esusale (251)
Post Reply