Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Krelus on November 30, 2008, 08:31:48 pm

Title: Warp in with fighters docked
Post by: Krelus on November 30, 2008, 08:31:48 pm
I'm trying to do this very dramatic entrance with Stratcomm's GTFG Sparta, which, among other things, has a fighterbay and 12 docking points on the front. I want the Sparta to jump in and begin spewing fighters. More importantly, I want it to warp in with 12 fighters attached to its forward docking points, and then have them undock when the ship stops. Unfortunately, it seems that FRED does not want this to happen, and all I get is an amusing (but frustrating) starship convulsion. Confusingly, it also warps in coming out of the side of the subspace window and appears all at once, instead of gradually.

So, uh, help?  :D

EDIT: Furthermore, upon additional testing, it seems that the spasm is caused not by its arrival, but simply by being docked with the fighters.
Title: Re: Warp in with fighters docked
Post by: Goober5000 on November 30, 2008, 11:58:38 pm
http://scp.indiegames.us/mantis/view.php?id=1723

It's a known problem.  I haven't had time to look into it.
Title: Re: Warp in with fighters docked
Post by: karajorma on December 01, 2008, 03:57:31 am
What orders do the fighters have? The spasming might be relieved by giving them initial orders to play dead.
Title: Re: Warp in with fighters docked
Post by: Krelus on December 01, 2008, 08:48:29 am
What orders do the fighters have? The spasming might be relieved by giving them initial orders to play dead.

I was hoping the fix would be something as simple as that, but alas..
Title: Re: Warp in with fighters docked
Post by: blowfish on December 01, 2008, 08:53:27 am
Come to think of it, I've never seen anything warp in with something docked before.  Is this problem caused by the fact that they are fighters?  Does it work if they are switched to transports or something?
Title: Re: Warp in with fighters docked
Post by: Shade on December 01, 2008, 09:11:17 am
It can be relieved by ordering them to play dead, yeah. Though I've seen a few occasions where even they seem to cause problems even then.
Title: Re: Warp in with fighters docked
Post by: Krelus on December 01, 2008, 03:36:52 pm
Play dead didn't work, but I just had an idea... Make them disabled until they undock. Could work.

EDIT: Stage 1 worked. She warped in straight and true with fighters attached. Actually getting them to undock did not, since fighters won't accept the ai-undock command. And, unfortunately, the Sparta is only capable of undocking from one fighter at a time. This may take some work.
Title: Re: Warp in with fighters docked
Post by: karajorma on December 01, 2008, 04:12:12 pm
What are you going to try now? I ask cause I know I'm going to be having this problem with the Cylon Basestar (soon as we dockpoint it) so I'm very interested in how you solve this one.
Title: Re: Warp in with fighters docked
Post by: FUBAR-BDHR on December 01, 2008, 04:28:54 pm
I wasn't there at the time but I think TBP had big problems with this and never did come up with a solution. 
Title: Re: Warp in with fighters docked
Post by: Shade on December 01, 2008, 04:29:21 pm
You can use objecttypes.tbl to allow the undock order for fighters.

[Edit] Attached a .tbm for doing just that.

[attachment deleted by admin]
Title: Re: Warp in with fighters docked
Post by: Krelus on December 01, 2008, 07:30:37 pm
You can use objecttypes.tbl to allow the undock order for fighters.

[Edit] Attached a .tbm for doing just that.

OK, now they won't attack anything after undocking. They'll just kinda... sit there.
DJLKSFHKJDJKFGJF *bangs head on keyboard*

EDIT: Nevermind, they will shoot at stuff, my testing method sucked hard.
Title: Re: Warp in with fighters docked
Post by: Droid803 on December 01, 2008, 07:39:34 pm
Fix their engines and tell them to attack something (or guard the Sparta?)
Or did you already do that?
Title: Re: Warp in with fighters docked
Post by: Krelus on December 01, 2008, 07:52:42 pm
Fix their engines and tell them to attack something (or guard the Sparta?)
Or did you already do that?

Actually it seems like they become unable to accept new orders from SEXP's. Player orders still work.

And their engines are already fixed.

EDIT: OK, a whole slew of weird stuff started, so this might be unrelated. I'm thinking some part of the mission data got corrupted.

I'm going to try remaking the whole shebang and seeing if it works then... I'll keep y'all posted.
Title: Re: Warp in with fighters docked
Post by: Colonol Dekker on December 01, 2008, 08:01:09 pm
If IPA couldn't solve it for the Raider carrier, i don't think it's possible 8(
Title: Re: Warp in with fighters docked
Post by: Krelus on December 01, 2008, 08:03:02 pm
If IPA couldn't solve it for the Raider carrier, i don't think it's possible 8(

Yeah, I'm considering just going "f*** it," because for god's sake, the Sparta has a fighterbay. The thought of a frigate jumping in with its exterior bristling with fighters just made me feel warm and fuzzy, though.

It's so frustrating! If it absolutely didn't work at all, I'd be OK, but everything works except SEXP-assigned goals, for some incoherent reason. So close...  :sigh:

Idea: Maybe what's going on is, since fighters were never intended to be able to undock in the first place, perhaps being told to do so screws up their ability to accept future SEXP-induced AI goals.
Title: Re: Warp in with fighters docked
Post by: FUBAR-BDHR on December 01, 2008, 08:12:11 pm
Don't know if this will work at all not alone for what you are trying but since you have the ship arrive OK with the fighters dock you could try to do a ship vanish for each fighter and pop in a new one at the same location.  Probably only work if the ship is stopped at the time. 
Title: Re: Warp in with fighters docked
Post by: Krelus on December 01, 2008, 09:01:51 pm
Don't know if this will work at all not alone for what you are trying but since you have the ship arrive OK with the fighters dock you could try to do a ship vanish for each fighter and pop in a new one at the same location.  Probably only work if the ship is stopped at the time. 

