Jump to content

how exactly does one create a simple part mod


Recommended Posts

 I have wanted to try my hand at mod that makes a clone of the ant engine (copied over from the old model) and switches its name, thrust, isp, description to all fit one of a cold gas thruster. I have placed the part in its own folder inside a parts folder and as well, the mod has a "flags" folder to determine if it is loaded. the flag works fine but the part itself is not loading. a copy of the "mod" is here https://www.mediafire.com/file/8u4z1jp0oi6jw2v/modtest.zip/file   now there is a 99% chance I have made some unwise choice in the "development" of this monstrosity and have accidentally hit the break everything button but nonetheless I would still appreciate assistance. if there is a thread that I have missed that has asked this exact same question I apologize in advance

Link to comment
Share on other sites

  • 5 months later...
On 3/5/2023 at 12:15 PM, bobjonesisthebest:D said:

 I have wanted to try my hand at mod that makes a clone of the ant engine (copied over from the old model) and switches its name, thrust, isp, description to all fit one of a cold gas thruster. I have placed the part in its own folder inside a parts folder and as well, the mod has a "flags" folder to determine if it is loaded. the flag works fine but the part itself is not loading. a copy of the "mod" is here https://www.mediafire.com/file/8u4z1jp0oi6jw2v/modtest.zip/file   now there is a 99% chance I have made some unwise choice in the "development" of this monstrosity and have accidentally hit the break everything button but nonetheless I would still appreciate assistance. if there is a thread that I have missed that has asked this exact same question I apologize in advance

Each part must have a unique name to be loaded up in game. If any other part has the same unique name then it will cause a conflict and not load properly or default to whichever was created first. So if you are loading the original Squad model at the same time with the same name then you will not get your part showing up. Also as it was a depreciated part it was set to hidden and had no category.

Try this instead.
 

Spoiler

