Jump to content

Help with modding a mod


G'th

Recommended Posts

So, basically, I want to try and add a texture switch module to the parts in this mod:

http://www.curse.com/ksp-mods/kerbal/222813-flag-decals-v2-3

The point being so I can use these decals as separate decals from what my misson flag is. I was already able to sort of do this by essentially creating a new part for each flag I wanted to use and just reusing the assets, replacing the flag texture. This obviously ends up with a large amount of extra parts.

However, my attempts using Firespitter's and Interstellars modules for this have been less than successful. And I think its because I either need to go in and do something with the models themselves or because I need information from the model that obviously I can't access.

Some help with getting this to work would be much, much appreciated.

Note: I do know that there is another mod that actually does this, however, the models in that particular mod aren't as useful as these are (because these scale up and down a lot better) and actually end up causing the decals to not look near as good.

Link to comment
Share on other sites

I'd like to add my request for help here too. That is to say, if you have a resource somewhere on the forum for someone who wants to modify what a particular part does, e.g. merging aspects of ESLD jump beacons and Parameciumkid's Jump Drive 0.6 onto the large spacedock from the IXS mod to create something that looks like the jump gate from Babylon 5. Alas, I'm very new at this and find all the information out there a bit overwhelming, so any specific directions would be nice.

Link to comment
Share on other sites

@G'th: can you show your cfg?

@warpaholic: practically all behaviour is defined in the MODULE{} sections in a part cfg - if it needs interaction with the actual part then you might have problems, for instance an engine needs a part of the model itself to have a specific name & orientation. Most of that sort of thing is in the addon development forum, disguised as information about building models.

Link to comment
Share on other sites

@G'th: can you show your cfg?

@warpaholic: practically all behaviour is defined in the MODULE{} sections in a part cfg - if it needs interaction with the actual part then you might have problems, for instance an engine needs a part of the model itself to have a specific name & orientation. Most of that sort of thing is in the addon development forum, disguised as information about building models.

Will do once I get home.

Link to comment
Share on other sites

Will do once I get home.

