Hints OXZ (Development Thread)

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

Moderators: winston, another_commander

User avatar
Cholmondely
Archivist
Archivist
Posts: 5365
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Education

Post by Cholmondely »

So, I'm a blithering idiot. Wrong titles for GNN.js script and for the descriptions.plist

Bar chatter seems to work fine now. But nothing on the GNN front.

The script loads and that's it. No error messages. None of the debug notices show in the latest.log

Code: Select all

"use strict";
this.name = "Hints_GNN.js";
this.author = "Cholmondely";
this.copyright = "(C) 2022 Littlebear & Phkb";
this.licence = "CC-NC-by-SA 4.0";
this.description = "Code by LittleBear and then Phkb.";
this.version = "0.9.4";

this.education_last = 0; // holds which news item was last published
this.education_max = 9; // hold the maximum number of news items available

this.startUpComplete = function() {
    // check save game for our education_last variable, and read it back in if found
    if (missionVariables.education_last) {
        this.education_last = parseInt(missionVariables.education_last);
    log(this.name, "got here1");
    }
}

this.playerWillSaveGame = function() {
    // make sure our education variable is saved
    missionVariables.education_last = this.education_last;
}

this.shipExitedWitchspace = function() {
    // if we've reach the maximum number of messages, we're done.
    if (this.education_last == this.education_max) return;

    // this is where you'd set up rules to govern how often news items are sent.
    // for the purposes of this exercise, we'll just make it random (1% chance)
    if (Math.random() < 0.01) { 
        var news = new Object;
        news.ID = this.name;
        // get the appropriate news item, based on the education_last variable.
        news.Message = expandDescription("[education_news_" + this.education_last + "]");
        news.Agency = 2;
        news.Priority = 1;
        this.passScreen(news, 1);
        log(this.name, "got here2");
    }
}

// i'm going to assume LittleBear's code here works
this.passScreen = function (news, mode) {
    var a = worldScripts.GNN._insertNews(news);
        log(this.name, "got here3");
    if (!a) {
        if (mode) this.education_last += 1; // If GNN conforms sucess, advance the News Counting variable to the next Broadcast.
        return;
    } else {
        if (a < 0) { // If the buffer was full then the mission variable counting the News Broadcasts wasn't advanced. Once the player has made the required number of jumps Random Station names will check again.
            return;
        }
    }
}

/*

// copy and paste everything between these markers ****** (but not the markers themselves) into descriptions.plist

******
    //• Interview of Chap reaching Elite status and giving manouever he used
    "education_news_1" = "Usge Ceanal has just attained Elite status according to a press release from the Elite Federation. In an interview, Ceanal said that he was an advocate of the Barkanion Bounce (named after the renowned Lave Academician) - swirling in loops towards his opposition whilst varying his speed. This tactic enables a trouble-free approach to one’s targets, and accounted for many hundreds of his kills.";

    //• Rock hermit destroyed in anarchy (a Pirate Cove)
    "education_news_2" = "A pirate-infested Rock Hermit has just been destroyed by a police viper-squad in the rodent-ridden anarchy of Riedquat. A centre for the local slave and narcotics trade, it has finally been shut down, allowing much safer travel in the Old Worlds sector! “The pirate plague has finally been eliminated” claimed the courageous Commander Reed Spar of GalCop, \"the Old Worlds are now as safe as a parentally-patrolled paddling pool!\"";

    //• Pirates nab chap on milk run Ensoreus-Ararus Furs-Computers: turns out to be a millionaire
    "education_news_3" = "Reports are just coming in about Orit Ceedthse, an Ensorean trader was murdered at Ararus yesterday by marauding pirates. It turns out that the feline was phenomenally rich, due to trading in furs and computers between Ensoreus and Ararus. Was she killed for her cargo, her money or for more murky misdemeanours? Truth is, we don’t know!";

    //• Quirium Cascade mishap
    "education_news_4" = "A quirium cascade bomb has been detonated at Qubeen. It caught some 27 ships and a rock hermit as well as the launcher of the bomb, a rodent from nearby Maesin. Inquiries are ongoing into the exact cause of the incident. GalCop is offering handsome rewards for relevant information.";"

    //• Flavour text
    "education_news_5" = "Murgh the Munificent, the Metropolitan of Maduro, in the Middle Oceans of Aronar, has been promoted to be the Sectoral Sacerdote for the Church of Giles the Creator. A devotee of fine wines, he is rumoured to have crepuscular connections in the ship-building industry as well as having links to the \"Cuban Cohort\", a mysterious group of musical mayhem-makers. He has for some time been threatening to lead a crusade against the Witchspace Lobster Worshippers. Watch this space!";

    //•Contracts
    "education_news_9" = "Arquebus the Audacious, the master trader, has finally come a cropper! After years of amassing a fortune trading in furs and computers, he took a time-sensitive contract to deliver wodgets to Ceesxe. Forgetting that fewer long jumps take much more time than many more smaller jumps, he arrived several days too late - and lost well over thirty thousand credits as a result! He is rumoured to have sold his ship in disgust and retired to a life of farming trumbles!";

    //• Flavour text
    "education_news_7" = "Archimandrite Ph'i Ku'ub of the Digebitian antipodes has just published a new commentary on the treatise on Theological Arithmetics by Saint Phibo Nacci. Combined with his earlier analysis of the mystical fourth codicil of the Codex of Giles the Creator, Ph'i Ku'ub claims to prove that the ooniverse was designed through random purposefulness, and show the numerical underpinnings of all that exists. Copies of his masterpiece have been selling like hotcakes! But does anybody actually understand it? Truth is, we don't know - and neither does anyone else!";

    //• Cim's changes to safe systems
    "education_news_8" = "Pirates travelling from their home system to raid another are becoming more of a threat. On the one hand, Police vipers at Diso have fought off another incursion of some several dozen pirates from the local anarchies, Uszaa and Reidquat. The President of Diso has appealed to GalCop for more help in stabilising the local region. On the other hand, Ensoreus has been raided by ravenous hordes from Ararus, Zaalela and Xeesle.";

    //• Pirates have ECM
    "education_news_6" = "The number of pirates armed with Electronic Counter Measures is increasing. Arch-Chandler RedSpear of GalCop's weapons research laboratory at Ceesxe has confirmed that more and more pirates are now using ECM in combat: "Do not fire missiles at pirates grouped in clusters of four or more, or you will waste them. At least one of them will be able to destroy your missiles" he told our reporters this morning.";
******
*/

