Hints OXZ (Development Thread)

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

Moderators: another_commander, winston

User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 15385
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Education

Post by Cody »

"... 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 interstellar space surrounded by gooks!"
Overall, there is a smell of fried onions!
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 1989
Joined: Thu Jun 20, 2013 10:22 pm

Re: Education

Post by Redspear »

Cody wrote: Wed Jan 19, 2022 7:36 pm "... 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 interstellar space surrounded by gooks!"
Might want to reconsider the 'G-word' there Cody, and whether or not it's the best one for purpose.
Intent <> interpretation I know but still...
"With our thoughts, we make the world" :-) - - - Game too slow for you? Masslock Compensators - - - Trouble getting out of trouble? Indestructible Injectors
User avatar
Cholmondely
Wiki Wizard
Wiki Wizard
Posts: 2882
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of Her Most Britannic Majesty (currently plague-ridden)
Contact:

Re: Education

Post by Cholmondely »

spara wrote: Wed Jan 19, 2022 7:13 pm
Cholmondely wrote: Wed Jan 19, 2022 5:19 pm Is it feasible to detect what oxp's are being used and add in relevant tips which only show up then?
Sure it feasible. You can easily check for the presence of an oxp and act accordingly. I would start with general gossip first though. I would create a list of converstations to the descriptions.plist and let the game randomly expand from those. If needed, I'll provide some example code for you.
Thanks! That's a relief. I think that advice for some of those oxp's is possibly even more important than advice for the Vanilla Game.

Currently researching the threads to work out how to add the bar picture and the text from the plist. I'm hoping that I can find the first in phkb/Littlebear's advice for expanding LongWay and that I can puzzle out the second from Death Comms.

I'll also want to eventually offer a selection of drinks and bar snacks for sale - I suppose that Murgh and Cody are our elite epicurean experts! But first things first!
Denizen of the Dark and Dismal Deserts of Digebiti.

Milo wrote Dancing the Gavotte

Oolite BB Topic icons guide
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 15385
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Education

Post by Cody »

Redspear wrote: Wed Jan 19, 2022 7:49 pmMight want to reconsider the 'G-word' there Cody
An interesting point - and I'm fully aware of the word's origins - but we're in a no-nonsense spacers bar way in the future.
Make it "bugs" if you (or Cholly) prefer, but that's probably just as offensive to other critters.
Overall, there is a smell of fried onions!
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 1989
Joined: Thu Jun 20, 2013 10:22 pm

Re: Education

Post by Redspear »

Cody wrote: Wed Jan 19, 2022 8:00 pm but we're in a no-nonsense spacers bar way in the future.
Make it "bugs" if you (or Cholly) prefer, but that's probably just as offensive to other critters.
I think it's totally realistic that someone might use it (and worse) and that's why I phrased as I did regards 'purpose'.

Tips for beginners should perhaps be of the more collectively welcoming variety and so is it worth the risk?... you know, as we discuss piracy, slave-trading, gun-running, drug-smuggling and bounty hunting :D
"With our thoughts, we make the world" :-) - - - Game too slow for you? Masslock Compensators - - - Trouble getting out of trouble? Indestructible Injectors
User avatar
Cholmondely
Wiki Wizard
Wiki Wizard
Posts: 2882
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of Her Most Britannic Majesty (currently plague-ridden)
Contact:

Re: Education

Post by Cholmondely »

spara wrote: Wed Jan 19, 2022 4:47 pm ...To make the function actually do something, try this:

Code: Select all

this.showBar = function() {
	mission.runScreen({
		title: "The Local Bar",
		screenID:"show_bar",
		message: "foo"
	})
}
When you get that working, link it to the description.plist by altering that "foo" there. Oh, and to make bug-fixing and tweaking a bit faster, you might want to add this.startUpComplete as an extra event for adding the interface. Just change the first function to this:

Code: Select all

