Page 1 of 2

[UPDATED RELEASE] - Escort Contracts 1.7.1 (2015-12-04)

Posted: Fri Dec 04, 2015 12:35 am
by Fritz
Image

Image

Image

Image

Image

Download current version 1.7.1: http://wiki.alioth.net/img_auth.php/5/5 ... _1.7.1.oxz

Download previous version 1.6.2: http://wiki.alioth.net/img_auth.php/b/b ... _1.6.2.oxz

Wiki page

Escort Contracts version 1.7.1 (2015-12-04)
By Capt. Murphy (2011, 2012)
Updated by Keeper (2013), Norby, Chimrod, phkb, Fritz (2015)
Background images by ZygoUgo (2013)
License: CC BY-NC-SA 3.0 : Please visit http://creativecommons.org/licenses/by-nc-sa/3.0/ for more info.
Requires Oolite 1.79

Overview: Allow players to enter into short-term escort contracts with NPC lone wolf traders.

Description:

The Independent Traders and Hauliers Association have reacted to demand from lone wolf NPC Traders and introduced a system to allow them to enter into short-term escort contracts with vetted and rated freelance escort pilots.

Players who wish want to access these contracts must purchase an I.T.H.A Independent Escort License available to players with a Clean legal status at systems with a Tech Level of 3 or above and not Anarchies, Feudal States or Multi-Governments.

Once purchased players whose legal rating is still clean may be offered short term escort contracts when docked at a system’s main station. The chance of being offered contracts is based on the player’s reputation as an escort. The fees offered are also affected by the player’s reputation as an escort and government type of the target system. Contracts to unsafe systems are more likely, and target systems are always within 1 jump of the starting system. Reputation is increased when a contract is successfully fulfilled and reduced when a contract is failed or aborted.

Once a contract is agreed the player has 3 game hours to launch from the station or the contract is failed (be careful about buying equipment – it takes up time). The NPC trader (or 'mother') will be waiting in the station aegis and will prompt the player to approach as they prepare to jump to the target system. The player can follow them through their wormhole or alternatively jump themselves to the target system. The latter isn't recommended because it will use up fuel needed for injector use (see below). Failure to arrive at the target system by the point the wormhole expires ends the contract.

Once in the target system the player’s task is to escort the mother to the system's main station. Mothers will issue various prompts to players in flight, will request assistance if attacked, and will assist the player if the player is attacked. The contract is fulfilled once the mother has entered the aegis of the target system's main station, unless there are hostile craft in the vicinity in which case the player must stand by to protect the mother until it has safely docked.

If you have an Advanced Space Compass installed the mother will be marked with an ‘M’ beacon code.

Game balance and playability:

In order to avoid these contracts being long and rather dull in between hostile encounters, this OXP gives the mother the ability to 'synchronise torus drives' with the player. The mother has been given scan_class CLASS_ROCK (but with custom scanner colours) so will not mass-lock the player. In flight if there is nothing else to mass-lock the player, the mother will prompt the player to approach to between 500 and 2500 meters and to match heading. If the player does so the mother will synchronise torus drives with the player and both mother and player will travel on the mother’s heading at torus speeds, until the player or mother is mass-locked again.

If the player is mass-locked but with no hostile contacts in the vicinity, the mother may after a short delay decide to try and use injectors to get out of the mass-locked situation so that the player and mother can take advantage of the mother’s synchronised torus drive capability. This feature will only operate if the player also has working injectors and at least 1 LY of fuel.

Mothers will normally be an Anaconda, Boa, Boa Cruiser, or Python, and all come equipped with ECM, injectors, and fore and aft beam lasers as standard.
Technical notes:

The shipdata.plist is set up to 'like_ship' to the core versions of these ships (or a retextured version if the core versions have been replaced by a retexture OXP), and if installed any of the versions from retexture OXPs that add variants in addition to core ships. Currently supported are Griff's, DeepSpace, Shady Sungs, Smiv's and Neolite Core.

If you have a retexture pack installed that does not replace the core models and want to suppress usage of the core models in this OXP you can edit the shipdata.plist to reduce the roleweighting of the core ships. Instructions are included in the shipdata.plist as comments.