Edited to add
:

The above is not quite accurate. I finally got a broadcast - but as [education_news_0] - it was at my 10th or greater station visit!

latest.log (showing all mentions of Hints):

Code: Select all

    ~/Library/Application Support/Oolite/AddOns/oolite.oxp.cholmondely.Hints.0.094 everything.oxp
    Hints_GNN.js 0.9.4
    Hints_Station_Bar.js 0.0.94
13:13:24.053 [script.javaScript.warning.ooliteDefined] ReportJSError (OOJavaScriptEngine.m:204): ----- JavaScript warning (Hints_GNN.js 0.9.4): Unknown expansion key [education_news_0] in string.
13:13:24.054 [Hints_GNN.js] GlobalLog (OOJSGlobal.m:266): got here3
13:13:24.054 [Hints_GNN.js] GlobalLog (OOJSGlobal.m:266): got here2
descriptions.plist

Code: Select all

{
// This stuff is mostly Cholmondely's, chunks from Redspear, Cody & Avder, singular snippets from Hiran, Switeck, & the mighty Murgh


//Vanilla game advice
"hints_bar_gossip" = 	(
	//Trade	
	"Bulbous batrachian in flight-suit: 'So what did you do after you graduated from Lave?' 
	\n\n{color:redColor} 
	Orange avian with spectacles and cap: 'Well I found a really good milk-run, Isinor to Qutiri. Both full of water - Isinor is liquid, Qutiri is solid. I made so much money I was able to buy up military lasers for both front and rear.' ",
	"'Ensoreus to Ararus is a top notch milk run!' \n\n{color:redColor} 'No, no, Xexedi to Laenin is better - Laenin is much safer than Ararus.",

	"Burly black feline speaking to a young tailed humanoid: 'Flying a cobra? Well, the Cargo Bay Expansion will help you almost double your profits! Just make sure you save up enough money both to buy it - and to fill it once you have bought it!' ",
	
	"You can get some really good deals at Rock Hermits if you can find them. The real mining hermits sell radioactives, minerals, gold, platinum and gems at super discounts. They don’t buy much - just food and drink and occasional bits of machinery, but if you can load up on cheap platinum, you can then offload it later in much better markets.",
	"Buying fuel and equipment at Rock Hermits is jolly expensive - d’ye know they charge three times the going rate?",
	
	"There is just one problem with using docking computers. They can add up to twenty minutes to docking. Usually it doesn't matter, but if you are running a contract, it might just sink you.",
	"I've never really found that those passenger contracts pay all that much. They give you a nice excuse to travel, but cargo contracts usually end up paying much better",
	"Short woman bedecked in sparkling jewellery speaking to a large yellow rodent: 'I got rich doing parcel couriers and adding in the fur-computer swap between rich industrial and poor ag's on the way. One tip though, make sure you have fuel injectors added on, and also use the shortest route mode on the chart to help you plan your route. The reason for that being, ideally, you want at least a third a tank of fuel whenever you jump to a new system in case of an over-the-top ambush. If you do multiple contracts at once you will soon see what I mean.' ",


	"'Have you heard? That Cody chap got paid well over seventy thousand credits for delivering a parcel contract over in Galaxy Seven?' \n\n{color:redColor} 'Yes, but a third of that was a bonus for early fulfilment' \n\n{color:yellowColor} 'It's still a lot of moolah for a small parcel' \n\n{color:redColor} 'But he will have spent years developing the reputation to get those sorts of contracts'",
	"So I took one of those contracted deliveries. Lots of dosh for a long way to go. Blow me if the maintenance bills didn't take almost every penny I'd made... And if I had the maintenance done en-route - which would have been cheaper - I'd have fluffed the contract",
	"If you're flying contracts, time is of the essence. You do know that lots of short hops take less time than the long hops, don't you? Just make sure that your maintenance is up-to-date before you do too many hops though!",

//Equipment
	"The very first thing I did when I got my new Cobra was shift the laser. I moved it from the front to the back. I'm useless at combat, and at least that way I can take pot shots at the pirates while I'm fleeing them.",
	"Large blue insect at a table of other insects: 'Fuel. That stuff's so cheap that even when they're charging triple it's a bargain. Most folks know that it powers their injectors and limits their trade routes but it's also your ticket to get the hell out of trouble. Always a good idea to prep an escape route. Short jumps if you can. It's what you've got left in the tank, not left in the bank that will save you when you're out there.' ",
	"Did you know you can hitch a ride through someone else's wormhole? Gives you much more options when you arrive... Of course, given that you might not know where the hell that is until you get there you might want to use one of them pretty quick too.",
	"If you are going to get maintenance done, go to the highest TL system in the area - the maintenance will last much longer - and does not cost a penny more!",
	"Old Johnny never made it to Zaonce. He left at Lave sure enough but at Zaonce witch-point beacon, no sign of him... Some say it's the (lowers voice) 'Thargoids', say they can pull you right out of witchspace, or into witchspace depending on your point of view... Johnny never was one for keeping his ship maintenance up to date though, or for staying focused once he started a jump sequence...",
	"So when I found my milk-run and started earning serious money, I started spending on my ship. What did I buy? Well, the first most crucial pieces of equipment are either fuel injectors - for avoiding trouble - or an enlarged cargo hold for earning more dosh. Your choice as to which makes more sense.",
	"Bearded chap with a red spear logo on his jump suit: 'Oh sure, injectors are cool and all, a good investment for sure but they wouldn't be my first choice... See, when you've only got one piece of fancy-pantsy equipment on your boat then there's only one thing that's gonna get damaged, right? Repairing it is a good deal cheaper than buying a new one but you might end up wishing you'd invested in something a little more reliable... especially as it's useless when you're out of gas. My choice? A beam laser. Very reliable, a huge upgrade from the pulse and tough as old space boots. I've yet to hear of one breaking down... Just watch your fire kid, that thing shoots so fast you can overheat it before you've landed a single hit. But aim first, get a good bead and it'll soon be paying for itself in bounties.' ",
	"The best way to use a military laser is as a one-shot gun. Wait until the hoodlums are in your sights and fire one shot. then do it again... that way you don't overheat the darned thing.",
	"I found that the Extra Energy Unit made a massive difference when I got nobbled by the pirates. The improved recharge of my shields meant I was able to survive and get away with my cargo intact.",
	"Shields are complicated bits of kit. There are two things you can do to improve them - either increase the rate of recharge, or increase their overall strength. Those Extra Energy Unit does one, the Shield Boosters do the other. And the Military Shield Enhancer does both!",
	"Those naval energy units are really good which is why they are worth a fortune. If you're not in cahoots with the navy, the only way to get one usually is to buy a second-hand ship which already has one... and, boy, do they bump the price up!",
	"Red feline speaking to a larger blue one: 'The Multi-Targeting System only makes sense if you set up your targets in advance, before you get into combat. Otherwise it's just a waste of time and money. All it does is allow you set up different targets for your different missiles. How many people are really going to need something like that?' ",
	"It's also a really good idea to get good at combat against multiple targets at once.  Get the shield boosters and extra energy unit. An ECM unit is mandatory. Once you can afford it, you'll want the military shield boosters as well. When you are targeted and you either don't want to or can't run away, get close to them quickly so they furball around you.  As long as you don't fly straight they have a very hard time hitting you.  Only ever fly straight while you are firing your laser, and only fire when you are 100% on target.",


//Pirate Tactics
	"So you got scragged by the pirates again? You never learn, do you? When you arrive at the Witch-point beacon turn ninety degrees or one-eighty degrees and scarper like billy-oh! Get out of there, and head away from the planet. You might meet the odd pirate or bounty hunter in the nastier systems, but there will be more empty space around and you should be able to flee - you do remember how to use your injectors, no? When you're ten seconds or so away, then turn and head towards the station, but not directly. That way you should easily avoid the pug-uglies. No mass-locks. No pirates. And don't cross the space-lane, whatever you do!",
	"I just arrived at the witch-point and found myself surrounded by some half-dozen pirates. I always carry some spare TC’s of food. I whizzed away from them, dropped a half-dozen and then turned 90 degrees and scrammed again. I got away - and had my the rest of my load of furs which I then off-loaded at the orbital for a good profit.",


//Thargoid Tactics
	"'So what's best? Clobber the Thargoids first - or go after the robot thargons?'\n\n{color:redColor} 'Well, it depends... If you are good enough to polish off the 'goids quickly, then the robots deactivate and you can just scoop them up for a profit. If not, they will be reactivated the moment another 'goid gets close. Oh! ...you usually get more dosh for the thargons in agricultural economies'",
	"If you're gonna ram something, probably not a good idea to ram at injector speeds! Whenever my cargo is full and I come across a 'goid warship and end up with a bunch of unpowered fighters, I've found it's fastest to just ram them at full (non-injector) speed to kill them and pick up the 50 credit bounty. Costs like a few units of shield, which are regenerated within moments. If you ram one while at full injector speed you lose your whole shield, and that's with both the shield boosters and the military shield enhancement!",

//Combat Tactics
	"It’s all done with corkscrews. Move towards them in a corkscrew! Especially if you vary your speed, you’ll find that they can’t draw a bead on you and you can get in real close and then marmalise them.  And if you need to scram, and have the speed, corkscrew!",
	"So there I was, surrounded by pirates. I hit the fuel injectors and whizzed over towards the sun. Only a couple of them were fast enough to follow, and the sun blinded them, so I was able to pick them off with my rear laser - I could see them, but they couldn't see me",
	"Members of hit squads also tend to inject away when they get low on energy. Get good at sniping so you can kill them while they are running away. They'll be back in a minute after they've regenerated otherwise. They're cowards who refuse to meet their end with dignity, and it's entertaining to watch them beg for their lives.",
	"Missiles are a waste of time unless you are only facing one or two opponents. The moment you are in a fight with half a dozen pirates, one of them is bound to have an ECM, and your missiles end up being as useful as confetti.",
	"If you fire a missile when you are right up in front of a pirate, he’ll never have a chance to ECM it - just make sure he doesn’t do the same to you!",
	"As far as missiles, it's up to preference. I've found that either the regular or ECM types realistically have a chance of a kill only against pirates. Against the hit squads, you can expect them to have injectors to outrun your missiles as well as an ECM. The only thing missiles are good for against them is to get them off your back for a while.",
	"You could also start with quirium cascade mines, just make sure you don't launch them with vipers in range or you'll end up a fugitive potentially instantly. All your kills are recorded, remember?",
	"For Giles's sake, whatever you do, don't use a Q-bomb unless you have fuel injectors and enough fuel left to scram! Far too many people get caught by their own Quirium bombs!",
	"Those Quirium cascade bombs are most effective when detonated in an asteroid field. They zap the asteroids which then contribute to the effect. If you explode one in a dense enough asteroid field, then the whole shebang will exceed your scanner range and can last over a minute. Just make sure that you don't get caught in it yourself!",
	"'Get lasers on your port and starboard sides. They come in very handy against ships that show you a generous amount of profile while flying next to you like the fer-de-lance, asp, and both types of cobra.' \n\n{color:redColor} 'But how do I use the wretched things?' \n\n{color:yellow}'Just remember that you will be steering up and down with roll instead of pitch while looking to either side of your ship.'",
	"The best way to use a military laser is as a one-shot gun. Wait until the hoodlums are in your sights and fire one shot. then do it again... that way you don't overheat the darned thing.",
	"So there I was, surrounded by pirates on all sides. I took out my Wheel of Destiny, invoked Saint Giles, kissed my Knucklebones of Negation and threw my throttle into full speed. With a slight corkscrew on my trajectory, I escaped. I've always tithed to the Church ever since.",

//Other advice
	"... anyway, as the jump countdown hit one, some nutter in a Ferdie ran right across my bow. I pulled up hard on the 'stick to avoid the bastard... next thing I know, the bloody klaxon's wailing, and I'm in ghastly glowing green interstellar space surrounded by 'goids!",
	"Young frog to older couple: 'So, Uncle Ferdie, tell me about Rock Hermits! Jerry told me that there two things to remember - that they are usually off the beaten path, but that they are usually massive and can be seen from a distance'  \n{color:greenColor}
	Older frog with gold monocle: 'Well, almost every system has at least one if not several. And they differ. Some sit on one of the space lanes, others not. Some are dangerous to approach - surrounded or guarded by pirates, others are just harmless miners.'  \n{color:yellowColor}
	Young frog: 'My chum Switeck told me that you find them by looking for the movement of a distant point-of-light while whizzing around on torus and then you can initially spot them or other large stations'  \n{color:greenColor}
	Older frog with monocle: 'If you see a ship heading away from the space-lane, it's probably en route to a rock hermit.'  \n{color:redColor}
	Older frog with yellow cap: 'Some folk say they have a secret network, and control the black markets.'  \n{color:yellowColor}
	Young frog: 'Those must be the pirate-infested ones then'  \n{color:redColor}
	Older frog with yellow cap: 'I never heard that, but it seems a good guess...' ",

//Flavour text
	"Success in combat needs a lot of preparation. Personally, I meditate every morning and then take a bubblebath. I find that that makes all the difference.",
	"Have you heard that guy's story about parallel universes connected via a nexus? I mean, which intelligent being would believe there is more than eight galaxies. Eight! What a smeghead!",
	"'Looking for advice? Well, folks are gonna tell you all kinds of stuff but most of it's only half-true.'  \n\n{color:redColor} 'I mean half-true is something, right?...'  \n\n{color:yellowColor} 'What I'm trying to say is when you hear that, 'the best thing for so and so is X', or that, 'you really oughta be doing Y', you might just want to remember what I tell 'em...'  \n\n{color:redColor} 'Yeah, well, you know, that's just, like, your opinion, frog'.",
	"Small green avian: 'Oh Dad, I'm so confused!'
	\n\n{color:greenColor}
	Large green avian: 'You just have to decide what kind of a creature you want to grow up to be, Gork; because whoever that creature is, a trader, a bounty hunter, a cargo contractor, a damn pirate or even a hermit... Just follow your path. This is the way things are. You can't change nature.'
	\n\n{color:yellowColor}
	'But change is nature, Dad. The part that we can influence. And it starts when we decide!'
	\n\n{color:greenColor}
	Scratches head: 'Now you're confusing me, son'",
	"Chap in yellow jump suit with tattoos at table of women: 'Ever been to Digebiti? They are utter nuts over there! Into this wacky sport called extreme dominoes - which are bigger than you are. They sit on balconies telling their staff down below to throw these things at each other... You have to see it to believe it!'",
	"Ceesxe is the leading centre for rejuve. I met a frog who was almost five hundred years old... he'd had five doses and looked as good as you or I. They say that it costs a pretty packet, though.",
	"...they say there is some sort of secret naval base around Xeer. Doing research, new ships and weapons, that sort of thing. I bet you some of their kit has to be pretty good...",
	"My daughter picked me up one of those Tionislan masks. I don't see how they can wear them all the time... they are so uncomfortable",
	"Went to the opera last night. All about a black cat who lived in Qutiri yonks ago. Apparently she had to flee for the hills as all the others were turning themselves yellow! But stuck out like a sore thumb as she was black and the ice and snow were not. The tenor was top-notch...",
	"When I visited Zarece, I was pottering around in one of the markets in a cloud city looking at some pots and minding my own business, when all of a sudden there was a riot! A bunch of lobsters hurtled past with an entire horde of rather fierce felines chasing after them. A lot of screeching, shouting and yelling. Most unseemly!",
	"A decent cup of tea. That's all you need to really succeed at docking. Either a really good Fragrant Broken Orange Pekoe - or a decent tarry Lapsang Souchong.",
	"This beer is utter bilge. I could do with a decent glass of wine. A Rexebian Richebourg or a Gequrian Cannubi.",
	"Smallish green bespectacled rodent at a table of frogs: 'So, I've been reading Saint Phibo Nacci's book on Theological Arithmetics. Have you ever looked at it? It is quite something. There is an entire section analysing the colours of the loincloths of the demons who clobbered Ebortsa! Somehow it ties in with the underlying structure of the galaxy. But don't ask me how!' ",
	"The 'music' is so loud that you can't even hear yourself think, nevermind hear what anybody else has to say!",
	"You are evicted from the bar for not wearing a cravat",
);

"hints_bar_commies" = 
	(
	"SLAPU's have jolly good prices if you want to buy computers, CZGF's have the same for machinery",
	);
	
"hints_bar_dsd" = 
	(
	"I made a fortune selling food and liquors to one of those Deep Space Dredgers.",
	"Alloys are really cheap at Deep Space Dredgers - you can make an excellent profit selling them at agriculturals",
	"Docking with Deep Space Dredgers is rather difficult - they automatically swerve to avoid you! Best to use Docking Computers - or buy and install one of those ILS systems - you know, an Instrument Landing System.",
	);

"hints_Ship's_Library" =
	(
	"You can get the Ship's Manual to appear in an MFD if your HUD supports them. That way you can read it as you fly! You cycle what the current MFD shows with that semicolon key on your astrogation console. Have you ever used it? Oh! And you select which MFD-space you want to use with the colon key",
	);

    //GNN hints (9)

    //• Interview of Chap reaching Elite status and giving manoeuvre he used
    "education_news_1" = "Usge Ceanal has just attained Elite status according to a press release from the Elite Federation. In an interview, Ceanal said that he was an advocate of the Barkanion Bounce (named after the renowned Lave Academician) - swirling in loops towards his opposition whilst varying his speed. This tactic enables a trouble-free approach to one’s targets, and accounted for many hundreds of his kills.";

    //• Rock hermit destroyed in anarchy (a Pirate Cove)
    "education_news_2" = "A pirate-infested Rock Hermit has just been destroyed by a police viper-squad in the rodent-ridden anarchy of Riedquat. A centre for the local slave and narcotics trade, it has finally been shut down, allowing much safer travel in the Old Worlds sector! \"The pirate plague has finally been eliminated\" claimed the courageous Commander Reed Spar of GalCop, \"the Old Worlds are now as safe as a parentally-patrolled paddling pool!\" ";

    //• Pirates nab chap on milk run Ensoreus-Ararus Furs-Computers: turns out to be a millionaire
    "education_news_3" = "Reports are just coming in about Orit Ceedthse, an Ensorean trader was murdered at Ararus yesterday by marauding pirates. It turns out that the feline was phenomenally rich, due to trading in furs and computers between Ensoreus and Ararus. Was she killed for her cargo, her money or for more murky misdemeanours? Truth is, we don’t know!";

    //• Quirium Cascade mishap
    "education_news_4" = "A quirium cascade bomb has been detonated at Qubeen. It caught some 27 ships and a rock hermit as well as the launcher of the bomb, a rodent from nearby Maesin. Inquiries are ongoing into the exact cause of the incident. GalCop is offering handsome rewards for relevant information.";

    //• Flavour text
    "education_news_5" = "Murgh the Munificent, the Metropolitan of Maduro, in the Middle Oceans of Aronar, has been promoted to be the Sectoral Sacerdote for the Church of Giles the Creator. A devotee of fine wines, he is rumoured to have crepuscular connections in the ship-building industry as well as having links to the \"Cuban Cohort\", a mysterious group of musical mayhem-makers. He has for some time been threatening to lead a crusade against the Witchspace Lobster Worshippers. Watch this space!";

    //• Pirates have ECM
    "education_news_6" = "The number of pirates armed with Electronic Counter Measures is increasing. Arch-Chandler RedSpear of GalCop's weapons research laboratory at Ceesxe has confirmed that more and more pirates are now using ECM in combat: \"Do not fire missiles at pirates grouped in clusters of four or more, or you will waste them. At least one of them will be able to destroy your missiles\" he told our reporters this morning.";
    
    //• Flavour text
    "education_news_7" = "Archimandrite Ph'i Ku'ub of the Digebitian antipodes has just published a new commentary on the treatise on Theological Arithmetics by Saint Phibo Nacci. Combined with his earlier analysis of the mystical fourth codicil of the Codex of Giles the Creator, Ph'i Ku'ub claims to prove that the ooniverse was designed through random purposefulness, and show the numerical underpinnings of all that exists. Copies of his masterpiece have been selling like hotcakes! But does anybody actually understand it? Truth is, we don't know - and neither does anyone else!";

    //• Cim's changes to safe systems
    "education_news_8" = "Pirates travelling from their home system to raid another are becoming more of a threat. On the one hand, Police vipers at Diso have fought off another incursion of some several dozen pirates from the local anarchies, Uszaa and Reidquat. The President of Diso has appealed to GalCop for more help in stabilising the local region. On the other hand, Ensoreus has been raided by ravenous hordes from Ararus, Zaalela and Xeesle.";

    //•Contracts
    "education_news_9" = "Arquebus the Audacious, the master trader, has finally come a cropper! After years of amassing a fortune trading in furs and computers, he took a time-sensitive contract to deliver wodgets to Ceesxe. Forgetting that fewer long jumps take much more time than many more smaller jumps, he arrived several days too late - and lost well over thirty thousand credits as a result! He is rumoured to have sold his ship in disgust and retired to a life of farming trumbles!";

}   
Last edited by Cholmondely on Tue May 10, 2022 12:27 pm, edited 3 times in total.
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Education

