Hard Light Productions Forums
Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: CommanderDJ on August 31, 2010, 03:20:50 am
-
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.
-
It's easily possible with argument SEXPs.
-
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?
-
It already is the default behavior.
-
It already is the default behavior.
what
-
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.
-
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:
-
Read the source code and learn:
// 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);
}
}
}
-
I just got pwned.
But still, as Enigmatic Entity pointed out,
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.
-
I just got pwned.
You took it equably enough. :)
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.
-
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.
-
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.
-
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.
-
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.
-
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.