Jump to content

[0.23.5] ModuleRCSFX 0.3 - RCS with PROPELLANT{}-based fuels and EFFECTS{}-based FX!


ialdabaoth

Recommended Posts

Updated 6/05/2014 0.3 - fixed bug where G and thrusterPower were not being used correctly (thanks NathanKell)

Updated 4/25/2014 0.3 - now uses transform's position instead of part's position, so integral RCS on pods will work correctly.

Updated 4/23/2014 0.2 - now includes useZaxis

Updated 4/23/2014 0.1 - now properly turns of thruster effects when RCS is turned off.

This is a pretty simple mod, which gives you RCS blocks with PROPELLANT {...} nodes and EFFECTS {...} nodes, so you can create Hall effect ion RCS, bipropellant RCS, anything you want - and then add sound and light effects. It also allows you to set 'useZaxis = true' to re-use thruster models as RCS models.

Here's what a part.cfg looks like:


PART
{

// --- general parameters ---
name = RCSBlock
module = Part
author = NovaSilisko

// --- asset parameters ---
mesh = model.mu
scale = 0.1

// --- node definitions ---
// definition format is Position X, Position Y, Position Z, Up X, Up Y, Up Z
node_attach = 0.45212, -0.0105571, -0.0059382, 1.0, 0.0, 0.0



// --- editor parameters ---
TechRequired = fuelSystems
entryCost = 3400
cost = 450
category = Control
subcategory = 0
title = RV-105 RCS Thruster Block
manufacturer = STEADLER Engineering Corps
description = The recent discovery of a third law of physics made it possible for STEADLER Corps engineers to produce these small monopropellant thrusters, to help with attitude control and linear motion. Even though many Kerbal physicists still dispute the validity of this new law, studies show that the thrusters seem to work as advertised.

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 0,1,0,0,0

// --- standard part parameters ---
mass = 0.05
dragModelType = default
maximum_drag = 0.001
minimum_drag = 0.001
angularDrag = 2
crashTolerance = 15
maxTemp = 3600


PhysicsSignificance = 1

// --- rcs module parameters ---

MODULE
{
EFFECTS
{
running
{
AUDIO
{
channel = Ship
clip = sound_rocket_mini
volume = 0.0 0.0
volume = 1.0 0.2
pitch = 0.0 0.2
pitch = 1.0 1.0
loop = true
}
}
engage
{
AUDIO
{
channel = Ship
clip = sound_vent_soft
volume = 1.0
pitch = 2.0
loop = false
}
}
flameout
{
AUDIO
{
channel = Ship
clip = sound_explosion_low
volume = 0.1
pitch = 2.0
loop = false
}
}
}
MODULE
{
name = ModuleRCSFX
thrusterTransformName = RCSthruster
thrusterPower = 1

runningEffectName = running
flameoutEffectName = flameout
engageEffectName = engage
PROPELLANT
{
name = MonoPropellant
ratio = 1.0
}
atmosphereCurve
{
key = 0 260
key = 1 100
}
}
}

Download from GitHub (includes source)

Edited by ialdabaoth
Link to comment
Share on other sites

So, you know what would be awesome? If someone could make some part.cfg files to create single-port, surface-mountable IonRCS parts out of the Ion Engine models. I figure something like this:


MODULE
{
name = ModuleRCSFX
thrusterTransformName = RCSthruster
thrusterPower = 0.5

runningEffectName = running
flameoutEffectName = flameout
engageEffectName = engage
PROPELLANT
{
name = Xenon
ratio = 1.0
}
PROPELLANT
{
name = ElectricCharge
ratio = 10.0
}
atmosphereCurve
{
key = 0 5000
key = 1 100
}
}

Link to comment
Share on other sites

My god! This is the best! I will use it IMMEDIATELY.

edit - I looked at the source, and the method is identical to the one I had half done! I feel less incompetent at coding as a result :P

Edited by Nertea
Link to comment
Share on other sites

So, you know what would be awesome? If someone could make some part.cfg files to create single-port, surface-mountable IonRCS parts out of the Ion Engine models. I figure something like this:


MODULE
{
name = ModuleRCSFX
thrusterTransformName = RCSthruster
thrusterPower = 0.5

runningEffectName = running
flameoutEffectName = flameout
engageEffectName = engage
PROPELLANT
{
name = Xenon
ratio = 1.0
}
PROPELLANT
{
name = ElectricCharge
ratio = 10.0
}
atmosphereCurve
{
key = 0 5000
key = 1 100
}
}

There was a mod that had IonRCS thruster that just use ElectricCharge back in KSP 22 but they broke in 23 you had to make the use like you have it.

EDIT Will have to dig around and see if, I can found them again.

Link to comment
Share on other sites

I have a small question:

is it derived from class ModuleRCS?

if Yes, Ok that's good.

if No:

Can you add some additional tag(s) to claim it as a main engine for a vessel? so that it can be controlled by throttle directly.

AFAIK MJ has implemented some sort of this mechanism, but only for class ModuleRCS I guess.

Link to comment
Share on other sites

There was a mod that had IonRCS thruster that just use ElectricCharge back in KSP 22 but they broke in 23 you had to make the use like you have it.

EDIT Will have to dig around and see if, I can found them again.

well what I really want is something that uses the normal Ion Engine's model, but scaled down and surface-mountable.

Link to comment
Share on other sites

There was a mod that had IonRCS thruster that just use ElectricCharge back in KSP 22 but they broke in 23 you had to make the use like you have it.

EDIT Will have to dig around and see if, I can found them again.

It also featured reserve power batteries. SodiumEyes wrote it I just can't think of the name.

Edit: AMPYear : https://github.com/SodiumEyes/AmpYear

Edited by rottielover
Link to comment
Share on other sites

It's derived directly from ModuleRCS.

One thing more that i forgot about RCSSound mod, it has implemented some sort of lighting for thrusters for ModuleRCS, I guess the author of RCSSound might need to rewrite the plugin so that it derives from ModuleRCSFX instead of ModuleRCS...

Edited by HoneyFox
Link to comment
Share on other sites

My god! This is the best! I will use it IMMEDIATELY.

edit - I looked at the source, and the method is identical to the one I had half done! I feel less incompetent at coding as a result :P

XD My first thought when I saw this thread was, I kid you not, "Hey, I should tell Nertea about this. It'd save him so much time and headache."

Link to comment
Share on other sites

update: just fixed a minor bug where sometimes RCS thrusters would still appear active when RCS is off. Please re-download.

One question I wonder is, does RCS's thrust transforms use Y axis instead of Z axis as the direction?

And, is the runningEffectName working normally now? In previous version it's constantly playing the effect while the stock RCS effect appears when the thruster is working.

Link to comment
Share on other sites

Yes, it uses Y axis. That's why you can't go between RCS and engine easily.

:( I was trying to rescale stock ion engine to 0.4 and later when i try using it in game... you know...

Perhaps ialdabaoth can add an option "useZAxis" in the module?

Edited by HoneyFox
Link to comment
Share on other sites

Nice :) Even more reason for me to resume work on SmokeScreen asap.

is it derived from class ModuleRCS?

No related to this mod but I'd love that you and dtobi rewrote your respective gimbals mods as a derived class from the stock one. I hit some wall while working on a new module when I found out that I'll have to handle those.

I should open a post somewhere about that.

Link to comment
Share on other sites

Honest question, are you going to attempt to get proper roll control to work with a part that is inline and includes RCS?

For example Lovad's SM has built in RCS pods, but they don't work worth a darn, and the LazTek Dragon pod. Pitch and Yaw work great, but roll does not work at all.

Link to comment
Share on other sites

Honest question, are you going to attempt to get proper roll control to work with a part that is inline and includes RCS?

For example Lovad's SM has built in RCS pods, but they don't work worth a darn, and the LazTek Dragon pod. Pitch and Yaw work great, but roll does not work at all.

why would gimbal be related to the RCS i wonder...

Link to comment
Share on other sites

This is a great mod, but the sounds are bit...annoying in the long run. Enabling/disabling RCS gives loud noise like air would be vented out at high pressure. But that is not the worst one, the 'puks' sound that rcs makes almost constantly when SAS is switched on, is...nerve breaking to be honest. I had to remove the plugin for that, but is there a way to remove that repeating 'puks' sound, maybe just by removing the sound file?

And yes, i use RCS quite a lot and i like the effects and the things future might bring along.

Link to comment
Share on other sites

Honest question, are you going to attempt to get proper roll control to work with a part that is inline and includes RCS?

For example Lovad's SM has built in RCS pods, but they don't work worth a darn, and the LazTek Dragon pod. Pitch and Yaw work great, but roll does not work at all.

Should be fixed in latest version (get the dll from github, I don't think ialdabaoth updated the package yet.)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...