Post by Cody »

Cholmondely wrote: Tue May 10, 2022 11:45 am
So, I'm a blithering idiot.
No comment!
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
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Education

Post by phkb »

Cholmondely wrote: Tue May 10, 2022 11:45 am
Bar chatter seems to work fine now.
Yay! One down...
Cholmondely wrote: Tue May 10, 2022 11:45 am
I finally got a broadcast - but as [education_news_0] - it was at my 10th or greater station visit!
OK, this one is my fault - a result of sending you non-tested code!
The issue comes down to when the "this.education_last" variable is updated.

These changes should fix it:

Code: Select all

"use strict";
this.name = "Hints_GNN.js";
this.author = "Cholmondely";
this.copyright = "(C) 2022 Littlebear & Phkb";
this.licence = "CC-NC-by-SA 4.0";
this.description = "Code by LittleBear and then Phkb.";
this.version = "0.9.4";

this.education_last = 0; // holds which news item was last published
this.education_max = 9; // hold the maximum number of news items available

this.startUpComplete = function() {
    // check save game for our education_last variable, and read it back in if found
    if (missionVariables.education_last) {
        this.education_last = parseInt(missionVariables.education_last);
    log(this.name, "got here1");
    }
}

this.playerWillSaveGame = function() {
    // make sure our education variable is saved
    missionVariables.education_last = this.education_last;
}

