Oolite Bulletins

For information and discussion about Oolite.
It is currently Tue Nov 21, 2017 6:18 am

All times are UTC




Post new topic  Reply to topic  [ 171 posts ]  Go to page 1 2 3 4 512 Next
Author Message
 Post subject: Email System (Release)
PostPosted: Sun Jan 25, 2015 3:53 am 
Offline
Commodore
Commodore
User avatar

Joined: Tue Jan 21, 2014 10:37 pm
Posts: 1804
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...
For a long time Oolite players have been receiving mission screens that array themselves as an email message. This makes sense in-game, as you would imagine a lot of communication between the player and NPC's in the game world would take place inside the bounds of an email system. However, while the conceit of an email system has been present, many other aspects of a true email system are lacking. In particular:
  1. The ability to re-read emails after you receive them
  2. The ability to analyse the trace of an email (ie, the path the email took to reach the player).
The Email System OXP attempts to address these shortcomings and provide (as much as possible) a true, in-game email system.

You can download version 1.7.1 here: https://app.box.com/s/jb3rzelnmao1xroh9rb2jhjr8esnhk06
To install, unzip the OXP to your AddOns folder.
You can download an OXZ version here: https://app.box.com/s/hzzcwz0mzvst41h3p5q90250xihdw3aj
Save this file directly into your AddOns folder.

You can also download this via the Expansion Manager.

Click here to visit the wiki page.

The readme file in the OXP package has all the details about how to use the system.

As part of the system, the player will start receiving emails from GALCOP and other entities, confirming actions that have taken place.

In 1.80, the player will receive email confirmations for the following events:
  • docking without clearance
  • bounty payments
  • fine payments
In 1.81, the player will also receive email confirmations for the following events:
  • starting and completing contracts (cargo, passenger and parcel)
  • rescuing escape pods
(If you have any suggestions for other game event that could be covered in the same way, please let me know!)

Here are some screenshots of the system in game:
Image
Image
Image
Image
Image

The OXP has a readme which includes examples on how to make use of the email system in other OXP's. For a simple example:
Code:
w = worldScripts.EmailSystem;
w.$createEmail({sender:"Captain Solo",					// senders name or email address
	subject:"I've got a bad feeling about this",		// subject line
	date:global.clock.seconds,				// the time the email was sent
	message:"I thought they smelled bad on the outside."	// body text of the email
);
Included in the OXP package is a simple mission OXP that demonstrates how to make use of the email system for mission OXP's. There are examples of how to ask the player for responses, using the trace system, and forcing the player to response when an email is opened.

Comments welcome!

_________________
My OXP's


Last edited by phkb on Fri Nov 04, 2016 2:38 am, edited 16 times in total.

Top
   
 Post subject: Re: Email System (Beta)
PostPosted: Sun Jan 25, 2015 9:07 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sat Jun 11, 2011 6:07 am
Posts: 2161
Location: Western Australia
I'm hostile to the idea of having to faff about buying what I perceive to be a pointless EQ, rather than download an OXP and have it just work. I feel the same about all the MFD OXPs out there. Is there a technical reason for that choice?

There's some unnecessary bloat in the JS. Which is an opportunity to trim fat without affecting function, so that's good.

The interface functions need a re-think. When adding a message, send the whole message as a single object parameter, rather than individual parameters? Definitely store the galaxy numbers with system IDs - not all players agree with the idea that a galactic jump is a Big Deal that's makes everything reset., and in 1.81 sysInfo from other charts is no longer verboten.


Top
   
 Post subject: Re: Email System (Beta)
PostPosted: Sun Jan 25, 2015 9:15 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Wed Aug 15, 2012 4:19 am
Posts: 2469
Location: Finland
Quote:
I'm hostile to the idea of having to faff about buying what I perceive to be a pointless EQ, rather than download an OXP and have it just work. I feel the same about all the MFD OXPs out there.
It's more or less a money sink type of design choice.


Top
   
 Post subject: Re: Email System (Beta)
PostPosted: Sun Jan 25, 2015 9:32 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sat Jun 11, 2011 6:07 am
Posts: 2161
Location: Western Australia
Quote:
Quote:
I'm hostile to the idea of having to faff about buying what I perceive to be a pointless EQ, rather than download an OXP and have it just work. I feel the same about all the MFD OXPs out there.
It's more or less a money sink type of design choice.
I know, but it doesn't cost enough - and is usually only one off - to accomplish that. Meanwhile the JS functions that use the EQ array are some of the slowest and should be avoided if possible. And in-game it just seems lame, although interstellar email is more believable than MFDs as something that could be charged for, I suppose.


Top
   
 Post subject: Re: Email System (Beta)
PostPosted: Sun Jan 25, 2015 12:57 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Mon May 20, 2013 9:53 pm
Posts: 2424
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Nice idea imho, I would like to write emails also. :)
The textEntry field of runScreen can get what the player type into a subject and a body line. This would be good for making notes for myself or post my tales to a friend. Moreover with future OXP improvements player could ask for jobs and reply an "ok" when accept an offer, or order something from the customer support of an equipment, etc.

