Page 3 of 13

Re: Email System (Beta)

Posted: Sat Feb 07, 2015 4:30 pm
by phkb
Version 1.1.1 has been release. In this version:
  • Removed unnecessary OXP folders, combines GALCOP Admin services into main OXP, ready for OXZ publication
  • Fixed bug when calling $createEmail during flight (thanks to Wildeblood for the heads up)
  • Removed unnecessary option on the $createMail function
  • Added message to arrival report if the player has unread emails.
Download links in the first post.

Re: Email System (Beta)

Posted: Mon Feb 09, 2015 5:36 am
by Wildeblood
phkb wrote:
Added message to arrival report if the player has unread emails.
Yeah, but nah. Maybe if you went to the extra complexity of doing this only for new unread mail it wouldn't wear thin so quickly. But I doubt it would be worth the effort; I think it would still be yeah, but nah.

Re: Email System (Beta)

Posted: Tue Feb 10, 2015 2:46 am
by phkb
Hmm, yeah. It seemed like a good idea at the time, but after playing for a while it does get rather irritating. It'll go for the next version.

Re: Email System (Beta)

Posted: Tue Feb 10, 2015 3:06 am
by phkb
Also, I'm considering adding an automatic deletion process if your inbox grows to over 100 emails. My though is to just drop off emails that don't require a response. Or should I move them to an archive inbox first, and then delete them from there? That option seems a little unnecessary, but what do you think?

Re: Email System (Beta)

Posted: Tue Feb 10, 2015 10:24 am
by Wildeblood
phkb wrote:
Also, I'm considering adding an automatic deletion process if your inbox grows to over 100 emails. My thought is to just drop off emails that don't require a response. Or should I move them to an archive inbox first, and then delete them from there? That option seems a little unnecessary, but what do you think?
IMO, the best option for usability - ignoring difficulty of implementation* - would be the same system this phpBB here uses for PMs: once the maximum is reached the new arrivals are put into a buffer and it refuses to display them until you delete some older messages. That way the user decides which to keep, the oldest not necessarily being the least important.

Much easier would just be to discard the oldest. But if you did want something fancier, I think a buffer array of new messages is a better option than a archive array of old messages, which really doesn't give the user the necessary incentive to ever delete them.

* It's such fun to write that when someone else is doing the work. :D

Something more fundamental: before you add this to the OXZ manager and encourage other expansions to start using it in earnest, please re-consider the property names you've used on the email object. I'd like you to reduce the use of camelCase as much as possible. Like this:-

Code: Select all

	$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
		});
rather than this:-

Code: Select all

	$createEmail(
		{sender:"Captain Solo",					// senders name or email address
		subject:"I've got a bad feeling about this",		// subject line
		sentDate:global.clock.seconds,				// the time the email was sent
		emailBody:"I thought they smelled bad on the outside."	// body text of the email
		});
or this:-

Code: Select all

	w.$createEmail(
		{sender:"The Chaser",				// senders name or email address
		subject:"Something for you do look at...",	// subject line
		date:global.clock.seconds,			// the time the email was sent
		message:"Would you like to play a game?",	// body text of the email
		option1:{short:"Yes", long:"Sure. Why not?", script:"EmailSystemDemo", function:"$AcceptChallenge", parameter:"mydata"},
		option2:{short:"No", long:"Sorry. Too busy right now.", script:"EmailSystemDemo", function:"$DeclineChallenge"}
		});
rather than this:-

Code: Select all

	w.$createEmail(
		{sender:"The Chaser",				// senders name or email address
		subject:"Something for you do look at...",	// subject line
		sentDate:global.clock.seconds,			// the time the email was sent
		emailBody:"Would you like to play a game?",	// body text of the email
		responseOption1:{displayText:"Yes", replyText:"Sure. Why not?", worldScriptsName:"EmailSystemDemo", callbackFunction:"$AcceptChallenge", functionParam:"mydata"},
		responseOption2:{displayText:"No", replyText:"Sorry. Too busy right now.", worldScriptsName:"EmailSystemDemo", callbackFunction:"$DeclineChallenge"}
		});

Re: Email System (Beta)

Posted: Tue Feb 10, 2015 2:54 pm
by phkb
They're great suggestions, thanks. I've done all the trimming to parameter names you've suggested. For the less used ones, though, I'm keeping them the same so they retain some of their self-documenting style.
Wildeblood wrote:
Much easier would just be to discard the oldest.
Yeah, that's what I'm doing for now. I mean, it's 1:50am so I'm not feeling like a major coding session right now. I might tackle the more complex method after some sleep.

I've also changed all the GalCop notification emails to have an 2 day expiry, after which they delete themselves. You can always go in an cancel the expiry if you want to keep the bounty notification where you cleaned up up 50 ships in one sitting. Great for bragging rights.

Re: Email System (Beta)

