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

[UPDATED RELEASE] - Escort Contracts OXP - 1.5.6 (07/05/12)

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

Moderators: winston, another_commander

Post Reply
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: [UPDATED RELEASE] - Escort Contracts OXP - 1.3.1 (7/8/11

Post by Capt. Murphy »

Thanks for the feedback gents...

commanderxairon - Allowing a long term arrangement between the player and an NPC trader as an escort is really beyond what I intended for the scope of this OXP. And do you really want to spend days following around an NPC? To do well it would need a lot of work so that there can be more meaningful interactions between the player and the NPC. If you want to make a career out of escorting, then keep doing contracts. The more you complete successfully the more frequently they are offered (and the payments go up). Having said that if you stop doing them for a while the frequency of offers will start to go down and payments will reduce again.

feelgone - That is a good point. The ability to leave the contract screen was a new addition for the last release and really is just to give the player a chance check if a contract is in 'the right direction' if they are heading somewhere specific. But as you say it also gives an opportunity to get repairs, purchase a new ship/equipment etc and it is a bit unrealistic that traders haven't entered into contracts with NPC flyers in the meantime. I'll stick it on the list for a future upgrade to re-do the contract list if the player leaves and then returns to the contract screen more that xx game hours after leaving it.

In case anyone is wondering I haven't been able to successfully reproduce FleurDeMals crash, although I think I know what (but not why) is triggering it for his particular setup. He's also suffered crashes with another OXP (Hired Guns) which uses a similar technique to hop the NPC escorts around so they can keep up with the player when the player uses jump drive with that OXP, so I think it's something to do with changing the position of NPC's via script. Anyone else having this issue please report.
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: [UPDATED RELEASE] - Escort Contracts OXP - 1.4 (19/9/11)

Post by Capt. Murphy »

Version 1.4 of escort contracts is available to download. See first post for read me and download link.

Incorporated feelgone's suggestion for changes to contracts on offer if player leaves mission screen for extended period of game time changes to mechanism used to simulate synchronised jump behaviour.
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.
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
sdrubble
Deadly
Deadly
Posts: 234
Joined: Fri Aug 05, 2011 8:30 am
Location: Belo Horizonte, Brazil

Re: [UPDATED RELEASE] - Escort Contracts OXP - 1.4 (19/9/11)

Post by sdrubble »

Hi Capt. Murphy,

thx for this wonderful OXP.

After doing a couple missions under v1.3.1 and having just finished my first 1.4 one, here's some thoughts:

Starting with the 'very annoying' bit: it's totally impossible to check the LONG range (F6+F6) star chart while evaluating a mission offer (but I'm sure that this could be done normally with 1.3.1). Use case: I wished to accommodate the escort mission together with an already in-progress cargo contract. Had to use ClymAngus charts instead. :? (all other 'docked' screens are reachable though).

The target reticle disappears for a while and reappears (repeatedly), mostly as of the 'please approach between 500 & 2500' moments. I have to guesstimate distance to mother (and *maybe* to other craft, not so sure of this). Also happened with previous version.