The shipdata.plist is also set up to use these OXP ships as potential mothers if installed:
From Neolite Companion : Monitor, Python Cruiser, Python ET Special;
From Old Ships 2010 : Monitor, Monitor2;
From Far Arm Ships : Tanker;
From Clippers: Python Clipper, Boa Clipper.
From Staer9's Shipset: Monitor, Python Cruiser, Python ET Special.

You can use these entries as a template to use ships from your favorite OXP. However be wary of doing this with any OXP ship that normally requires its own shipscript, or is too large to dock at a normal station as the results may be unpredictable.
Changelog:

Version 0.9 (24/4/11) - Initial Release.

Version 0.9.1 (29/4/11)

Fixed a bug in detecting player kills (the mother should pay a bonus for hostile kills made during the contract - was broken in version 0.9).
Added code for mother to use injectors to try and escape from mass lock situations after a few minutes.
Made criteria for contract success arrival in target system's station aegis rather than mother safely docked to save player time.
Replaced shield enhancers with shield boosters as standard equipment for mothers as they were a little too uber.
Added code to stop the I.T.H.A. Independent Escort License being damaged in combat.
Added an additional world script which displays the players escort reputation on the manifest screen.

Version 0.9.2 (29/4/11)

Fixed a small bug in calculation and display of contract prices.

Version 1.0 (8/5/11)

Added a cap to escort reputation.
Removed shield boosters as standard equipment for mothers and gave them fore beam lasers instead of military lasers. Mothers now really do need your help to survive an encounter with multiple hostiles.
Many improvements to the AI for the mother using injectors feature.
Fixed a cosmetic bug in the mission screen timing.
Fixed a bug where the mother could still be found waiting to dock after the player had docked, met the mother’s pilot in the bar, got their reward and re-launched.
Improvements and bug fixes to the combat AI, mainly relating to mother - player communication.
Removed player auto targeting mother’s primary aggressor (potential for confusion if other auto target-locking OXP’s are installed).
Adjusted criteria for contract success. If no hostiles in vicinity the contract is fulfilled once the mother is in the station aegis. If there are hostiles in the vicinity when the mother arrives in the aegis the player must not dock until the mother is safely docked to fulfill the contract. The mother will explicitly tell the player this on arrival at the station aegis.
Added code so that if repeatedly attacked by the player, the mother will eventually ‘turn’ and attack the player. The contract is immediately failed at this point.
Added code so the timer that checks to see if the player has followed the mother through it’s wormhole kicks as the wormhole closes. Uses same calculation as oolite engine to work out wormhole expiry time depending on the mother ship mass.

Version 1.1 (15/6/11)

Various improvements to AI following tester reports of occasional anomalous docking and route finding behaviour.
Added a pilot and cargo to the mother (thanks to Eric Walch for the tip).
Added code to gradually reduce a positive or negative escort reputation over time.
Added code so that any fire from a players ‘Hired Guns’ from the OXP of the same same are treated as Friendly Fire.

Version 1.2 (13/7/11)

Fixed dockingAI that would not parse correctly on Mac systems.
Tweaked and tidied the synchronised jump code. Player must be between 500m-2500m and on approximately same heading as mother before synchronised jump will happen. The minimum distance has been introduced to avoid mother making course changes whilst hopping due to avoiding ‘collision’ with the player.
Added an additional check to avoid anomalous communication from the mother when docked.

Version 1.3 (7/8/11)

Added code to Mission Screen handling to allow access to Short Range Chart whilst perusing contracts.
Added check to avoid contract being offered to post-Nova system.

Version 1.3.1 (7/8/11)

Fixed missiontext.plist that would not parse correctly on Mac systems.

Version 1.4 (19/9/11)

Changed synchronised jump mechanism to use ship.velocity and a frame callback to simulate synchronised jump behaviour rather than a ‘teleport/hop’. Change prompted by reports of original method causing a crash to desktop on some systems (seemingly caused by changing the mother’s ship.position by script), and retained as the effect is more pleasing. Thanks to FleurdeMal for reporting the crash and testing the revised version.

If player leaves mission screen to access short range chart and does not return within a fairly short time period there is a chance that the contracts on offer will have changed.

