Jump to content

Electric Engine Development


dans6887

Recommended Posts

I am trying to develop my own mod with electric engines. My engines are meant to run solely on electric charge. The models and textures work just fine but when I go to launch nothing happens when I right-click on my engine is says "flameout: electric charge depleted". I know there is something not right in the config file but I don't know what it is. Anybody out there good at programming that can help me? The config data is listed below. :confused:

PART

{

name = zapperEngine

module = Part

author = Daniel Scott

mesh = model.mu

scale = 1

rescaleFactor = .50

node_stack_top = 0.0, 2.2, 0.0, 0.0, 1.0, 0.0, 1

node_stack_bottom = 0.0, -2.2, 0.0, 0.0, -1.0, 0.0, 1

fx_exhaustFlame_blue = 0.0, -2.5, 0.0, 0.0, 1.0, 0.0, running

fx_exhaustLight_blue = 0.0, -2.5, 0.0, 0.0, 0.0, 1.0, running

fx_smokeTrail_light = 0.0, -2.5, 0.0, 0.0, 1.0, 0.0, running

fx_exhaustSparks_flameout = 0.0, -2.5, 0.0, 0.0, 1.0, 0.0, flameout

sound_vent_medium = engage

sound_rocket_hard = running

sound_vent_soft = disengage

sound_explosion_low = flameout

TechRequired = basicRocketry

entryCost = 16800

cost = 80

category = Engine

subcategory = 0

title = HERMEs 1.02.01 "Zapper" Electric Rocket Engine

manufacturer = Hadron Electric Rocket Enterprises

description = By generating a strong magnetic field coupled with a repulsor. This engine has virtually no exhaust. Remember to bring enough batteries and solar panels.

attachRules = 1,1,1,1,0

mass = 0.25

dragModelType = default

maximum_drag = 0.2

minimum_drag = 0.2

angularDrag = 2

crashTolerance = 10

maxTemp = 2000 // = 3600

bulkheadProfiles = size0

MODULE

{

name = ModuleEngines

thrustVectorTransformName = thrustTransform

exhaustDamage = False

ignitionThreshold = 0.1

minThrust = 0

maxThrust = 500

heatProduction = 0

EngineType = Electric

PROPELLANT

{

name = ElectricCharge

ratio = 1.0

DrawGauge = True

}

atmosphereCurve

{

key = 0 500

}

}

MODULE

{

name = FXModuleAnimateThrottle

animationName = colorAnimation

dependOnEngineState = True

responseSpeed = 0.5

}

MODULE

{

name = ModuleTestSubject

environments = 15

useStaging = True

useEvent = True

}

}

Link to comment
Share on other sites

Ok, I know it will sound stupid but.... Are you sure you have enough electricity on your craft to run the engine?

Spam a LOT of RTG, until you can be sure you have more than enough electricity to run one of the engine and do the test again :)

Link to comment
Share on other sites

Did you look at your part in VAB and see how much electricity per second is need to run it ? As electricity doesn't have and density IMO it would be best to make your own fuel and give it alittle density and a converter to do a 1 to 1 electricity to your fuel.

Link to comment
Share on other sites

At least one of your PROPELLANTs must have nonzero mass. Thrust = massflow * Isp * 9.80665, if mass flow is 0, no thrust.

This is usually done by making the engine generate a dummy resource which it then consumes.

Where in the cfg file do I look to make sure of that?

Link to comment
Share on other sites

I know there is enough electric charge because i put on enough batteries for 12000 units of electricity. Its just not getting to the engine. But If I add Xenon gas to the list of engine propellants, the engine fires. and both electricity and xenon are consumed. However I still get no thrust and no "fire" from the bottom of the engine. If I release from the launch clamps, the ship falls and explodes. My thrust is set for 800 and my ISP is 15000 both in vac and atmo. Fuel ratios are both set to 0.001. I have also given the engine the alternator module so it can generate its own electric charge. My other problem aside from the thrust is the flame effect does not show up on the tail end of the engine. I get the sounds but no visuals. I have tried adjusting the position, but still nothing. My cfg code is below.

PART

