Jump to content

Multiple FlagDecal Modules on a singular part?


Recommended Posts

Real quick question hopefully.

Can a part in KSP have multiple flag decal modules, i.e, flag decal location in various places on the part? If I added multiple decals, would I get multiple toggles in the VAB tweak menu for that part? Granted, you can only choose one decal for your vessel, so they'd all be the same decal theoretically, but disregard that for now. Are multiple FlagDecal modules possible?

Thanks in advance. :)

Link to comment
Share on other sites

Yes it is possible (IIRC) by using two FlagDecal modules in the config :)

Example:

Ariane 5 fuel tank in TantaresLV

PART
{

name = CLV_LFO_A
module = Part
author = Tantares

MODEL
{
model = TantaresLV/CLV/Ariane_LFO_A
}
scale = 1
rescaleFactor = 1.0

node_stack_top = 0.0, 7.5, 0.0, 0.0, 1.0, 0.0, 3
node_stack_bottom = 0.0, -7.5, 0.0, 0.0, -1.0, 0.0, 3
node_attach = 1.875, 0.0, 0.0, 1.0, 0.0, 0.0, 2
bulkheadProfiles = size3

TechRequired = heavierRocketry
entryCost = 12000
cost = 12000

category = Propulsion
subcategory = 0
title = A:CT "Glace" Rocket Fuel Tank
manufacturer =
description =

attachRules = 1,0,1,1,0

mass = 15.0

dragModelType = default
maximum_drag = 0.20
minimum_drag = 0.15
angularDrag = 2
crashTolerance = 15
maxTemp = 2000

RESOURCE
{
name = LiquidFuel
amount = 9720
maxAmount = 9720
}

RESOURCE
{
name = Oxidizer
amount = 11880
maxAmount = 11880
}


MODULE
{
name = FlagDecal
textureQuadName = FlagTexture1
}


MODULE
{
name = FlagDecal
textureQuadName = FlagTexture2
}

}

Link to comment
Share on other sites

Yes it is possible (IIRC) by using two FlagDecal modules in the config :)

Or combine the flag meshes into one and reference it with a single module.

I've used both methods, and can confirm that they both work. Usually the only reason to make them separate mesh objects with separate config references, is if there's a need to do so. An example is if you want one of them to be on an engine, and the other on the engine's shroud. If you just want flags on opposite sides of a static object, like a fuel tank, it's easier to make them part of the same mesh object and reference it once, and it also saves you an unnecessary draw call.

Link to comment
Share on other sites

An example is if you want one of them to be on an engine, and the other on the engine's shroud.

Hadn't thought of that scenario, nice idea!

Perhaps referencing seperate decals from one module would be possible by giving them identical names, same way as moduleEngines handles thrustTransforms. Has anyone tried that?

Link to comment
Share on other sites

It's interesting, I didn't quite understood the method, NecroBones, would you please explain in detail how I can put flag decals on jetissonable engine shrouds and chute caps?

Yep, just make the flag decal's mesh object a child of the object you want it to be attached to.

Link to comment
Share on other sites

Thanks for the replies all.

Does anyone think it'd be at all possible to choose have different decals on the same vessel? The overall vessel decal is defined by the main FlagDecal module in the VAB, right?

FlagDecals are stipulated from the craft's flag as far as I know, so sadly not possible I think.

All flags are loaded into memory at startup; so not with Stock modules, but with a custom FlagDecal plugin it would be "reasonably" trivial to point to a different Flag texture.

If the source code for the FlagDecal module was available I might take a stab at it, but unfortunately we only have visible (I think?) the snippits like so...

7b6321d016.png

So, you would really need each flag module to hold a reference to a flag texture, which you would insert in the "updateDisplay()" or "updateFlagTexture()" methods instead of presumably fetching the flag texture of the current craft.

The problem is building UI to select flags, etc. Good place to start there I think would be procedural parts or Firespitter texture switch source code.

Please an actual programmer (I am just a database monkey!) can tell me if I'm spreading any incorrect info.

Edited by Beale
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...