Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

[Release] Bulletin Board system

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

Moderators: another_commander, winston

User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: [WIP] Bulletin Board system

Post by Norby »

phkb wrote:
do you have to get back to the originating station to hand in your mission within the 8 hours? Or does the clock essentially stop once the tenth pirate is killed?
I vote to must get back in time. Another story if you save a trader ship out of trouble and the beholden captain can pay right when the last attacker is destroyed.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16065
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: [WIP] Bulletin Board system

Post by Cody »

I'm not too familiar with Bulletin Board missions, but Elite-wise I've always worked on the premise that you've got nothing 'til you've docked.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4668
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: [WIP] Bulletin Board system

Post by phkb »

Version 0.6 is now available. In this version:
  • Added an additional check when creating a new mission. Expiry time must be in the future.
  • Fixed bug with "markerShape" setting not being correctly set up.
  • Active missions that have expired are now coloured red in the bulletin board list.
  • Included manifest text on mission briefing page when mission is completed but not yet handed in. Also included expiry time, which is still relevant for completed-yet-not-handed-in missions.
  • Forced manifest entries to be updated each time the manifest screen is viewed in order to keep "Expires in" field up to date.
  • Added "%" to percentage completed text on mission screen.
  • Added a "disablePercentDisplay" boolean value to enable a mission to turn off the display of the "Percent complete" value. This would leave just the manifest text as the method of showing mission status.
  • Completed missions that are about to be handed in will no longer show as being close to expiry.
  • Better handling missions complete when docking where the confirmCompleteCallback function returns a value.
  • Fixed bug when attempting to show the long range chart.
  • Code refactoring.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4668
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: [WIP] Bulletin Board system

Post by phkb »

Version 0.7 is now available. In this release:
  • Accepting a mission now doesn't close the mission briefing screen.
  • Added a "stopTimeAtComplete" boolean value to enable missions to be setup so that, as soon as the mission is flagged 100% complete, the expiry time countdown will stop. This means that the player can take as much time as they want to return to the system and hand in their completed mission. The default for this value is false.
  • Added a "allowPartialComplete" boolean value so that a mission can be handed in early, with a reduction in the payment based on the percentage completed. If penalties also apply it will reduced by the percentage completed.
  • Added a "statusText" text value that will be displayed on the mission briefing screen as the "Current status" instead of the manifestText value.
  • Added the "$updateBBStatusText" function to enable the status text to be updated.
  • Fixed issue with "allowTerminate" not defaulting correctly.
  • Added the originating system to the mission details page.
  • Added the destination system to the main mission list.
  • Changed the "Expires" column to only show hours (or minutes if the time remaining is less than 100 minutes) on the main mission list screen.
  • Moved "Percentage Complete" column to be the last column on the main mission list screen.
  • Changed how stationKeys are added, making it possible for a station to have multiple keys, as well as allowing for multiple worldScripts to have different station keys for the same station.
  • Fixed issue where exiting a multi-page mission briefing and re-opening it was not reseting the current page back to 1.
  • Fixed issue where boolean values of true or false (that is not a text string with "true" or "false" in it) were not being recognised correctly when adding a mission.
  • Changed the way the number of active missions is counted. Now any active mission is listed, not just the non-expired missions.
  • When viewing a completed Bulletin Board mission and the player is not in the originating system, the option to "Set course for [originating system]" will now be available.
  • Corrected logic for determining when a property has been passed in an object when adding new missions.
  • Changed completion types "AT_STATION" and "WHEN_DOCKED_STATION" to be "AT_STATIONKEY" and "WHEN_DOCKED_STATIONKEY" to better describe their purpose.
  • Added a debug flag to turn on/off log messages.
  • If the Email System is installed, accepting, terminating, completing and failing missions will now generate a confirmation email.
  • Added a comma between "# available" and "# active" on the interface screen.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4668
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: [WIP] Bulletin Board system

Post by phkb »

There have been a few releases of the BB system since my last post above, so here's a list of all the changes, including those in today's release of 0.13:
0.13
  • Added an "availabilityCallback" function, to allow for cases where a mission can be added to the BB, but conditions prevent the player from being able to accept it (eg insufficient cargo space).
  • If a mission has a deposit amount as part of the terms of acceptance, this value will be deducted from the payment amount on the first page of the bulletin board display. Brings it into line with the cargo contracts screen.
  • Fixed bug with displaying custom items on a mission detail page.
0.12
  • Moved restoring data process to startUp function.
0.11
  • Added custom menu items that can be used with callbacks to allow custom functions to be called on each mission.
  • Changed methodology for creating mission ID's to eliminate the possibility of ever having two missions with the same ID.
  • Changed short range chart selection range to 7.5ly, rather than 15ly.
  • Fixed another minor bug with the players destination getting reset unexpectedly when viewing mission destinations.
  • Missions added with "autoAccept" turned on will now get their destination marker put on the system map, and (if the Email System is installed) will have confirmation emails sent.
  • Fixed Javascript reference error when terminating a mission.
  • Better handling of interstellar space conditions.
  • Added the "noEmails" option, to stop a mission from sending confirmation emails.
  • Added ability for calling routines to specify their own ID for reference, overriding the default.
  • Changed the console message that is displayed when a mission is manually terminated by the player.
  • Chart markers were not being removed from the chart after missions were completed.
  • Fixed issue with HUD not becoming visible again when launching while viewing the Bulletin Board.
  • Setting a blank value ("") for a mission station key should have allowed the mission to be found and completed at any station in the source system.
  • Swapped "Expiry" and "Payment" columns in the main list to align better with other contract screens (parcels, cargo, passengers).