this.shipExitedWitchspace = function() {
    // if we've reach the maximum number of messages, we're done.
    if (this.education_last == this.education_max) return;

    // this is where you'd set up rules to govern how often news items are sent.
    // for the purposes of this exercise, we'll just make it random (1% chance)
    if (Math.random() < 0.01) { 
        var news = new Object;
        news.ID = this.name;
        // increment the education_last variable
        this.education_last += 1;
        // get the appropriate news item, based on the education_last variable.
        news.Message = expandDescription("[education_news_" + this.education_last + "]");
        news.Agency = 2;
        news.Priority = 1;
        this.passScreen(news, 1);
        log(this.name, "got here2");
    }
}

this.passScreen = function (news, mode) {
    var a = worldScripts.GNN._insertNews(news);
        log(this.name, "got here3");
    if (!a) {
        return;
    } else {
        if (a < 0) { // If the buffer was full ...
            if (mode) this.education_last -= 1; // ... revert the education_last variable to the previous setting so we can try again later.
            return;
        }
    }
}

/*

// copy and paste everything between these markers ****** (but not the markers themselves) into descriptions.plist

******
    //• Interview of Chap reaching Elite status and giving manouever he used
    "education_news_1" = "Usge Ceanal has just attained Elite status according to a press release from the Elite Federation. In an interview, Ceanal said that he was an advocate of the Barkanion Bounce (named after the renowned Lave Academician) - swirling in loops towards his opposition whilst varying his speed. This tactic enables a trouble-free approach to one’s targets, and accounted for many hundreds of his kills.";

    //• Rock hermit destroyed in anarchy (a Pirate Cove)
    "education_news_2" = "A pirate-infested Rock Hermit has just been destroyed by a police viper-squad in the rodent-ridden anarchy of Riedquat. A centre for the local slave and narcotics trade, it has finally been shut down, allowing much safer travel in the Old Worlds sector! “The pirate plague has finally been eliminated” claimed the courageous Commander Reed Spar of GalCop, \"the Old Worlds are now as safe as a parentally-patrolled paddling pool!\"";

    //• Pirates nab chap on milk run Ensoreus-Ararus Furs-Computers: turns out to be a millionaire
    "education_news_3" = "Reports are just coming in about Orit Ceedthse, an Ensorean trader was murdered at Ararus yesterday by marauding pirates. It turns out that the feline was phenomenally rich, due to trading in furs and computers between Ensoreus and Ararus. Was she killed for her cargo, her money or for more murky misdemeanours? Truth is, we don’t know!";

    //• Quirium Cascade mishap
    "education_news_4" = "A quirium cascade bomb has been detonated at Qubeen. It caught some 27 ships and a rock hermit as well as the launcher of the bomb, a rodent from nearby Maesin. Inquiries are ongoing into the exact cause of the incident. GalCop is offering handsome rewards for relevant information.";"

    //• Flavour text
    "education_news_5" = "Murgh the Munificent, the Metropolitan of Maduro, in the Middle Oceans of Aronar, has been promoted to be the Sectoral Sacerdote for the Church of Giles the Creator. A devotee of fine wines, he is rumoured to have crepuscular connections in the ship-building industry as well as having links to the \"Cuban Cohort\", a mysterious group of musical mayhem-makers. He has for some time been threatening to lead a crusade against the Witchspace Lobster Worshippers. Watch this space!";

    //•Contracts
    "education_news_9" = "Arquebus the Audacious, the master trader, has finally come a cropper! After years of amassing a fortune trading in furs and computers, he took a time-sensitive contract to deliver wodgets to Ceesxe. Forgetting that fewer long jumps take much more time than many more smaller jumps, he arrived several days too late - and lost well over thirty thousand credits as a result! He is rumoured to have sold his ship in disgust and retired to a life of farming trumbles!";

    //• Flavour text
    "education_news_7" = "Archimandrite Ph'i Ku'ub of the Digebitian antipodes has just published a new commentary on the treatise on Theological Arithmetics by Saint Phibo Nacci. Combined with his earlier analysis of the mystical fourth codicil of the Codex of Giles the Creator, Ph'i Ku'ub claims to prove that the ooniverse was designed through random purposefulness, and show the numerical underpinnings of all that exists. Copies of his masterpiece have been selling like hotcakes! But does anybody actually understand it? Truth is, we don't know - and neither does anyone else!";

    //• Cim's changes to safe systems
    "education_news_8" = "Pirates travelling from their home system to raid another are becoming more of a threat. On the one hand, Police vipers at Diso have fought off another incursion of some several dozen pirates from the local anarchies, Uszaa and Reidquat. The President of Diso has appealed to GalCop for more help in stabilising the local region. On the other hand, Ensoreus has been raided by ravenous hordes from Ararus, Zaalela and Xeesle.";

    //• Pirates have ECM
    "education_news_6" = "The number of pirates armed with Electronic Counter Measures is increasing. Arch-Chandler RedSpear of GalCop's weapons research laboratory at Ceesxe has confirmed that more and more pirates are now using ECM in combat: "Do not fire missiles at pirates grouped in clusters of four or more, or you will waste them. At least one of them will be able to destroy your missiles" he told our reporters this morning.";
******
*/
Cholmondely wrote: Tue May 10, 2022 11:45 am
it was at my 10th or greater station visit!
Change the Math.random() < 0.01 to a higher percentage to increase the chances of getting a broadcast. While testing, you might want to change the number to 1.0 so that it is a guaranteed chance you will get a broadcast in a new system.
User avatar
Cholmondely
Archivist
Archivist
Posts: 5365
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Hints OXZ (Development Thread)