There was a looooong stretch where mother jumped and disjumped about fifteen times in sequence (some other craft was just repeatedly going into and out of jumping range). Would this situation be a possible candidate for using injectors (let's say, after the 3rd or 4th aborted jump in a row)? This adds some stretched 'boring' element into mission... :cry:

IIRC, under 3.1 the mother instantly detected when last baddie was killed and issued the 'let's get going' call. Under 1.4 (this is not bad at all ! :twisted: ) I had ample time to scoop lots of pods while awaiting for the mother to 'awake'. It wouldn't, and it did so only after I approached her very closely. If it's a feature instead of a bug, better describe this under the readme...

Now for the 'cheatable' :twisted: portion: mission is finally accomplished at station aegis. Then I return to witchpoint and kill 3 more baddies. Then I dock to receive mission payment, and surprisingly find that the 3 additional baddies got improperly counted for the mission bonus (maybe you could stop counting kills after 'mission accomplished' ?)

This is already a wonderful addon to Oolite. HTH to improve it a bit more.

Cheers :mrgreen:
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: [UPDATED RELEASE] - Escort Contracts OXP - 1.4 (19/9/11)

Post by Capt. Murphy »

Thanks for the feedback srubble,

I don't know - first they want the short range chart and now they want both....! :wink:

I'll have a bit of a think about that. Because there is no key press for accessing the mission screens I have to set it to override the transfer from a gui screen to another. Would it be better if you could access the short range, then the long range and then another f6 press took you back to the mission screen?

Not sure about the target reticle - I don't recall ever coming across that in my playtesting, and there isn't anything in escort contracts that should interfere with the HUD. Are you actually losing target (i.e. have to manually re-target the mother) or it is just a HUD flicker? Are you using an OXP HUD?

The delay before the mother is hitting injectors is random - no change between last version and this one. I'll have a think about getting the mother to inject if repeatedly mass locked by the same NPC.
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
sdrubble
Deadly
Deadly
Posts: 234
Joined: Fri Aug 05, 2011 8:30 am
Location: Belo Horizonte, Brazil

Re: [UPDATED RELEASE] - Escort Contracts OXP - 1.4 (19/9/11)

Post by sdrubble »

Capt. Murphy wrote:
I don't know - first they want the short range chart and now they want both....! :wink:
Well, of course... you can't ever manage to keep everybody happy at the same time...
I'll have a bit of a think about that. Because there is no key press for accessing the mission screens I have to set it to override the transfer from a gui screen to another. Would it be better if you could access the short range, then the long range and then another f6 press took you back to the mission screen?
Fine with me !!! :mrgreen:

What's important, from my point of view, is being able to access any and all mission screens, regardless if it takes a zillion keypresses. Matter of fact there's already one KP for GalaxyInfo, one for Hypercargo, a couple for RandomHits, 1 more for UPSCourier (and I never seem to find the right one... :shock: ), so 1 extra KP for EC certainly won't hurt at all. :D
Not sure about the target reticle - I don't recall ever coming across that in my playtesting, and there isn't anything in escort contracts that should interfere with the HUD. Are you actually losing target (i.e. have to manually re-target the mother) or it is just a HUD flicker? Are you using an OXP HUD?
What seems to disappear is just the square reticle drawing in itself. Because when I press 'R' I receive a confirmation msg , 'locked into whatever' or some such - only the reticle is missing, together with the additional info on type of ship, distance, bounty etc.

I'm using MilHUD with lots of tweaks, plus a hud.plist in AddOns\Config with a few more... if you wish to see those I can upload a ZIP to somewhere with all of these. Just shout.
The delay before the mother is hitting injectors is random - no change between last version and this one. I'll have a think about getting the mother to inject if repeatedly mass locked by the same NPC.
That makes sense - I'd suggest a maximum of 3 successive mass locks by same NPC before injecting... and will you pls also take into account that, if a mass lock aborts the jump AND I don't have the reticle to immediately check the distance figures, next jump will be delayed a bit until I 'feel' I'm more than 2500m away and reapproach the mother. Thorny issue it seems. :?
. . .
And as you didn't say a word about the issues of 'take your time and scoop at will' and the 'go kill some more baddies and bring the bonus bill' (just made some crooked rhymes, hehe), I'll take these as 'Easter eggs' of EC - surely won't complain at all... :mrgreen:
User avatar
sdrubble
Deadly
Deadly
Posts: 234
Joined: Fri Aug 05, 2011 8:30 am
Location: Belo Horizonte, Brazil

Re: [UPDATED RELEASE] - Escort Contracts OXP - 1.4 (19/9/11)

Post by sdrubble »

I just had one of those glorious 'Eureka' moments, while 70% asleep at the toilet (a not-so-brief relaxing interlude after some strenuous work :| was successfully concluded :) ). That's one of the preferred spots of my uncalled-for creativity bursts BTW... :mrgreen:

What happens is that MilHUD reacts in a very specific way, at the SAME conditions which allow for a jump (i.e., no mass lock as the mother has CLASS_ROCK scan_class): it switches to the GREEN HUD, which among other things DOES suppress the target reticle... :idea: :D :idea:

While I could possibly tweak the green hud and re-incorporate the reticle back to it, I believe that it MIGHT (???) be simpler to tweak something inside the MilHUD plist-changing script. This is something I can't do by myself though.

I currently have the following, inside \MilHUD\Config\script.js:

Code: Select all

this.alertConditionChanged = function(newCondition, oldCondition)
   {
   switch(newCondition)
      {
      case 0: // we're docked - DOES NOT KICK IN WHEN LOADING GAME - only when we RE-DOCK !!!
         {
         player.ship.hud = "milhuddock.plist"; // set the docked HUD
			[snip]
         break;
         }
      case 1: // we're at green alert
         {
         if(player.ship.energy > 108) // if we're not using the damaged HUD
            {
            player.ship.hud = "milhudgreen.plist"; // set the standard HUD
			[snip]
            }
         break;
		 }
      case 2: // we're at yellow alert
         {
         if(player.ship.energy > 108) // if we're not using the damaged HUD
            {
            player.ship.hud = "milhudyellow.plist"; // set the yellow alert HUD
			[snip]
            }
         break;
         }
      case 3: // we're at red alert
         {
         if(player.alertHostiles && player.ship.energy > 108) // and under attack and not using the damaged HUD
            {
            player.ship.hud = "milhudred.plist"; // set the combat HUD
			[snip]
            }
         break;
         }
      }
   }
