Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

The Assassins Guild OXP (Final Updated Version)

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

Moderators: winston, another_commander

another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6571
Joined: Wed Feb 28, 2007 7:54 am

Re: The Assassins Guild OXP (Final Updated Version)

Post by another_commander »

What you want to do is:

Code: Select all

System.infoForSystem(6,73).description="Test"
Note the capital S in System.
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2868
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Re: The Assassins Guild OXP (Final Updated Version)

Post by LittleBear »

Thanks. Worked perfectly. I've been parked up at Orramaor for a while testing the script with Orbits, System Redux and Strangers World to come up with a method that means regardless of the OXZs installed the assassins planets, moons, stations and ships are always in the same place. Got that working. Done so far is: Set Up for all system descriptions in their starting states; Added the planet, the Soin Family Burrow (with custom defenders) and mine sweepers to protect it. I'll need to fly round the 9 other assassins systems and add their features. Then do the code to implement the missions. Each Planet and Moon gets a new texture and the old stations are replaced with modern ones (Globe Station for Orramoar).

Script so far:

Code: Select all

"use strict";
this.name = "AssassinsRebooted";
this.author = "LittleBear";
this.copyright = "This script is hereby placed in the public domain.";
this.description = "Assassins Guild OXZ - Rebooted Version 2.0 - 07/06/24";
this.version = "2.0";
this.licence = "CC BY-NC-SA 4.0";

