YOUR AD HERE!!! 300 ads (sets A, B, C, D, E, F & G)

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

Moderators: winston, another_commander

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 »

snork wrote:
I just want to express my appreciation for the creativity of you lot.
And good designs, too. Some make me think some of you are in that kind of business in RL ?

I really enjoy these ads a lot, be it on buoys or pi42 stores.
Even on old hardware, they are just great. :)
Dr. Nil who started the whole YAH thing many moons ago, got so good at it, he did indeed change careers and now does something like it in RL!
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
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 »

Disembodied wrote:
I've downloaded the updated YAH 4.1 and all my constores seem to end up with their docking bays pointing away from the witchpoint, which isn't very convenient ... although I think strict convenience should be set aside here in favour of displaying the stores in all their glory. Is there a way to make the constores appear perpendicular to a line running between the witchpoint and the planet? It's a shame not to show them off!
Twas done on purpose, Ark got Eric W to take a look at the AI and got it changed so that the docking bay of the station was away from the witchpoint, so you had to fly past it to flip over and fly in, for the very reason you state - so you see more than just the docking port! :wink:
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Disembodied
Jedi Spam Assassin
Jedi Spam Assassin
Posts: 6885
Joined: Thu Jul 12, 2007 10:54 pm
Location: Carter's Snort

Post by Disembodied »

DaddyHoggy wrote:
Disembodied wrote:
I've downloaded the updated YAH 4.1 and all my constores seem to end up with their docking bays pointing away from the witchpoint, which isn't very convenient ... although I think strict convenience should be set aside here in favour of displaying the stores in all their glory. Is there a way to make the constores appear perpendicular to a line running between the witchpoint and the planet? It's a shame not to show them off!
Twas done on purpose, Ark got Eric W to take a look at the AI and got it changed so that the docking bay of the station was away from the witchpoint, so you had to fly past it to flip over and fly in, for the very reason you state - so you see more than just the docking port! :wink:
Showing off the constores is a good idea, but to be honest I think it would be better to set them perpendicular. Then you'd see them blazing in all their gaudy splendour from the WP, and get to gaze at them as you fly towards them all the way in – plus admire them in the rear view half the way in to the planet, too. At the moment you just get to see their tops, and then have to take a (in my case, usually too-close) peek at them out the side view just before making the turn around to dock.

At the moment, what I assume is the relevant bit of the code (it's called "yah_constore_facing.js") reads

Code: Select all

this.shipSpawned = function () 
{ 
   var targetVector = this.ship.position.direction();
   var angle = this.ship.heading.angleTo(targetVector);
   var cross = this.ship.heading.cross(targetVector).direction();
   this.ship.orientation = this.ship.orientation.rotate(cross, -angle);
    
   delete this.shipSpawned; 
}
Despite my earlier javascript triumph (is "triumph" too strong a word? No. No it's not. :D) with Galactic Navy, although I can see that this code is doing something I can't see what to change to make the constores sit at 90° to the player. Is there a smart individual out there who can?
User avatar
allikat
Deadly
Deadly
Posts: 191
Joined: Tue Jan 19, 2010 5:45 pm

Post by allikat »

The long way to do that would be to keep the current settings, and alter which part of the station is the front?
Or have it moved closer to the planet, and heading for the sun?
Commander Monty, a Python Class Cruiser driver :D
Iron assed bulk haulers for the win!

Of the two trumbles which escaped today from Lave station, only 473 have been located....
User avatar
Disembodied
Jedi Spam Assassin
Jedi Spam Assassin
Posts: 6885
Joined: Thu Jul 12, 2007 10:54 pm
Location: Carter's Snort

Post by Disembodied »

Wait a minute, I might be on to something here ...

Edit: cracked it, I think! I've tested it a couple of times now and it seems to work:

Code: Select all

this.shipSpawned = function () 
{ 
   var targetVector = this.ship.position.direction();
   var angle = this.ship.heading.angleTo(targetVector);
   var cross = this.ship.heading.cross(targetVector).direction();
   this.ship.orientation = this.ship.orientation.rotate(cross, -angle/2);
    
   delete this.shipSpawned; 
}
angle/2 seems to be the charm! IMO it gives you a much better view of the constores.
Last edited by Disembodied on Sun Feb 07, 2010 7:25 pm, edited 1 time in total.
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 »

Disembodied wrote:
Wait a minute, I might be on to something here ...
Good luck, I think the original plan was to have it at 90 (d'oh ALT+0186 doesn't work under Linux for the degree symbol!) but it didn't seem to work (could have misremembered) - Ark and/or Eric (who, I'm sure, did the scripting) would know more.
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Disembodied
Jedi Spam Assassin
Jedi Spam Assassin
Posts: 6885
Joined: Thu Jul 12, 2007 10:54 pm
Location: Carter's Snort

Post by Disembodied »

DaddyHoggy: see edited post above ...
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 »

Disembodied wrote:
DaddyHoggy: see edited post above ...
:roll: :oops: :lol:

Edited post ninja'd!
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
allikat
Deadly
Deadly
Posts: 191
Joined: Tue Jan 19, 2010 5:45 pm

Post by allikat »

Myr is an electrical assembler who happens to drink a lot of spice tea, hence their help with one of the ads :)
Commander Monty, a Python Class Cruiser driver :D
Iron assed bulk haulers for the win!

