Ambrosia Garden Archive
    • Prevent landing on planet


      How can I prevent the player from landing on a planet unless he has a certian outfit (or contribute bit set) if that planet is uninhabited?

      I've been using the govt require bit to control landing, but that doesn't work if the planet is uninhabited, neither does MinCoolness.

      Will I need to create multiple systems that swap if the player has the right requirements?

    • If the outfit's maximum is 1, then have the stellar start destroyed and for the outfit have OnPurchase Uxxx - regenerate (Un-destroy) stellar ID xxx, and OnSell Yxxx - destroy stellar ID xxx, and make sure the planet can only be landed on when it's not destroyed.

    • I see what you're saying, but I guess I should have been more specific.

      In my case, the outfits in question aren't always bought or sold.

      I'm trying to have it so you can't land on a planet unless you have a ship capable of atmospheric flight to the surface OR have certian shuttles that could be used to ferry (cargo/outfits/people) to and from the surface (so it's as good as being able to land)

      So, either certian ships set a contribute bit, or are granted an outfit that represents landing. Then, if the ship can't land, there is an option to have an outfit (shuttles) that would allow landing. So only in certian instances are the outfits actually purchased.

      At any rate, this would apply for every uninhabited planet. So it would be a large number of regenerate/destroy commands. Not that this is really an issue, I'd likely consolidate them to misns and simply run the misns like a sub-routine.

      Even better, would be able to have differences in what's available at the planet, depending on how you have access to it. Wheather it's via landing, small shuttle, lanrg shuttle. (Can be handled with the require field) Or maybe you can only get to orbit, as that would still allow use of the mission computer and access to your fighter bay loadouts and weapons in storage and such. (handled in the outfiter, which is available on every spob specificaly for this purpose) but if you can't land and don't have any shuttles, you don't get access to the trading center, or installing of new outfits.

      Edit: Ok, hmmm. I'm already runing a perpetual self-destructing dude that basicaly re-calculates your contribute bits every few seconds. I suppose I could add a datepost and some crons to run the regen/destroy routine if certian items are detected. But I'd really like to avoid date posting as that will make the date usless as a meaningful date.

      This post has been edited by Desprez : 13 April 2006 - 01:30 AM

    • This is really cheesy, and has major unintended consequences, but it just might work.

      Make all planets belong to the same government. Make that government have no allies, no enemies, and not care about anything.

      Let's say the player starts off in a shuttle that can land and launch. Make it so the government starts out letting you land. Now any time something changes to make you be unable to land, run and instantly abort a mission that, OnAbort, causes your legal status with the Planet government to drop below the threshold of landability.

      When you, by whatever means, regain the ability to land, a mission is run and aborted that makes your legal status rise again. It's important that you set it up so the missions can't be run multiple times in succession, ie. buy a shuttle and then buy landing pods, because then buying a ship that can't land would only knock your status down one level.

      This makes it so that if you dominate a planet you can land even if you shouldn't be able to. Maybe you're using the planet's landing pods. Or maybe you could just have invincible defense ships and circumvent the problem.

      In any case, you could have space stations belong to a different government and thus be accessible to all ships.

      It'd take tons of work, and still be really crude, but it's the best I can come up with on short notice.

      This post has been edited by Qaanol : 14 April 2006 - 02:20 PM

    • It doesn't work on uninhabited planets.
      Nova doesn't care about MinCoolness or require bits if the planet is uninhabited, even if the planet has a government.

      If the planet is inhabited, I can simply use the require bit associated with the govt resource. (Each conceptial government is made up of two govt resources. One for stations, one for planets.)

    • @qaanol, on Apr 15 2006, 05:26 AM, said in Prevent landing on planet:

      This is really cheesy, and has major unintended consequences, but it just might work.

      Make all planets belong to the same government. Make that government have no allies, no enemies, and not care about anything.

      Let's say the player starts off in a shuttle that can land and launch. Make it so the government starts out letting you land. Now any time something changes to make you be unable to land, run and instantly abort a mission that, OnAbort, causes your legal status with the Planet government to drop below the threshold of landability.

      When you, by whatever means, regain the ability to land, a mission is run and aborted that makes your legal status rise again. It's important that you set it up so the missions can't be run multiple times in succession, ie. buy a shuttle and then buy landing pods, because then buying a ship that can't land would only knock your status down one level.

      This makes it so that if you dominate a planet you can land even if you shouldn't be able to. Maybe you're using the planet's landing pods. Or maybe you could just have invincible defense ships and circumvent the problem.

      In any case, you could have space stations belong to a different government and thus be accessible to all ships.

      It'd take tons of work, and still be really crude, but it's the best I can come up with on short notice.

      That could make a very interesting plug-in.

    • Or you could just set a bit when you purchase or capture a ship capable of landing on such planets that triggers a cron to undestroy the needed stellars and destroy them when the bit is not set. That takes care of allowing the landing or not.

      Possibly very annoying to do if you have many such planets and a lot of ships, though. But it will work.

      I have no idea however how you,re going to control wether or not it is allowed to use the trade center, shipyard and the likes unless you create duplicate systems and switch them with visibility.

    • @mumbling-psycho, on Apr 15 2006, 03:14 PM, said in Prevent landing on planet:

      Or you could just set a bit when you purchase or capture a ship capable of landing on such planets that triggers a cron to undestroy the needed stellars and destroy them when the bit is not set. That takes care of allowing the landing or not.

      Possibly very annoying to do if you have many such planets and a lot of ships, though. But it will work.

      I have no idea however how you,re going to control wether or not it is allowed to use the trade center, shipyard and the likes unless you create duplicate systems and switch them with visibility.

      Hmm, well, I'd have to continualy check for the presence of the shuttles since it's possible you could get them killed in flight. That will lead to having to regen/destroy many stellars every few seconds.
      It also make using a fighter (ship capabable of atmosphere flight) as an escape ship impractical. Since the OnCapture and OnPurchase fields don't trigger if you get the fighter as an escape ship. Not too big of a deal as that limitation was giving me problems for other reasons.

      But let me ask about the other solution...
      What happens if your are in the system when you rotate its visibility with another system?
      Also, would I need to make alternate spobs for EVERY stellar, or just the ones that have different landing characterstics?

    • Surely you don't need to make the shuttle an actual launched fighter? I mean when is the player actually going to use it? It's sole purpose is to allow landing on planets, right?

      If the system changes while you're in it you end up in the new system.
      You would only need duplicates of the stellars that change.

    • @guy, on Apr 15 2006, 09:54 PM, said in Prevent landing on planet:

      Surely you don't need to make the shuttle an actual launched fighter? I mean when is the player actually going to use it? It's sole purpose is to allow landing on planets, right?

      Well, in a pinch you can change its loadout to have weapons and send it to fight.

      But... that's more of a holdover from hoping that I'd be able to swap the loadout in flight. Until Fxxx works, this isn't going to happen. As long as you have to currently go to the outfitter to change loadouts, I guess I can make the shuttle variant simply be a placeholder and not actually launch a fighter.

      However, one large shuttle variant does currently come with a PD turret, and that actualy has use in formation... I could change that though.

      (Actually, I have though about giving every fighter class a non-launchable variant, simply because you might want to keep them off the secondary weapon options, so you don't have to select throught them, and so you don't accidentaly launch them if you want to save them for later. But I didn't want to use up any more outfit resources, and the spare parts functionality could kind of do this too, if I want to allow dissassembling fighters)

    • @guy, on Apr 15 2006, 01:54 PM, said in Prevent landing on planet:

      If the system changes while you're in it you end up in the new system.

      Are you certain about that? I just did a quick test, and changing the current system's visibility (by blowing up a planet) did not seem to transfer me to the alternate version of the system. Also, from my experience in changing systems around for the Rotating Systems hack, it doesn't even transfer you properly if you take off into a changed system, so it seems odd that it would transfer you properly if the system changes while you are flying in it.

      Edwards

    • Er, no I didn't mean while flying in it (that would be a bit far-fetched) but it does work when you land. This happens in rEV and a certain upcoming quasi-TC.

    • @guy, on Apr 15 2006, 11:15 PM, said in Prevent landing on planet:

      Er, no I didn't mean while flying in it (that would be a bit far-fetched) but it does work when you land. This happens in rEV and a certain upcoming quasi-TC.

      All right. It had looked to me like Desprez had been asking about what happens when you are flying in a system (as that seems to fit in with the subject of this thread). As for when you land, it all works out the day after the switch, in my experience: If you are on a planet when the system switches due to a crön, you will take off into the old system. If you then land and take off again, you will take off into the new system. However, this may only be a problem with cröns, as I think that they fire on take-off, while anything else will fire before take-off.

      Edwards