// When first installed, delete all the variables from the old versions of Assassins and set up the systems modified by Assassins to their starting states.
this.startUp = function() {
if (!missionVariables.assassins_rebooted_stage) {
// Clean Up the Save File by Deleted all old variables when the OXZ is first installed.
delete missionVariables.assassins;
delete missionVariables.assassins_basedeath;
delete missionVariables.assassins_bugattack;
delete missionVariables.assassins_card;
delete missionVariables.assassins_gotscan;
delete missionVariables.assassins_jumpcount;
delete missionVariables.assassins_killcount;
delete missionVariables.assassins_navybots;
delete missionVariables.assassins_robotescape;
delete missionVariables.assassins_robottimer;
delete missionVariables.assassins_trumble;
delete missionVariables.assassins_unlocked;
delete missionVariables.assassins_war;
// Set Up the Assassins Systems in their default starting states.
// These changes are made once, the first time the game starts up after installing the OXZ, at start up regardless of the player's location. 
// The rest of the Script is bracketed off so that it is only checked in Galaxy 7 and only when the Assassins missions are running.
// Set Up Orramaor.
System.infoForSystem(6,73).description = "Orramaor is noted for the resort world of Apollodorus, where many of the locals spend their holidays. It is reasonably well known as the corporate headquarters of Soin Classic Shipyards Ltd. In recent years, Soin Classic Shipyards have specialised in the development of greatly improved versions of Serpent Class ships.";
System.infoForSystem(6,73).techlevel = 14;
System.infoForSystem(6,73).government = 6;
System.infoForSystem(6,73).economy = 0;
System.infoForSystem(6,73).inhabitants = "Small Rodent Scientists";
System.infoForSystem(6,73).productivity = 53489;
System.infoForSystem(6,73).population = 83;
// Set Up Esrire
System.infoForSystem(6,107).description = "Esrire is famous for its large gas giant, Cerberus. The system is however plagued by high levels of criminal activity, even by the standards of an anarchy system. GalCop Special Branch suspects that many criminal organizations make their home in this system, but have thus far found no living witnesses to corroborate their theories.";
System.infoForSystem(6,107).inhabitants = "Sinister Yellow Frogs";
System.infoForSystem(6,107).productivity = 97252;
// Set Up Tiared
System.infoForSystem(6,194).description = "Tiared is well known for its large volcanic companion, Diomedes. The inhabitants have a passion for the sport of Zero-G Hockey, hosting the last five Galactic Cup competitions. The Galactic Zero-G Hockey Association have their headquarters on the northern continent of the planet.";
System.infoForSystem(6,194).inhabitants = "Hockey Obsessed Lizards";
// Set Up Beatle
System.infoForSystem(6,203).description = "Beatle is well known for its moon, Augeas. The Augeaian Orbital Repair Facility is famous for the affordable servicing facilities provided by its industrious work crews. The Augeaian Security Force maintains a strong presence of both Micro and Interceptor Kraits in the vicinity. Customers can rest assured that their powered down craft will remain secure whilst undergoing servicing.";
System.infoForSystem(6,203).techlevel = 14;
System.infoForSystem(6,203).government = 7;
System.infoForSystem(6,203).economy = 0;
System.infoForSystem(6,203).inhabitants = "Feline Engineers";
System.infoForSystem(6,203).productivity = 39902;
// Set Up Ateslete
System.infoForSystem(6,39).description = "The Ateslete System is reasonably noted for the ice-world, Stymphal. The well known robotics company, Griff Research Ltd, operates factories over most of the planet and maintains an orbital research station near Stymphal.";
System.infoForSystem(6,39).techlevel = 14;
System.infoForSystem(6,39).government = 7;
System.infoForSystem(6,39).economy = 0;
System.infoForSystem(6,39).inhabitants = "Mostly Robots";
System.infoForSystem(6,39).productivity = 78824;
System.infoForSystem(6,39).population = 72;
// Set Up Quandixe
System.infoForSystem(6,53).description = "Quandixe is well known for its tropical moon Hesperides, the climate of which is perfectly suited to the cultivation of Megaweed. Dark rumors circulate that the Quandixeian Corporation is in reality a front for a Mafia narcotics syndicate.";
System.infoForSystem(6,53).inhabitants = "Legitimate Businessmen";
System.infoForSystem(6,53).economy = 5;
System.infoForSystem(6,53).productivity = 84296;
// Set Up Geteve
System.infoForSystem(6,18).description = "Geteve is reasonably well known for its large moon, Hercules. GalCop Special Branch maintains a well armed base in orbit around Hercules. The main offices of the Galactic Prosecution Service are based on the moon's surface.";
System.infoForSystem(6,18).inhabitants = "Law Abiding Humans";
System.infoForSystem(6,18).government = 6;
System.infoForSystem(6,18).economy = 0;
System.infoForSystem(6,18).productivity = 58132;
// Set Up Zarausxe (No missions are scripted here, but the player will be pursued by angry sports fans from this system, so the description and inhabitants are tweaked.)
System.infoForSystem(6,184).description = "This planet is notable for its great tropical forests, but is famous for its inhabitants passion for the sport of Zero-G Hockey.";
System.infoForSystem(6,184).inhabitants = "Hockey Obsessed Humans";
// Set Up Ataneris
System.infoForSystem(6,81).description = "Ataneris is famous for its forest covered companion, Hippolyte, but has a sinister reputation as traditional place of bloodshed. In dark corners of disreputable space bars it is whispered that, from time to time, duels between pilots of great skill take place by the Witchspace Beacon. Two ships enter the circle. One ship leaves.";
// Set Up Esreates (No missions are scripted here, but the player will be pursued by Triads from this system, so the description and inhabitants are tweaked.)
System.infoForSystem(6,100).description = "Formally a GalCop penal colony, a successful rebellion by the prisoners placed the system in the hands of felons. At present the system is run by the Yankisona Triad gang. In criminal circles, it is well known that relations with the Quandixeian Mafia are less than cordial. Many fear that all out gang warfare is imminent.";
System.infoForSystem(6,100).inhabitants = "Criminals of Many Species";
System.infoForSystem(6,100).productivity = 29127;
// Set Up Orreedon (No missions are scripted here, but a fellow assissin will make a hit involving a dealy goat, so the description is tweaked.)
System.infoForSystem(6,118).description = "The planet Orreedon is famous for its strange mountains, but cursed by deadly goats. In criminal circles, it is said that an illegal trade in the export of Orreedonian deadly goats flourishes on the northern continent. Once domesticated, the deadly goat can be trained as a vicious attack beast.";
// Set Up Estiri
System.infoForSystem(6,82).description = "Estiri is noted for its large ocean covered moon, Nemean, and famous as the location of the Galactic Supreme Court. The Galactic Navy operates from a well armed base orbiting the moon.";
System.infoForSystem(6,82).government = 6;
System.infoForSystem(6,82).productivity = 27654;
// Set Up Sobeer (No missions are scripted here, but mention is made of someone being sent a spotted cod as a mafi warning, so the description is tweaked.)
System.infoForSystem(6,19).description = "Sobeer is famous for the delicious nature of its native marine life, particularly the exquisite Sobeerian spotted cod. Beings of a more sensitive nature decline however to partake in this delicacy, knowing its use in certain sinister Mafia rituals.";
// Set Up Eszausve
System.infoForSystem(6,13).description = "Eszausve is famous for its rocky moon and the twin gas giants Hades and Lernean, but cursed by one of the most oppressive governments in the Galaxy. Although the People's Popular Front bravely resists the oppressive regime of Governor Tarkin, thus far they have made little progress in restoring freedom to the planet.";
System.infoForSystem(6,13).productivity = 98764;
System.infoForSystem(6,13).inhabitants = "Oppressed Harmless Fat Birds";
System.infoForSystem(6,13).techlevel = 14;
// Define all the variables used by Assassins Rebooted to their starting values.
// The Set Up code above is only run when the Stage variable is undefined. Once it is defined, the set up code is not run again therefore.
missionVariables.assassins_rebooted_stage = 0;
missionVariables.assassins_rebooted_jumpcounter = 0;
missionVariables.assassins_rebooted_soin_clan_station_death = 0;

//HERE!
}
// Closing Bracket for StartUp
}

