Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: aldo_14 on September 20, 2002, 04:38:47 pm

Title: Auto protect shields sexp?
Post by: aldo_14 on September 20, 2002, 04:38:47 pm
Just an idea for an SEXP (or flagged in ships.tbl, but I figure SEXP-ing could be more flexible)

Basically, the game reacts to the lowest shield quadrant and directs all energy to that until it's full or (to prevent a sort of logic error where 1 quad is full and the others are down, and thus all 3 are attempted to be raised) another (any) quadrant is under a certain value.

i.e. it autoequalizes the shields to buffer up the lowest one, presuming it is the area under direct threat (I figure that checking for incoming fire could be a bit too slow...obviously not sure, I'm not proficient enough with C++ / C to actually do this, even if me compiler worked :( ).

Um...like

while(lowestQuad)<10% and (allotherQuads)>10%
 {
 direct all power to (lowestPowerQuad)
//or, equalize shield?
 }

(I'm not sure all the possible scenarios, but I'd assume the function to get the lowest quadrant could check how long that quadrant had been at that level (i.e. how recently it had been knocked down), or double check in a short space to check if it dropped (was under fire), or simply prioritize back/front/left/right when multiple quads are at the same level)

I'm assuming that the game regards the shield as in quadrants based on the special sexps and the HUD ani.  

Just an idea.... it might be useful for stuff, like a lower-difficulty aid, or simulating new technology... or maybe not.


Another idea (which i think has been suggested) would be render the shieldhit ani when 2 shields intersect, i.e. in a collision.  regardless of whether it prevent sthe iompact, it could look cool.  Especially with large shielded craft colliding.
Title: Auto protect shields sexp?
Post by: DTP on September 20, 2002, 10:40:33 pm
I think that should be an AI thing and not an actual SEXP.

since, it is a "auto feature".
Title: Auto protect shields sexp?
Post by: Bobboau on September 20, 2002, 10:49:25 pm
would be a good option type thing like auto target and speed matching, usefull to novice pilots or in those tight scrapes, but a skilled pilot would benefit to manualy controleing it
Title: Auto protect shields sexp?
Post by: Solatar on September 20, 2002, 10:51:13 pm
Yes, right under Auto Target, and Auto Macth speed on you HUD, add Auto Equal or something.
Title: Auto protect shields sexp?
Post by: aldo_14 on September 21, 2002, 07:10:56 am
Quote
Originally posted by DTP
I think that should be an AI thing and not an actual SEXP.

since, it is a "auto feature".


Wouldn;t that be a bit more difficult to impelement, though?  Especially to have it only apply in certain cases...I was thinking that the SEXP code already can affect the shields, and that you could make the whole operation ship-type independent, or triggered only under set conditions, with SEXPs.
Title: Auto protect shields sexp?
Post by: DTP on September 23, 2002, 07:00:28 am
Quote
Originally posted by Bobboau
would be a good option type thing like auto target and speed matching, usefull to novice pilots or in those tight scrapes, but a skilled pilot would benefit to manualy controleing it


it would centainly lighten the pressure on my Q button.
:D
Title: Auto protect shields sexp?
Post by: DTP on September 23, 2002, 07:06:14 am
Quote
Originally posted by aldo_14


Wouldn;t that be a bit more difficult to impelement, though?  Especially to have it only apply in certain cases...I was thinking that the SEXP code already can affect the shields, and that you could make the whole operation ship-type independent, or triggered only under set conditions, with SEXPs.


I think it would be equilly difficult/easy to implement either cases. but since you already have a max amount of SEXPS i think it is bad to do it as a SEXP.

cant remember the max events right now. but will return on that
Title: Auto protect shields sexp?
Post by: IceFire on September 23, 2002, 07:06:17 am
So I'm not the only one who hits "Q" constantly during a firefight :)

Keep those shields equalized!!  Although in recent months I've been directing shield energy to different quadrants...especially on attack runs against the more deadly capital ships showing up in MOD's.
Title: Auto protect shields sexp?
Post by: Fury on September 23, 2002, 07:21:35 am
Quote
Originally posted by IceFire
So I'm not the only one who hits "Q" constantly during a firefight :)


No, you are not. :)
Title: Auto protect shields sexp?
Post by: Nico on September 23, 2002, 08:36:09 am
nah, not automatic, when I go frontal against a cap, for exemple, I put all the shields in the front of my ship, and when I badly want to kill the ^ù$ù*ù$ that keeps evading me, I put all the shields on the back coz there's that damn dragon that won't leave me alone.
get my point? :)
Title: Auto protect shields sexp?
Post by: Bobboau on September 23, 2002, 10:07:35 am
what about an auto feature that replays you're last sheild instruction (equalise, front quadrant, side quardrants, rear quadrant) every, 1/4th of a second
Title: Auto protect shields sexp?
Post by: aldo_14 on September 23, 2002, 04:09:29 pm
Quote
Originally posted by venom2506
nah, not automatic, when I go frontal against a cap, for exemple, I put all the shields in the front of my ship, and when I badly want to kill the ^ù$ù*ù$ that keeps evading me, I put all the shields on the back coz there's that damn dragon that won't leave me alone.
get my point? :)


Actually...that's what I meant.  the idea being that the game detects the weakest shield and boosts it the most, until the other quadrants drop below a certain level....

actually, being able to 'set' all power to the left / right / front / back shields with a hotkey (using q to re-equalise) could be neat....... (I'm assuming it's no possible at the mo).

The thing about the SEXP limit is a good point....I forgot about that.  Isn;t there a limit on the defined SEXPs, too?
Title: Auto protect shields sexp?
Post by: DTP on September 24, 2002, 12:31:17 am
Quote
Originally posted by Bobboau
what about an auto feature that replays you're last sheild instruction (equalise, front quadrant, side quardrants, rear quadrant) every, 1/4th of a second


yeah, would have to be designed carefully though.

i can foresee situations, where you are about to stabelize your front shield section when that auto feature zaps all power to the rear section, meaning you would have to press more times, and in some cases that lost time would get you killed.
Title: Auto protect shields sexp?
Post by: LtNarol on September 24, 2002, 07:08:44 am
preset automatic stuff = bad
sexps to enabe/disable such features = good

they created the Q button so you can equalize, and arrow keys so you can do other stuff, dont get rid of that with auto-features.  Sexps on the other hand that do the same thing can be helpful to ai ships or novice players without being an impediment to more experienced players.
Title: Auto protect shields sexp?
Post by: DTP on September 24, 2002, 07:24:00 am
it was a toggle on/off thing, all the normal shield management functions would still be there.
Title: Auto protect shields sexp?
Post by: IceFire on September 24, 2002, 07:52:01 am
I think we should give this to AI ships....wingmen and enemies are aweful at shield management.
Title: Auto protect shields sexp?
Post by: Fury on September 24, 2002, 08:20:36 am
Quote
Originally posted by IceFire
I think we should give this to AI ships....wingmen and enemies are aweful at shield management.


Agreed. AI should constantly equalise shields.
Even better if you can give it few basic routines to check if it should strenghten one of the shield faces.