Jump to content

SolverEngine:Why I get no FX or Emissive running in my mod based on SolverEngine


Recommended Posts

I'm working on my mod based on SolverEngine now.I'm reading AJE and RF's source codes and found that both SolverEngine and them are amazing and work perfectly.However,I don't know how to get emissive and FX running.

Based on my understanding of the sources,I coded in my mod as below


public override double GetEngineTemp() { return chamberTemp; }


public override double GetEmissive() { return fxPower; }
public override float GetFXPower() { return fxPower; }
public override float GetFXRunning() { return fxPower; }
public override float GetFXThrottle() { return fxPower; }
public override float GetFXSpool() { return fxPower; }
public override bool GetRunning() { return fuelFlow > 0; }

where the fxPower is a float( 0f~1f ),and debug shows it has correct value when running.

But there is no exhaust flame or other FX.

Mod's Git: https://github.com/Librazy/EngineDevelopment/tree/ParamAlpha

Thanks for reading and helping

Edited by Librazy
Link to comment
Share on other sites

Your Test.cfg config does not have any EFFECT node. So the engine has no effect to display.

You need to copy an EFFECT config from an other engine.

Sorry for my stupid……Gonna to try it tomorrow(UTC+8here……

Link to comment
Share on other sites

Your Test.cfg config does not have any EFFECT node. So the engine has no effect to display.

You need to copy an EFFECT config from an other engine.

Thanks,I writes an cfg on a KW ModuleEngineFX that has an EFFECT,and It works well^But it seems some more work needs to be done to fit an ModuleEngine part=w=:huh:

Great to see this get use--and let us know if you need anything else added to SolverEngines! :)

I dunna to write a mod like AJE on rocket engine,but I don't know how&what to do until I found SolverEngines.No issue for now^(These days I was buried in my messy liquid-engine-simulation codes to ensure it won't get out-ranged results)

Actually I need some data from RF like fuelFraction of CalculateGamma and the exhaust gases' molar mass.

And an issue for RF:

For an ModuleEnginesSolver part when showing RF GUI in action group, It just run once CreateEngine but Multi-GetInfo on the propellants changed to.Mine reads Isp and other data depended on propellants-in-use when CreateEngine,so it wouldn't show correct data for currect propellants.And It seems that RF runs the engine sim on every OnGUI,which I think only need to run once from the beginning when loading and changing configs(like the stock part list do.

Thanks for bring us a lot of wonderful modsï¼Â

- - - Updated - - -

Great to see this get use--and let us know if you need anything else added to SolverEngines! :)

PS:Due to the absent of EI on 1.0.x version,I add the ullage and ignition code from EI which I'd like to include in my mod...Not until today did I found the Ullage branch of MFS&RF..

I'm reading ModuleEnginesRF to find out how to write a better ModuleEnginesDev for my EngineDevelopment

- - - Updated - - -

......Then I find out we won't meet on the same part for ModuleEnginesRF and ModuleEnginesDev...So I will write a :Final in the cfg to drive away any other ModuleEngines* (Badness:sticktongue:4 joking

Link to comment
Share on other sites

SolverEngines derives from ModuleEnginesFX; it would be rather hard to make it work with non-ModuleEnginesFX effects. ;)

Sounds like you're doing some awesome stuff! In fact, I suggest you just fork RealFuels and go from there, since that's what RF's solver aspires to do (actually calculate real liquid and solid engine performance, rather than use curves); we just haven't written that yet. And interesting you mention ullage; I just added that to RF. Check the repo. :) (Sorry we duplicated effort, since it sounds like we did the same thing).

Excellent point about GetInfo, I'll fix that.

Link to comment
Share on other sites

Sounds like you're doing some awesome stuff! In fact, I suggest you just fork RealFuels and go from there, since that's what RF's solver aspires to do

So..when i get my simulation and calculation right I'll redo it in RF and pull to your repo.

In my mod,I'd like to add some cfg node other like ModuleNozzleConfig ModuleChamberConfig to get datas needed.So the player can get some different performance using different nozzles,chamber sand powercycles--the way to change settings is just the same to change fuels.So the basic thing is a realistic calculation engine performance,which I'm trying to work on now.

But I'm a new-hand on both KSP plugin and engine calculation,so I had made little progress so far.I think I will do better with your and others help.

My honor to take part in the wonderful work

- - - Updated - - -

PS: 04:00 a.m. here (..I should learn the lesson not to drink too much coffee before sleep..

Link to comment
Share on other sites

  • 2 weeks later...
SolverEngines derives from ModuleEnginesFX; it would be rather hard to make it work with non-ModuleEnginesFX effects. ;)

Sounds like you're doing some awesome stuff! In fact, I suggest you just fork RealFuels and go from there, since that's what RF's solver aspires to do (actually calculate real liquid and solid engine performance, rather than use curves); we just haven't written that yet. And interesting you mention ullage; I just added that to RF. Check the repo. :) (Sorry we duplicated effort, since it sounds like we did the same thing).

Excellent point about GetInfo, I'll fix that.

Basically understood how RF works,I‘m trying to rewrite SolverRF for real performance calculation.Just have liquid de laval engine done yet.//Hope I'd written something useful

Time to consider how the cfg should be…Would be a big project to find out the params for lots of engines.

https://github.com/Librazy/ModularFuelSystem

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