this.systemWillPopulate = function() {
// The whole of the Assassins Script for adding planets, moons, stations and ships is bracketed off to only be checked in Galaxy 7.
if (galaxyNumber === 6) {
// Second Check that we are in not only in Galaxy 7 but we are also at one of the ten systems where assassins is adding stuff to the system.
if (system.ID === 73 ||  system.ID === 107 || system.ID === 194 || system.ID === 203 || system.ID === 39 || system.ID === 53 || system.ID === 18 || 
system.ID === 81 || system.ID === 82 || system.ID === 13) {
// Wait until OXZs such as Strangers World and Orbits have finished moving planets around before we add anything to the system.
// This makes sure that the Assassins objects are always added at the exact co-ordinates set in planetinfo.
// Without this check Strangers World / Orbits will move the objects from their co-ordinates so neither the planets moons, stations or mission ships will be where the should be.
{ this.scriptDelay_assassins_populator = new Timer(this, this.assassins_populator, 0.19); } // Run the Populator Function.
// Closing Bracket for populating Assassins Systems.
}

// Closing Backet for code only run in Galaxy 7.
}
// Closing Bracket for this system will populate
}

//Function to Populate all Assassins Systems with planets, moons, ships and stations
this.assassins_populator = function assassins_populator() {
// Populate Orramaor 
if (system.ID === 73) {
// The Companion Planet Appollodrus is always added regardless of whether any missions are running or not.
system.addMoon("assassins_rebooted_Apollodorus"); 
// Likewise, the Soin Family Burrow is always present at least until the Guild destroy it!
if (missionVariables.assassins_rebooted_soin_clan_station_death === 0) {
system.legacy_addShipsAt("assassins_rebooted_soin_clan_station", 1, "pwm", [-100000, -500000, 305000]);
system.legacy_addShipsAt("assassins_rebooted_minesweeper", 1, "pwm", [-100000, -500000, 315000]);
system.legacy_addShipsAt("assassins_rebooted_minesweeper", 1, "pwm", [-100000, -500000, 295000]);
}



// Closing Bracket for Orramaor.
}

return;	
//Closing Bracket for the whole populator function.
}

OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
Post Reply