Space Objects/Probes?

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

Killer Wolf wrote:
could we press Shift N to arm the camera which would then auto shoot when an object is under the crosshairs? actually, combining this would also return the object id, thereby providing a way of confirming you've photo'd the right thing.
ooh - maybe a switchable camera HUD for when you Shift N...?
you could press shift N to prime and then N to toggle a piece of equipment between armed and unarmed (or any number of states, really)

you'd need 2 scripts - one equipment script to switch missionVariable.shinyThingStatus ( eg from 0 - unarmed to 1 - armed & back), and a world script that checks if missionVariable.shinyThingStatus is 1 before doing the deed...

You could then use shipTargetAcquired as a world event to automatically take snapshots whenever the player acquires a new target. At the moment I don't think there's an easy way to determine if the new target was acquired when switching missiles or by ident computer, but I might be wrong - ...or we might be able to add that info to the event handler in the near future...


About switchable HUDs: well, if you can code it, why not! :)
I seem to detect a slight misunderstanding between what shift-N & N actually do.
Just to be perfectly clear: shift-N (prime equipment) says: "I want to use this at some point in the future", N (activate equipment) says : "that thing I wanted to use? Do something with it now!"

By the way, shift-N goes forward through all the usable stuff, ctrl-shift-N goes backwards...
Last edited by Kaks on Fri Nov 19, 2010 1:00 pm, edited 1 time in total.
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Kaks wrote:
In order to make this concept fully workable we also need to make sure that the player is looking forward, as well as having the ship pointing in the right direction...
Only when taking snapshots with his handheld camera through the window. He could also use the fixed camera in the nose of the ship. :wink:

Thinking of it... The angle is measured from the centre of the ship, not from the view position. And that angle should not be fixed but distance dependent. When very close to the target, a wider angle should be allowed. That is also relative easy triangular math: allowed deviation = Tangent(angle) * distance. (Both distance and deviation are in meters)
And for small angles, Tangent(angle) is about the same as angle, we could simplify that to: allowed deviation = angle * distance
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Post by Smivs »

Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

I played a bit further with A_C's code and came up with:

Code: Select all

this.pictureCount = 10;

this.activated = function()
{
	var self = this.ship;
   var target = self.target;
	
	player.consoleMessage("Photo shot.");
	
	takeSnapShot();
	if (target)
	{
        var range = target.position.distanceTo(self.position) - target.collisionRadius;
        var minDistance = target.collisionRadius * 3; // screen filling
        var maxDistance = target.collisionRadius * 10; // 1/5 of screen filling
        var inRange =  (range < maxDistance && range > minDistance);
        var deviation = self.heading.angleTo(target.position.subtract(self.position)) * range; // deviation in meter. 
        var centered = (deviation < target.collisionRadius);
        if (inRange && centered)
        {
            worldScripts.photoCamera.photoConfirmed();
            player.consoleMessage("Object nicely framed");
        }

	}
    if (this.pictureCount-- < 1)
    {
        self.removeEquipment("EQ_PHOTOCAMERA");
        player.consoleMessage("Film is full");
    }
}
This code has a general value and is independent of object size. You can use it for vipers, as well as stations. Its just a shame you must buy a new camera after 10 shots :roll:
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2272
Joined: Tue Jan 02, 2007 12:38 pm

Post by Killer Wolf »

"Its just a shame you must buy a new camera after 10 shots "

as long as we don't have to haul it to the local branch of BOots to get the film developed!
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

It's not BOots it's 'Bots

Image
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

You realise of course I'm now going to have to fight the evil urge to write Speed Camera.oxp :twisted:
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Thargoid wrote:
You realise of course I'm now going to have to fight the evil urge to write Speed Camera.oxp :twisted:
And I re-started working on my Achenar.oxp that I wrote about 2 years ago. It needed launch from a interstellar station. That never worked good because the station was transferred to normal space on launch.