this.startUpComplete = this.shipDockedWithStation = function(station) {
...
The first couple of tweaks (foo-ing and this.startUpComplete) worked fine - and doing them one by one and checking each time was educational.

Inital abject failure:

So I then tried this (copying Phkb's DeathComms - or so I thought!)

Code: Select all

this.showBar = function() {
mission.runScreen({
title: "The Local Bar",
screenID:"show_bar",
//var text = expandDescription("[education_bar_gossip]");
message: expandDescription("[education_bar_gossip]");
and got nothing on the F4 screen again... and also this (censorious snippets from Latest.Log)

Code: Select all

    ~/Library/Application Support/Oolite/AddOns/Education.1.1.oxp

20:04:34.158 [script.javaScript.exception.curlyAfterList] ReportJSError (OOJavaScriptEngine.m:204): 

***** JavaScript exception (Education_Station_Bar.js.anon-script): SyntaxError: missing } after property list

20:04:34.158 [script.javaScript.load.failed] -[OOJSScript initWithPath:properties:] (OOJSScript.m:267): ***** Error loading JavaScript script /Users/accountname/Library/Application Support/Oolite/AddOns/Education.1.1.oxp/Scripts/Education_Station_Bar.js -- compilation failed


20:04:34.158 [script.load.notFound] +[OOScript scriptsFromFileNamed:] (OOScript.m:137): ***** ERROR: Could not find script file Education_Station_Bar.js.
I dug around in OOJavaScriptEngine.m (thanks, Hiran!) where line 204 reads:

Code: Select all

OOLog(messageClass, @"%@ JavaScript %@ (%@): %@", highlight, severity, activeScript, messageText);
The context is this (lines 197-208):

Code: Select all

		// First line: problem description
		// avoid windows DEP exceptions!
		OOJSScript *thisScript = [[OOJSScript currentlyRunningScript] weakRetain];
		activeScript = [[thisScript weakRefUnderlyingObject] displayName];
		[thisScript release];
		
		if (activeScript == nil)  activeScript = @"<unidentified script>";
		OOLog(messageClass, @"%@ JavaScript %@ (%@): %@", highlight, severity, activeScript, messageText);
		
		if (showLocation && sErrorHandlerStackSkip == 0 && report->filename != NULL)
		{
			// Second line: where error occured, and line if provided. (The line is only provided for compile-time errors, not run-time errors.)
Incidentally, Littlebear's suggestion above was this:

Code: Select all

	{

	"education_bar_gossip" =
	(
	"gubbins",
	);

	}
Phkb's Death Comms has this:

Code: Select all

{
	deathcomms_message = (
		"Aieeee!",
			);
}
		
Note the mystically missing quotation marks!

Is that because Phkb's snippets are hoicked out of his descriptions.plist to appear on the viewscreen, while LittleBear's appear on a mission screen?
Denizen of the Dark and Dismal Deserts of Digebiti.

Milo wrote Dancing the Gavotte

Oolite BB Topic icons guide
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2662
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: Education

Post by spara »

Almost there :D Correct this

Code: Select all

message: expandDescription("[education_bar_gossip]");
to this

Code: Select all

message: expandDescription("[education_bar_gossip]")
and it should work as intended.
User avatar
Cholmondely
Wiki Wizard
Wiki Wizard
Posts: 2882
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of Her Most Britannic Majesty (currently plague-ridden)
Contact:

Re: Education

Post by Cholmondely »

spara wrote: Wed Jan 19, 2022 8:54 pm Almost there :D Correct this

Code: Select all

message: expandDescription("[education_bar_gossip]");
to this

Code: Select all

message: expandDescription("[education_bar_gossip]")
and it should work as intended.

Ha! Haha! :mrgreen: The WitchSpace Lobster is in Mac-marmalising-mode again...

Code: Select all

   ~/Library/Application Support/Oolite/AddOns/Education.1.1.oxp
   
22:49:36.008 [script.javaScript.exception.curlyAfterList] ReportJSError (OOJavaScriptEngine.m:204): ***** JavaScript exception (Education_Station_Bar.js.anon-script): SyntaxError: missing } after property list

22:49:36.008 [script.javaScript.load.failed] -[OOJSScript initWithPath:properties:] (OOJSScript.m:267): ***** Error loading JavaScript script /Users/accountname/Library/Application Support/Oolite/AddOns/Education.1.1.oxp/Scripts/Education_Station_Bar.js -- compilation failed

22:49:36.008 [script.load.notFound] +[OOScript scriptsFromFileNamed:] (OOScript.m:137): ***** ERROR: Could not find script file Education_Station_Bar.js.
From

Code: Select all

this.name           = "Education_Station_Bar.js";
this.author         = "Cholmondely";
this.copyright      = "(C) 2022 Cholmondely";
this.licence        = "CC-NC-by-SA 4.0";
this.description    = "This OXP does nothing at all yet.";
this.version        = "0.1.1";

"use strict";

// Having a "Visit the Station Bar" on the F4 Screen might be a way to go for that. This script would let you give a randomly picked item each time. Although you might want to also add a timer so the messages change over time. You could also add tests for Government type, economy or station type so different items are overheard in different systems types and station types.

// Set Up your F4 Screen Option Like this:-

this.startUpComplete = this.shipDockedWithStation = function(station) {
this.barinterface();
}
this.removebar = this.shipWillLaunchFromStation = function() {
player.ship.dockedStation.setInterface("bar_chatter",null);
}

//  Now Add your Visit the Bar Interface like this:- 

this.barinterface = function() {	
player.ship.dockedStation.setInterface("bar_chatter",{
title: "Visit the Station Bar",
category: "Activity",
summary: "Useful gossip can sometimes be overheard in the Bar",
callback: this.showBar.bind(this)});	
};

// Now add this code so that when the Visit the Bar Option is selected Oolite will randomly pick one of the messages you have set up in descriptions. 

this.showBar = function() {
mission.runScreen({
title: "The Local Bar",
screenID:"show_bar",
message: expandDescription("[education_bar_gossip]")
background: "litf_bg_localbar.png", //This adds the bar image behind the message
	})
}

And as before, Nada! not even a Knackwürste! Nothing!
But "foo" worked just fine.

It's rather like summoning demons, what? The recipes in Finland using windows are obviously quite different from the English apple-based versions... I obviously need to get out more and visit the shrine to the WSL.
Denizen of the Dark and Dismal Deserts of Digebiti.

Milo wrote Dancing the Gavotte

Oolite BB Topic icons guide
User avatar
Cholmondely
Wiki Wizard
Wiki Wizard
Posts: 2882
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of Her Most Britannic Majesty (currently plague-ridden)
Contact:

Re: Education

Post by Cholmondely »

The following have been added to the descriptions.plist:
hiran wrote: Tue Jan 18, 2022 8:37 pm 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!
Redspear wrote: Tue Jan 18, 2022 9:44 pm "Looking for advice? Well, folks are gonna tell you all kinds of stuff but most of it's only half-true. I mean half-true is something, right?... 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... 'Yeah, well, you know, that's just, like, your opinion, frog'."
I'm presuming it is just the one monologue - or is the last comment ( 'Yeah, well, you know, that's just, like, your opinion, frog') the second conversant?
Old Murgh wrote: Wed Jan 19, 2022 4:12 pm "Oh Dad, I'm so confused!"
"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."
" But change is nature, Dad. The part that we can influence. And it starts when we decide!”
"Now you're confusing me, son".
Redspear wrote: Wed Jan 19, 2022 6:56 pm "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."

"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."
Redspear wrote: Wed Jan 19, 2022 7:23 pm "Old Johnny never made it to Zaonce. He left at Lave sure enough but at Zaonce witchpoint 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..."
Cody wrote: Wed Jan 19, 2022 7:36 pm "... 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 gooks!"
Denizen of the Dark and Dismal Deserts of Digebiti.

Milo wrote Dancing the Gavotte

Oolite BB Topic icons guide
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 1989
Joined: Thu Jun 20, 2013 10:22 pm

Re: Education

Post by Redspear »

Cholmondely wrote: Thu Jan 20, 2022 12:12 am I'm presuming it is just the one monologue - or is the last comment ( 'Yeah, well, you know, that's just, like, your opinion, frog') the second conversant?
You presume correctly.

My second post on the other hand (as you may have surmised) was meant to be three seperate remarks from seperate conversations.


Re the 'G-word' however, having thought about it some more. I really think we should lose it.

It's bound to personally upset someone sooner or later and I don't think it was crucial to the flavour of Cody's post (he himself suggested an alternative). It's meant to be offensive/derisory but not to a real-world 'racial' group(s), right? So surely there's a substitute word we can use, be it bugs, 'goids or even just #@%&$!.

I'm aware that vermin-like references have particular historical sensitivities too but at least they tend to be more universal (similar to the concept of 'barbarian' more than the word's actual origin) and rarely be the actual word 'bugs'. We don't even have to use such a word anyway, so we could avoid that problem altogether.

I appreciate that no one's calling me (or anyone else) anything in particular here but that's not always how self-perception works is it?
Young kids especially are often exploring their sense of identity in a particularly self-conscious and vulnerable period of their lives. And I hear that some of them are also rather fond of computer games too...

I could be completely overreacting here but I think it's really important to ask this question: Is it worth the risk?
Need more suggestions? Ask me, I expect I can come up with at least a dozen.

Friendliest board this side of Riedquat?

This is an unsavoury incident waiting to happen IMHO and, even worse, we might never get to hear of it.
"With our thoughts, we make the world" :-) - - - Game too slow for you? Masslock Compensators - - - Trouble getting out of trouble? Indestructible Injectors
User avatar
Old Murgh
Wiki Wizard
Wiki Wizard
Posts: 331
Joined: Sat Dec 04, 2021 11:01 pm

