Page 83 of 136
Posted: Sun Feb 07, 2010 7:02 pm
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!
Posted: Sun Feb 07, 2010 7:04 pm
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!
Posted: Sun Feb 07, 2010 7:14 pm
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!
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.
) 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?
Posted: Sun Feb 07, 2010 7:16 pm
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?
Posted: Sun Feb 07, 2010 7:20 pm
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.
Posted: Sun Feb 07, 2010 7:24 pm
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.
Posted: Sun Feb 07, 2010 7:26 pm
by Disembodied
DaddyHoggy: see edited post above ...
Posted: Sun Feb 07, 2010 7:33 pm
by DaddyHoggy
Disembodied wrote:DaddyHoggy: see edited post above ...
Edited post ninja'd!
Posted: Sun Feb 07, 2010 8:25 pm
by allikat
Myr is an electrical assembler who happens to drink a lot of spice tea, hence their help with one of the ads
Posted: Sun Feb 07, 2010 8:32 pm
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.
Posted: Mon Feb 08, 2010 10:14 am
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.
Posted: Mon Feb 08, 2010 10:28 am
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.
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.
Posted: Mon Feb 08, 2010 11:54 am
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.
Posted: Mon Feb 08, 2010 6:37 pm
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.
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
Posted: Tue Feb 09, 2010 4:58 am
by JazHaz
Think someone should split this part off from the YAH! thread...?