Jump to content

Firespitter propeller plane and helicopter parts v7.1 (May 5th) for KSP 1.0


Snjo

Recommended Posts

Love the parts, but I am having issues with some. Most notably is the attack helicopter crew pod; it causes a massive lag spike on my system, dragging the game down to 4FPS, even while just sitting by itself on the launch pad.

I've launched a 200+ part station rig without dropping a frame, but that pod just kills my system for some reason.

Link to comment
Share on other sites

Love the parts, but I am having issues with some. Most notably is the attack helicopter crew pod; it causes a massive lag spike on my system, dragging the game down to 4FPS, even while just sitting by itself on the launch pad.

I've launched a 200+ part station rig without dropping a frame, but that pod just kills my system for some reason.

This is because my monitors are very inefficiently rendered. I've changed it now, so that the monitors don't activate until you press a button. This way the inefficient character grid will not be constructed when it is not needed.

The plan has always been to convert the whole thing to a similar system to Raster Prop Monitor, but it's a big task, so I haven't gotten around to it yet.

Modders' note: This new behavior is not the default for other monitor props using this plugin, it depends on the variable autoCreateGrid = false to be set in the prop.cfg

  MODULE
{
name = FSmonitorScript

autoCreateGrid = false

Edited by Snjo
Link to comment
Share on other sites

Mesh switching is like a drug. A drug that I now abuse - not just a little bit either, I mean like in a really creepy way.

I don't think I'll ever be happy making just a single simple part ever again...must have variations! Even a simple turbo prop project exploded on me:

trubo_Project.png

Note that is 1 single catalog entry, 2 textures borrowed from elsewhere. 50 different combinations of looks and will be 2 different modes (turbo prop and electric). 500kb total on your RAM load. Preview the other 40-50 parts with even more combinations here. Yes, Virginia, its functioning in the game just fine.

From my game designer point of view, this real magic of this is that it lets you standardize the stats a bit, while allowing near infinite possibility for the "look" of the user experience. Of course, I thought the same thing when texture switching came out...

Edited by PolecatEZ
Link to comment
Share on other sites

I am now in the bothersome position of having to update my own part catalog. Deleting a lot of parts, and moving them to a legacy pack.

Stuff like three fenestrons have to be added to a single part, fuel tanks/fuselage going from 4 to 1, and having to figure out where to use tex switch or mesh switch...

Link to comment
Share on other sites

A request: please disable the resource switching (but leave the mesh switching enabled) in the presence of a ModuleFuelTanks module? :)

Good idea. What's the name of the assembly? I'll do it the same way as with FAR if I have that assembly name:

FARActive = AssemblyLoader.loadedAssemblies.Any(a => a.assembly.GetName().Name.Equals("FerramAerospaceResearch", StringComparison.InvariantCultureIgnoreCase));
if (FARActive)
{
this.enabled = false;
}

Link to comment
Share on other sites

