Page 4 of 4

Re: OXP idea: Escape capsule locator

Posted: Tue Jul 26, 2011 5:38 am
by Dragonfire
The script that runs the file could look for a condition "is_clean" before running. If that condition is not met, the script doesn't run.

Re: OXP idea: Escape capsule locator

Posted: Tue Jul 26, 2011 5:40 am
by Thargoid
I meant more in terms of in-game immersion and realism.

I know how to do it in the code (player.bounty can also be used in JS, or the requires_clean entry set true in equipment.plist).

Re: OXP idea: Escape capsule locator

Posted: Tue Jul 26, 2011 6:05 am
by Kaks
In terms of realism, you could have the police scan you when you dock, and depending on your status and / or government type, give you fines/increase your bounty/confiscate the equipment... :twisted:

Re: OXP idea: Escape capsule locator

Posted: Tue Jul 26, 2011 6:23 am
by Capt. Murphy
The equipment is now now only purchasable for clean pilots and I don't think it is beyond the bounds of realism for the software to be able to disable itself if the player loses the clean status, or renable itself if clean status is regained. Script wise it's done... timer checks legal status and if not clean will remove the equipment entirely and awards some dummy equipment instead so it can be re-awarded once bounty is back to 0 .:)

A question for mac and linux using devs/scripters out there...

On my windows machine ship.roles returns the array with the roles in alphabetical order, not the order they appear in shipdata.plist. My script is relying on this behaviour and it has crossed my mind that this could be OS specific behaviour. Can anyone confirm if this is behaviour common to all OS's?

Re: OXP idea: Escape capsule locator

Posted: Tue Jul 26, 2011 7:30 am
by Eric Walch
Capt. Murphy wrote:
On my windows machine ship.roles returns the array with the roles in alphabetical order, not the order they appear in shipdata.plist. My script is relying on this behaviour and it has crossed my mind that this could be OS specific behaviour. Can anyone confirm if this is behaviour common to all OS's?
I am not familiar with this part of code but after a quick browse I found:

Code: Select all

- (NSArray *)sortedRoles
{
	return [[_rolesAndProbabilities allKeys] sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
}
So I think the code is already explicitly working with a sorted array.

Re: OXP idea: Escape capsule locator

Posted: Thu Jul 28, 2011 5:52 am
by Capt. Murphy
Thanks Eric.

Version 1.0 is released - see https://bb.oolite.space/viewtopic.php?f=4&t=10590

Re: OXP idea: Escape capsule locator

Posted: Thu Jul 28, 2011 8:12 am
by Eric Walch
Capt. Murphy wrote:
Version 1.0 is released
I had a quick look and wounder if it is not screwing up missions that release pods. e.g. the constrictor mission launches a pod with the original pilot in the pod. The pod has the default escape pod role. Also in ups I have several missions were escape capsules are released with the original pilots on board. When I read the code correctly, you remove those pods and replace it with new ones. But than all the original pilots are removed. I think the ionics mission will have similar problems.

And what about transports.oxp. The liners in it have ships with multiple escape capsules. The first contains a trader as pilot, the others all contain passengers. (Passengers have a 100% insurance).

I think you must rethink the replacing of the pods, just to get a beacon symbol on it.

Re: OXP idea: Escape capsule locator

Posted: Thu Jul 28, 2011 8:44 am
by Kaks
Hmmm, if you have really high energy, really light & really small beacon drones, they shouldn't be able either to destroy or being destroyed by NPCs...

How would it work if you had a beacon standing still near the ejection site, and have it begin to move towards the actual escape capsule only when the player reaches scanner range?

Re: OXP idea: Escape capsule locator

Posted: Thu Jul 28, 2011 8:52 am
by Gimi
Kaks wrote:
Hmmm, if you have really high energy, really light & really small beacon drones, they shouldn't be able either to destroy or being destroyed by NPCs...

How would it work if you had a beacon standing still near the ejection site, and have it begin to move towards the actual escape capsule only when the player reaches scanner range?
You are talking about an Oolite version of the distress beacon that is mandatory on most ships in RL:
Image
Sounds like a good idea, and the behaviour you describe also seems realistic.

Re: OXP idea: Escape capsule locator

Posted: Thu Jul 28, 2011 3:35 pm
by Capt. Murphy
Grrrr - me making assumptions again.

You are quite right Eric -UPS and the constrictor (and any other OXP that include a custom pilot in a regular pod) will be broken by this as it stands.

Shame- I was quite pleased with the scripting and the ship data shenanigans needed to make this one work and it's taken a little while to put together.

I'll withdraw the download and go back to my original idea which was as Kaks suggests a tiny, low mass dummy beacon scripted to follow the original type pod around. I just liked the elegance of being able to give the pods themselves the beacons.......

Now if only someone would slip a bit of code into trunk to make ship.beaconCode read/write this kind of thing would be a lot easier.... :wink:

Re: OXP idea: Escape capsule locator

Posted: Thu Jul 28, 2011 5:40 pm
by CommonSenseOTB
Capt. Murphy wrote:
Grrrr - me making assumptions again.

You are quite right Eric -UPS and the constrictor (and any other OXP that include a custom pilot in a regular pod) will be broken by this as it stands.

Shame- I was quite pleased with the scripting and the ship data shenanigans needed to make this one work and it's taken a little while to put together.

I'll withdraw the download and go back to my original idea which was as Kaks suggests a tiny, low mass dummy beacon scripted to follow the original type pod around. I just liked the elegance of being able to give the pods themselves the beacons.......

Now if only someone would slip a bit of code into trunk to make ship.beaconCode read/write this kind of thing would be a lot easier.... :wink:
Seconded.

Sorry for suggesting to make the ships have beacons as it appears to have caused a big headache. Cheers.

Re: OXP idea: Escape capsule locator

Posted: Thu Jul 28, 2011 7:02 pm
by Kaks
Hmm, sounds like a scripting request for 1.77! It could potentially break the standard game behaviour, but it's always worth considering, I suppose... :)

Re: OXP idea: Escape capsule locator

Posted: Tue Aug 02, 2011 5:25 am
by Capt. Murphy