Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: fightermedic on March 08, 2014, 08:25:54 pm

Title: Idea: Navigation-Subsystem and maneuverability
Post by: fightermedic on March 08, 2014, 08:25:54 pm
It just occured to me that this engine is missing a feature that i would absolutely love to use in my upcomming mod!  :nod:

As we all know, if the engine subsystem gets damaged, ships become slower, and there also is a global flag that prohibits warping out if the navigagtion subsystem is destroyed.
Now, what if another global flag would be added, that, once set, reduces a ships maneuverability in the same way the speed goes down with damaged engines, as the navigation subsystem gets damaged?

There probably should be a minimum turn-rate,  something like 25% of the ships base maneuverability still available, even if the subsystem is destroyed entirely though, unlike the engines; since not being able to turn at all is just stupid

Would that be hard to implement? While not the easiest thing on the world, it does sound quite straight forward to me, but what do i know

Anyone else interested in seeing something like that? I for one would really love to have a way to simulate damaged flight controls and side thrusters on ships  :nervous: And it would add some real purpose to the navigation system at long last  ;)
Title: Re: Idea: Navigation-Subsystem and maneuverability
Post by: Black Wolf on March 08, 2014, 08:45:51 pm
I like the idea. Could be implemented as an in-mission ship flag, off by default, but toggleable on from the ships editor (and globally toggleable from mission specs).
Title: Re: Idea: Navigation-Subsystem and maneuverability
Post by: karajorma on March 08, 2014, 11:07:43 pm
I think an Objecttypes.tbl, ai_profile.tbl or mod.tbl setting would make more sense for this. It's something you want set at the campaign level, not mission level.
Title: Re: Idea: Navigation-Subsystem and maneuverability
Post by: General Battuta on March 09, 2014, 12:10:10 am
If we are going to be able to alter tabled traits on the fly (and if we can alter P/H/B change rates presumably we can get at other stuff like max speed), more than anything else I want SEXP access to this. Setting up all the other requests in the thread is pretty trivial if you have SEXPs that work.

Kara's suggestion is another sensible way to do it from a low-overhead standpoint.
Title: Re: Idea: Navigation-Subsystem and maneuverability
Post by: Axem on March 09, 2014, 12:13:57 am
Or you know... With lua :p
Title: Re: Idea: Navigation-Subsystem and maneuverability
Post by: General Battuta on March 09, 2014, 12:15:57 am
Lua is much more of a commitment to learn, and frankly I'd prefer to continue doing advanced SEXP work without it.
Title: Re: Idea: Navigation-Subsystem and maneuverability
Post by: fightermedic on March 09, 2014, 05:55:42 am
I think an Objecttypes.tbl, ai_profile.tbl or mod.tbl setting would make more sense for this. It's something you want set at the campaign level, not mission level.
ai_profile.tbl is the place to go, since the other navigation flag is there as well

@Axem:
i don't know
features like this could be pretty usefull for more than one mod, and i think it would rest well within the engine itself
too bad i have no idea of lua, a script would be better than nothing of course

another feature that is similar to this one that maybe should be done alongside is a working shieldgenerator-subsystem that reduces max shield if damaged, (or 0 if destroyed)
it sounds so similar to implement to my navigation idea, that maybe it would be a waste to not include both at the same time, nevermind the actual way it is implented

on a global level, SEXPs are not ideal for this, as i think both of this is stuff that you either want for your whole mod or not at all, so you have to set it up in every mission for every ship where it'd make a difference  :shaking:

anyway, it's all just daydreaming unless someone is interested in actually implementing it
but sharing the idea doesn't hurt i guess
Title: Re: Idea: Navigation-Subsystem and maneuverability
Post by: Axem on March 09, 2014, 09:00:16 am
Well it just reminded me of this thread: http://www.hard-light.net/forums/index.php?topic=82426.0

Its a lot of specific behavior that might be envisioned to be slightly different for other mods. Like what if I wanted the engine subsystem to also govern maneuverability instead of navigation? I mean having sexps that change the rotation values of ships would be cool, but I think it goes a little overboard if you're going to be copy pasting sexps into each mission. (I know the pain of that and never wish to repeat it).

Battuta: Yes, I realize lua knowledge is low. I really wish to change this with some tutorials in the future. Break down this scripting wall everyone's frightened about.
Title: Re: Idea: Navigation-Subsystem and maneuverability
Post by: General Battuta on March 09, 2014, 10:43:40 am
I think an Objecttypes.tbl, ai_profile.tbl or mod.tbl setting would make more sense for this. It's something you want set at the campaign level, not mission level.
ai_profile.tbl is the place to go, since the other navigation flag is there as well

@Axem:
i don't know
features like this could be pretty usefull for more than one mod, and i think it would rest well within the engine itself
too bad i have no idea of lua, a script would be better than nothing of course

another feature that is similar to this one that maybe should be done alongside is a working shieldgenerator-subsystem that reduces max shield if damaged, (or 0 if destroyed)
it sounds so similar to implement to my navigation idea, that maybe it would be a waste to not include both at the same time, nevermind the actual way it is implented

This is trivial to do with existing SEXPs.

