Jump to content

Recommended Posts

I would like to create an engine that runs on pure electricity. I based it on the dawn engine, messed with the .cfg file a bit, and I have this crazy engine that runs on nothing.

How do i make the engine name to be different?

Also, how do I make the rate of resource consumption based solely on the amount of thrust?

Note: I have no experience in coding and stuff.

Link to comment
Share on other sites

Make a copy of the CFGs then edit the CFG file values to make it a separate part

name = New Name

title =New In Game Name

    MODULE
    {

           //grab the ModuleEngine from the target engine
           //So all this---->
        name = ModuleEngines
        thrustVectorTransformName = thrustTransform
        exhaustDamage = True
        ignitionThreshold = 0.1
        minThrust = 0
        maxThrust = 215
        heatProduction = 200
        fxOffset = 0, 0, 0.574338
        EngineType = LiquidFuel
        exhaustDamageDistanceOffset = 0.79
          //<----


        PROPELLANT //this you would need. Remove the other propellants
        {
            name = ElectricCharge
            ratio = 1
            DrawGauge = True
        }


        atmosphereCurve //set this to the target Engine 
        {
            key = 0 320
            key = 1 250
            key = 6 0.001
        }
    }

 

That should get you started :)

Link to comment
Share on other sites

ModuleEngines can't be used to create engines that only use electricity because electricity is massless.

The proposal by @Jatwaa will not work as is.

Either electricity would have to be patched to give it mass  (bad idea) or

generators (ModuleGenerator or ModuleResourceConverter) would have to be added to the part to constantly generate a resource with mass that the engine uses (with ElectricCharge as an input resource). The engine part could then be configured to store very small amounts to the engine, the bare minimum it needs each physics frame at full thrust.

Edited by Starwaster
Link to comment
Share on other sites

3 hours ago, Starwaster said:

ModuleEngines can't be used to create engines that only use electricity because electricity is massless.

The proposal by @Jatwaa will not work as is.

Either electricity would have to be patched to give it mass  (bad idea) or

generators (ModuleGenerator or ModuleResourceConverter) would have to be added to the part to constantly generate a resource with mass that the engine uses (with ElectricCharge as an input resource). The engine part could then be configured to store very small amounts to the engine, the bare minimum it needs each physics frame at full thrust.

Aye, it's a starting and pain point. Then again, I forgot I have added a resource BatteryCharge that has a minor mass created by a generator. If you try to do so w/out, its a nightmare to figure out. 

So I have one resource named

RESOURCE_DEFINITION
{
  name = BatteryPower
  displayName = Battery Power
  abbreviation = BPow
  density = 0.0001  
  unitCost = 0
  hsp = 0
  flowMode = ALL_VESSEL
  transfer = PUMP
  isTweakable = true
}

Then I have a generator to store it from EC

MODULE
    {
         name = ModuleResourceConverter
         ConverterName = StoreCharge
         StartActionName = Store
         StopActionName = Stop
         AutoShutdown = false
     
         INPUT_RESOURCE
         {
            ResourceName = ElectricCharge
            Ratio = 1
            FlowMode = ALL_VESSEL
           }

         OUTPUT_RESOURCE
         {
            ResourceName = BatteryPower
            Ratio = 1
            DumpExcess = false
            FlowMode = ALL_VESSEL
         }
    }

 

Edited by Jatwaa
Link to comment
Share on other sites

Hi as already mentioned , you can't build a pure electric engine, However, you can wangle it a bit below is how firespitter and other mods do it already. Using a global resource similar to intake air , but with a tiny mass,  the resource is harvested from the atmosphere,  using a globally cfg'd resource , and a properly cfg'd intake module.  
 

MODULE
{
	name = ModuleEnginesFX
	thrustVectorTransformName = thrustTransform
	exhaustDamage = False
	ignitionThreshold = 0.1
	minThrust = 0
	maxThrust = 8
	heatProduction = 8
	useEngineResponseTime = True
	engineAccelerationSpeed = 20
	engineDecelerationSpeed = 20
	useVelocityCurve = True
	spoolEffectName = idle
	PROPELLANT
	{
		name = ElectricCharge
		ratio = 0.4
		DrawGauge = True
	}
	PROPELLANT
	{
		name = FSCoolant // virtually massles resource 
		ratio = 0.01
	}
    atmosphereCurve
    {
		key = 0 800
		key = 1 800
    }
    velocityCurve
    {
        key = 500 0 0 0
        key = 425 0.2 0 0
        key = 0 1 0 0
    }
	
}


RESOURCE
{
    name = FSCoolant
    amount = 5.0 // internally stored amount
    maxAmount = 5.0
}

MODULE
{
  name = ModuleResourceIntake
  resourceName = FSCoolant // global rsource
  checkForOxygen = false
  area = 1
  intakeSpeed = 50
  intakeTransformName = Intake //thrustTransform //Intake  
}

 

Link to comment
Share on other sites

Hello all, 

     I have been working on making my own electric engine.  Thanks for all the posts.   I'd like to know more about fuel consumption and working out how to make it work, so far I like the coolant idea, seems fitting.

 

Xd the great:

 Look for title;

The near by attributes are seen in the hanger.

(I am modding a part from airplane plus)

TechRequired = aerodynamicSystems
cost = 1400
entryCost = 3000
category = Engine
subcategory = 0
title = EProp 30 Electric Prop Engine
manufacturer = KHI
description = The EProp engine for real remains kerbal's most popular engine in its class. Mainly because it is the only engine like it in its class.

 

 

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