Jump to content

Modded Ship has No Fuel


Recommended Posts

Hello there!
I am creating a mod for KSP, but I need some help with the config file. In the config file, I have a RESOURCE module for an undefined fuel called "Artron Banks". I have this resource being displayed and shown, and the amount of Artron Banks is 5000. The problem is, when I load the game there isn't any fuel at all! The Artron Banks Gauge is empty. I have no idea what to do. Please help!
https://ibb.co/Ld9sXt3

Notice the Fuel Gauge in the bottom corner.

Link to comment
Share on other sites

On 1/1/2020 at 3:26 PM, Immensity said:

Hello there!
I am creating a mod for KSP, but I need some help with the config file. In the config file, I have a RESOURCE module for an undefined fuel called "Artron Banks". I have this resource being displayed and shown, and the amount of Artron Banks is 5000. The problem is, when I load the game there isn't any fuel at all! The Artron Banks Gauge is empty. I have no idea what to do. Please help!
https://ibb.co/Ld9sXt3

Notice the Fuel Gauge in the bottom corner.

Can't troubleshoot properly from a screenshot. Need to see the config itself. Although, keep in mind that the fields for the RESOURCE node are case sensitive.  So it should look something like:

RESOURCE
{
	name = Artron
	amount = 3000
	maxAmount = 3000
}

So amount needs to be all lowercase

Also, why is the ship larger on the inside than the outside...?

Link to comment
Share on other sites

On 1/2/2020 at 7:55 PM, Starwaster said:

Can't troubleshoot properly from a screenshot. Need to see the config itself. Although, keep in mind that the fields for the RESOURCE node are case sensitive.  So it should look something like:


RESOURCE
{
	name = Artron
	amount = 3000
	maxAmount = 3000
}

So amount needs to be all lowercase

Here is the config:

PART
{
    name = doctorTardis
    module = Part
    author = Immensity
    mesh = model.mu
    scale = 1
    rescaleFactor = 1.0
    node_stack_top = 0.0, -1.26502, 0.0, 0.0, -1.0, 0.0, 1
    TechRequired = experimentalRocketry
    entryCost = 300000
    cost = 200000
    category = Pods
    subcategory = 0
    title = The Doctor's TT Capsule
    manufacturer = Gallifrey Blackhole Shipyard
    description = The Doctor's obsolete TT Capsule. The Chameleon circuit is faulty, making the ship stuck looking like an old Police Box. 
    attachRules = 1,0,1,1,0
    mass = 3
    dragModelType = Default
    maximum_drag = 0.1
    minimum_drag = 0.1
    angularDrag = 0.1
    crashTolerance = 700
    breakingForce = 1000000
    breakingTorque = 1000000
    maxTemp = 6000
    fuelCrossFeed = False
    CrewCapacity = 6
    vesselType = Ship
    INTERNAL
    {
        name = TardisInternal
    }
    MODULE
    {
        name = ModuleCommand
        minimumCrew = 0
    }
    MODULE
    {
        name = ModuleGenerator
        isAlwaysActive = true
        OUTPUT_RESOURCE
        {
           name = ElectricCharge
           rate = 500
        }    
    }
    MODULE
    {
        name = ModuleGenerator
        isAlwaysActive = true
        OUTPUT_RESOURCE
        {
           name = Artron Banks
           rate = 600
        }    
    }
    RESOURCE
    {
        name = ElectricCharge
        amount = 5000
        maxAmount = 5000
    }
    RESOURCE
    {
        name = Artron Banks
        amount = 1000
        maxAmount = 1000
    }
    MODULE
    {
        name = ModuleSAS    
    }
    MODULE
    {
        name = ModuleReactionWheel
        PitchTorque = 12.5
        YawTorque = 12.5
        RollTorque = 12.5
        RESOURCE
        {
            name = Artron Banks
            rate = 0.01
        }
    }
    MODULE
    {
        name = ModuleEngines
        thrustVectorTransformName = thrustTransform
        exhaustDamage = False
        ignitionThreshold = 0.1
        minThrust = 0
        maxThrust = 500
        heatProduction = 1
        fxOffset = 0, -8.51542, -1.49597
        PROPELLANT
        {
            name = Artron Banks
            ratio = 0.1
            DrawGauge = True
        }
        atmosphereCurve
         {
            key = 0 500
            key = 1 500
         }
    
    }
    MODULE
    {
        name = ModuleRCS
        thrusterTransformName = RCSthruster
        thrusterPower = 50
        resourceName = Artron Banks
        atmosphereCurve
         {
            key = 0 500
           key = 1 500
         }
    }
}

 

