Ambrosia Garden Archive
    • Fly your carried ship


      Imagine the scenario where you have a large ship that has a large modular area. You buy different special containers to use there - and your ship gets swapped out so it can change to an appropriate graphic to represent the new module. Now some of these modules are actualy ships. Like a fighter but bigger. Again, I can swap out the player's ship and use a new graphic, and even take advantage of the "key carried extra frames" so when you launch the ship, it actually looks like it physicaly seperates.

      This is neat enough, but then I decided it would be much cooler if you could choose whitch portion you could pilot.

      1. Fly the main ship and launch the carried ship like a fighter.

      2. Control the fighter while leaving the main ship behind. Then you can come back to the main ship again, and if you die you can fly the escape ship back to your main ship.

      Most of this works pretty well - untill you have to use the escape ship where the main ship becomes neutral. I have a way around this but it's ugly.

      -----

      I'm using an abortable mission to control whether you want to pilot the ship or the fighter.

      I've also made extensive use of "fire only with key carried" weapons.
      Basicaly, weapons are split between those that can go on the fighter, and those that can go on the main ship. And every weapon has a duplicate version for when you are piloting the ship or the fighter - the "fire only with key carried" is the only difference.

      The effect is this:
      When you are piloting the main ship, and the fighter is docked, you get access to both fighter and ship weapons (this large "fighter" is carried outside of the main ship, not in a harger, so it's concievable it could use its weapons.)

      All the fighter weapons only fire if the fighter is present, so the moment you launch it, you only have your main ship weapons.

      Now, at some point you may wish to fly the fighter.
      You abort the "Transfer to Fighter" mission and a couple seconds later it checks to make sure the fighter is docked and then swaps your ship.
      Visually, nothing changes yet as you haven't launched yet. Behind the senes, you have become the fighter with "key carried sprites" that look like the combined ship, while also getting a bay and a carried ship - so basically you are now carring the main ship, but it looks the other way around.

      All your weapons have been swapped for their duplicates and the "carried main ship" outfit is also a speed/turning/accel mod to make your fighter fly just like the main ship.

      You still have access to all your weapons, until you "launch" (really launching the main ship) and then you only can fire the fighter weapons. This launch effectively removes the speed/turn/accel peanalty while also changing your sprites to look like the fighter.

      Here I found it necessary to use a special main ship with 0 speed. Otherwise it would fly in formation with you at fighter like speed.
      So when you want to come back, you recall your main ship, then fly to it.

      Things get more complicated when you die in the fighter. I had to add a way to remeber what outfits you had because you can't transfer then to the escape ship. So now the escape ship gets a "Rescue Me" mission that gives you all your outfits back including the bay for the main ship. This should have allow you to go scoop it back up.

      But no. Your main ship has abandoned you when your ship blew up, never mind that you escaped.

      So now I have the problem. The rescue me mission can easily swap you back into the main ship, sans fighter. But now there is still the neutral main ship still sitting in the system, as if suddenly poping back into your main ship wasn't jarring enough. And becaue he had to get 0 speed, he's not going anywhere, either.

      What do you think? Is this an acceptable hack? Or is there another way to go about this?

      Here is a sample plug.
      It is very crude, and not without problems. However, most of the complexity and problems relate to trying to remember your outfits when you die in the fighter.
      I guess I can scrap the "fly the escape ship back and try again" aspect, but that's part of the coolness. Any ideas?

      1. Land on the planet, while trying not to laugh at the graphics.
      2. pick up the mission in the computer
      3. buy a fighter, notice it adds the weapons it comes with.
      4. test thing out in the main ship pilot role. When you want to switch, abort the mission in you active mission box.
      5. There is a self destruct weapon to you can test dying.

      Fly the Fighter Test.zip (216 K)

    • This has got to be one of the most interesting ideas for a plug I've ever heard of.

    • Well, first of all, given the issues someone else brought up here recently, it might be worth experimenting with what happens when you make one or both ships planet-type. At the very least it might prevent hostiles from going after your main ship when you're in the fighter.

      Second, perhaps instead of using the normal escape-pod mechanism, you could have an invisible mission with "fail if disabled", and use the fail event to trigger a scripted transfer-to-escape-pod-then-detonate-fighter event when the fighter is disabled.

    • If your planet type ship is spawned through a mission the ship will act like a planet in the most literal sense of the word: it won't be able to move at all.

      This post has been edited by JacaByte : 14 June 2007 - 10:20 AM

    • @lindley, on Jun 14 2007, 03:00 PM, said in Fly your carried ship:

      Well, first of all, given the issues someone else brought up here recently, it might be worth experimenting with what happens when you make one or both ships planet-type. At the very least it might prevent hostiles from going after your main ship when you're in the fighter.

      Second, perhaps instead of using the normal escape-pod mechanism, you could have an invisible mission with "fail if disabled", and use the fail event to trigger a scripted transfer-to-escape-pod-then-detonate-fighter event when the fighter is disabled.

      I tried something like that already, and it didn't work. I may have just messed it up, so it might be worth revisiting.

      It might be worth giving the main ship (as a fighter) a self destruct weapon and a default hostile government. So when he abondons you, he turns hostile, shoots and kills himself.

      EDIT: Never mind, neither worked.

      This post has been edited by Desprez : 14 June 2007 - 02:24 PM

    • Bloddy hell. Ok, so I tried a new trick.

      I made all of the main ship weapons that you get while piloting the fighter be persistant outfits. The thinking is that they will get transfered to the escape ship when ejecting. Then I could put some code in the fighter's OnRetire field to remove the persistant outfits if you actually tried to sell the fighter while piloting it.

      Not only does OnRetire evaluate when ejecting (complicating matters) but persistant outfits don't transfer to the esacpe ship.

      Is there ANY way to keep outfits when ejecting?

    • You could make the fighter not have access to normal outfits and just put them on the escape ship.

    • @joshtigerheart, on Jun 15 2007, 02:04 AM, said in Fly your carried ship:

      You could make the fighter not have access to normal outfits and just put them on the escape ship.

      True, but it's not the fighter weapons I need to keep (as the fighter has been destroyed) it's the main ship weapons and outfits that need to remain.
      Part of the heart of EV is customizing your ship. I can hardly eliminate that.

      Interestingly, I've had to weigh the choice of makeing a customizable fighter, with the choice of being able to launch it while commanding the main ship.
      That is, if you launch the fighter it must be a stock config. If you can cutomize it, then only the player can fly it or it won't have the correct weapons.

      I'm leaning towards customizing the main ship, and choosing a stock fighter.

    • Well, there has been some investigation into "warehousing" one ship + all outfits while you're in another. It's rather convoluted, but it can be done. Do a search for that.

      Second, do we know what happens if your escape pod doesn't have the "Is escape ship" flag active? Maybe outfits would transfer normally then.

    • @lindley, on Jun 15 2007, 01:18 PM, said in Fly your carried ship:

      Well, there has been some investigation into "warehousing" one ship + all outfits while you're in another. It's rather convoluted, but it can be done. Do a search for that.

      Second, do we know what happens if your escape pod doesn't have the "Is escape ship" flag active? Maybe outfits would transfer normally then.

      I'll try that.

    • I have fallen in love with the concept of "launching" the carrier so the hero can go on a "trench run" in his private fighter. My head is literally over my heels as I think about it.

      I don't care about escape ships. Never use them, don't want them, can't imagine a fighter being able to hold one.

      There are so many cool uses for this. Needing a fast platform to launch a short-range missile with huge blast for one.

      Wait, damage taken by the "carrier" isn't remembered when you redock with it. Ie, you launch into your fighter at full health, you keep the immobile hulk between you and your enemy so it takes a beating, then, just before it dies, you recall it. You take a few hits, then relaunch it. It's back at full health and you can use it as a wall again.

      Actually, that's pretty similar to my Sanctuary bay. Well, more similar to my original Safe Zone bay than the newer Sanctuary, but the idea's the same.

      I'm going to make just a normal bay with wall-shaped sprites and see how that works. Walls are very durable, absorbing all projectiles and lasting a long time. You can set up numerous walls to make a "room". Putting bumpers outside the room would work well too. I ought to make the bumper weapon one of these days.

    • @qaanol, on Jun 15 2007, 07:38 PM, said in Fly your carried ship:

      I have fallen in love with the concept of "launching" the carrier so the hero can go on a "trench run" in his private fighter. My head is literally over my heels as I think about it.

      I don't care about escape ships. Never use them, don't want them, can't imagine a fighter being able to hold one.

      There are so many cool uses for this. Needing a fast platform to launch a short-range missile with huge blast for one.

      Wait, damage taken by the "carrier" isn't remembered when you redock with it. Ie, you launch into your fighter at full health, you keep the immobile hulk between you and your enemy so it takes a beating, then, just before it dies, you recall it. You take a few hits, then relaunch it. It's back at full health and you can use it as a wall again.

      Actually, that's pretty similar to my Sanctuary bay. Well, more similar to my original Safe Zone bay than the newer Sanctuary, but the idea's the same.

      I'm going to make just a normal bay with wall-shaped sprites and see how that works. Walls are very durable, absorbing all projectiles and lasting a long time. You can set up numerous walls to make a "room". Putting bumpers outside the room would work well too. I ought to make the bumper weapon one of these days.

      Well, if you wanted to prevent use of the carrier as a shield, you can give it no weapons, and make it a planet-type ship. That way, it can't aggro the enemies and can't absorb shots.

      True, I don't need to escape back to the carrier. But it would be extra cool to have a stock of fighters that you can pilot. If a fighter is destroyed, you simply try again, until you run out of fighters.

      @ Lindlyey:
      Sorry, if the "fail if player is disabled or destroyed" misn flag is used, OnFail does not actually trigger when the player dies. If the player dies, it seems nothing gets triggered anymore.

      Still, this technique can be used to those scenarios that don't have customizable ships. Such as those where the carrier is more of a plot device than a combatant. That way, the carrier can be respawned and have specific outfits every time. And then you can carry different fighters, and choose which one to fly.
      In addition, the "pilot fighter" mechanic can simply switch your ship to the fighter - what happens in this case is that you abort a different mision to call it back - where it calls back a disbled carrier. You board it, and becuase you have a bay for it, it gets put into the bay, and now you have you key carried ship sprites again.

      MAYBE, we can take advantage of the "escort becomes neutral on player's ship destroyed" effect. That is, make the players fighter have 0 armor, and the carried ship gives +armor. When the player launches, the +armor is gone and the ship dies. Then an auto-ejecting escape ship (the REAL fighter - with stock weaps) becomes the player's ship. Now the carrier becomes neutral and warps out. (no need for 0 speed anymore) When you are done (or in an escape pod) you can call it back.

      This gives the effect of the carrier dropping you off, then coming back later. Don't know if this will work, it's an untested idea.

      This post has been edited by Desprez : 15 June 2007 - 09:30 PM

    • Well, this has become a tough problem.

      My goal was to find some way of the player seeing themselves launch out of the carrier. Fly around, do stuff. Then bea able to come back to the carrier all without reloading the system.

      One vision was to let the player customize their ship and/or fighters. Another vision was more scripted. You would be a part of a fighter wing, and could launch from a carrier, but wouldn't get to cutomize the fighter or the carrier - you're just a soldier that has to use what you are given.

      The first way is difficuly to pull off, to say the least. Lots of little problems kept getting in the way. Now, if you don't use escape ships on the fighter, the problem is doable. But, half the reason of having a fighter, is that the fighter is disposable. But if the player is piloting the fighter, it is no longer disposable. If you can't return to the carrier to try again, then what's the point of leaving?

      The second vision was trickier than I'd anticipated, but I think it is workable in certian ways.

      The idea from the pervious post where the player launches in a transitional ship before it self-destructs into the fighter, causing the carrier to warp out, does not work.

      So, next I figured that I could "simulate" the carrier. You fly close to a spob that looks like a carrier and it would give you access to fighter swaping missions when you were close. (spob shoots itself, granting the missions in OnDestroy, regenerate the spob using a dude misn.)

      This would allow you to come back to the carrier to re-arm or switch fighters. But, alas, the effect was unconvincing. The player doesn't have to slow down, and the timing was hard to control.

      Using disabled mission ships to board to control fighter swaping has problems to. You can only board them once. They don't work used as a ship to pickup gain a key carried ship making it look like you entered the carrier Just doesn't work.
      If you don't pick the ship up, it just sits there, useless to use again.

      System dudes don't work because as soon as you board (capture) the carrier, another dude spawns.

      But as it turnes out, you can use the auxiliary mission ships for this purpose.

      So for a fighter pilot campaign, you could give the player a fighter. And they launch off the planet. A mission causes a diabled carrier to warp in. Now you can go to the carrier and board it. The moment you do it gets put into a hidden bay causing your key carried frames to make you look like the carrier. The carrier also gives you heavy armor and shields for protection (possibly the fighter have some key carried firing PD turrets that only funtion when you are in the carrier) and a high negative speed mod, so your speed becomes 0. This mission ship will keep appearing until you board it, and it won't keep re-apearing after unless you start a new mission.

      You also have missions that you "abort" to switch to a different fighter. These datepost and detect to make sure you are "in" the carrier via a require bit. If so it swap you into the new fighter.

      You can launch youself, by launching the carrier, which has a speed of 0 so it just sits there, and as a planet-type ship, it won't die, or be a shield. Though you could make it kill-able for script reasons. It won't break the system, as you can always spawn another auxiliary ship.

      Now every time you go back to the carrier in a ship that has the carrier bay, you get the effect of landing, and are able to use the fighter swaping missions. This works even if you're in an escape ship. True the carrier will leave if this happens, but you can have an abortable mission to call it back.

      Anyway, this whole thing allows the possibilities for extended system battles.
      It is also not that resource intensive, assuming you only use pre-built ships. Once you try to re-build a customized ship after an ejection, you have major problems.

      I'll work up another example plug if anyone is interested.