Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Tokamaku Yokuu on September 28, 2012, 02:24:53 am

Title: Modifying the directionality of mysterious dimensional anomalies
Post by: Tokamaku Yokuu on September 28, 2012, 02:24:53 am
so guys i found a starlance model (http://www.hard-light.net/forums/index.php?topic=76772.0) and i thought it was pretty cool so i started using it

BUT THE PLOT TAKES A SHOCKING TWIST as I realize I can't spin the nodes around in FRED.
It's a minor inconvenience at worst but I can't help but wonder if there's a way to get back at that little smirking wireframe for getting me to move and rotate every ship in a mission.

so guys
how do i rotate jump node
Title: Re: Modifying the directionality of mysterious dimensional anomalies
Post by: Droid803 on September 28, 2012, 05:27:04 pm
You...don't :P

That is the problem with directional jump nodes.
You build the mission around its set position.

Or you ask the coder guys down in SCP to let them be rotated in FRED.
Title: Re: Modifying the directionality of mysterious dimensional anomalies
Post by: mjn.mixael on September 28, 2012, 05:37:27 pm
You could create 2 jump nodes, one regular one rotated.

At the beginning of the mission hide one with hide-jumpnode, then at the switch, hide the old one and use show-jumpnode on the rotated one.
Title: Re: Modifying the directionality of mysterious dimensional anomalies
Post by: Droid803 on September 28, 2012, 05:44:57 pm
You can have more than one jump node model?
Really?
Title: Re: Modifying the directionality of mysterious dimensional anomalies
Post by: Tokamaku Yokuu on September 28, 2012, 06:20:56 pm
multi-model dark magic
What wizardry allows you to spawn jump nodes with different models?

Or you ask the coder guys down in SCP to let them be rotated in FRED.
im scared to pray to the mighty lords of code for such a little thing
Title: Re: Modifying the directionality of mysterious dimensional anomalies
Post by: Axem on September 28, 2012, 06:25:17 pm
set-jumpnode-model sexp :)
Title: Re: Modifying the directionality of mysterious dimensional anomalies
Post by: Tokamaku Yokuu on September 28, 2012, 06:41:43 pm
I find this solution satisfactory except for how dumb I feel for not remembering useful SEXPs.
Title: Re: Modifying the directionality of mysterious dimensional anomalies
Post by: Goober5000 on October 01, 2012, 10:19:05 am
Or you could place a standard jumpnode but rotate the entire mission around it.  This is what :v: did in, for example, Out of the Dark, Into the Night.

Or the SCP could just add an orientation matrix to jump nodes, the same as we did for skyboxes.  This would be a good confidence-building task for a junior coder to tackle.
Title: Re: Modifying the directionality of mysterious dimensional anomalies
Post by: Mongoose on October 04, 2012, 12:48:55 pm
So out of general curiosity, if one were to take a stab at adding that sort of functionality to jump nodes, whereabouts in the code should they be looking?
Title: Re: Modifying the directionality of mysterious dimensional anomalies
Post by: Goober5000 on October 05, 2012, 12:54:27 am
The... jump node part, presumably?

Finding the file and line number is a substantial chunk of the entire task here. :p
Title: Re: Modifying the directionality of mysterious dimensional anomalies
Post by: Mongoose on October 05, 2012, 02:16:58 am
Well I was hoping I could at least get some inkling of what file said code would wind up in, or at the very least, what file the skybox code it would be modeled on might be found. :p

Now that I look at the wiki, though, I see there's a nice list of the project files, which I didn't know was there.  Handy.
Title: Re: Modifying the directionality of mysterious dimensional anomalies
Post by: AndrewofDoom on October 05, 2012, 10:44:58 am
Cool, someone actually found that model I made useful. :P
Title: Re: Modifying the directionality of mysterious dimensional anomalies
Post by: mjn.mixael on October 05, 2012, 10:54:39 am
Or you could place a standard jumpnode but rotate the entire mission around it.  This is what :v: did in, for example, Out of the Dark, Into the Night.

I submit that my original approach is much simpler...
Title: Re: Modifying the directionality of mysterious dimensional anomalies
Post by: Goober5000 on October 05, 2012, 01:39:46 pm
By what metrics?  I submit that the rotate-entire-mission approach is much simpler.

But there are several situations where the entire-mission approach is not practical or desired (one of which is the third mission in Scroll), so it's good to have multiple ways of doing things.
Title: Re: Modifying the directionality of mysterious dimensional anomalies
Post by: mjn.mixael on October 05, 2012, 02:23:44 pm
Rotate and entire mission or simply hide/unhide 2 objects? Yeah.
Title: Re: Modifying the directionality of mysterious dimensional anomalies
Post by: MatthTheGeek on October 05, 2012, 02:39:52 pm
Rotating a mission is simply a matter of selecting everything and hit the numpad. 15 sec job.

As long as you don't have sexps using absolute coordinates that is, in which case you'd have to track those down and apply a rotation matrix on them.
Title: Re: Modifying the directionality of mysterious dimensional anomalies
Post by: mjn.mixael on October 05, 2012, 02:49:38 pm
it seems we are talking about something different. I was under the impression he needed this to happen during the mission. Re-reading the first post does not specify that, I suppose.
Title: Re: Modifying the directionality of mysterious dimensional anomalies
Post by: General Battuta on October 05, 2012, 02:56:30 pm
Rotating a mission is simply a matter of selecting everything and hit the numpad. 15 sec job.

As long as you don't have sexps using absolute coordinates that is, in which case you'd have to track those down and apply a rotation matrix on them.

Can't this also **** with relative object orientation? Object A might not be pointing at object B any more after the rotation.

Or, IDK, that seems like it's happened to me a time or two.
Title: Re: Modifying the directionality of mysterious dimensional anomalies
Post by: LordPomposity on October 05, 2012, 03:09:13 pm
Rotating a mission is simply a matter of selecting everything and hit the numpad. 15 sec job.

As long as you don't have sexps using absolute coordinates that is, in which case you'd have to track those down and apply a rotation matrix on them.

Can't this also **** with relative object orientation? Object A might not be pointing at object B any more after the rotation.

Or, IDK, that seems like it's happened to me a time or two.
It very definitely can--specifically, it creates a problem whenever a ship's rotational axis is not parallel to the mission's rotational axis. Unless you FRED in the XZ plane, you probably have ships like this.

As an example, open FRED2, place a second fighter, place it at (0,100,100), point it as GTF Ulysses 0, and then y-rotate them both.
Title: Re: Modifying the directionality of mysterious dimensional anomalies
Post by: Goober5000 on October 05, 2012, 04:40:49 pm
It's possible to rotate all objects (or an arbitrary subset of objects) around a single point, or a single object, while maintaining their orientation relative to one another.  Just select the rotation tool, select the plane around which to rotate, and drag the mouse around.  All the objects will move and rotate in synchronization, and will continue to point at any ships or locations they were pointing at previously (relative to the newly rotated coordinate space).  The origin of rotation will be the highlighted object among all the selected ones.

In Scroll, this was done for one of our missions in order to make the skybox appear on a different orientation.  However, as mentioned by MatthTheGeek, this caused problems with some of our sexps using absolute coordinates.  We resolved the problem by restoring the original object positions and adding a rotation matrix for skyboxes.  For jump nodes, the problem and solution are almost identical.