Too lazy to upload it to a file sharing website, so thats what you get. It seems to be fine, nothing unusual. It's still WIP.

Link to comment
Share on other sites

I think you need to add the resource definition. This will determine its weight, cost and various other properties.

Spoiler

RESOURCE_DEFINITION
{
    name = Artron Banks
    displayName = Artron Banks
    density = 5
    hsp = 4007
    flowMode = ALL_VESSEL
    transfer = PUMP
    isTweakable = true
    isVisible = true
    unitCost = 0.0008
    color = 0.7,0.7,1
    volume = 5
}

If you want it to be found on planets for mining. You will need to define planetary resources. See this example for Dirt from the mod Community resource pack.

Spoiler

//    Community Resource Pack
//    Resource:
//
//Resource types:  
//    0 = Crustal            (Stuff you dig up)
//    1 = Oceanic            (Stuff in the oceans)
//    2 = Atmospheric        (Stuff in the air, varies with pressure)
//    3 = Interplanetary    (Stuff you find between planets)
//
//Express all numbers as percentages 0.0-100.0, not 0.0-1.0!
//
PLANETARY_RESOURCE
{
    ResourceName = Dirt
    ResourceType = 0
    PlanetName = Jool
    
    Distribution
    {
        PresenceChance = 0
        MinAbundance = 0
        MaxAbundance = 0
        Variance = 0
        Dispersal = 0
    }
}

GLOBAL_RESOURCE
{
    ResourceName = Dirt
    ResourceType = 0
    
    Distribution
    {
        PresenceChance = 100
        MinAbundance =20
        MaxAbundance = 50
        Variance = 50
        Dispersal = 3
    }
}

Then you would need to set up the scanners and drills to find and mine them.

 

You may also need to use ModuleRCSFX to have the thrust show properly.

Spoiler

    EFFECTS
    {
        running
        {
            AUDIO_MULTI_POOL
            {
                channel = Ship
                transformName = RCSthruster
                clip = sound_rocket_mini
                volume = 0.0 0.0
                volume = 0.02 0.5
                volume = 0.5 0.75
                volume = 1.0 1.0
                pitch = 0.0 0.75
                pitch = 1.0 1.5
                loop = true
            }
            MODEL_MULTI_PARTICLE
            {
                modelName = Squad/FX/Monoprop_small
                transformName = RCSthruster
                emission = 0.0 0.0
                emission = 0.1 0.0
                emission = 1.0 1.0
                speed = 0.0 0.8
                speed = 1.0 1.0
            }
        }        
    }
    
    MODULE
    {
        name = ModuleRCSFX
        stagingEnabled = False
        thrusterTransformName = RCSthruster
        thrusterPower = 50
        resourceName = Artron Banks
        resourceFlowMode = STAGE_PRIORITY_FLOW
        runningEffectName = running
        atmosphereCurve
        {
            key = 0 500
            key = 1 500
            key = 4 0.001
        }
    }    

One last thing is the name Artron Banks. I am not sure since I have not tested it. But you may need to put it in as ArtronBanks with no space for it to work. This would apply to the above configs.

Link to comment
Share on other sites

@Immensity as @Barar says, do not use spaces in the RESOURCE name. If you want it to display with spaces then add displayName = Artron Banks in the RESOURCE_DEFINITION

Also, it will be necessary to assign density to the resource or KSP cannot calculate thrust. The Rocket Equation is in full force here. (density = 0.001 = 1kg/cubic meter = the density of water)

 

 

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