{

name = zapperEngine

module = Part

author = Daniel Scott

mesh = model.mu

rescaleFactor = 0.5

node_stack_top = 0.0, 2.2, 0.0, 0.0, 1.0, 0.0, 2

node_stack_bottom = 0.0, -2.1, 0.0, 0.0, -1.0, 0.0, 2

fx_exhaustFlame_blue_small = 0.0, -0.8, 0.0, 0.0, 1.0, 0.0, running

fx_exhaustLight_blue = 0.0, -0.8, 0.0, 0.0, 0.0, 1.0, running

fx_smokeTrail_light = 0.0, -1.3, 0.0, 0.0, 1.0, 0.0, running

sound_vent_medium = engage

sound_rocket_hard = running

sound_vent_soft = disengage

sound_explosion_low = flameout

TechRequired = basicRocketry

entryCost = 4200

cost = 100

category = Engine

subcategory = 0

title = HERMEs 1.02.01 "Zapper" Electric Rocket Engine

manufacturer = Hadron Electric Rocket Enterprises

description = By generating a strong magnetic field coupled with a repulsor this engine uses the force of the quantum vacuum Remember to bring enough batteries and solar panels!

attachRules = 1,1,1,0,0

mass = 1.0

// 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 = 7

breakingForce = 200

breakingTorque = 200

maxTemp = 2000 // = 3600

bulkheadProfiles = size2

MODULE

{

name = ModuleEngines

thrustVectorTransformName = thrustTransform

exhaustDamage = False

ignitionThreshold = 0.1

minThrust = 0

maxThrust = 1800

heatProduction = 0

EngineType = Electric

PROPELLANT

{

name = ElectricCharge

ratio = 0.001

DrawGauge = True

}

PROPELLANT

{

name = XenonGas

ratio = 0.001

DrawGauge = True

}

atmosphereCurve

{

key = 0 15000

key = 1 15000

}

}

MODULE

{

name = ModuleJettison

jettisonName = fairing

bottomNodeName = bottom

isFairing = True

jettisonedObjectMass = 0.5

jettisonForce = 15

jettisonDirection = 0 0 1

}

MODULE

{

name = ModuleAlternator

RESOURCE

{

name = ElectricCharge

rate = 100.0

}

}

RESOURCE

{

name = ElectricCharge

amount = 0

maxAmount = 0

isTweakable = false

hideFlow = true

}

MODULE

{

name = ModuleTestSubject

environments = 15

useStaging = True

useEvent = True

}

MODULE

{

name = ModuleSurfaceFX

thrustProviderModuleIndex = 0

fxMax = 0.6

maxDistance = 30

falloff = 1.5

thrustTransformName = thrustTransform

}

}

Link to comment
Share on other sites

Where in the cfg file do I look to make sure of that?

KSP/GameData/Squad/Resources/ResourcesGeneric.cfg here

RESOURCE_DEFINITION
{
name = LiquidFuel
density = 0.005
unitCost = 0.8
hsp = 2010
flowMode = STACK_PRIORITY_SEARCH
transfer = PUMP
isTweakable = true
}
RESOURCE_DEFINITION
{
name = Oxidizer
density = 0.005
unitCost = 0.18
hsp = 1551
flowMode = STACK_PRIORITY_SEARCH
transfer = PUMP
isTweakable = true
}
RESOURCE_DEFINITION
{
name = SolidFuel
density = 0.0075
unitCost = 0.6
hsp = 920
flowMode = NO_FLOW
transfer = NONE
isTweakable = true
}
RESOURCE_DEFINITION
{
name = MonoPropellant
density = 0.004
unitCost = 1.2
hsp = 3000
flowMode = STAGE_PRIORITY_FLOW
transfer = PUMP
isTweakable = true
}
RESOURCE_DEFINITION
{
name = XenonGas
density = 0.0001
unitCost = 4
hsp = 120
flowMode = STAGE_PRIORITY_FLOW
transfer = PUMP
isTweakable = true
}
RESOURCE_DEFINITION
{
name = ElectricCharge
density = 0
unitCost = 0
hsp = 0
flowMode = ALL_VESSEL
transfer = PUMP
isTweakable = true
}
RESOURCE_DEFINITION
{
name = IntakeAir
density = 0.005
unitCost = 0
hsp = 10
flowMode = ALL_VESSEL
transfer = PUMP
isTweakable = false
}
RESOURCE_DEFINITION
{
name = EVA Propellant
density = 0
unitCost = 0
hsp = 3000
flowMode = NO_FLOW
transfer = PUMP
isTweakable = false
}

RESOURCE_DEFINITION
{
name = Ore
density = 0.010
unitCost = 0.02
flowMode = ALL_VESSEL
transfer = PUMP
hsp = 1000
isTweakable = true
color = 1,0,1
}
RESOURCE_DEFINITION
{
name = Ablator
density = 0.001
hsp = 400
flowMode = NO_FLOW
transfer = NONE
isTweakable = True
unitCost = 0.5
}

And you can look in CommunityResourcePack and it's cfg.

Link to comment
Share on other sites