PART
{
    name = BobJonesmicroEngine
    module = Part
    author = NovaSilisko/ Bob Jones
    mesh = model.mu
    scale = 1
    rescaleFactor = 1
    node_stack_top = 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0
    node_stack_bottom = 0.0, -0.2816985, 0.0, 0.0, -1.0, 0.0, 0

    node_attach = 0.0, 0.0, 0.00, 0.0, 90.0, 0.0, 0
    fx_exhaustFlame_white_tiny = 0.0, -0.2816985, 0.0, 0.0, 1.0, 0.0, running
    TechRequired = propulsionSystems
    entryCost = 10
    cost = 40
    category = Engine
    subcategory = 0
    title = LV-0 "Fwoosh" Cold Gas Engine
    manufacturer = #autoLOC_501627 //#autoLOC_501627 = Jebediah Kerman's Junkyard and Spacecraft Parts Co
    description = After an incedent invlolving a fire extinguisher and a chair. they got the idea for an engine that burned no fuel but instead used pressure for the thrust. it's good at being cheap and at being cheap, not much else though
    attachRules = 1,1,1,1,0
    mass = 0.02
    heatConductivity = 0.06 // half default
    skinInternalConductionMult = 4.0
    emissiveConstant = 0.8 // engine nozzles are good at radiating.
    dragModelType = default
    maximum_drag = 0.2
    minimum_drag = 0.2
    angularDrag = 2
    crashTolerance = 10
    maxTemp = 2000 // = 3600
    bulkheadProfiles = size0, srf
    tags =fwoosh cold gas
    EFFECTS
    {
        running
        {
            AUDIO
            {
                channel = Ship
                clip = sound_rocket_mini
                volume = 0.0 0.0
                volume = 1.0 0.3
                pitch = 0.0 1.5
                pitch = 2.0 2.5
                loop = true
            }
            MODEL_MULTI_PARTICLE
            {
                modelName = Squad/FX/Monoprop_small
                transformName = FXTransform
                emission = 0.0 0.0
                emission = 0.4 0.8
                emission = 1.0 1.0
                speed = 0.0 0.8
                speed = 1.0 1.0
                //localOffset = 0, 0, 1
                localPosition = 0, 0, 0.08
            }
        }
        engage
        {
            AUDIO
            {
                channel = Ship
                clip = sound_vent_soft
                volume = 1.0
                pitch = 2.0
                loop = false
            }
        }
        flameout
        {
            PREFAB_PARTICLE
            {
                prefabName = fx_exhaustSparks_flameout_2
                transformName = thrustTransform
                oneShot = true
            }
            AUDIO
            {
                channel = Ship
                clip = sound_explosion_low
                volume = 1.0
                pitch = 2.0
                loop = false
            }
        }            
    }
    MODULE
    {
        name = ModuleEnginesFX
        thrustVectorTransformName = thrustTransform
        exhaustDamage = False
        ignitionThreshold = 0.1
        minThrust = 0
        maxThrust = 0.2
        heatProduction = -0.01
        fxOffset = 0, 0, 0.99
        EngineType = LiquidFuel
        exhaustDamageDistanceOffset = 0.05
        runningEffectName = running
        PROPELLANT
        {
            name = Coldgas
            ratio = 0.4
            DrawGauge = True
        }

        atmosphereCurve
        {
            key = 0 315
            key = 1 80
            key = 3 0.001
        }
    }
    MODULE
    {
        name = ModuleTestSubject
        useStaging = True
        useEvent = True
        situationMask = 127
        CONSTRAINT
        {
            type = REPEATABILITY
            value = ALWAYS
            prestige = Trivial
        }
        CONSTRAINT
        {
            type = REPEATABILITY
            value = BODYANDSITUATION
            prestige = Significant
        }
        CONSTRAINT
        {
            type = REPEATABILITY
            value = ONCEPERPART
            prestige = Exceptional
        }
        CONSTRAINT
        {
            type = ALTITUDEENV
            test = GT
            value = 4000
            prestige = Trivial
        }
        CONSTRAINT
        {
            type = ALTITUDEENV
            test = LT
            value = 8000
            prestige = Trivial
        }
        CONSTRAINT
        {
            type = ALTITUDEENV
            test = GT
            value = 2000
            prestige = Significant
        }
        CONSTRAINT
        {
            type = ALTITUDEENV
            test = LT
            value = 4000
            prestige = Significant
        }
        CONSTRAINT
        {
            type = ALTITUDEENV
            test = GT
            value = 1000
            prestige = Exceptional
        }
        CONSTRAINT
        {
            type = ALTITUDEENV
            test = LT
            value = 2000
            prestige = Exceptional
        }
        CONSTRAINT
        {
            type = ALTITUDE
            test = GT
            value = 0 // this just registers altitude as something to care about
            situationMask = 8
        }
        CONSTRAINT
        {
            type = ALTITUDE
            test = LT
            value = 300000
            situationMask = 16
            body = _NotSun
        }
        CONSTRAINT
        {
            type = ALTITUDE
            test = LT
            value = 600000
            situationMask = 32
            body = _NotSun
        }
        CONSTRAINT
        {
            type = SPEED
            test = GT
            value = 0
            situationMask = 8
            prestige = Trivial
        }
        CONSTRAINT
        {
            type = SPEED
            test = LT
            value = 600
            situationMask = 8
            prestige = Trivial
        }
        CONSTRAINT
        {
            type = SPEED
            test = GT
            value = 300
            situationMask = 8
            prestige = Significant
        }
        CONSTRAINT
        {
            type = SPEED
            test = LT
            value = 1200
            situationMask = 8
            prestige = Significant
        }
        CONSTRAINT
        {
            type = SPEED
            test = GT
            value = 600
            situationMask = 8
            prestige = Exceptional
        }
        CONSTRAINT
        {
            type = SPEED
            test = LT
            value = 2500
            situationMask = 8
            prestige = Exceptional
        }
        CONSTRAINT
        {
            type = SPEEDENV
            test = LT
            value = 200
            prestige = Trivial
        }
        CONSTRAINT
        {
            type = SPEEDENV
            test = GT
            value = 100
            prestige = Trivial
        }
        CONSTRAINT
        {
            type = SPEEDENV
            test = LT
            value = 100
            prestige = Significant
        }
        CONSTRAINT
        {
            type = SPEEDENV
            test = GT
            value = 50
            prestige = Significant
        }
        CONSTRAINT
        {
            type = SPEEDENV
            test = LT
            value = 50
            prestige = Exceptional
        }
        CONSTRAINT
        {
            type = SPEEDENV
            test = GT
            value = 20
            prestige = Exceptional
        }
    }

    MODULE
    {
        name = ModuleCargoPart
        stackableQuantity = 2
        packedVolume = 20
    }
}

When I first started I looked at as many Squad configurations as possible and compared what I found to how the part showed up in game. If you are using a Windows based system then you can use the Windows key to switch out of the game to look at a config file while you have its part loaded up in the SPH to get an idea of what relates to what.

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