0.10
  • "terminateCallback" was not being called when a mission was terminated by the player. "failedCallback" was being called instead.
  • Fixed Javascript bug in "failedCallback" routine.
0.9
  • Added optional "deposit" property to mission items, which will be deducted from the player's account when accepting the mission.
  • Added travel time (in hours) to the destination system info and source system info.
  • "Set course" option now takes player's full course into consideration when working out whether the option should be displayed, rather than just the final destination.
  • Fixed issue where player destination was getting reset when BB is exited by pressing a function key, rather than via the "Exit" command.
0.8
  • Fixed issue with AT_SOURCE missions that allow for partial completion, where they could be partially completed at non-source stations.
  • Active but expired missions that are shown on the main BB list will now just show as "Expired".
  • Added "customDisplayItems", so missions can add their own heading/value information items to the mission details page.
  • "Set course for" menu items won't be shown if player already has that system set as their destination.
  • Changed "==" comparisons to "===" for performance improvements.

Progress on the mission pack that makes use of the BB is steady, although slow!
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4668
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: [WIP] Bulletin Board system

Post by phkb »

Version 0.14 is now available via the download manager. In this version:
  • The "availableCallback" function was not being called on the short or long range chart screens.
  • Added an event registration and execution system, so OXP's can know when various interface events have taken place.
  • Days now included in mission time remaining on the mission detail screen.
  • Fixed issue where "Set course for" options were not being displayed on map screens.
  • Fixed issue where numeric custom display item values were causing an error.
  • Fixed issue where an error would occur if a mission does not have a manifestText entry as well as no manifestCallback.
  • Fixed issue where adding multiple station keys to the same station were not adding data correctly.
  • The stationKeys array was not being reset after a jump.
  • Corrected errors in documentation.
  • Bug fixes.
  • Code refactoring.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4668
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: [WIP] Bulletin Board system

Post by phkb »

V0.14 was going to be a final version, but in my testing I found some limitations and bugs. So v0.15 is now available. In this release:
  • Added "remoteDepositProcess" property, to control whether deduction of the deposit amount should be handled by the BB or by some external process.
  • Changed colour of unavailable items in the main list to be a slightly darker shade of gray.
  • Added a "Net payment" line to missions that have a deposit.
  • Unavailable items will now be put at the bottom of the mission list.
  • Removed the backgroundHeight and overlayHeight properties. The background and overlay properties are now defined as guiTextureSpecifier, which can include these other elements as part of a dictionary.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4668
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: [WIP] Bulletin Board system

Post by phkb »

I thought it was about time to make use of this Bulletin Board I'd created, so I finally got around to putting together an OXP which unifies all the contracts (cargo, passemger and parcel) into the Bulletin Board system. There is no functional change to any contracts - they still operate exactly the same. The only difference is that they are all viewed and accepted on the one F4 interface screen, rather than being on 3 different ones. The details of any active contracts are also kept on the Bulletin Board, up until the time the contract is completed. You can still see all contracts on the F5F5 manifest screen.

Here's a screeny of the main BB list with various contracts on it. Grey items are available but some restriction is in place that will prevent them being accepted (ie insufficient cargo space).
Image

And here's a shot of one of the passenger items
Image

Given this is the first OXP that actually makes use of the Bulletin Board I'd appreciate any feedback on the interface design, any shortcomings, wishlist items, as well as any issues relating to the contracts themselves.

Here's a link for an OXZ version of ContractsOnBB.oxz
And here's one for a OXP version inside a ZIP ContractsOnBB.zip.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16065
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: [WIP] Bulletin Board system

Post by Cody »

Code: Select all

13:21:04.857 [BulletinBoardSystem]: !!Error: Unable to call event callback. Event:preListDisplay, WS:ContractsOnBB FN:$validateContracts
Hmm, on checking, it seems I downloaded an old version of BBS... updating now.

Nope, still got that error!
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4668
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: [WIP] Bulletin Board system

Post by phkb »

Cody wrote:
Nope, still got that error!
Wait, wha?!

Umm, OK, I'm stumped now. I'm not seeing that error at all. It can't be a timing issue or OXP load issue, because the fact that the event is being called at all means the ContractsOnBB OXP has loaded, and if the error is being generated it means the BB system is up to date and is trying to call the function. I've tried to reproduce this in 1.84 and 1.85 without success.

Hmm...I'll keep looking.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16065
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: [WIP] Bulletin Board system

Post by Cody »

I can reproduce it every time I visit the F4 bulletins screen (running 1.85.0.6894-170126-da4b3f7).
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4668
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: [WIP] Bulletin Board system

Post by phkb »

OK, clutching at straws moment - did you download the ZIP/OXP version, or the OXZ version of ContractsOnBB
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16065
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: [WIP] Bulletin Board system

Post by Cody »

The OXZ version, which I've tried in both the AddOns folder and the Managed folder.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4668
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: [WIP] Bulletin Board system

Post by phkb »

Hmm. Well, I've just uploaded v0.16 of the BB system. This may or may not fix the error, but it will at least tell us the exact error that is occurring. Let me know what you get.

Edit: OK, I found the problem. ContractsOnBB v0.2 now available via links in above post. The problem was with the fact that I wasn't checking for the presence of the Smugglers OXP before trying to call its internals.

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

Re: [WIP] Bulletin Board system

Post by Cody »

Aye, I was just about to post this:

Code: Select all

22:17:19.714 [BulletinBoardSystem]: !!Error: Unable to call event callback. Event:preListDisplay, WS:ContractsOnBB 
FN:$validateContracts Error:TypeError: worldScripts.Smugglers_Contracts is undefined


Fixed - cool! Add number of jumps to destination/route data?
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
Post Reply