Post by Cholmondely »

Call for help!

I'm now working on hints for OXP's.

So far I have the following:
Commies.oxp
1) Young woman: "I visited one of those communist systems. There was an Astro-gulag with convict labourers, but I couldn't find any Rock Hermits.
Feline in goggles: No, there are usually Rock Hermits too, it's just that their beacons are not as distinctive as the Astro-gulags
Woman: So what's the deal with the convict labourers?
Feline: Nasty. They work in Mining Pods and Scavenger Rays. The Pods are just a laser with an engine and a pilot's seat. Half a day of oxygen to stop them running. The heat from the laser warms up the pilots, so they have to fire it often to survive - which makes them visible to the Thought Police. The Scavenger Rays scoop up the splinters, but are ultra-slow and big. It's virtually impossible to escape in either, and many die in what seem to be pre-arranged accidents.",

2) "Those communist systems have factories built right in the sun's corona to harvest the energy.
Are they worth visiting?
Well, there are two sorts. SLAPU's in the more advanced systems, CZGF's in the poorer ones. SLAPU's have jolly good prices if you want to buy computers, CZGF's have the same for machinery",

Deep Space Dredgers.oxp
1) "I made a fortune selling food and liquors to one of those Deep Space Dredgers.",

2) "Alloys are really cheap at Deep Space Dredgers - you can make an excellent profit selling them at agriculturals",

