Hard Light Productions Forums
Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Shivan Hunter on June 29, 2011, 02:50:37 pm
-
So something I've been considering for modeling is modular ships- separate ones which can be docked in several ways to create a few different whole ships with slightly different purposes. This is of course entirely doable in FS except for two small problems:
1) Speed. Ships slow down when docked to other ships, presumably based on the ratio of the driving ship's mass to the mass of the total bulk. This can be mitigated (and actually used to create modular ships with different speeds) by setting the engine block's speed to something ridiculous like 200. However, to do this effectively, I'd need to know the raw math behind the speed cap; is it simply "total speed = ship's speed / (total mass / ship's mass), then capped at 10 m/s"?
2) Targeting. Individual ships can be targeted, there's no way to draw a single target box around a group of ships (unless you're using scripting- I dunno about scripting so there may well be a way to do it). I'm not going to say the evil words "seems simple to do" because knowing the FS engine it likely isn't.
Anyway, I haven't been doing much modeling recently (working on a small carrier that some people may have seen in IRC), but once I start a new lineup of ships (still Terran, different manufacturer/style) I might make some of the larger ones modular. I'm definitely going to do this for installations.
-
1) Speed. Ships slow down when docked to other ships, presumably based on the ratio of the driving ship's mass to the mass of the total bulk. This can be mitigated (and actually used to create modular ships with different speeds) by setting the engine block's speed to something ridiculous like 200. However, to do this effectively, I'd need to know the raw math behind the speed cap; is it simply "total speed = ship's speed / (total mass / ship's mass), then capped at 10 m/s"?
I'm fairly sure this is not the case. It's been a long time since I looked into modular hulls myself, years, but what I saw then was that it doesn't work that way. You'll notice that FS1-era ships take big hits to speed when they dock with things, but FS2-era ships don't. I suspected, but since I never actually built them don't know, that it's related to MoI values.
-
well, as I mentioned in the equation there's a cap. It won't go below (IIRC) 10 m/s due to being docked. This was introduced in FS2, probably because of the gargantuan freighters they added but that's just speculation.
-
2) Targeting. Individual ships can be targeted, there's no way to draw a single target box around a group of ships (unless you're using scripting- I dunno about scripting so there may well be a way to do it). I'm not going to say the evil words "seems simple to do" because knowing the FS engine it likely isn't.
One solution is to simply sensor-hide all modules but 1, then transfer damage across all docked "modules" via SEXPs. Granted, every setup would have to be custom-made per any given configuration of modules, and would probably need customized hit point values for any external modules. Now, subsystems, on the other hand...
Modularity via daisy-chained docking is probably more feasible for installations than ships at the moment, but it may be possible to get modular "frankenships" sorta working using that method.
-
You could use change-class under models and texturing to 'swap out' the old linked configuration for a new 'attached' object. I don't know how believeable the transition would look, might have to add some kind of effect to mask it, but it would be a lot cleaner than trying to manage the linked object using event code.
-
Could you have the LOD0 big enough to encapsulate the whole model? It could be achieved just by having little pieces floating outside the limits of the module.
-
I've been thinking about this for a while myself, although for super structure purposes.
The docking thing should be more feasible now due to the takeoff and landing system Diaspora put together.
You also have the modular pieces that were put into that gas station platform pack released not long ago.
The targeting of two objects to become one sounds like the larger pain to accomplish.
-
Can you do me a favour and remind me of this in about 2 weeks? I have some additional modular gear from the MCK which is about halfway towards another release iteration, but I'm still on holiday til sometime near then. If you're really keen on modular instalations as well as ships, it'd be cool to integrate the two projects a little bit.
-
You'll notice that FS1-era ships take big hits to speed when they dock with things, but FS2-era ships don't. I suspected, but since I never actually built them don't know, that it's related to MoI values.
It's not; it was a change in the physics code between FS1 and FS2. You can now toggle this behavior on or off with an AI profiles flag.
(We first noticed this when testing "The Hammer and the Anvil"; in FS2 the freighters reach the node way too quickly. We had to add cap-waypoint-speed logic so that the speed would be correct when playing with retail.)
-
Interesting. I wonder if that's what caused the FighterKiller to stop smacking.
-
The FighterKiller missile? What does that have to do with docking or waypoints?
-
You mentioned a physics engine change, and that's one of the enduring mysteries in my mind, so it's possible.
-
Okay. Well, it's possible more than one thing was changed in the physics. I'd need to compare FS1 and FS2, but that doesn't have a realistic chance of happening unless someone posts a video.
-
Not sure if this is related but... on modular ships...
I had this idea of a Fenris frankenship courtesy of the dock points (and probably a couple others from years ago), but other than the issues about targeting, the other problem I ran into was the field of fire of the dockee's turrets not taking the docker into account.
Cue moments when I put a heavy beam cannon or something destructive on the docked object, only for it to kill the ship it's docked with...
But if a campaign uses this as a sort-of "breakaway" tool in rescue missions, then... :doubt:
-
Lock the turrets that are blocked by the docked stuff. Problem solved.
-
Maybe make the modules as subsystems, if destroyed they're invisible. You can have the ship dock with a container object which looks the same as the module. Then when docked the container object despawns and the subsystem on the actual docking ship is repaired, thus appearing.