Tweaked AI for initial hyperspace jump to reduce incidence of mother trying to jump when jumps are blocked by the station’s mass.

Version 1.4.1 (24/9/11)

Minor tweaks. Can now access both short range and long range charts and return to mission screens.

Tweaked the AI, so mother more likely to use injectors if mass-locked repeatedly by same NPC.

Version 1.4.2 (20/11/11)

Some tweaks to the mother ship-script to reduce processing overhead.
Fixed small bug where player was rewarded extra for a ‘hostile’ kill even if the kill was an asteroid or boulder.

Version 1.5 (28/1/12)

Made JS strict mode compatible.
Made Save Anywhere OXP compatible.
Reduced use of missionVariables.
Tweaked calculation of contract rewards - average is 25% lower than previous versions but with significant random variation.
Kills are only counted by the mother if the player is within 3 x her scanner range.
If mother is 'abandoned' by the player for any length of time there is a chance she will be ambushed by pirates - frequency is higher in more dangerous government types.
Added a little randomness to some of the comms messages from the mother.
Eliminated unneccesary and irritating repeat comms messages, particulary the 'Jump Drive Synchronised' message.
Added a background image to mission screens.
Made the code to remove mother ship from ooniverse on contract failure more robust.
Found and fixed a few potential bugs if the player does something 'weird' such as not dock to collect the reward at the end of a contract.

Version 1.5.1 (05/02/12)

Fixed small bug in display of reputation introduced in last release.
Reduced frequency of some other comms messages in response to user feedback.
Expanded shipdata.plist to use ship variants as mothers from the 5 main retexture shipsets if available, and several other OXP ships if available.

Version 1.5.2 (05/03/12)

Tweaked AI to stop mother injecting indefinately in fleeing from attack in starting system.
Reduced max speed of escort contracts variant of Boa Clipper.
Enabled entries for the addition version of Smiv's v4 shipset.

Version 1.5.3 (07/03/12)

Fixed small bug where player was rewarded extra for a ‘hostile’ kill even if the kill isCargo.

Version 1.5.4 (21/04/12)

Tweak to the chances of contracts being offered. Was in a range of 25% to 100% depending on escort reputation, now a range of 20% to 80%.
Set specific spawn position for mother of 19km directly behind main station to avoid issues with bigger stations (e.g the Torus) (thanks to cim for bug report and suggestion for appropriate fix).

Version 1.5.5 (05/05/12)

Added Staer9 shipset versions of the Monitor, Python Cruiser, & Python ET Special as potential mother variants if the OXP is installed.
Made the Escort License transferable equipment when buying a new ship.

Version 1.5.6 (07/05/12)

Mother spawn position set to sphere radius 4km centred on a spot 14km directly behind main station.
Mother will hold this position until player approaches and then start moving directly away from station/planet rather than towards witchpoint, whilst preparing to jump.
If mother's maxSpeed is greater than 95% of player.ship.maxSpeed she will limit her cruising speed and injector speed to 95% of equivalent player.ship.maxSpeeds (apart from in combat).
Fixed logic bug with behaviour controlling when to start/stop injecting. Starting was based on player's mass lock status, ending on the mothers. Ending now checks both.
Increased frequency of check to stop injecting to every second - previously every 3 seconds.
Thanks to Lone_wolf and cim for highlighting the issues leading to these tweaks.

Version 1.5.9 (2013-05-05)

Unofficial update to work with Oolite V1.77's interfaces screen (and other updates) by Keeper and new background images by ZygoUgo.

Version 1.6.1 (2015-01-27)

Fixes by Norby.

Version 1.6.2 (2015-06-09)

Fixes by Chimrod.

Version 1.6.3 (2015-08-25)

Fix by phkb for use with Xenon HUD

Version 1.7.1 (2015-12-04)

Several fixes and other changes by Fritz (see release notes below). Most non-bugfix changes apply to the comms messages which are now randomly variable and won't be repeated too often anymore.
Original thread concering this OXP (April 2011 - November 2015)

Thread about a bug when saving games (fixed with version 1.7.1)

Release notes 1.7.1