I don't understand how the switching actually works, but I suppose that the 'newCondition' regards the docked-green-red-yellow status, which would have ALREADY changed beforehand when this plist fires.

So my very unknowledgeable suggestions would be either of these:

1. keep the 'yellow' status throughout the mission, in the EC scripts themselves (I'm not sure if you'd want to do that), OR
2. change the MilHUD plist-changing script so that, SPECIFICALLY while the EC mission is running, it'll keep using 'milhudyellow.plist' even on GREEN status, OR
3. include a reticle in 'milhudgreen.plist'.

So if I could have some assistance on alternative #2 (so that nothing would need to change inside EC proper), I'd be really thankful.

Cheers
User avatar
CommonSenseOTB
---- E L I T E ----
---- E L I T E ----
Posts: 1397
Joined: Wed May 04, 2011 10:42 am
Location: Saskatchewan, Canada

Re: [UPDATED RELEASE] - Escort Contracts OXP - 1.4 (19/9/11)

Post by CommonSenseOTB »

sdrubble, the disappearing reticle is a hud specific issue. If it's a problem to have the reticle disappear then change the appropriate hud.plist to include a reticle. You can even copy and paste it from the hud.plist that has it to the one that doesn't. Simplest solution to make your custom hud work for you and will even draw a reticle around rocks and cargo containers that are targetted this way. :wink:
Take an idea from one person and twist or modify it in a different way as a return suggestion so another person can see a part of it that can apply to the oxp they are working on.


CommonSense 'Outside-the-Box' Design Studios Ltd.
WIKI+OXPs
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: [UPDATED RELEASE] - Escort Contracts OXP - 1.4 (19/9/11)

Post by Capt. Murphy »

I thought it might be a switchable HUD issue.

If you want to do option 2 rather than 3 you could add a check for the escort contracts missionVariable in the switching code.

Something like this should get you started.

Code: Select all

  case 1: // we're at green alert
         {
         if(missionVariables.ec_currentcontract === "YES")
         {
         player.ship.hud = "appropriatehud.plist";
         break;
         }
         if(player.ship.energy > 108) // if we're not using the damaged HUD
            {
            player.ship.hud = "milhudgreen.plist"; // set the standard HUD
         [snip]
            }
         break;
       }
I'll take a look at the other issues as-well - was posting quick yesterday morning as was late for work. Hopefully will have some time this weekend.
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
sdrubble
Deadly
Deadly
Posts: 234
Joined: Fri Aug 05, 2011 8:30 am
Location: Belo Horizonte, Brazil

Re: [UPDATED RELEASE] - Escort Contracts OXP - 1.4 (19/9/11)

Post by sdrubble »

Capt. Murphy wrote:
I thought it might be a switchable HUD issue.

If you want to do option 2 rather than 3 you could add a check for the escort contracts missionVariable in the switching code.

Something like this should get you started.
That was great, Capt. Murphy. Just as I wished, and worked from the start.

Here's a screenshot of an Escort Contracts jump, showing the yellow MilHUD (WITH reticle) force-fed by the script condition you suggested, instead of the green hud (that does not have a reticle) that was formerly compulsory when mass locks are absent.

I also verified that, outside of the Escort Contracts missions, hud switching still behaves as it usually did. Just perfect. Thx a lot for the code suggestion !!! :mrgreen:

@CommonSenseOTB, Thx for your input.
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: [UPDATED RELEASE] - Escort Contracts OXP - 1.4.1 (24/9/1

Post by Capt. Murphy »

Good stuff sdrubble.

I've uploaded version 1.4.1. See first post.

You can access the long range chart now and pressing F6 again from long range chart will take you back to the contract offers screen.

I've also done a little tweak so the repeated mass lock issue shouldn't happen as often. Previously as soon as the mother and player synchronised jump drives the mother's 'frustration level' (which is a factor in how quickly she'll decide to inject when mass-locked) was set to 0. Now it reduces a little more slowly so if there only a very short period of jump speed between masslocks she should decide to inject more quickly.

I've checked the code for problems with counting kills during the mission and it looks fine. I've done some testing this morning and kills were not being counted after the mother had reported she was safely in the Aegis so not sure what caused that. Also playtested combat and didn't come across any problems with the mother going dormant after combat. Again the code looks fine.
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
sdrubble
Deadly
Deadly
Posts: 234
Joined: Fri Aug 05, 2011 8:30 am
Location: Belo Horizonte, Brazil