In 1.75 there will be a station key to keep it in interstellar space. Its now a mission to write an article for the Tionisla chronicle. It needs an interview with an acherian on the station and a picture of that station. I scripted it up yesterday as a novice mission in G1. Now I must test-fly it, and than work on the content of the mission screens.

There will be 4 screens. Anybody better in english than me, that is volunteering to write them for me?
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Post by Cody »

Eric Walch wrote:
There will be 4 screens. Anybody better in english than me, that is volunteering to write them for me?
Tell me roughly what you want the screens to say, Eric, and I'll happily 'englishify' it.
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
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

El Viejo wrote:
Eric Walch wrote:
There will be 4 screens. Anybody better in english than me, that is volunteering to write them for me?
Tell me roughly what you want the screens to say, Eric, and I'll happily 'englishify' it.
Ditto what EV says - having written over 100+ News flashes for Snoopers and LH2 - I'm getting quite good at it - but EV gets first dibs as he offered first.
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Post by Cody »

You’re spoilt for choice, Eric… but seeing as how it’s to do with the Tionisla Chronicle, I'm sure that DH, the ferocious newshound from ‘Snoopers’, will have a much better idea of what you want.
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
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

El Viejo wrote:
You’re spoilt for choice, Eric… but seeing as how it’s to do with the Tionisla Chronicle, I'm sure that DH, the ferocious newshound from ‘Snoopers’, will have a much better idea of what you want.
Except it was Drew who wrote all the TC articles - Drew, where are you? :wink:
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

DaddyHoggy wrote:
El Viejo wrote:
Eric Walch wrote:
There will be 4 screens. Anybody better in english than me, that is volunteering to write them for me?
Tell me roughly what you want the screens to say, Eric, and I'll happily 'englishify' it.
Ditto what EV says - having written over 100+ News flashes for Snoopers and LH2 - I'm getting quite good at it - but EV gets first dibs as he offered first.
Thanks both for the offer. A fully working wip-version is here. I enclosed two save games. One at the start and one at the destination. The scripting is fully working, only the "missiontext.plist" now needs working on. It currently holds one-line space holders for the mission pages.

I had no real texts in mind but the 5 pages I had in mind are roughly:

at Tionisla
1: On docking at Tionisla there must be a text to offer a job to write an article about "achenar" the hidden planet that according to rumours is found nearby Biorle.
2: when accepted the next screen gives some further details and installs the camera. Probably should it also explain how to activate the camera as this is a new 1.75 key. And the camera has only room for 10 pictures.

at achenar (misjump between Usle and Biorle)
3: On docking at the station you get some info about the planet. (there can't be a sun in interstellar space, so maybe something about living below the surface of the planet etc.)

at Tionisla
4: Success report and reward

at Biorle
5: becouse novices have no idea how to misjump I added a facultative page to hint how one must misjump. When jumping (and docking at main station) from Biorle->Usle->Biorle you get a page about traders often entering wormholes with pitch full up and never arriving at Usle.

(Or should I force a misjump here by script?)
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

DaddyHoggy wrote:
El Viejo wrote:
You’re spoilt for choice, Eric… but seeing as how it’s to do with the Tionisla Chronicle, I'm sure that DH, the ferocious newshound from ‘Snoopers’, will have a much better idea of what you want.
Except it was Drew who wrote all the TC articles - Drew, where are you? :wink:
But it's you who is the award-winning author. :D
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

Commander McLane wrote:
DaddyHoggy wrote:
El Viejo wrote:
You’re spoilt for choice, Eric… but seeing as how it’s to do with the Tionisla Chronicle, I'm sure that DH, the ferocious newshound from ‘Snoopers’, will have a much better idea of what you want.
Except it was Drew who wrote all the TC articles - Drew, where are you? :wink:
But it's you who is the award-winning author. :D
But Drew's the only one of us who has finished a novel (several times over), but that's for the thought! :wink:
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
Post Reply