Posted: Fri Dec 04, 2015 12:40 am
by Fritz
ReadMe 1.7.1.txt:
License here: http://creativecommons.org/licenses/by-nc-sa/3.0/
--------------------------------------------------------------------------
Credit to Captain Murphy for creating the OXP and maintaining the
versions up to 1.5.x, to Norby, Keeper, Chimrod and phkp for the fixes
in versions 1.6.x, and to ZygoUgo for the background images.
--------------------------------------------------------------------------

Version 1.7.1 (2015-12-04 by Fritz G.)

This version fixes several bugs (see below), but most changes apply to the
comms messages. Some of these were repeated much too often, which could
be very annoying, especially during fighting. This was fixed by adding
some counters in the code, and some message were shortened a litle bit,
as well as the ship's name, which is now "[name]'s [ship type]" instead
of "Trader [name]'s [ship type]".

Most comms messages can now appear in different variants, adding more
realism in the style of Comms Pack A. This was achieved by using string
expansion and adding a discriptions.plist.

Another more than minor change is the contract assignment procedure:
While trying to find the "0 available" bug (see below) I noticed that target
systems had to have a lower government type than the current system. This
meant that fewer contracts were offered in unsafe systems, and getting a
contract in anarchies was impossible.

The new logic simply choses from all systems in jump range with a
government type of 5 or lower. The probability of one of them being
chosen is still higher for unsafe systems. I have moved the probability
factors and a switch for changing between the old and the new selection
logic to the begin of Escort_Contracts.js, so that it is easy to adjust
without having to dig deep into the code.

Because of these rather significant changes, I decided to change the
version number to 1.7.1. instead of 1.6.4.

What I didn't change is the hectic and somtimes a litte suicidal mother AI.
The experience of escorting and fighting should be exactly the same as before,
except that the mother isn't so talkative anymore.

I tested my changes only with Oolite version 1.82 on Windows 7, but they
should work with version 1.79 and newer too.


Bugfixes:
- No NPC escorts for the mother (fix in shipdata.plist)
- The mission will not break anymore if the player arrives in the target
system some seconds before the mother. Was a follow-up bug to some
strange behaviour of Oolite itself.
- "Escort Contracts (0 available)" will not appear anymore on the F4
screen, the contract option is not shown at all in this case.
- After docking, new escort contracts are available immediately. In older
versions you had to save and reload the game. (You can still do this
repeatedly to "cheat" if the offered contracts don't fit you, but I
consider this a minor issue, because the differences in payment are not
as big as with parcel or passenger contracts.)
- No new missions will be offered after loading a game including an
accepted contract.
- Price calculation now works after flying a mission that was saved and
reloaded (was a follow-up bug to the previous one).
- Upper case letters in background filenames changed to lower case, fixing
the missing background issue in the mission success screens.
- Using the map during contract selection doesn't change the target system
anymore.

Comms messages:
- Added descriptions.plist with random variations of most messages.
- Added suppression code to prevent some messages to be repeated over and
over again, somtimes only seconds apart. In these cases, the electronic
voice coldn't keep up. There is still room for improvement in some cases.
- Some communication messages shortened and "Trader" omitted from
displayName for better working with eSpeak.
- Replaced "jump drive" with "torus drive" consequently to avoid confusion.

Other:
- Torus synchronisation will need a little more precision in heading
alignment, but in practice this doesn't make it more difficult for the
player. I changed it because synchronised torus driving looks odd if the
headings differ too much.
- Added beacon_label "Escort Mother" in shipdata.plist
- The "python-trader" is included in shipdata.plist as a possible mother.
- Adapted ec_mother_dockingAI.plist to dockingAI.plist from Oolite 1.82,
hoping that this will fix the problem of the docking procedure getting
stuck sometimes. The only difference between the two docking AIs is
now the AI switched to when being attacked. I still have stuck traders
in rare cases, mostly when I'm immediately behind them in the docking
corridor, but it's difficult to reproduce. If a trader is stuck, it can
be 'reanimated' by approaching very close and activating the collision
avoidance behaviour, so a mission can still be finished successfully.
- Script code tidied up (mostly indention and bracket issues).
Because this is my first OXP upload some feedback would be appreciated!

