Page 1 of 2

Release: Fireworks.oxp v 1.1 now available

Posted: Fri Feb 18, 2011 2:22 pm
by Commander McLane
Have you just become ELITE? Have you just survived your first encounter with the Thargoids (and smashed some bugs)? Have you just finished a long and dangerous mission? Or do you just feel like celebrating or whatever reason?

Now you can do! Just enter your current station's equipment section and order a Personal Fireworks. The station master will prepare an impressive display for you. Just launch, sit back, and enjoy the next minute. It all happens only for you!

The Personal Fireworks does cost a little, but you're worth it! Sometimes it's absolutely adequate to spend some of your money just for a display of your vanity.

If you liked the action, you can re-dock and have another Personal Fireworks. Or you buy the take-away version, the Portable Fireworks! That's some fireworks packed into an empty mine shell. You can mount it on an unused pylon and launch it whenever you feel like celebrating. Don't forget to switch to your rear view to enjoy the action. Everything is assembled and tested by experts, and there are no high explosives involved. Therefore the fireworks is not a weapon, it cannot damage anything. It's just a light show for you to enjoy.


NOTE: Fireworks.oxp uses a missile model and a mine model from Missiles and Bombs.oxp. Therefore this OXP is required for fireworks.oxp to work.


The celebration is on, available at an [EliteWiki] Elite Wiki near you! :D


EDIT: new in v 1.1: sound effects!

Re: Release: Fireworks.oxp

Posted: Fri Feb 18, 2011 2:29 pm
by DaddyHoggy
You sir are a genius! I love it!

(Perhaps a mod - would be post-6400 kills for the Elite Fed of Pilots to do this for you as you come into dock...)

And this is why Oolite is the best game in the Ooniverse! 8)

Re: Release: Fireworks.oxp

Posted: Fri Feb 18, 2011 2:35 pm
by gizmo
I'll use it to celebrate the 10000 kill.

Re: Release: Fireworks.oxp

Posted: Fri Feb 18, 2011 3:44 pm
by Commander McLane
DaddyHoggy wrote:
You sir are a genius! I love it!

(Perhaps a mod - would be post-6400 kills for the Elite Fed of Pilots to do this for you as you come into dock...)
Now that's a nice idea. :D

I am also thinking that perhaps occasionally you could see someone else's fireworks when you're approaching a station.

Re: Release: Fireworks.oxp

Posted: Fri Feb 18, 2011 4:01 pm
by Okti
Good one Commander McLane,


I think you can do a special show when a commander reaches to Oresrati as well :) .

Re: Release: Fireworks.oxp

Posted: Fri Feb 18, 2011 5:09 pm
by Commander McLane
By the way: I wanted to include some nice celebratory music as well, and Handel's Music For The Royal Fireworks seemed an obvious choice, but I couldn't find a recording in the public domain.

If anyone could give me a hint? (Or perhaps one of the more musically sound guys could make an own arrangement?) Watermusic would be fine as well.

Re: Release: Fireworks.oxp

Posted: Fri Feb 18, 2011 6:16 pm
by Rxke
it's not on Musopen... http://www.musopen.org/music.php

But maybe you'll find something else of your liking?

Musopen is NOT illegal!

Re: Release: Fireworks.oxp

Posted: Fri Feb 18, 2011 6:18 pm
by Rxke
BTW, I always thought Holst's 'Mars' fits nicely in Oolite...

http://www.musopen.org/music.php?type=piece&id=411

Re: Release: Fireworks.oxp

Posted: Fri Feb 18, 2011 6:20 pm
by Cody
I was just going to suggest Jupiter.

Re: Release: Fireworks.oxp

Posted: Fri Feb 18, 2011 6:26 pm
by Rxke
El Viejo wrote:
I was just going to suggest Jupiter.
But that's not available :(

(Edit: you can pay them to record a piece, BTW.... Tempting, isn't it?)

(edit edit: looks like that option isn't there anymore, sigh...)

Re: Release: Fireworks.oxp

Posted: Fri Feb 18, 2011 6:29 pm
by Cody
I used to play Elite for hours with The Planets suite blaring out.

Re: Release: Fireworks.oxp

Posted: Thu Mar 03, 2011 3:20 pm
by Commander McLane
I just noticed a glitch in fireworks.oxp which only becomes apparent if you buy the fireworks on a station with an eccentric docking bay. The fireworkers are centered around the station's centre, not the docking bay's, so I emerged sideways of them.

I don't know off the top of my head whether the coordinates of subentities (like docks) are available to JS. If they are, I'm going to base the position calculation for the fireworkers on those coordinates instead.

Re: Release: Fireworks.oxp

Posted: Thu Mar 03, 2011 5:53 pm
by Thargoid
They are, but they are the position of the sub-ent relative to the main entity. You need to do a little maths to turn them into global co-ords. The function from Aquatics to do that is:

Code: Select all

this.localToGlobal = function(position)
	{ // sub-ent position is relative to mother, but for swapping we need the absolute global position
	let orientation = this.ship.orientation;
	if (oolite.compareVersion('1.75') > 0) 
		{orientation.w = -orientation.w; } // this is needed in pre-1.75 to get things in the right place for some reason?
	return this.ship.position.add(position.rotateBy(orientation));
	}
called with a script line such as subSled.position = this.localToGlobal(this.subPosition); , in that case subSled is the newly spawned distinct entity that is going to replace the sub-entity (this code drives the launching of the sleds from the HammerHead), and this.subPosition if the position of that subentity (this.subPosition = this.ship.subEntities[0].position;). In this case this.ship refers to the main mother entity.

Have a look in aquatics_hammerHead.js for details, from which the above is extracted.[/color]

Re: Release: Fireworks.oxp

Posted: Thu Mar 03, 2011 6:55 pm
by Commander McLane
Thanks for the code! :D

Over dinner I had the thought that I maybe could get away with using player.ship.position instead of station.position. I have to check yet whether the player gets the position of the docking bay or the position of the station when docked. If it were docking bay that would make things much easier.

Re: Release: Fireworks.oxp

Posted: Thu May 12, 2011 7:29 am
by Commander McLane
Updating on my last post: I did get away with using player.ship.position. So in v 1.1 you are the centre of the fireworks, even if launching from an eccentric station. :)

I also added sound effects to the fireworks. Yes, I know that there is no sound in space, but it's cool. 8)

[EliteWiki] Enjoy!