Of the two trumbles which escaped today from Lave station, only 473 have been located....
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Disembodied wrote:

Code: Select all

this.shipSpawned = function () 
{ 
   var targetVector = this.ship.position.direction();
   var angle = this.ship.heading.angleTo(targetVector);
   var cross = this.ship.heading.cross(targetVector).direction();
   this.ship.orientation = this.ship.orientation.rotate(cross, -angle);
    
   delete this.shipSpawned; 
}
this.ship.position.direction() is a unit vector away from the witchspace entry point (because that’s the origin of the coordinate system). For a vector between the main planet and the witchpoint, you’d want Vector3D(0, 0, 0).subtract(system.mainPlanet.position).direction(). (Obviously you’d want to check that system.mainPlanet exists first.) For the opposite direction, system.mainPlanet.position.direction() would suffice.
User avatar
Disembodied
Jedi Spam Assassin
Jedi Spam Assassin
Posts: 6885
Joined: Thu Jul 12, 2007 10:54 pm
Location: Carter's Snort

Post by Disembodied »

Ahruman wrote:
this.ship.position.direction() is a unit vector away from the witchspace entry point (because that’s the origin of the coordinate system). For a vector between the main planet and the witchpoint, you’d want Vector3D(0, 0, 0).subtract(system.mainPlanet.position).direction(). (Obviously you’d want to check that system.mainPlanet exists first.) For the opposite direction, system.mainPlanet.position.direction() would suffice.
I'm going to have to start looking at this coding stuff more closely. I'm starting to suspect I might be some sort of javascript idiot savant ... or maybe just the idiot part. Only time will tell. :D
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6682
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Disembodied wrote:
I'm going to have to start looking at this coding stuff more closely. I'm starting to suspect I might be some sort of javascript idiot savant ... or maybe just the idiot part. Only time will tell. :D
Once you've done it once, it becomes like a drug and you just need more of it. Before you know it, you'll be making your own scripts and wondering how come you hadn't started earlier. ;-)
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 »

Disembodied wrote:
Showing off the constores is a good idea, but to be honest I think it would be better to set them perpendicular. Then you'd see them blazing in all their gaudy splendour from the WP, and get to gaze at them as you fly towards them all the way in – plus admire them in the rear view half the way in to the planet, too. At the moment you just get to see their tops, and then have to take a (in my case, usually too-close) peek at them out the side view just before making the turn around to dock.
The reason they are positioned so is that the original stations had an AI that turned them in a orientation facing from the witchpoint.
When Ark updated the oxp with Griffs constores, the orientation bit by AI did not work anymore. I assume because it were now rotating stations. I gave Ark a piece of JS code that oriented them to the witchpoint. But I never had seen the oxp itself. I assumes the stores were added a random locations around the witchpoint. But as I see now, they are always placed at the similar position behind the witchpoint. (System.legacy_addShipsAt("constore", 1, "pwu", [0, 0, 1.05])) That means you can skip the whole calculation part and just set the orientation to a fixed value.

Code: Select all

this.ship.orientation = [w, x, y, z]
The orientation relatve to the witchpoint was mainly so because the old stations had this orientation. But I agree, for showing off the constore a bit tilted orientation would be nicer.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

another_commander wrote:
Disembodied wrote:
I'm going to have to start looking at this coding stuff more closely. I'm starting to suspect I might be some sort of javascript idiot savant ... or maybe just the idiot part. Only time will tell. :D
Once you've done it once, it becomes like a drug and you just need more of it. Before you know it, you'll be making your own scripts and wondering how come you hadn't started earlier. ;-)
Closely followed by realising quite how many of the bloody things you now have to maintain every time we have a trunk version-up :wink:
User avatar
JazHaz
---- E L I T E ----
---- E L I T E ----
Posts: 2991
Joined: Tue Sep 22, 2009 11:07 am
Location: Enfield, Middlesex
Contact:

Post by JazHaz »

Think someone should split this part off from the YAH! thread...?
Post Reply