Re: [UPDATED RELEASE] - Escort Contracts OXP - 1.4.1 (24/9/1

Post by sdrubble »

Capt. Murphy wrote:
Good stuff sdrubble.
:D
I've uploaded version 1.4.1. See first post.
Well, first post [currently] states:
Download current version 1.4 from ...
... you probably wanted to say 1.4.1 I guess. 8)
You can access the long range chart now and pressing F6 again from long range chart will take you back to the contract offers screen.
Sweet! :D
I've also done a little tweak so the repeated mass lock issue shouldn't happen as often. Previously as soon as the mother and player synchronised jump drives the mother's 'frustration level' (which is a factor in how quickly she'll decide to inject when mass-locked) was set to 0. Now it reduces a little more slowly so if there only a very short period of jump speed between masslocks she should decide to inject more quickly.
Thx - from my point of view this should improve gameplay significantly. Also thx for explaining the 'frustration' thingy a bit, which was something that kept me quite puzzled. :mrgreen:
I've checked the code for problems with counting kills during the mission and it looks fine. I've done some testing this morning and kills were not being counted after the mother had reported she was safely in the Aegis so not sure what caused that. Also playtested combat and didn't come across any problems with the mother going dormant after combat. Again the code looks fine.
Well it could also have been an overlook from my part when reporting these issues - I was probably a bit tired when testing. :P

Anyway this is great news. I'll be testing 1.4.1 shortly... thx a lot of a lot, indeed again. :mrgreen:

Cheers! :D
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: [UPDATED RELEASE] - Escort Contracts OXP - 1.4.1 (24/9/1

Post by Capt. Murphy »

sdrubble wrote:
I've uploaded version 1.4.1. See first post.
Well, first post [currently] states:
Download current version 1.4 from ...
... you probably wanted to say 1.4.1 I guess. 8)
Oops - sorted - thanks.
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: [UPDATED RELEASE] - Escort Contracts OXP - 1.4.2 (20/11/

Post by Capt. Murphy »

1.4.2 available for download - see first post for update to read me and download link.
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.
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
Captain Patrick
Competent
Competent
Posts: 42
Joined: Tue Jun 22, 2010 6:14 am

Re: [UPDATED RELEASE] - Escort Contracts OXP - 1.4.2 (20/11/

Post by Captain Patrick »

Thanks for a very enjoyable and generally very realistic OXP.

However, I've been feeling bad about using it because I think each mission pays my character about 3-4 times what the escorted ship could realistically afford with a typical cargo (see also Hired Guns OXP, that rents the player _two_ escorts for 750 cr, which seems affordable and fair).

This doesn't include the bonuses for kills, which I find allows me to abandon my charge and go gadding about all over an Anarchy system, picking fights and racking up kills (including of DeepSpacePirates, from that OXP), and getting paid mucho extra for it, so long as I never dock - I'm not saying this irresponsible behaviour can or should be prevented (say by imposing a maximum range for straying without losing the contract; but an escort might have to stay behind to fight a group of pirates while the mother ship gets away), but it shouldn't be rewarded: survival of the mother should be the escort's only concern. And traders generally normally don't seem to inquire into the status of passing ships so long as they're not attacking, or otherwise look for trouble, but leave that to GalCop and vigilantes working on their own time.
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: [UPDATED RELEASE] - Escort Contracts OXP - 1.4.2 (20/11/

Post by Capt. Murphy »

Thanks for the feedback Captain Patrick, always appreciated.

With regards to the kill bonus I can change the code fairly easily so a kill is only recognised when it happens within scanner range and a bit of the mother. Excellent suggestion. Your post has also inspired an idea for another little tweak that will discourage too much gallivanting (not an automatic contract loss, but a scripted tendency for the mother to find herself in trouble if you are out of scanner range for too long).

Re the base fee that is offered to the player I have to admit that not a huge amount of thought went into the level except that I wanted to make the fees a reasonably worthwhile alternative to trading. It's not hard to make 1000 credits plus with a standard cobby per run.

The base fee varies from 200 to 800 depending on the perceived danger in the destination system, although that figure is modified by your escort reputation and can at the most extreme double or half. So the fees could potentially be between 100 to 1600. That's not totally out of whack with hired guns - you would pay more for Cobra (1000 for 2) or Viper (1500 for 2) escorts.

I agree the fee represents a big chunk of the mother's potential profit, but these ships have big bays and may also be carrying metals, gems, passengers. So the smallest potential mother, the Python could easily be making 4000+ profit, and the bigger ships more than that. As NPC's don't have the option to reload after a save they are probably not quite as gung-ho as the average player and would be prepared to part with that kind of cash to ensure their safety. It's also probably cheaper for them than getting through a rack full of hardened missiles... :wink:

Non-withstanding that it's my OXP, I don't think that as a player I would be tempted by these contracts if they were paying significantly less than they are now - I'd just trade instead - but maybe I should knock about 25% of the maximum? What kind of range of fees do you think would be appropriate?
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
Post Reply