Re: [UPDATED RELEASE] - Escort Contracts 1.7.1 (2015-12-04)

Posted: Fri Dec 04, 2015 1:40 am
by Norby
Very nice work! Please go forward and upload into the manager.

Re: [UPDATED RELEASE] - Escort Contracts 1.7.1 (2015-12-04)

Posted: Fri Dec 04, 2015 2:13 am
by Fritz
Thank you! But I have to go to bed, and I have to learn how to do the upload. But tomorrow... er... today is Friday! :D

Re: [UPDATED RELEASE] - Escort Contracts 1.7.1 (2015-12-04)

Posted: Fri Dec 04, 2015 9:46 am
by phkb
That's a massive first release! Well done! I look forward to downloading this shortly and giving it a whirl.

Re: [UPDATED RELEASE] - Escort Contracts 1.7.1 (2015-12-04)

Posted: Sun Dec 06, 2015 11:13 pm
by Fritz
Does it work? cim gave me an account, and I could upload the OXP to the manager today. So speak now or forever hold your peace! ;)

Re: [UPDATED RELEASE] - Escort Contracts 1.7.1 (2015-12-04)

Posted: Wed Dec 30, 2015 2:41 pm
by gizmo
There's an exception with the latest trunk (not sure about other versions) and Escort Contracts 1.7.1 (again not sure regarding versions):

Code: Select all

Exception: TypeError: player.ship.dockedStation is null
    Active script: Escort_Contracts 1.7.1
    Escort_Contracts.js, line 494:
    			player.ship.dockedStation.setInterface("escort_f4contracts",null); //remove interfaces option after timeout
To reproduce:
- go to the Contracts screen while docked
- decline all
- launch
- make a hyperspace jump
- after exiting the wormhole select the ship's manifest screen or the galactic chart

Re: [UPDATED RELEASE] - Escort Contracts 1.7.1 (2015-12-04)

Posted: Wed Dec 30, 2015 4:36 pm
by Fritz
I'll have a look at it this evening!

Strangely, most of the bugs seem to be hidden in the part where you are docked. AI and synchronised torus drive, no problem at all, but a few mission screens... :roll:

Edit: I can reproduce it with version 1.7.1 on Oolite 1.82. Since it has no effect on the game, I never noticed.

Re: [UPDATED RELEASE] - Escort Contracts 1.7.1 (2015-12-04)

Posted: Wed Dec 30, 2015 9:36 pm
by Fritz
Found and fixed. The mission selection mechanism is quite complicated: If you wait too long after declining (several hours!), all contracts are considered to be taken by others. The code for removing the contracts after time has run out didn't check if the player is still docked, and it is called for all screens, not only F4 (which isn't available in flight).

Version 1.7.2 will be coming soon, because I made some other (minor) changes.

Re: [UPDATED RELEASE] - Escort Contracts 1.7.1 (2015-12-04)

Posted: Thu May 05, 2016 10:53 pm
by Devium
Uhhg haven't tried escort stuff since I was a noob and got massacred A LOT lol but I recently decided I was gunna be the best damn escort there ever was... traded in the Ole Cobbie III for a shiiiiiny mamba. I could see myself protecting the hell out of innocent traders in THIS thing. But alas 2 outta 3 wormhole rides dump me in interstellar space. Usually straight away voiding my contract. Once the trader was there but it voided after trying to follow him out.

I also seem to recall that there were 2 other escorts that used to accompany the trader? But it's just me by my lonesome... running into packs of pirates... survive 5 (limping a little) hit 4-5 more immediately after... make it into station with a repair list longer then an Erbitians Barmaids legs.... This may be my fault having a few things that probably add pirates lol

And last but not least I have to keep save/loading or leave/enter the station to get contracts to show up most of the time.. this profession is frustrating :oops:

[Edit] Well I must have been just having the longest run of bad luck ever on the misjumps lol past 10 or so have been okie dokie... [/edit]

Re: [UPDATED RELEASE] - Escort Contracts 1.7.1 (2015-12-04)