Re: Education

Post by Old Murgh »

Cholmondely wrote: Thu Jan 20, 2022 12:12 am
Cody wrote: Wed Jan 19, 2022 7:36 pm "... 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 gooks!"
Good stuff. But may I second the suggestion to alter "gooks", to frooks or snooks or something (but I quite like "snooks"), so as not to have the character seem like a resentful Vietnam War veteran? Some cinema stereotype associations are just too hard to uncouple.

[edit]I wrote before Redspears simultaneous post and would add that I second those sentiments too. Let's not do that and just be more creative.
I was young, I was naïve. [EliteWiki] Jonny Cuba made me do it!
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 1989
Joined: Thu Jun 20, 2013 10:22 pm

Re: Education

Post by Redspear »

Old Murgh wrote: Thu Jan 20, 2022 1:27 am I quite like "snooks"
Frantically searches the word 'snooks' for possible offence :wink:
"With our thoughts, we make the world" :-) - - - Game too slow for you? Masslock Compensators - - - Trouble getting out of trouble? Indestructible Injectors
User avatar
Old Murgh
Wiki Wizard
Wiki Wizard
Posts: 331
Joined: Sat Dec 04, 2021 11:01 pm

Re: Education

Post by Old Murgh »

Redspear wrote: Thu Jan 20, 2022 1:37 am
Old Murgh wrote: Thu Jan 20, 2022 1:27 am I quite like "snooks"
Frantically searches the word 'snooks' for possible offence :wink:
:D
You might inevitably dig up something in the end but it should be rather innocuous. I guess there is the yiddish use of schnook meaning a stupid or unimportant person, but from my own language Norwegian I associate it with the colubrid family of snakes, but a word we use generically to mean any boring old snake, but also an inappropriately nosy person, or a childish word for stalker.

Now, we do spell it snok, but pronounce it snook. It's the same in Swedish (at least the snake bit) but the Danes say snog.

In this reptile-fixated universe, it could be our frak. :wink:
I was young, I was naïve. [EliteWiki] Jonny Cuba made me do it!
User avatar
phkb
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3278
Joined: Tue Jan 21, 2014 10:37 pm
Location: Between SDL and a hard place…

Re: Education

Post by phkb »

Cholmondely wrote: Wed Jan 19, 2022 11:05 pm And as before, Nada! not even a Knackwürste! Nothing!
But "foo" worked just fine.
Based on your githib repository, the "descriptions.plist" file should be inside the "Config" folder, not at the root level.
hiran
---- E L I T E ----
---- E L I T E ----
Posts: 853
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Education

Post by hiran »

You might want to add some drawn-out jokes so there are more conversations that can be overheard but not all of them transport 'wisdom'. ;-)
I have not failed. I've just found 10,000 ways that won't work. [Thomas Edison]
Post Reply