Page 1 of 1
Galactic News Network - Personalised news
Posted: Sun Aug 03, 2014 4:25 am
by ffutures
Something that might be fun for the Galactic News Network - maybe an occasional story that mentions the captain or ship by name, e.g.
"In local news, notorious outlaws xxxx and yyyy were today captured by the Boa Cruiser Kiki's Delivery Service under Captain Rowland (Elite)."
"The Anaconda 'Rust Bucket' was today destroyed by a pirate attack; fortunately its captain was rescued by the Boa Cruiser Kiki's Delivery Service under Captain Rowland (Elite)."
"An urgent GalCop announcement - Be on the lookout for Boa Cruiser Kiki's Delivery Service, which has been declared fugitive. Notorious Captain Rowland (Elite) is quoted as saying 'It wasn't me, it was a one-armed space pirate!' before fleeing the scene"
Obviously you wouldn't want to do this too often, but just once in a while might be fun.
Re: Galactic News Network - Personalised news
Posted: Sun Aug 03, 2014 4:55 am
by mossfoot
ffutures wrote:Something that might be fun for the Galactic News Network - maybe an occasional story that mentions the captain or ship by name, e.g.
"In local news, notorious outlaws xxxx and yyyy were today captured by the Boa Cruiser Kiki's Delivery Service under Captain Rowland (Elite)."
"The Anaconda 'Rust Bucket' was today destroyed by a pirate attack; fortunately its captain was rescued by the Boa Cruiser Kiki's Delivery Service under Captain Rowland (Elite)."
"An urgent GalCop announcement - Be on the lookout for Boa Cruiser Kiki's Delivery Service, which has been declared fugitive. Notorious Captain Rowland (Elite) is quoted as saying 'It wasn't me, it was a one-armed space pirate!' before fleeing the scene"
Obviously you wouldn't want to do this too often, but just once in a while might be fun.
I like it!
Re: Galactic News Network - Personalised news
Posted: Sun Aug 03, 2014 6:33 am
by Switeck
Fame and Infamy -- because you want to be remembered as more than just a number.
Return to a system, regain most of your old bounty that you "acquired" there.
Be a hero of a system, maybe there's some minor benefits?
Re: Galactic News Network - Personalised news
Posted: Sun Aug 03, 2014 3:52 pm
by Tricky
A sample piece of code that can be used in your worldscript. Obviously more work needs to be done to use it.
Code: Select all
this.startUp() = function() {
/* Set true for some logging. */
this.$logging = false;
if (missionVariables.your_oxp_snoopers_news) {
/* Retrieve the snoopers news variable and parse it. */
this.$newsForSnoopers = JSON.parse(missionVariables.your_oxp_snoopers_news);
} else {
this.$newsForSnoopers = {};
}
};
/* NAME
* playerWillSaveGame
*
* FUNCTION
* Player is about to save the game.
*/
this.playerWillSaveGame = function () {
/* Stringify the snoopers news variable and store it. */
missionVariables.your_oxp_snoopers_news = JSON.stringify(this.$newsForSnoopers);
};
/* NAME
* $sendNewsToSnoopers
*
* FUNCTION
* Send news to Snoopers (if available).
*
* INPUTS
* message - news to show
* agency - agency to use (optional)
*/
this.$sendNewsToSnoopers = function (message, agency) {
var news = {},
result;
if (!worldScripts.snoopers) {
/* Snoopers not installed. */
return;
}
if (!agency || typeof agency !== "number") {
/* Random agency. [1, 2 or 3] */
agency = Math.floor(Math.random() * 3.0) + 1;
}
news.ID = this.name;
news.Message = message;
news.Agency = agency;
/* Snoopers Documentation on the wiki has a list describing what the result number means.
* http://wiki.alioth.net/index.php/Snoopers_Doc#Errorcodes
*/
result = worldScripts.snoopers.insertNews(news);
if (result < 0) {
/* Save for later. Snoopers only allows one news item at a time. */
this.$newsForSnoopers.push(news);
if (this.$logging) {
log(this.name, "$sendNewsToSnoopers::Saving news for later.\n" +
"* ID: '" + this.name + "'\n" +
"* Message: '" + message + "'\n" +
"* Agency: " + agency + "\n" +
"* result: " + result);
} else if (result > 0) {
/* Problem. */
log(this.name, "$sendNewsToSnoopers::Problem with news.\n" +
"* ID: '" + this.name + "'\n" +
"* Message: '" + message + "'\n" +
"* Agency: " + agency + "\n" +
"* result: " + result);
} else {
/* News inserted. */
if (this.$logging) {
log(this.name, "$sendNewsToSnoopers::News inserted.\n" +
"* ID: '" + this.name + "'\n" +
"* Message: '" + message + "'\n" +
"* Agency: " + agency + "\n" +
"* result: " + result);
}
}
};
/* NAME
* newsDisplayed
*
* FUNCTION
* Called by Snoopers when the news item has been displayed.
* Check for any more news available and send it.
*/
this.newsDisplayed = function () {
var news = this.$newsForSnoopers.shift();
if (news) {
/* More news available. Send it to Snoopers. */
this.$sendNewsToSnoopers(news.Message, news.Agency);
}
};
Re: Galactic News Network - Personalised news
Posted: Sun Aug 03, 2014 5:58 pm
by ffutures
So far as I can understand it that looks good, but I wouldn't like to try to make it work, I'm rubbish at that sort of thing. A few suggestions on things that might trigger a report occasionally - but not every time they happen:
Capture 2 or more pirates in a single flight
Rescue someone
Go from clean to fugitive (offender is a bit too common, I think)
Set a long-distance "record" for continuous flights without docking (could be triggered in the same way as Witchspace Sickness)
And of course various crimes such as Q-bombing clean ships or a station.
Re: Galactic News Network - Personalised news
Posted: Sun Aug 03, 2014 6:36 pm
by mossfoot
ffutures wrote:So far as I can understand it that looks good, but I wouldn't like to try to make it work, I'm rubbish at that sort of thing. A few suggestions on things that might trigger a report occasionally - but not every time they happen:
Capture 2 or more pirates in a single flight
Rescue someone
Go from clean to fugitive (offender is a bit too common, I think)
Set a long-distance "record" for continuous flights without docking (could be triggered in the same way as Witchspace Sickness)
And of course various crimes such as Q-bombing clean ships or a station.
Certain things should happen every time, though (or at least more frequently). For example, capturing a pirate worth 500 credits or more.
And Q-bombing a station would always be news worthy.
Re: Galactic News Network - Personalised news
Posted: Sun Aug 03, 2014 7:35 pm
by Neelix
mossfoot wrote:And Q-bombing a station would always be news worthy.
Not that that actually accomplishes much... I was messing around with the debug console and triggered a cascade explosion in a ship which had just launched. When it was all over all the local traffic and the nav beacon were gone, but the main station was still spinning in place, completely unscathed.
- Neelix
Re: Galactic News Network - Personalised news
Posted: Sun Aug 03, 2014 8:41 pm
by mossfoot
Oh, of course. Indestructible. Forgot
Re: Galactic News Network - Personalised news
Posted: Mon Aug 04, 2014 5:02 pm
by ffutures
Unless hit by a giant meteor, of course...