Okay here is what I have done.

I have added a custom resource (VacuumCharge) to the resources.cfg file in squad. I have also created a "fueltank" called VC-100 that holds 2000 units of this fuel. My engine fires but I still get no thrust. The density of my vacuum charge is 0.01 which is double that of liquid fuel. I have included the cfg for both my engine and the vacuum charge:

--------------------------------Engine------------------------------------------------

PART

{

name = zapperEngine

module = Part

author = Daniel Scott

mesh = model.mu

rescaleFactor = 0.5

node_stack_top = 0.0, 2.2, 0.0, 0.0, 1.0, 0.0, 2

node_stack_bottom = 0.0, -2.0, 0.0, 0.0, -1.0, 0.0, 2

fx_exhaustFlame_blue_small = 0.0, -0.8, 0.0, 0.0, 1.0, 0.0, running

fx_exhaustLight_blue = 0.0, -0.8, 0.0, 0.0, 0.0, 1.0, running

fx_smokeTrail_light = 0.0, -1.3, 0.0, 0.0, 1.0, 0.0, running

sound_vent_medium = engage

sound_rocket_hard = running

sound_vent_soft = disengage

sound_explosion_low = flameout

TechRequired = basicRocketry

entryCost = 4200

cost = 100

category = Engine

subcategory = 0

title = HERMEs 1.02.01 "Zapper" Electric Rocket Engine

manufacturer = Hadron Electric Rocket Enterprises

description = By generating a strong magnetic field coupled with a repulsor this engine uses the force of the quantum vacuum. Remember to bring enough batteries and solar panels!

attachRules = 1,1,1,0,0

mass = 1.0

// 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 = 7

breakingForce = 200

breakingTorque = 200

maxTemp = 2000 // = 3600

bulkheadProfiles = size2

MODULE

{

name = ModuleEngines

thrustVectorTransformName = thrustTransform

exhaustDamage = False

ignitionThreshold = 0.1

minThrust = 0

maxThrust = 1800

heatProduction = 0

EngineType = Electric

PROPELLANT

{

name = ElectricCharge

ratio = 0.001

DrawGauge = True

}

PROPELLANT

{

name = VacuumCharge

ratio = 0.001

DrawGauge = True

}

atmosphereCurve

{

key = 0 900

key = 1 900

key = 3 0.001

}

}

MODULE

{

name = ModuleJettison

jettisonName = fairing

bottomNodeName = bottom

isFairing = True

jettisonedObjectMass = 0.5

jettisonForce = 15

jettisonDirection = 0 0 1

}

MODULE

{

name = ModuleAlternator

RESOURCE

{

name = ElectricCharge

rate = 100.0

}

}

RESOURCE

{

name = ElectricCharge

amount = 0

maxAmount = 0

isTweakable = false

hideFlow = true

}

MODULE

{

name = ModuleTestSubject

environments = 15

useStaging = True

useEvent = True

}

MODULE

{

name = ModuleSurfaceFX

thrustProviderModuleIndex = 0

fxMax = 0.6

maxDistance = 30

falloff = 1.5

thrustTransformName = thrustTransform

}

}

------------------------------------------------------------------------------

-------------------------VacuumCharge tank----------------------------------------

PART

{

name = vacuumCharge tank

module = Part

author = Squad

mesh = model.mu

rescaleFactor = .65

node_stack_top = 0.0, 0.25, 0.0, 0.0, 1.0, 0.0, 1

node_stack_bottom = 0.0, -0.25, 0.0, 0.0, -1.0, 0.0, 1

node_attach = 0.0, 0.0, 0.3125, 0.0, 1.0, 0.0

TechRequired = basicRocketry

entryCost = 3200

cost = 50

category = FuelTank

subcategory = 0

title = Z-200 Rechargeable Battery Bank

manufacturer = Hadron Electric Rocket Enterprises

description = The VC-100 is a stackable tank containing Vacuum Particles for use with all of HERMEs rocket engines.

attachRules = 1,0,1,1,0

mass = 0.01

dragModelType = default

maximum_drag = 0.2

minimum_drag = 0.2

angularDrag = 1

crashTolerance = 8

maxTemp = 2000 // = 3200

bulkheadProfiles = size0, srf

RESOURCE

{

name = VacuumCharge

amount = 2000

maxAmount = 2000

}

}

Link to comment
Share on other sites

I have gone back and checked everything.; Looks like there is a problem with my model and texture files. When I copy the models from any of squad's files and then use my .cfg files it works perfectly. I'm going to have to get more proficient with blender and unity in order to get my designs to work

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