Author Topic: Support ship behaviour  (Read 3218 times)

0 Members and 1 Guest are viewing this topic.

Offline CommanderDJ

  • Software engineer
  • 210
Support ship behaviour
An idea just occurred to me: support ships don't usually look out for themselves at all. When under attack, they just stand there and take it (well, duh, they have no weapons). But seeing as how you can just call in another one whenever you want, would it be possible to make it so that if a support ship isn't currently under orders to rearm anybody or stay near anyone, could it depart when its hull integrity falls below a certain value? Or perhaps just when under attack? I think this would make it their behaviour more realistic and believable.
[16:57] <CommanderDJ> What prompted the decision to split WiH into acts?
[16:58] <battuta> it was long, we wanted to release something
[16:58] <battuta> it felt good to have a target to hit
[17:00] <RangerKarl> not sure if talking about strike mission, or jerking off
[17:00] <CommanderDJ> WUT
[17:00] <CommanderDJ> hahahahaha
[17:00] <battuta> hahahaha
[17:00] <RangerKarl> same thing really, if you think about it

 

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
Re: Support ship behaviour
It's easily possible with argument SEXPs.

 

Offline CommanderDJ

  • Software engineer
  • 210
Re: Support ship behaviour
I didn't mean in a specific mission, like you said, that's easy. I meant could we make this default behaviour? And would it be worth it?
[16:57] <CommanderDJ> What prompted the decision to split WiH into acts?
[16:58] <battuta> it was long, we wanted to release something
[16:58] <battuta> it felt good to have a target to hit
[17:00] <RangerKarl> not sure if talking about strike mission, or jerking off
[17:00] <CommanderDJ> WUT
[17:00] <CommanderDJ> hahahahaha
[17:00] <battuta> hahahaha
[17:00] <RangerKarl> same thing really, if you think about it

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
It already is the default behavior.

 

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
It already is the default behavior.
what

 

Offline CommanderDJ

  • Software engineer
  • 210
It already is the default behavior.

Um. No it isn't. Well, at least, not in my experience. When a support ship is being attacked (which doesn't happen often, I'll admit), it just sits there and does nothing. Sometimes it flies attempts to fly away, obviously to no avail. Any pilot in that situation would have the common sense to jump back to base.
[16:57] <CommanderDJ> What prompted the decision to split WiH into acts?
[16:58] <battuta> it was long, we wanted to release something
[16:58] <battuta> it felt good to have a target to hit
[17:00] <RangerKarl> not sure if talking about strike mission, or jerking off
[17:00] <CommanderDJ> WUT
[17:00] <CommanderDJ> hahahahaha
[17:00] <battuta> hahahaha
[17:00] <RangerKarl> same thing really, if you think about it

 

Offline Enigmatic Entity

  • Exemplar Essayer
  • 28
  • Amigo ad infinitum.
I have seen them try to go back to base, though mainly when I get bored in a silly self created BoE and turn traitor. They wait too long though and get destroyed sometimes even after they are in the warp hole, but the hole is still open, so the weapons fly straight through...

If they aren't attacked, they sit there pretending to be an asteroid. They move for 1/2 a second upon receiving fire, then stop until they get hit again :doubt:
Juvenescence and multifariousness is eternal.

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Read the source code and learn:

Code: [Select]
// If a support ship with no goals and low hull, depart.  Be sure that there are no pending goals
// in the support ships ai_goal array.  Just process this ships goals.
if (sip->flags & SIF_SUPPORT) {
if ( timestamp_elapsed(aip->warp_out_timestamp) ) {
ai_process_mission_orders( OBJ_INDEX(objp), aip );
if ( (aip->support_ship_objnum == -1) && (get_hull_pct(objp) < 0.25f) ) {
if (!(shipp->flags & SF_DEPARTING))
mission_do_departure(objp);
}
}
}

 

Offline CommanderDJ

  • Software engineer
  • 210
I just got pwned.

But still, as Enigmatic Entity pointed out,
Quote
If they aren't attacked, they sit there pretending to be an asteroid. They move for 1/2 a second upon receiving fire, then stop until they get hit again.
Now I'm obviously not demanding that this be looked into RIEET NAO (as I'm obviously not in a position to), but I'm asking if it could possibly be evaluated sometime in the future?
This is especially visible when you turn traitor. The support ship is a sitting duck. I just think it would make for a more realistic game experience if the support ship jumped out as soon as it was attacked if it has no active goals. Or for example when it's hull is less than 50%, because by the time it gets to 25% (as in that code snippet you have there), it's going to take about two seconds for the support ship to be destroyed if it's continuously under fire.
[16:57] <CommanderDJ> What prompted the decision to split WiH into acts?
[16:58] <battuta> it was long, we wanted to release something
[16:58] <battuta> it felt good to have a target to hit
[17:00] <RangerKarl> not sure if talking about strike mission, or jerking off
[17:00] <CommanderDJ> WUT
[17:00] <CommanderDJ> hahahahaha
[17:00] <battuta> hahahaha
[17:00] <RangerKarl> same thing really, if you think about it

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
I just got pwned.
You took it equably enough. :)

Quote
I just think it would make for a more realistic game experience if the support ship jumped out as soon as it was attacked if it has no active goals. Or for example when it's hull is less than 50%, because by the time it gets to 25% (as in that code snippet you have there), it's going to take about two seconds for the support ship to be destroyed if it's continuously under fire.
The problem here is not the AI but the departure mechanism.  It takes so long for a ship to depart that small ships are usually destroyed before they can complete the jump.  Under sustained fire a support ship can be destroyed even if it's set to jump out at 75%.

The solution is probably to implement a new warpout type that can complete very quickly.  In X-Wing and TIE Fighter, for example, ships going into hyperspace would escape weapons range in less than a second.

 

Offline CommanderDJ

  • Software engineer
  • 210
Yes. What you say makes a lot of sense. Would you guys actually consider implementing this? Maybe specifically for support ships by default and then available as a SEXP or feature that can be toggled for other ships in FRED? Because that would be awesome.
[16:57] <CommanderDJ> What prompted the decision to split WiH into acts?
[16:58] <battuta> it was long, we wanted to release something
[16:58] <battuta> it felt good to have a target to hit
[17:00] <RangerKarl> not sure if talking about strike mission, or jerking off
[17:00] <CommanderDJ> WUT
[17:00] <CommanderDJ> hahahahaha
[17:00] <battuta> hahahaha
[17:00] <RangerKarl> same thing really, if you think about it

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
I dunno about that. I definitely wouldn't want it in the core campaigns. If a 'fast jump' drive exists, why don't fighters get it?

It'd be an interesting mod option, but I don't think it should be applied to support ships, especially not on the code level.

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
It would definitely be an interesting mod option, for balance purposes.  Especially if a campaign creator wants his fighters to be able to escape on a regular basis, instead of fighting to the death.

Implementing a new warpout type is non-trivial, however, and there doesn't seem to be a campaign which currently needs this.

 

Offline Retsof

  • 210
  • Sanity is over-rated.
You could just set the warpout speed higher in the ship tables.  Harder to shoot a ship that's being sucked into subspace at 200 m/s.
:::PROUD VASUDAN RIGHTS SUPPORTER:::

"Get off my forum" -General Battuta
I can't help but hear a shotgun cocking with this.

  

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Wrong, I think. The problem is that the ship needs to accelerate (or decelerate, as the case may be) to the warpout speed, and that takes time. IIRC.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns