Cephei

The official unoffical "help a fellow plugin developer" thread

2627 posts in this topic

9 hours ago, wasml said:

@MaxZhaoI notice two odd characters just before PART in your post of the file where you changed the cost - if this is in the actual file it could cause this issue. Did your text editor add some extra characters? maybe it didn't save in a basic ASCII format? This would be the only thing I can think of.

 

Yeah I did notice it, however, the problem persists even after I've removed the characters. I don't know what those are but they don't appear in any other part cfgs. 

Share this post


Link to post
Share on other sites

I'm Having a problem creating my own generator. I want a small generator that can take ore and electricity and turn it into either liquid fuel, oxidiser or mono propellant as well as store the excess. I am new at modding KSP. I have made a model and texture that work but for some reason my code is wrong. Every resource value I enter appears in the game as 0. 

For example:


    MODULE
    {
        name = ModuleResourceConverter
        ConverterName = Mono Propellant
        StartActionName = Start Mono Propellant
        StopActionName = Stop Mono Propellant
        AutoShutdown = false
        GeneratesHeat = false
        UseSpecialistBonus = false
        INPUT_RESOURCE
        {
            ResourceName = ElectricCharge
            Rate = 0.5
        }
        INPUT_RESOURCE
        {
            ResourceName = Ore
            Rate = 0.5
        }
        OUTPUT_RESOURCE
        {
            ResourceName = MonoPropellant
            Rate = 0.95
            DumpExcess = false
        }

Can anyone see a problem? I have tried coping parts of the coding from stock game parts.

Help! Please.

Full Code:

PART
{
    name = FuelGen2
    module = Part
    author = Brahimus
    rescaleFactor = 1
    node_attach = 0, 0, 0, 1, 0, 0, 0
    TechRequired = largeElectrics
    entryCost = 2250
    cost = 750
    category = Utility
    subcategory = 0
    title = Super Ore Converter
    manufacturer = Brahimus Inc.
    description = A small generator that can convert electricity and ore into liquid fuel, mono propellant and oxidizer.
    attachRules = 0,1,0,0,0

    // --- standard part parameters ---
    mass = 0.05
    dragModelType = default
    maximum_drag = 0.2
    minimum_drag = 0.2
    angularDrag = 2
    crashTolerance = 7000
    maxTemp = 7000

    MODEL
    {
        model = Squad/Parts/Utility/FuelCell2/FuelCell
    }
    MODULE
    {
        name = ModuleResourceConverter
        ConverterName = Liquid Fuel
        StartActionName = Create Liquid Fuel
        StopActionName = Stop Liquid Fuel
        AutoShutdown = false
        GeneratesHeat = false
        UseSpecialistBonus = false
    canOverflow = false
     deactivateIfFull = false
    deactivateIfEmpty = false 
        INPUT_RESOURCE
        {
            ResourceName = ElectricCharge
            Rate = 0.5
        }
        INPUT_RESOURCE
        {
            ResourceName = Ore
            Rate = 0.05
        }
        OUTPUT_RESOURCE
        {
            ResourceName = LiquidFuel
            Rate = 0.95
            DumpExcess = false
        }
    }
    MODULE
    {
        name = ModuleResourceConverter
        ConverterName = Oxidizer
        StartActionName = Start Oxidizer
        StopActionName = Stop Oxidizer
        AutoShutdown = false
        GeneratesHeat = false
        UseSpecialistBonus = false
    canOverflow = false
     deactivateIfFull = false
    deactivateIfEmpty = false 
        INPUT_RESOURCE
        {
            ResourceName = ElectricCharge
            Rate = 0.5
        }
        INPUT_RESOURCE
        {
            ResourceName = Ore
            Rate = 0.05
        }
        OUTPUT_RESOURCE
        {
            ResourceName = Oxidizer
            Rate = 0.95
            DumpExcess = false
        }
    }
    MODULE
    {
        name = ModuleResourceConverter
        ConverterName = Mono Propellant
        StartActionName = Start Mono Propellant
        StopActionName = Stop Mono Propellant
        AutoShutdown = false
        GeneratesHeat = false
        UseSpecialistBonus = false
    canOverflow = false
     deactivateIfFull = false
    deactivateIfEmpty = false 
        INPUT_RESOURCE
        {
            ResourceName = ElectricCharge
            Rate = 0.5
        }
        INPUT_RESOURCE
        {
            ResourceName = Ore
            Rate = 0.005
        }
        OUTPUT_RESOURCE
        {
            ResourceName = MonoPropellant
            Rate = 0.95
            DumpExcess = false
        }
    }
    RESOURCE
    {
        name = LiquidFuel
        amount = 100
        maxAmount = 100
    }
    RESOURCE
    {
        name = Oxidizer
        amount = 100
        maxAmount = 100
    }
    RESOURCE
    {
        name = MonoPropellant
        amount = 100
        maxAmount = 100
    }
}
 

Edited by Brahimus

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now