_________________
OXPs by Norby


Top
   
 Post subject: Re: Email System (Beta)
PostPosted: Sun Jan 25, 2015 2:25 pm 
Offline
Commodore
Commodore
User avatar

Joined: Tue Jan 21, 2014 10:37 pm
Posts: 1804
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...
Quote:
Is there a technical reason for that choice?
Not really, other than I had observed many other OXP's doing the same thing and came to the conclusion that this was the way to do it. I wasn't intending it as a money-sink. The purchase cost was a token, because I thought this was the right way of doing it.
Quote:
There's some unnecessary bloat in the JS.
OK, I'll take another look.
Quote:
Definitely store the galaxy numbers with system IDs
Good point. On the list for the next version.
Quote:
send the whole message as a single object parameter, rather than individual parameters
Does sending an object rather than parameters make a difference in performance, or in usability? In my experience I prefer having a defined list of parameters in the function call, but if there is greater preference is for passing objects I can certainly change it.
Quote:
The textEntry field of runScreen can get what the player type into a subject and a body line.
I'll have a play around with this and see what I can come up with.

_________________
My OXP's


Top
   
 Post subject: Re: Email System (Beta)
PostPosted: Sun Jan 25, 2015 2:35 pm 
Offline
Jedi Spam Assassin
Jedi Spam Assassin
User avatar

Joined: Thu Jul 12, 2007 10:54 pm
Posts: 5857
Location: Carter's Snort
Quote:
If you have any suggestions for other game event that could be covered in the same way, please let me know!
Mission text from the built-in missions (Constrictor, Thargoid Plans, etc.)? The occasional piece of Trumble-related spam? :)

_________________
Oofiction: Calliope: a Captain Hesperus adventure | Stranglehold: a Captain Hesperus adventure | Local Midnight in the Vacuum Bar | A Farewell to Arms, Legs, etc.: the Blaze O'Glory Story


Top
   
 Post subject: Re: Email System (Beta)
PostPosted: Sun Jan 25, 2015 2:49 pm 
Offline
Commodore
Commodore
User avatar

Joined: Tue Jan 21, 2014 10:37 pm
Posts: 1804
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...
Quote:
Mission text from the built-in missions
I'd like to pick up all the mission screen text, particularly the ones you mentioned, but I'm not sure how to hook into a running mission screen and pull down all the text being displayed. If there is a way to do this, and someone can point me in the right direction, I'll certainly give it a go.

_________________
My OXP's


Top
   
 Post subject: Re: Email System (Beta)
PostPosted: Sun Jan 25, 2015 2:54 pm 
Offline
Commodore
Commodore
User avatar

Joined: Tue Jan 21, 2014 10:37 pm
Posts: 1804
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...
Quote:
The occasional piece of Trumble-related spam
I was actually thinking of adding a "spam" OXP, which would send you emails in each system, based on the economy type/govenment type, but decided against it (for the moment) mainly because I'd expect that by the time the game is set in, there would be no spam! But maybe that's putting too much faith in the ability of software engineers to eradicate the problem, or too little faith in spammers' ability to get around the problem. :wink:

_________________
My OXP's


Top
   
 Post subject: Re: Email System (Beta)
PostPosted: Mon Jan 26, 2015 5:49 am 
Offline
Commodore
Commodore
User avatar

Joined: Tue Jan 21, 2014 10:37 pm
Posts: 1804
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...
Quote:
send the whole message as a single object parameter, rather than individual parameters
Actually, on changing the code to use an object I think it actually makes the code more readable. Thanks for the tip, Wildeblood!

_________________
My OXP's


Top
   
 Post subject: Re: Email System (Beta)
PostPosted: Wed Jan 28, 2015 6:20 am 
Offline
Commodore
Commodore
User avatar

Joined: Tue Jan 21, 2014 10:37 pm
Posts: 1804
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...
Version 1.0.1 have been released. Download links in the first post.
In this version:
  • Changed createEmail function call to use an object, rather than parameters.
  • Added galaxy number to stored emails, which will be displayed when the player is in a galaxy other than the one they received the email in.
  • fixed bug that was preventing bounty email from being sent
  • fixed bug that was sending a docking clearance penalty notice when docking clearance was about to expire
  • Spelling fixes
  • Code cleanup

_________________
My OXP's


Top
   
 Post subject: Re: Email System (Beta)
PostPosted: Wed Jan 28, 2015 1:19 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sat Jun 11, 2011 6:07 am
Posts: 2161
Location: Western Australia
Spam, spam, spam! I made this version of my Autotrade Report Screen plug-in so Autotrade can send you email reports of its activities:-

Obsolete link removed.

And I left the previous version script inside so you can see exactly how much I added to link with the EmailSystem OXP.


Last edited by Wildeblood on Sun Feb 08, 2015 4:48 pm, edited 1 time in total.

Top
   
 Post subject: Re: Email System (Beta)
PostPosted: Wed Jan 28, 2015 1:51 pm 
Offline
Commodore
Commodore
User avatar

Joined: Tue Jan 21, 2014 10:37 pm
Posts: 1804
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...
And spam is good, right? :)

_________________
My OXP's


Top
   
 Post subject: Re: Email System (Beta)
PostPosted: Thu Jan 29, 2015 6:42 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sat Jun 11, 2011 6:07 am
Posts: 2161
Location: Western Australia
Quote:
And spam is good, right? :)
I thought so.

I want an "expires" property on the email object, so I can set a future date it will be automatically deleted, and some clear instructions for calculating the time. ("I was reading an email when it deleted itself after seven seconds!?" "Sorry, dude, that was meant to be seven days.") There's no need to implement this auto-deletion (yet), just ensure an email object with an expires property won't be rejected by the createEmail function as malformed.

When I used the "Close this email & open the next" option, the next was displayed with headers only, no main body text shown.

Having all those mission variables seems totally bogus. Are you using those directly to create the mission screens, or just to save the database between game sessions? If the former, I'll shut up, because I'm mystified by mission screens. If the latter, that's bodgey as; a single mission variable with the whole database JSON serialized should do.

What happens if I put something long in the sender field? For my spam plug-in I wanted to use "GALClear clearing & settlements" but used "Trading Assistant" instead, because it looked like anything longer would make a mess.


Top
   
 Post subject: Re: Email System (Beta)
PostPosted: Thu Jan 29, 2015 8:53 am 
Offline
Commodore
Commodore
User avatar

Joined: Tue Jan 21, 2014 10:37 pm
Posts: 1804
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...
Expires property: Good idea - I'll look into it.

Close and open next: Smells like a bug to me. On it.

Mission variables: Yeah, I tried the JSON thing but couldn't get it to work, something to do with having sub objects. I'll try again.

Long sender field: It will be truncated on the inbox display, to keep the columns in line. I haven't tried really long senders to see what happens on the message display though. I'll look into it.

_________________
My OXP's


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 171 posts ]  Go to page 1 2 3 4 512 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Limited