3) "Docking with Deep Space Dredgers is rather difficult - they automatically swerve to avoid you! Best to use Docking Computers - or buy and install one of those ILS systems - you know, an Instrument Landing System.",

4) "You sometimes find several Dredgers in a rough line - if you find two of them, you can extrapolate the line to locate the rest"

Ship's Library.oxp
1) "Elderly green rodent: "You can get your Ship's Manual to appear in an MFD if your HUD supports them. That way you can read it as you fly!
Young lobster: Really? How do these MFD's work? I missed the class at Lave Academy...
Rodent: It's all done via your astrogation console. You cycle what your current MFD shows - even if it is currently blank - with that semicolon key on the console. If you have several MFD's available, that's how you choose between them.
Lobster: But what if I have more than one MFD slot on my viewscreen?
Rodent: Very simple. You select which MFD-space you want to use with the colon key
Lobster: So it's just those two keys then? The colon and the semi-colon?
Rodent: Well, if you add in the control key with either of your colons, then you can also cycle backwards!",

2) "That Ship's Manual is intelligent! If you've changed the keys on your astrogation console, it picks up on that and gives you your new keys instead!",

3) "It's best to read the Ship's Manual when docked! That way you get to see the diagrammes, which don't show in the MFD version"
Can you add anything?

(just bar talk, so far, but possibly to include GNN broadcasts too, if Phkb is amenable and if there are good enough press releases!)
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
Post Reply