That requires more SEXPs than I'm willing to sift through just for a half second event which most players would look at, go "Oh, that's neat, I guess" and promptly forget about.

Although, hell, if I plan on doing it only once, it could be worth it.
Title: Re: Warp in with fighters docked
Post by: starlord on December 02, 2008, 09:22:26 am
TBP could use this also for the raider battle wagon.
Title: Re: Warp in with fighters docked
Post by: Col. Fishguts on December 02, 2008, 09:50:13 am
You are thinking of the raider carrier. But as mentioned above, IPAndrews tried to accomplish this for a long time without success, so we would be as interested in a solution as everybody else :)
Title: Re: Warp in with fighters docked
Post by: Krelus on December 02, 2008, 01:41:15 pm
As I said before, the one and only aspect of this which refuses to work is the fact that the fighters don't accept SEXP-given commands after undocking. I'm gonna try changing the fighter's AI profile once it undocks, and start it with no profile to begin with. It might kickstart the AI into doing what I want it to.
Title: Re: Warp in with fighters docked
Post by: karajorma on December 02, 2008, 01:52:41 pm
Stick the bug in Mantis. Sooner or later I'm going to have to look into the cause with the Basestar anyway so I might as well start now.
Title: Re: Warp in with fighters docked
Post by: Goober5000 on December 02, 2008, 04:47:43 pm
Idea: Maybe what's going on is, since fighters were never intended to be able to undock in the first place, perhaps being told to do so screws up their ability to accept future SEXP-induced AI goals.
This is a good theory.  Maybe the goal code never registers the undock goal as complete.  So, it would be hung up on the undock goal forever.

One way you could get around this is by using jettison-cargo-delay on the host ship.  No undocking procedure required, and it's quicker too.
Title: Re: Warp in with fighters docked
Post by: Krelus on December 02, 2008, 07:09:32 pm
Idea: Maybe what's going on is, since fighters were never intended to be able to undock in the first place, perhaps being told to do so screws up their ability to accept future SEXP-induced AI goals.
This is a good theory.  Maybe the goal code never registers the undock goal as complete.  So, it would be hung up on the undock goal forever.

One way you could get around this is by using jettison-cargo-delay on the host ship.  No undocking procedure required, and it's quicker too.

Whoa, I always thought that SEXP just set a ship's cargo to "none." I'll have to check that out.

EDIT: OK, Jettison works much more cleanly. However, it did not remedy the problem. In the process I have discerned the issue's true nature, however.

The problem is caused not by the ai-undock goal, but rather by the nature of how they enter the map. They're designated Beta, Gamma and Delta wings, but they don't show up in the wing monitor and nothing appears in the Wings command menu. As far as the game engine is concerned, their wings do not exist, so giving orders to said wing is rather pointless. Now, back to the problem of the fighters not accepting orders. The problem is, my SEXPs were giving goals to their wings, not each individual fighter. So, basically, this is still doable but you have to give each individual ship its goals and ignore the fact that they're all winged together. Problem solved, works beautifully (even if setting it up is a COLOSSAL pain in the ass).

Since giving goals to twelve fighters is more trouble than it's worth, I highly suggest making excellent use of the "initial orders" menu. So, to sum up:

Have the fighters start disabled and docked to the ship, with initial orders to do whatever you want them to do once they undock.

Have the fighters arrival cues set to 3 seconds after the mothership arrives, no warp effect.

Time events so that once the ship slows almost to a halt, it jettisons its cargo and all the fighters have their engines restored.

Enjoy. There's a slight problem in that each fighter experiences a miniscule bump upon disconnecting, but that's so minor I couldn't possibly care less.


VICTORY IS MINE!!!!!!  :beamz:

Thanks for all your help, folks!
Title: Re: Warp in with fighters docked
Post by: Goober5000 on December 02, 2008, 09:37:08 pm
The problem is caused not by the ai-undock goal, but rather by the nature of how they enter the map. They're designated Beta, Gamma and Delta wings, but they don't show up in the wing monitor and nothing appears in the Wings command menu. As far as the game engine is concerned, their wings do not exist
Ah.  Well, that would be this other bug:
http://scp.indiegames.us/mantis/view.php?id=530

But I'm glad you were able to jury-rig it into working. :)
Title: Re: Warp in with fighters docked
Post by: terran_emperor on December 02, 2008, 09:52:58 pm
Oh sweet! you are cool. Now if IPA can get this to work for TBP...

*Rubs hands in anticipation*
Title: Re: Warp in with fighters docked
Post by: 0rph3u5 on December 06, 2008, 11:09:50 am
You are thinking of the raider carrier. But as mentioned above, IPAndrews tried to accomplish this for a long time without success, so we would be as interested in a solution as everybody else :)

I had a solution ready made... but no one ever asked me (it require just a simple table-hack)
Title: Re: Warp in with fighters docked
Post by: Col. Fishguts on December 09, 2008, 03:37:08 am
You are thinking of the raider carrier. But as mentioned above, IPAndrews tried to accomplish this for a long time without success, so we would be as interested in a solution as everybody else :)

I had a solution ready made... but no one ever asked me (it require just a simple table-hack)

Don't tell me, tell IPA :P . I suck at FREDding.
Title: Re: Warp in with fighters docked
Post by: 0rph3u5 on December 09, 2008, 11:06:08 am
You are thinking of the raider carrier. But as mentioned above, IPAndrews tried to accomplish this for a long time without success, so we would be as interested in a solution as everybody else :)

I had a solution ready made... but no one ever asked me (it require just a simple table-hack)

Don't tell me, tell IPA :P . I suck at FREDding.

I will make a package out of it and add to the "Xmas Presents to TBP Freders"-package