Posted: Tue Feb 10, 2015 3:31 pm
by Smivs
phkb wrote:
I've also changed all the GalCop notification emails to have an 2 day expiry, after which they delete themselves.
Maybe this is the way to go :wink:

Re: Email System (Beta)

Posted: Sun Feb 22, 2015 4:07 pm
by phkb
Version 1.1.2 has been released. In this version:
  • Removed arrival report message. If you really want it, you can turn it on with a setting.
  • Fixed issue with the bounty report email if the player destroys a ship with no bounty. No entry will be made in this case now.
  • Added an archive limit, so that emails will automatically be start to be deleted if they have 100 emails or more.
  • Added an expiry date to all the standard GalCop notices.
  • Simplified $createEmail object parameters.
  • added a zero check on expiry time
  • fixed bug where number of pages wasn't updating when deleting emails.
  • spelling corrections
Download links in the first post.

Re: Email System (Beta)

Posted: Sat Feb 28, 2015 3:55 am
by phkb
Version 1.1.3 has been release. Very small update, just fixing the way random names are chosen. Now available via the download manager.

Re: Email System (Beta)

Posted: Sat Feb 28, 2015 7:17 pm
by CommRLock78
Heya Phkb - I really like this OXP - anything that adds to the immersion is awesome 8). I noticed in your update you forgot to change the version number, which is wrecking havoc with the manager. I had to modify the scripts and manifest and install manually.

Re: Email System (Beta)

Posted: Sun Mar 01, 2015 1:53 am
by phkb
Thanks for that. I'll post an update shortly.

[EDIT] OK, it everything should match now. Showing as version 1.1.3, and 1.1.3 in the manifest file, and script file. You don't need to download it again it you don't want to. No other code changes were made.

Re: Email System (Beta)

Posted: Mon Mar 02, 2015 2:28 am
by phkb
I'm looking to put some other events into emails, things like equipment and ship purchases. One of the purchases is a maintenance overhaul. What I'd like to be able to do is put together a list of say 10 to 15 random items so that the email looks like a true statement of work for a ship overhaul. You know, things like "Realigning laser housing" or "Recalibrating witchspace drive". Can anyone suggest a few things that might go on such a list? I'd like to get the full list to around 50 items if I can, so the list will be pretty much guaranteed to be different each time.

Re: Email System (Beta)

Posted: Mon Mar 02, 2015 10:13 am
by Disembodied
Some should be general, some might need to be item-specific (so you'd have to check to see if the player had e.g. a fuel scoop before charging them for "removing carbon scoring")

General
Balance engine nacelles
Dredge air vents
Top up coolant
Check and replace worn airlock seals
Defragment HUD systems
Adjust internal gravity pump
Replace worn torus bearings
Check power grid distributor
Balance shield matrix
Purge comms buffers

Specific
Remove carbon scoring from fuel scoop
Check pylon connectors (might be general - but do all ships have, or have to have, pylons?)
Degauss ASC
Rejoint docking computer kernel
Rebore witchspace injectors
Point-fix heat shielding blanket
Close spectral leakage in wormhole scanner

You might even want to just have a range of random, non-specific terms like "Realign" or "Check" or "Adjust" etc. which you could then put in front of the name of any piece of OXP equipment on the ship - so you could have "Adjust Tea Maker", and so on. Of course, you'd also get things like "Realign Ship's Cat" ...

Re: Email System (Beta)

Posted: Mon Mar 02, 2015 11:45 am
by Disembodied
There are already tech levels assigned to different kinds of equipment, but if you also assign tech levels to the various general jobs, it might be a good way of marking the difference between a service at a low-tech planet and a service at a high-tech one. Low TL worlds could do basic mechanical operations, but as things get more complicated they would drop off the list. Here's the same "General" list as before, with some additions, and suggested TL numbers:

Empty environmental tanks - 1
Dredge air vents - 1
Sanitise crew space - 1
Top up coolant - 2
Check and replace worn airlock seals - 2
Clean hydraulic filters - 2
Balance engine nacelles - 3
Lubricate drivetrain connectors - 3
Replace worn torus bearings - 4
Align torus rotator cuffs - 4
Prime thermal shunts - 5
Purge comms buffers - 6
Check power grid distributor - 7
Defragment HUD systems - 8
Adjust internal gravity pump - 9
Balance shield matrix - 10
Calibrate Dirac combs - 11
Tune wormhole generator - 12
Configure monopole moments - 13
Flush gluon trap - 14

Mind you, according to the wiki, a [wiki]Maintenance[/wiki] overhaul has a TL of 7, which would mean that you can't get your ship maintained at a planet of TL6 or below ... is this the case? I can't remember ever trying.

Re: Email System (Beta)

Posted: Mon Mar 02, 2015 1:38 pm
by Diziet Sma
Good lists..

There should probably be some generic combat-damage related items to be repaired, too.. since the ship is pretty much certain to have been under fire at some point..

Things like panel damage, laser scoring, fused circuitry, perhaps shrapnel damage from missiles, etc.