Quote
on a global level, SEXPs are not ideal for this, as i think both of this is stuff that you either want for your whole mod or not at all, so you have to set it up in every mission for every ship where it'd make a difference  :shaking:

anyway, it's all just daydreaming unless someone is interested in actually implementing it
but sharing the idea doesn't hurt i guess

A SEXP library between missions would be nice, but honestly, SEXPs ARE ideal for this - simply because this is a capability FREDders need to have access to. I'd rather see this feature implemented in SEXPs with a high workload than implemented in the AI profile and left inaccessible to the mission creator. This kind of fine-grained control of ship behavior is something we've been craving for years.

Axem, it'd be great to make people more familiar with LUA, but frankly I think there's a lot of value to having a single-stream set of solutions to creating missions. I want my events to be able to get **** done on their own, not resort to LUA for everything remotely creative.
Title: Re: Idea: Navigation-Subsystem and maneuverability
Post by: Dragon on March 09, 2014, 12:15:25 pm
Well it just reminded me of this thread: http://www.hard-light.net/forums/index.php?topic=82426.0
So people have not forgotten about my suggestion? :) Anyway, good to know there's interest in this idea.
While SEXPs work for some of this stuff, working with a large number of SEXPed behaviors like that quickly becomes a pain to maintain across all ships in the campaign. A LUA script would solve this, but LUA knowledge is somewhat low and a large number of consecutively running scripts can bog the game down somewhat. If you want a flightsim-level subsystem damage model, for all fighters and capships in mission, doing that stuff with LUA runs the risk of being inefficient (not to mention it's hard to find a LUA coder who'd be willing and able to write that), and doing it with SEXPs is an absolute pain that would drive you insane if you had to maintain it over a decent length campaign.

There are two good solutions: engine-side feature (which I suggested earlier) or a SEXP-script of some sort. The latter solution seems particularly appealing because of how powerful if could be, especially if it was possible to also introduce the rest of LISP language (which SEXPs are directly derived from) and give it an accessible, FRED-based editor. However, introducing a second scripting language and making necessary changes to FRED might as well be harder than implementing more subsystems engine-side (though I might be wrong, I don't know to what extent LISP is currently implemented).

BTW, I recently came up with another idea of in-engine implementation. Basically, instead of hard-coding subsystem behavior, an entry in table would bind a table value (or several) to subsystem's health, and define the nature of this relation. This could be powerful and relatively simple for the end user. It'd also have an advantage of allowing the subsystem to be called whatever you want, what would actually matter would be the entry in it's properties.
Title: Re: Idea: Navigation-Subsystem and maneuverability
Post by: The E on March 09, 2014, 12:41:27 pm
BTW, I recently came up with another idea of in-engine implementation. Basically, instead of hard-coding subsystem behavior, an entry in table would bind a table value (or several) to subsystem's health, and define the nature of this relation. This could be powerful and relatively simple for the end user. It'd also have an advantage of allowing the subsystem to be called whatever you want, what would actually matter would be the entry in it's properties.

Feel free to come up with a design for this that isn't hideously complicated to implement.
Title: Re: Idea: Navigation-Subsystem and maneuverability
Post by: Dragon on March 09, 2014, 04:03:52 pm
I'd like to, but it seems everything is hideously complicated in this engine. :) Well, I suppose I'll better get to learning C/C++... I've only started with that one recently, so it might be a year or two before I'm ready to try myself against the Codethluthu (and even then, I'll probably start with writing SEXPs. I've heard the stories about the rest of the code). :)

Anyway, in that case, "SEXP scripting" or even a full-on LISP interpreter built into FRED would be a better idea. IIRC, it was even quite seriously discussed one day. I'd greatly appreciate being able to automatically apply a set of SEXPs to every ship in every mission in the campaign, and I'm sure this feature would be useful to FREDers in general. Even something as "simple" (though probably not so simple, as per usual) as importing events from another mission file would greatly streamline implementing certain repetitive mission elements, such as checkpoints or carrier launches/landings.
Title: Re: Idea: Navigation-Subsystem and maneuverability
Post by: jr2 on March 14, 2014, 09:22:06 pm
Didn't Goober already do something similar with the shield subsystem, or is that my imagination?
Title: Re: Idea: Navigation-Subsystem and maneuverability
Post by: Nightstorm on March 21, 2017, 09:28:57 am
I was curious is this was ever implemented anywhere?  I was messing around with sub system damage and realized that the Navigation system didn't seem to affect anything I could see.  I literally had this same idea last night and then found out that Fightermedic had it three years ago :)

I did see in the ai_profile.tbl the flag for Navigation affecting warpout.  So am I to understand that if that is set to YES and your Nav system is knocked out, a jump capable ship couldn't jump?

That would affect all ships that are jump enabled and would do something, but for small fighters without jump it leaves the NAV system as an unused sub system correct?
Title: Re: Idea: Navigation-Subsystem and maneuverability
Post by: Dragon on March 21, 2017, 01:30:01 pm
Besides engines and weapons, none of the non-turret subsystems really do anything for most ships. Sensors and comms only affect the player, AFAIK.