Posted: Fri May 06, 2016 11:39 am
by Bogatyr
I like the escort contracts because they're challenging. You have to take the pirates down *fast* all the while keeping an eye on your escort mother. It's frantic and fun. Financially, they're rarely worth it, unless you happen upon a contract that takes you where you're already going with a load of cargo or another contract. Combat is expensive until you realize that you just cannot let the bastards get your shields down at all. Once your shields are down, you're toast or you start getting heavily damaged. If a pirate has a beam laser on target on you, you must dodge right away. This is a lesson I've learned the hard and expensive way. As long as finances are not an issue, I advise filling up on hardhead missiles so you can immediately thin and/or distract the herd when a big cloud of pirates attack the mother.

It would be cool if escort contracts could be extended to cover repairs for all damages received in the course of the contract.

Re: [UPDATED RELEASE] - Escort Contracts 1.7.1 (2015-12-04)

Posted: Fri May 06, 2016 1:48 pm
by Devium
Yeah watching the mother is what was throwing me off lol and being in a ship without any missile pylons (mamba escort). I have no problem when I'm running cross chart parcels and passengers, assassins at every turn, but wanted to start out trying to use escort contracts to make my way up. Now that my rep is excellent the contracts seem to show up more without save loading and it seems I just had a night where every random bad roll of luck came my way. But yeah think I got the hang of the defensive style of combat tho sometimes mother likes to rush back into the cloud of 10 or so pirates when we clearly need to run and aft shoot the fast ones :D Thats when she should definitely pay for repairs!
Did manage to take out a Serpent Class Cruiser, Python ET, Python Class Cruiser, Gnat, Mamba, 2 SimonB Sidewinder Specials, Cobra MkIII, Gecko, and a DTT Wraith in one furball with my lil mamba... only thing functioning after that was the laser :lol:

Re: [UPDATED RELEASE] - Escort Contracts 1.7.1 (2015-12-04)

Posted: Sat Jan 07, 2017 10:39 am
by Keeper
Fritz wrote:
Version 1.7.2 will be coming soon, because I made some other (minor) changes.
Whatever became of this? The manager still shows 1.7.1.

Re: [UPDATED RELEASE] - Escort Contracts 1.7.1 (2015-12-04)

Posted: Mon Jan 09, 2017 9:08 pm
by Fritz
I think I made the minor changes already, so I only have to upload it. But I'll have to check carefully first, because I was distracted by some other things in the past months (my days are too short for all the things I'm trying to do... :roll: ).

Re: [UPDATED RELEASE] - Escort Contracts 1.7.1 (2015-12-04)

Posted: Tue Jan 10, 2017 2:25 am
by Cmdr. Aiden Henessy
A suggestion, if pricing and financial concerns are a problem with the OXP -
Just like giving a price per killed pirate, maybe tweak the code to give a smaller percentage per pirate that flees? May not be possible, but an idea.

As far as contracts go:


1. Some contracts offer a low up-front price, however will cover costs of any repairs. Has a larger bonus for pirates killed or made to flee.

2. Have some contracts offer a large up-front price, in pure cash, but don't offer repairs of the equipment. Doesn't have as much of a bonus for killed or fled pirates.


The idea behind the two different types is one is expected to be low-risk, and the other is expected to be high-risk. The high risk ones carry a high monetary amount, to attract the eyes, however the person offering the contract knows that damage is likely to occur and thus it'd be very expensive to have to pay for those - so he doesn't offer repairs. However, a low-risk contract won't have as much of a reward, since they aren't so desperate to attract the attention of others, but they do promise on the off chance you get damaged to repair your systems. This makes them more competitive to the ones that don't offer that service.
Likewise, with the price-per-head reward, the high-risk contracts are likely to run into a lot of pirates, thus the reward for killing would increase beyond what the pilot was making in cargo contracts. So he lowers the bounty system. But the low-risk ones have a higher price per head, since it's not expected to run into many. Again, making them a bit more attractive to the ones not concerned about risk.


This also makes it somewhat more engaging to the player - do you run the mission with a high profit and high risk, or low profit and low risk? And it's not simply a matter of dying or not. (since that seems to be all too erasable with save games) The bigger risk I believe would lie in damage to equipment. Even with that large reward at the end, if it's a really grueling mission that blows up half your ship, you may spend more than you earned in repairs.