I'd suggest not doing it by the assembly, since the mere presence of the assembly shouldn't stop functionality on any given part (the part might not have a modular tank, after all!). Instead, if(part.Modules.Contains("ModuleFuelTank")) { don't mess with resources. }

Link to comment
Share on other sites

v6.4.PRE2

-Some parts moved to the Firespitter Legacy Parts Pack (not yet packaged)

-Tweakable engines! Adjust the number of propeller blades, their length, and the engine size in the hangar!

-New helicopter main rotor using aerodynamic lift on the blades and particle ground FX (currently constantly on)

-Electric propeller and electric heli engine are using the new engine module, which trades some silly throttle bugs for new and exciting bugs

-Modular fuel tanks. A single part with alternate texutres and fuel tanks. Toggle through the choices in the hangar. (oblong multi-tank and fuel drop tank)

-Wheel alignment guides end the scourge of crooked gear placement. Press F2 to toggle guide lines.

-A new engine module that supports atmospheric engines much better, separates engine start up time from throttle response, and allows for electric engines without the extra FScoolant resource.

-Apache cockpit monitors are off by default to reduce lag. Click a button to turn them on.

-Helicopter engines display a guide arrow to assist in putting them on the right way.

-New texture switch, mesh switch and fuel tank switch modules allows for many varieties in a single part. Added normal-map-only support to tex switch.

WARNING: Note that some parts are still WIP, including some that have replaced parts moved to legacy. This release is not part complete, and should only be used by the very curious

PolecatEZ, you might want to check out the use of dual texture switches in Parts\Fuselage\FS_oblongMultiTank, one that switches fuels + normal map, and another that switches textures.

Link to comment
Share on other sites

And here I thought I would relax and play a bit...I got that model you see above modularly cut up to take advantage of the new tweakable engine, now I just need to do a battle royale with Unity to make it work...then do it for 5 more chopper engines.

Link to comment
Share on other sites

I'd suggest not doing it by the assembly, since the mere presence of the assembly shouldn't stop functionality on any given part (the part might not have a modular tank, after all!). Instead, if(part.Modules.Contains("ModuleFuelTank")) { don't mess with resources. }

In that case, there isn't a need to do anything at all. The fuel switch only exists in parts that have the FSfuelSwitch module. If modular fuel tanks only exist in parts that have ModuleFuelTank, those will never exist in the same part anyway.

If ModuleFuelTank is present, it's either because the cfg has been edited manually, of by using MM, in which case you would remove the FSfuelSwitch anyways (and the line useFuelSwitchModule = true from the other connected switcher modules).

If you ever add the concept of pre-defined tank setups that can be toggled through, I could just have the mesh/tex switchers do a sendmessage to it so that there is no need for dll references in the build.

Link to comment
Share on other sites

The new FSTextureSwitch2 module is great. :D

Though I found a bug, when switching to a none tweakable resource it stops showing the resource bar.

So when that happens you can't tweak the tweakable resources.

Is it possible to have 2 FSTextureSwitch2 modules which change 1 of the 2 resource on a part?

So basically mix the resource combination through switching 2 FSTextureSwitch2 modules.

Something like moduleID would be nice.

Edited by Albert VDS
Link to comment
Share on other sites

The new FSTextureSwitch2 module is great. :D

Though I found a bug, when switching to a none tweakable resource it stops showing the resource bar.

So when that happens you can't tweak the tweakable resources.

What is a non-tweakable resource? When the tank is set to empty/structural, there is obviously no resource, and therefore no resource amount to tweak

Is it possible to have 2 FSTextureSwitch2 modules which change 1 of the 2 resource on a part?

So basically mix the resource combination through switching 2 FSTextureSwitch2 modules.

Something like moduleID would be nice.

No. I have to nuke the entire resource list in the part, and in symmetry counterparts before rebuilding the list. Making assumptions about which resources not to touch in case they are used by some other module is a highway to the nullref zone.

edit: BTW I fixed a bug with symmtery parts not saving the selected tank properly, the dll is here

Link to comment
Share on other sites

What is a non-tweakable resource? When the tank is set to empty/structural, there is obviously no resource, and therefore no resource amount to tweak

A resource which can't be adjusted in the VAB/SPH, for example TAC Life Support resource: Waste Water, Carbondioxide and Waste.

No. I have to nuke the entire resource list in the part, and in symmetry counterparts before rebuilding the list. Making assumptions about which resources not to touch in case they are used by some other module is a highway to the nullref zone.

edit: BTW I fixed a bug with symmtery parts not saving the selected tank properly, the dll is here

Alright, I'll use them separately then. :)

Link to comment
Share on other sites

A resource which can't be adjusted in the VAB/SPH, for example TAC Life Support resource: Waste Water, Carbondioxide and Waste.

I've never used those mods. How are those resources different, and what prevents them from being tweaked in a regular part?

Link to comment
Share on other sites

If isTweakable is set to true in RESOURCE_DEFINITION then it's tweakable in VAB/SPH.

Waste Water, Carbondioxide and Waste have it set to false, I guess because you normally won't send up those resource IRL.

So the issue for you is that a tank with WasteWater doesn't show a resource, therefore not making it obvious that the tank is there?

The tweakable sliders are not delivered by the switcher module, they are delivered by the stock code if a resource is present. If you need to make it clear to the user that the tank is different, you can use the textureDisplayNames values to give the tank setup a different set of names like "Structural;Fuel;Waste Water", and then that will show up for the selected tank type

edit: if the thing truly does bug out, send me a part where that happens, and I can debug it.

Link to comment
Share on other sites

Snjo, is possible to switch 2 object's textures at the same time?

I tried something like this, but it didn't work:

	
textureNames = location\texture1,location\texture2;location\texture3,location\texture4
objectNames = Object1;Object2

I simplified it to make it readable

Link to comment
Share on other sites

Hey Snjo, got a bug here. Trying to use your new tweakable helicopter rotor, but it doesn't produce any thrust, or ground effect. I'm running a lot of mods so there might be an incompatibility there somewhere. I'll do some more testing on a clean KSP but I don't think it's a problem on my end.

Link to comment
Share on other sites

Out of curiosity, could we possibly get a reverse-thrust mode on the PROpeller and its electric variant?

For sure. Just had to fix some coding first.

Snjo, is possible to switch 2 object's textures at the same time?

I tried something like this, but it didn't work:

	
textureNames = location\texture1,location\texture2;location\texture3,location\texture4
objectNames = Object1;Object2

I simplified it to make it readable

It would be tricky for it to know which objects should receive which texture. Of course it could just do it in sequence, but it's not supported currently. Also I see you used backslashes in your paths, which are only supported in the latest version of the dll (If you guessed that I spent way too long hunting bugs because I had made that error myself, you would be right). It now replaces \ with / for you internally.

If you post an issue to the issue tracker, I may remember to take a look at it :)

Hey Snjo, got a bug here. Trying to use your new tweakable helicopter rotor, but it doesn't produce any thrust, or ground effect. I'm running a lot of mods so there might be an incompatibility there somewhere. I'll do some more testing on a clean KSP but I don't think it's a problem on my end.

Did you give it time to spin up, and can you see the blades pitch when you use Shift/Ctrl? The code should be fairly independent of all other code and mods, so not sure what went wrong. I will have to rewrite the whole thing anyway to make it use less magic and more resources though, so still new bugs to make.

Still finding bugs with the fuel tank switcher and part symmetry, think they are all squashed. As nice as part symmetry is, it's hell to code for. Had to add in ModuleID on the texture switchers. Also it's possible the fuel switch has to be before the tex switch in the part.cfg so that it has tank types defined before the tex switchers mess with it.

Edited by Snjo
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...