Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: wistler on March 21, 2013, 07:43:01 am

Title: Controlling the direction/location of ships warping in
Post by: wistler on March 21, 2013, 07:43:01 am
I'm looking to control the specifics of how ships warp-in and there direction. I'm after a ship to jump in facing a target, but the best i seem to be able to do is 'Arrival -> Location -> Near ship.

Ideally I was looking to grab the targets X-Y-Z location and have the ship arrive going off that. I had tried having a waypoint move to the desired X-Y-Z and have the ship then jump in on the waypoints location, but waypoints don't seem to be an option in the drop down box in ship Arrivals. Using an alternative, say some nav markers I'm using, don't let the ship appear closer then 500m.

I guess I'm asking if I can dictate how, when, and which direction ships enter using SEXP?

Title: Re: Controlling the direction/location of ships warping in
Post by: X3N0-Life-Form on March 21, 2013, 08:32:08 am
I don't know whether it's doable via SEXP, but it certainly would be intersting to be able to specify "face ship" when using "near ship" or "hyperspace" arrival locations.
Title: Re: Controlling the direction/location of ships warping in
Post by: wistler on March 21, 2013, 08:50:28 am
I don't know whether it's doable via SEXP, but it certainly would be intersting to be able to specify "face ship" when using "near ship" or "hyperspace" arrival locations.

Yeah I find the level of control over these things to be still quite rudimentary. They work great when everything else is static, but once you have capital ships moving around everywhere it makes it a whole lot harder.
Title: Re: Controlling the direction/location of ships warping in
Post by: Rodo on March 22, 2013, 08:53:44 pm
I once tried making the ship jump near and facing a moving waypoint that followed an existing ship on the battlefield.

The results where not that pritty I'm afraid, it would be optimal to be able to change the position and orientation of a ship in any state, even of those that have not yet arrived to the battlearea, but I don't know how hard that might be to code.
Title: Re: Controlling the direction/location of ships warping in
Post by: Goober5000 on March 22, 2013, 10:13:38 pm
You've almost got it.  The full solution is to make the ship appear "In front of" an invisible object, and then customize that object's position and orientation as you like.
Title: Re: Controlling the direction/location of ships warping in
Post by: Rodo on March 23, 2013, 10:45:33 am
You've almost got it.  The full solution is to make the ship appear "In front of" an invisible object, and then customize that object's position and orientation as you like.

Yes, the problem as I remember is that the game chooses a different position everytime for the ship appear on, it's like it's using somekind of random generator to get the coordinates.
The ship jumps in front of alright, it just doesn't in the same spot twice, like choosing from a limited arc of coordinates in front of the ship.
Title: Re: Controlling the direction/location of ships warping in
Post by: Goober5000 on March 23, 2013, 03:20:59 pm
Well, this is true; the coordinates are random within a cone of coordinates in front of the object.  I suppose you're looking for exact placement?
Title: Re: Controlling the direction/location of ships warping in
Post by: Rodo on March 23, 2013, 04:29:44 pm
Yes, on this particular mission it was important because the ship that was jumping in had to do so right on the broadside of another one for a beam bombardment drill.

I had to resort to conventionally positioning a ship midway on the x axis and half guessing on the time the ship was supposed to arrive.
It works, sometimes it looks kinda off but that's as far as I will go, it occurred to me using multiple ships placed along the axis, each one bound to arrive only if certain time of the mission has passed, but I cannot be arsed to playtest another 5 hours on this overly complex solution if the later works.
Title: Re: Controlling the direction/location of ships warping in
Post by: Trivial Psychic on March 23, 2013, 04:42:52 pm
Sounds like a comprehensive upgrade to arrival cues is what most would prefer.  A way to manipulate the arrival vector in relation to another target (basically a constantly variable upgrade of the current arrive-in-front-of setting we have now), as well relative self-orientation controls.
Title: Re: Controlling the direction/location of ships warping in
Post by: General Battuta on March 23, 2013, 04:46:12 pm
Sounds like a comprehensive upgrade to arrival cues is what most would prefer.  A way to manipulate the arrival vector in relation to another target (basically a constantly variable upgrade of the current arrive-in-front-of setting we have now), as well relative self-orientation controls.

None of that would be necessary if we could perform coordinate operations on ships that hadn't arrived yet, though.
Title: Re: Controlling the direction/location of ships warping in
Post by: Trivial Psychic on March 23, 2013, 04:48:24 pm
Wouldn't that involve the use of a bunch of get-ship-coords instances?
Title: Re: Controlling the direction/location of ships warping in
Post by: General Battuta on March 23, 2013, 05:12:08 pm
Wouldn't that involve the use of a bunch of get-ship-coords instances?

Maybe, depending on what you're trying to do, but both getting and setting coordinates is super easy.
Title: Re: Controlling the direction/location of ships warping in
Post by: Rodo on March 23, 2013, 06:15:15 pm
None of that would be necessary if we could perform coordinate operations on ships that hadn't arrived yet, though.

I think this would be ideal as well, but as I said earlier I'm not sure if it's something worth the effort of the coders compared to the benefits it would yield.
When first fredding the mission I was quite surprised to find out that I couldn't make operations on ships that have not arrived in battle.
Title: Re: Controlling the direction/location of ships warping in
Post by: wistler on March 25, 2013, 02:49:28 am
I don't think you really need to coordinate manipulate a Ship before it arrives, I'd be happy with a ship that warps in on a waypoint 1:1 and faces waypoint 1:2. That way I could place the waypoints where I like.
Title: Re: Controlling the direction/location of ships warping in
Post by: Nohiki on March 25, 2013, 05:10:21 am
Same thing, the game would just use coordinates of the waypoint.
Title: Re: Controlling the direction/location of ships warping in
Post by: General Battuta on March 25, 2013, 07:28:30 am
I don't think you really need to coordinate manipulate a Ship before it arrives, I'd be happy with a ship that warps in on a waypoint 1:1 and faces waypoint 1:2. That way I could place the waypoints where I like.

This would accomplish the same thing, yeah, since you can now perform coordinate manipulation on waypoints.