Special weapons and OnCapture field woes

I have a few weapons that have dual modes that can be switched on the fly.
For instance, a turret that can be either point defense or a standard turret. And a gun that can either be extended range or fire in a spread pattern.
The switching is controlled via an abortable mission.

These work nicely, however I'm running into a problem with captured ships.

If you have one of these weapons, and you capture a ship, the missions will remain and aborting the mission will grant you a weapon you shouldn't have.

I originally though I could solve this buy removing those missions using the OnCapture field, but this will also remove them if the ship is merely 'used as an escort' taking away your weapon functionality.

These two opposite consequences seem to be irreconcilable with each other.

Second situation:
A similar problem occurs with the 'multiple ammo for one weapon' trick.
Any AI ships I build have to add the full compliment of invisible weaps for a particular weapon. OR I have to remove the weapon (it broke when you captured the ship) but either way I have to use arguments in the OnCapture field and this will lead to strange results because you can't be sure if the player is capturing for an escort or to fly.
(And most of the time, between normal weapons and outfits there isn't enough default weapons and outfit slots to use if I fill them up with invisible weapons.)

I don't want to remove the special weapons, so do I:

  1. Make all ships uncapturable (you can still plunder ship and repair fighters I would assume)
  2. Try to build a weapon detection and mission reconstruction routine using crons. (Running out of crons, btw)
  3. ???

This post has been edited by Desprez : 22 September 2009 - 10:09 PM

Making ships uncapturable but not unboardable is, as far as I know, impossible. Setting crew very, very high can work as a partial solution, but it has some very obvious limitations. Setting crew to 0 makes it unboardable (I'm not sure about restoring 0-crew fighters, but can check).

Although you're low on cröns I'd say the best thing to do is use one crön and one öutf to solve the problem. The outfit would be a "new ship token" and would have no effect other than causing the abort and delete mission to run (actually, it should also keep you from buying the turret in question, since it could be possible to capture the ship, land, buy the outfit, and then take off before the crön runs). This way, you won't have the problem of aborting the mission if you just use the captured ship as an escort, and it should work for both problems.

There's one remaining problem here, however; if the mission switches the weapons on abort, it will switch them whether it's aborted manually or via scripting, meaning that when the crön fires, it will still give you the weapons. You can fix that by putting a string in the crön after the abort string (this is critical) to delete the weapons. There's actually another way, but that requires you to make one extra mission and is much more complicated. For your purposes, this way should work fine.

For multiple ammo/one weapon, I find that it's best to work around it all together due to the number of problems it causes for Nova, but I seem to recall a scenario in Anathema where one ship had both a turret and point-defense turret that use the same ammo. I got around the problem by assigning each its own ammo supply in the shïp screen, and haven't seen any problems so far in either AI behavior and behavior after capture (since it seems to merge the two ammo supplies into one for the player – again, not positive about this one). Of course, you could do the new ship –> scrap AI outfits routine, but depending on the ammo stocks, that could require a lot of cröns/mïsns.

QUOTE (Archon @ Sep 23 2009, 06:55 AM) <{POST_SNAPBACK}>

Making ships uncapturable but not unboardable is, as far as I know, impossible. Setting crew very, very high can work as a partial solution, but it has some very obvious limitations. Setting crew to 0 makes it unboardable (I'm not sure about restoring 0-crew fighters, but can check).

Setting crew very high won't effectively make a ship uncapturable?
( Or rather, giving the player a permanent, invisible, -30000 marines outfit. Oh, damn, I just saw that negative marines doesn't work to decrease odds.)

Aside from that, I think there is some mis-communication of ideas here.

QUOTE

Although you're low on cröns I'd say the best thing to do is use one crön and one öutf to solve the problem. The outfit would be a "new ship token" and would have no effect other than causing the abort and delete mission to run (actually, it should also keep you from buying the turret in question, since it could be possible to capture the ship, land, buy the outfit, and then take off before the crön runs). This way, you won't have the problem of aborting the mission if you just use the captured ship as an escort, and it should work for both problems.

First off, the crons can run instantly by inserting a date-posting mission in the OnCapture field.
But I don't see how this solves the problem, as I'd still need a cron for every 'special' weapon I need to check for.
Which I guess is doable, but I was hoping for something a bit more elegant.

QUOTE

There's one remaining problem here, however; if the mission switches the weapons on abort, it will switch them whether it's aborted manually or via scripting, meaning that when the crön fires, it will still give you the weapons.

It's not a problem because that's not how they work. Needing the functionality to be able to sell the items necessitated a way to exit the swapping missions loop. Briefly, when each mission aborts it starts the next. All except one, which begins the loop again not by OnAbort, but using OnShipDone and a self destructing dude. So that is the break in the chain where aborting that mission will permanently exit the mission loop. Otherwise you can never get rid of the missions.

QUOTE

You can fix that by putting a string in the crön after the abort string (this is critical) to delete the weapons.

Nope. Because aborting a mission still starts the next. Yes, you can then delete the weapon, but the mission is still there to be aborted, granting a new weapon. See above.

QUOTE

For multiple ammo/one weapon, I find that it's best to work around it all together due to the number of problems it causes for Nova

By 'work around', you mean not use them?
I have not encountered any unsolved problems. (except in relation to this discussion) Can you elaborate here? What problems do you mean?

QUOTE

but I seem to recall a scenario in Anathema where one ship had both a turret and point-defense turret that use the same ammo.

Multiple weapons/one ammo isn't the same thing. Though, I haven't encountered any problems with this either. There's nothing special I have to do when capturing ships with such weapons.

P.S. Well, now that I'm thinking about it, using crons to properly set-up player ships might not be so bad. It will free up some weap/outfit slots on ships. And (once in place) in makes building ships easier for me as I don't have to hand code all the AI/player fixing hacks for each ship.
Looks like I'll need 1 cron for every 'swappable' weapon, and 2 crons (to deal with multiple copies) for every group of launchers to use multiple ammo. So 14 crons for me. Possibly more if I need to free up even more default weap/outfit spaces since I can't grant stuff in the OnCapture field reliably.

A good example here is shield and armor outfit 'fixes'. AI ships that are supposed to have extra armor/shields need to have those values added directly to the shield and armor fields since they ignore those outfits. If a player then captures that ship, he now has too much shields/armor. So I have invisible default outfits to 'fix' the value. This works because the AI ship ignores the fix, and the player ship doesn't. The problem is that these fixes use a default outfit slot each, in addition to the slot used buy the shield/armor outfit itself. So it seems I can save a slot buy spending 2 crons.

QUOTE (Desprez @ Sep 23 2009, 10:43 AM) <{POST_SNAPBACK}>

Setting crew very high won't effectively make a ship uncapturable?

There are three problems with setting the ships' crew count very high: first, you can never get <1% chance, so somebody will eventually get lucky and break the system; second, if there are any outfits in your plug that increase capture odds by a set %, that 1% will become 11% pretty quickly; third, if and when somebody does capture the ship, they now have a ship with some ungodly crew count that they could use to capture more "uncapturable" ships (although you could fix this with contribute bits/crons/missions etc.).

QUOTE (Desprez @ Sep 23 2009, 10:43 AM) <{POST_SNAPBACK}>

First off, the crons can run instantly by inserting a date-posting mission in the OnCapture field.
But I don't see how this solves the problem, as I'd still need a cron for every 'special' weapon I need to check for.
Which I guess is doable, but I was hoping for something a bit more elegant.

I actually don't think the date-increasing mission idea will work since the date gets bumped when a mission is completed , not aborted/failed/ShipDone-ed. So you'd still have to land… somewhere… before the date increase kicked in. Plus, you wouldn't need a crön for every weapon if you wanted a work-around. You could just make it detect and delete the new ship token and get rid of all the outfits and missions that are toggleable. The player would start off without the toggleable weapons, but that would cut your resource usage down to 1 outfit and 1 cron.

QUOTE (Desprez @ Sep 23 2009, 10:43 AM) <{POST_SNAPBACK}>

It's not a problem because that's not how they work. Needing the functionality to be able to sell the items necessitated a way to exit the swapping missions loop. Briefly, when each mission aborts it starts the next. All except one, which begins the loop again not by OnAbort, but using OnShipDone and a self destructing dude. So that is the break in the chain where aborting that mission will permanently exit the mission loop. Otherwise you can never get rid of the missions.

Hmm, that's a very interesting way of going about it. The one time I needed to do something of the same sort I used two missions: buying the outfit starts Mission A and Mission B, aborting Mission A fails and then aborts Mission B, and failing Mission B starts the toggle. That way, when the player switched ships or sold the outfit, Mission B would abort followed by Mission A aborting. I don't know if that would give you a more elegant way of going about it, but it's there if you want to toy around with it. This should also address your next concern.

QUOTE (Desprez @ Sep 23 2009, 10:43 AM) <{POST_SNAPBACK}>

By 'work around', you mean not use them?
I have not encountered any unsolved problems. (except in relation to this discussion) Can you elaborate here? What problems do you mean?

Oh, I totally read you backwards there. For multiple ammo/one weapon, the new ship token should work fine; just use it to delete the invisible weapons the AI needs to fire the different ammo types.

QUOTE (Desprez @ Sep 23 2009, 10:43 AM) <{POST_SNAPBACK}>

A good example here is shield and armor outfit 'fixes'. AI ships that are supposed to have extra armor/shields need to have those values added directly to the shield and armor fields since they ignore those outfits. If a player then captures that ship, he now has too much shields/armor. So I have invisible default outfits to 'fix' the value. This works because the AI ship ignores the fix, and the player ship doesn't. The problem is that these fixes use a default outfit slot each, in addition to the slot used buy the shield/armor outfit itself. So it seems I can save a slot buy spending 2 crons.

Yup.

OK I think that's about it. Let me know if you need more clarification on any of those points.

QUOTE (Archon @ Sep 23 2009, 06:04 PM) <{POST_SNAPBACK}>

I actually don't think the date-increasing mission idea will work since the date gets bumped when a mission is completed , not aborted/failed/ShipDone-ed.

I use auto-aborting date posting missions all the time.

QUOTE

So you'd still have to land… somewhere… before the date increase kicked in. Plus, you wouldn't need a crön for every weapon if you wanted a work-around. You could just make it detect and delete the new ship token and get rid of all the outfits and missions that are toggleable. The player would start off without the toggleable weapons, but that would cut your resource usage down to 1 outfit and 1 cron.

Ah, I see what your getting at. Basically, the player captures ships with some items missing.

QUOTE

Hmm, that's a very interesting way of going about it. The one time I needed to do something of the same sort I used two missions: buying the outfit starts Mission A and Mission B, aborting Mission A fails and then aborts Mission B, and failing Mission B starts the toggle. That way, when the player switched ships or sold the outfit, Mission B would abort followed by Mission A aborting. I don't know if that would give you a more elegant way of going about it, but it's there if you want to toy around with it.

If I'm interpreting you correctly, you have 4 missions, and 2 running missions at any given time to perform repeating swaps. Whereas I have 2, with only 1 running, but also uses a dude, and at least 1 step needs a delay. (Originally, I didn't envision the delay, but from a gameplay perspective it can be good to have: "Please wait a moment while your PD Turret starts up...")

Yup, you got it. I was thinking about the delay too when I put forward the other method, but I actually really do like the weapon toggle delay thing. Quite… atmospheric, or something.

I was actually positively convinced that increase date would only work on success… bugger. Well thanks for the tip!

There's a lot of good stuff in this thread. I like the "toggle weapons with a delay". I like the

QUOTE (Desprez @ Sep 23 2009, 08:16 PM) <{POST_SNAPBACK}>

Ah, I see what your getting at. Basically, the player captures ships with some items missing.

This…this has so many uses. shivers

QUOTE (Qaanol @ Sep 24 2009, 07:35 PM) <{POST_SNAPBACK}>

This…this has so many uses. shivers

Tokens (and Dxxx, Gxxx, and Cxxx) are your friend. 😄

(edit)Oh my god, Qaanol shivered! shiver

This post has been edited by Archon : 24 September 2009 - 07:58 PM

You capture a ship. Suddenly you find weapons and engines refuse to work. You realize it was a trap as the reinforcement fleet warps in...

Funny, that's exactly what I do in Anathema…

Unless, of course, you use it as an escort, in which case it disables your ship's systems.