Email System (Release)
Moderators: winston, another_commander
Re: Email System (Release)
The "Small fix on good service level" item in the shop seems to create emails (shown in F4 as unread) but when opening the Email system, no mail is there.
Log (excerpt):
JavaScript warning (GalCopAdminServices 1.4.4): Unknown expansion key [maint_itemname_EQ_SERVICE_LEVEL_SMALL_FIX_4] in string.
oolite.oxp.phkb.EmailSystem.oxz/Scripts/galcopadmin.js, line 409.
---
Edit:
When my escorts (EscortDeck/EscortPack OXP) kill a fugitive with a bounty, the email states (no bounty).
Log (excerpt):
JavaScript warning (GalCopAdminServices 1.4.4): Unknown expansion key [maint_itemname_EQ_SERVICE_LEVEL_SMALL_FIX_4] in string.
oolite.oxp.phkb.EmailSystem.oxz/Scripts/galcopadmin.js, line 409.
---
Edit:
When my escorts (EscortDeck/EscortPack OXP) kill a fugitive with a bounty, the email states (no bounty).
- phkb
- 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: Email System (Release)
Vincentz wrote:How about sending an email when getting Cargo, Passenger Parcel contracts?
Wildeblood is correct, you'll get emails about contracts (and scooped escape pods) in 1.81.Wildeblood wrote:The contracts should already be creating emails for Oolite 1.81
I'm not sure about the archive function. The problem is not technical (it's not that hard to do), but practical. Archived emails have to be stored and retrieved. All that storage is in your save game file, and when the save game is loaded all that data has to go into memory somewhere. Having thousands, or even hundreds, of archived email is a massive resource drain, both in memory allocation and save game size.Vincentz wrote:Sends email to archive
The reason I made most of the automated emails expire automatically is to keep the size of the mailbox down. Regular playing should mean only 1 or 2 pages of emails are being stored and retrieved.
I'm not necessarily against the idea, but I'm not sure of the best way to implement it that ensures a reasonable memory footprint.
What do others think? Would an archive system be valuable? Should it have a hard limit of, say, 100 emails? That way, if you want to archive more, you have to delete some archived emails. Or if you archive more than 100, the oldest archived emails are dropped? Other ideas?
What OXP is that from?QCS wrote:The "Small fix on good service level" item
Interesting. That would mean theQCS wrote:When my escorts (EscortDeck/EscortPack OXP) kill a fugitive with a bounty, the email states (no bounty).
shipKilledOther
function is getting called when your escorts kill a ship, but it's not providing details of the ship that was killed (the whom parameter). I'll have to look into the Export Pack OXP and see what it's doing.- Wildeblood
- ---- E L I T E ----
- Posts: 2453
- Joined: Sat Jun 11, 2011 6:07 am
- Location: Western Australia
- Contact:
Re: Email System (Release)
One of Norby's, Hardships possibly.phkb wrote:QCS wrote:
The "Small fix on good service level" item
What OXP is that from?
- Norby
- ---- E L I T E ----
- Posts: 2577
- Joined: Mon May 20, 2013 9:53 pm
- Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
- Contact:
Re: Email System (Release)
ShipVersionphkb wrote:What OXP is that from?QCS wrote:The "Small fix on good service level" item
- phkb
- 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: Email System (Release)
Thanks Wildeblood and Norby. I'll check it out.
- phkb
- 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: Email System (Release)
Version 1.4.5 has been released. In this version:
- Added some more equipment key exclusions for the maintenance email (ShipVersion OXP items)
- Added some special cases for ShipVersion repair equipment items.
- Switched from shipKilledOther to shipTargetDestroyed to better monitor for ships destroyed by the player
- Small bug fixes and tweaks.
Re: Email System (Release)
Hi phkb,phkb wrote:Version 1.4.5 has been released. In this version:
I'm having some issues downloading this from inside the game. I believe the version number in manifest.plist is still set to 1.4.4
Regards,
Glenn
- phkb
- 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: Email System (Release)
Thanks for the report, Glenn. I'll get an update posted later this evening.
Edit: OK, Version 1.4.6 is released, which fixes the manifest version number issue, and another small issue with the "maint_itemname" errors in the log file.
Edit: OK, Version 1.4.6 is released, which fixes the manifest version number issue, and another small issue with the "maint_itemname" errors in the log file.
- Wildeblood
- ---- E L I T E ----
- Posts: 2453
- Joined: Sat Jun 11, 2011 6:07 am
- Location: Western Australia
- Contact:
Re: Email System (Release)
You're some kind of workaholic, phkb.
- phkb
- 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: Email System (Release)
I like to code. And Oolite is part of my pain management strategy.
- phkb
- 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: Email System (Release)
Version 1.4.7 has just been release and is available via the download manager or via links in the first post. This version fixes an issue with the Combat Simulator OXP, where invalid emails were being sent after destroying simulator ships.
- Norby
- ---- E L I T E ----
- Posts: 2577
- Joined: Mon May 20, 2013 9:53 pm
- Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
- Contact:
Re: Email System (Release)
Here is a fix for a timelimit problem in galcopadmin.js. When I bought a ship with 30 equipment:
I measured the running time of the important part in debug console:Almost 4 seconds due to the access of the equipment array is very slow.
You can fix it like this:270 times faster.
Code: Select all
17:33:40.427 [script.javaScript.timeLimit] OperationCallback (OOJSEngineTimeManagement.m:229): ***** ERROR: Script "GalCopAdminServices" ran for 1.80469 seconds and has been terminated.
17:33:40.427 [script.javaScript.stackTrace] OOJSDumpStack (OOJavaScriptEngine.m:811): 0 (galcopadmin.js:924) <anonymous function>
Code: Select all
var a=console.getProfile(function(){
var equip,ship=player.ship;for (var i = 0; i < ship.equipment.length; i++) {
if ("EQ_HULL_REPAIR".indexOf(ship.equipment[i].equipmentKey) == -1) {
if (ship.equipment[i].isPortableBetweenShips == false) {
equip += "- " + ship.equipment[i].name + "\n";
added = true
}
}
}});log(this.name,a.javaScriptTime+" : "+a.totalTime);
0.003686000000003631 : 3.788045
You can fix it like this:
Code: Select all
var a=console.getProfile(function(){
var equip,e=player.ship.equipment,i;for (i = 0; i < e.length; i++) {
var q = e[i];
if ("EQ_HULL_REPAIR".indexOf(q.equipmentKey) == -1) {
if (q.isPortableBetweenShips == false) {
equip += "- " + q.name + "\n";
added = true
}
}
}log(this.name,"i="+i);});
log(this.name,a.javaScriptTime+" : "+a.totalTime);
i=30
0.0004270000000001165 : 0.013895
- phkb
- 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: Email System (Release)
Norby wrote:270 times faster
Wow. OK, well, new version will be out soon. Thanks for taking the time to find and debug the issue Norby.
- Wildeblood
- ---- E L I T E ----
- Posts: 2453
- Joined: Sat Jun 11, 2011 6:07 am
- Location: Western Australia
- Contact:
Re: Email System (Release)
I think if you go back to the first page of this thread, I was harping on about avoiding player.ship.equipment as much as possible.phkb wrote:Norby wrote:270 times faster
Wow.
- phkb
- 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: Email System (Release)
Version 1.4.11 is now up which incorporates the changes Norby supplied to improve performance.
My apologies for not taking your advice sooner. Got there in the end, though.Wildeblood wrote:I think if you go back to the first page of this thread, I was harping on about avoiding player.ship.equipment as much as possible