Bit more info now I've checked FSTextureSwitch again - it works on a specific named part of the model which is not always terribly obvious to find. You can load a model up into Blender with taniwha's import filter and browse the structure of it ( for a decal plate it's probably very simple ), but you will need very basic blender knowledge and some basic knowledge of how a Unity model is constructed. None of that is at all difficult though.

Link to comment
Share on other sites

PART

{

name = curved_flag4

module = Part

author = Starvision

// --- asset parameters ---

mesh = model.mu

scale=1

rescaleFactor=3

// --- node definitions ---

node_attach = 0.0, 0.032, 0.0, 0.0, -1.0, 0.0, 1

// --- editor parameters ---

TechRequired = start

entrycost = 10

cost = 10

category = Utility

subcategory = 0

title = 3.75m Curved Flag

manufacturer = Dee-Cal Industries

description = A large flag that can be attached to 3.75m cylinders.

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision

attachRules = 0,1,0,0,1

// --- standard part parameters ---

mass = 0.02

dragModelType = Default

maximum_drag = 0.02

minimum_drag = 0.01

angularDrag = 0.02

crashTolerance = 8

maxTemp = 1000

fuelCrossFeed = False

breakingForce = 200

breakingTorque = 200

bulkheadProfiles = size3, srf

// --- SAS parameters ---

MODULE

{

name = FStextureSwitch2

//showListButton = True

textureNames = ZZZ_Flags/Textures/adventure;ZZZ_Flags/Textures/Aerojet;ZZZ_Flags/Textures/Archer;ZZZ_Flags/Textures/Atlantis;ZZZ_Flags/Textures/Aurora;ZZZ_Flags/Textures/Bigelow;ZZZ_Flags/Textures/Boeing;ZZZ_Flags/Textures/Columbus;ZZZ_Flags/Textures/Constitution;ZZZ_Flags/Textures/DEI;ZZZ_Flags/Textures/Discovery;ZZZ_Flags/Textures/Endeavour;ZZZ_Flags/Textures/Endurance;ZZZ_Flags/Textures/GSA;ZZZ_Flags/Textures/Highland;ZZZ_Flags/Textures/Independence;ZZZ_Flags/Textures/Inspiration;ZZZ_Flags/Textures/Intrepid;ZZZ_Flags/Textures/Lockheed;ZZZ_Flags/Textures/McDonnel;ZZZ_Flags/Textures/Oddysey;ZZZ_Flags/Textures/Resolution;ZZZ_Flags/Textures/ULA

objectNames = model

textureDisplayNames = Adventure;Aerojet;Archer;Atlantis;Aurora;Bigelow;Boeing;Columbus;Constitution;DEI;Discovery;Endeavour;Endurance;GSA;Highland;Independence;Inspiration;Intrepid;Lockheed;McDonnel;Odyssey;Resolution;ULA

useFuelSwitchModule = True

fuelTankSetups = 0;1;2;3

}

}

Thats what I have.

Link to comment
Share on other sites

In the original config is this:


MODULE
{
name = FlagDecal
textureQuadName = Curved
}

which may or may not be necessary to leave in, but it's probably a good idea to leave it. However that textureQuadName line is a clue; try changing your objectNames entry to read objectNames=Curved. You also want to set the useFuelSwitchModule line to False & remove the tanks.

I'd need to actually fiddle with the models & some graphics to have any more idea of what's going on. I do notice what looks like line breaks in your cfg ( your "B oeing" for instance ), that's not a good thing.

Link to comment
Share on other sites

I'd like to add my request for help here too. That is to say, if you have a resource somewhere on the forum for someone who wants to modify what a particular part does, e.g. merging aspects of ESLD jump beacons and Parameciumkid's Jump Drive 0.6 onto the large spacedock from the IXS mod to create something that looks like the jump gate from Babylon 5. Alas, I'm very new at this and find all the information out there a bit overwhelming, so any specific directions would be nice.

The base idea is discussed in "To add Davon's mechanics to a different, prettier part" from this post. Here's an untested quick stab at it:


@PART[wsSpacedock*]:Final
{
%MODULE
{
name = ModuleEnviroSensor
sensorType = GRAV
}
%MODULE
{
name = ESLDBeacon
beaconModel = LB10
}
RESOURCE
{
name = ElectricCharge
amount = 100
maxAmount = 100
}
RESOURCE
{
name = Karborundum
amount = 0
maxAmount = 50
}

}

This just stuffs the LB10 beacon in all the spacedocks. You could make different beacons in different docks (might make sense since they're different sizes) and tweak the settings, and add in the jump drive at the same time.

Basically just look in the old part's .cfg file, copy the MODULE{}s and RESOURCE{}s to the part you want them to be in. You'll need Module Manager of course

Link to comment
Share on other sites

For the switching module to work, you will need to direct it to the name of the actual object within the model that will be getting it's texture changed. As Master Disaster pointed out, it's possible this object is named "Curved". You're also referencing a fuel switch module you don't have defined, that may or may not break the module.

Give this a try:

MODULE
{
name = FStextureSwitch2
objectNames = Curved
textureRootFolder = ZZZ_Flags/Textures/
textureNames = Adventure;Aerojet;Archer;Atlantis;Aurora;Bigelow;Boeing;Columbus;Constitution;DEI;Discovery;Endeavour;Endurance;GSA;Highland;Independence;Inspiration;Intrepid;Lockheed;McDonnel;Oddysey;Resolution;ULA
textureDisplayNames = Adventure;Aerojet;Archer;Atlantis;Aurora;Bigelow;Boeing;Columbus;Constitution;DEI;Discovery;Endeavour;Endurance;GSA;Highland;Independence;Inspiration;Intrepid;Lockheed;McDonnel;Odyssey;Resolution;ULA
useFuelSwitchModule = false
nextButtonText = Next Flag
prevButtonText = Previous Flag
switchableInFlight = false
repaintableEVA = false
showPreviousButton = true
updateSymmetry = true
showInfo = true
debugMode = false
showListButton = false
}

You can find the FS Part Module documentation here: https://docs.google.com/document/d/1iD52DfHft04Hb48TEhF5a4n5JOc8efUevdg5Y_QPICQ/

Edited by Randazzo
Link to comment
Share on other sites

For the switching module to work, you will need to direct it to the name of the actual object within the model that will be getting it's texture changed. As Master Disaster pointed out, it's possible this object is named "Curved". You're also referencing a fuel switch module you don't have defined, that may or may not break the module.

Give this a try:

MODULE
{
name = FStextureSwitch2
objectNames = Curved
textureRootFolder = ZZZ_Flags/Textures/
textureNames = Adventure;Aerojet;Archer;Atlantis;Aurora;Bigelow;Boeing;Columbus;Constitution;DEI;Discovery;Endeavour;Endurance;GSA;Highland;Independence;Inspiration;Intrepid;Lockheed;McDonnel;Oddysey;Resolution;ULA
textureDisplayNames = Adventure;Aerojet;Archer;Atlantis;Aurora;Bigelow;Boeing;Columbus;Constitution;DEI;Discovery;Endeavour;Endurance;GSA;Highland;Independence;Inspiration;Intrepid;Lockheed;McDonnel;Odyssey;Resolution;ULA
useFuelSwitchModule = false
nextButtonText = Next Flag
prevButtonText = Previous Flag
switchableInFlight = false
repaintableEVA = false
showPreviousButton = true
updateSymmetry = true
showInfo = true
debugMode = false
showListButton = false
}

You can find the FS Part Module documentation here: https://docs.google.com/document/d/1iD52DfHft04Hb48TEhF5a4n5JOc8efUevdg5Y_QPICQ/

Eureka! Thank you so much!

- - - Updated - - -

For the switching module to work, you will need to direct it to the name of the actual object within the model that will be getting it's texture changed. As Master Disaster pointed out, it's possible this object is named "Curved". You're also referencing a fuel switch module you don't have defined, that may or may not break the module.

Give this a try:

MODULE
{
name = FStextureSwitch2
objectNames = Curved
textureRootFolder = ZZZ_Flags/Textures/
textureNames = Adventure;Aerojet;Archer;Atlantis;Aurora;Bigelow;Boeing;Columbus;Constitution;DEI;Discovery;Endeavour;Endurance;GSA;Highland;Independence;Inspiration;Intrepid;Lockheed;McDonnel;Oddysey;Resolution;ULA
textureDisplayNames = Adventure;Aerojet;Archer;Atlantis;Aurora;Bigelow;Boeing;Columbus;Constitution;DEI;Discovery;Endeavour;Endurance;GSA;Highland;Independence;Inspiration;Intrepid;Lockheed;McDonnel;Odyssey;Resolution;ULA
useFuelSwitchModule = false
nextButtonText = Next Flag
prevButtonText = Previous Flag
switchableInFlight = false
repaintableEVA = false
showPreviousButton = true
updateSymmetry = true
showInfo = true
debugMode = false
showListButton = false
}

You can find the FS Part Module documentation here: https://docs.google.com/document/d/1iD52DfHft04Hb48TEhF5a4n5JOc8efUevdg5Y_QPICQ/

Eureka! Thank you so much!

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...