Jump to content

Monniasza

Members
  • Posts

    70
  • Joined

  • Last visited

Everything posted by Monniasza

  1. How do I get properties from a FSfuelSwitch module in a part? The following code does not work: @MODULE[FSfuelSwitch],*{ %testqty = #$resourceNames[0]$ @testqty = #$testqty[0,;]$ } @title = #$title$ $/MODULE[FSFuelSwitch]/resourceNames$
  2. Road to 1.4 release: LPG: [x] sanitize B9PS-enabled parts [] B9 Aerospace parts [x] Filter Extensions support [x] Hypersonic Nose Cone Rockets: [] LV-T31 "Gimbaliant" Liquid Fuel Engine
  3. I'll want following tags: :IF(like :NEEDS, but checks its parent) Conditional code within #IF[] and #ENDIF SubSections: #DO - unconditional single #LOOP - unconditional loop #IF[] - conditional single #WHILE[] - conditional loop #END - end #REIF[] - conditional retry #RE - unconditional retry #BREAK - unconditional break #BIF[] - conditional break Full sections: #KALL - stop all runs of given patch #KTHIS - stop this run of patch #RETRY - re-run this copy of patch #REALL - re-run all copies of this patch Use #COND[] to set conditions on following operations using question mark. To prevent hacking, the value should be reset to false before going to next file. Functions: #LOG = - print x in KSP.log #TYPE = - change node's type #IFVAR = - use variable as condition It will need new method of operation: Tokenize all CFGs Convert all scripts into executable code Reorder scripts based on order tags and file names Run scripts in order I plan to use these in SSTO Framework, part of SSTO Project Core
  4. Sorry for no updates in 2 months. I'm busy with making a new computer game and remote learning.
  5. I've made Hypersonic Nose Cone. It will be released in 1.3.4
  6. Please add ability to restrict tank contents by tech researched, using TechRequired node in tank definitions.
  7. @neistridlar Do you want to have this mod on CKAN?
  8. @NESD Please continue development, and release the new update for 1.8.x - 1.10.x
  9. 2.5 and 3.75 meter cockpits with excellent aerodynamics.
  10. Please add: GitHub repository FTP themes to stock tanks Stock themes to FTP tanks MODEL{} notations with external textures to all FTP tanks Second, third and fourth suggestions do not violate copyright, because textures are referenced, not copied
  11. Please add : 3.75m parts LFO tanks Jets LFO fueled RCS Textures Unlimited recolouring GitHub repository Adapters Crew capsules Vacuum engines Colored coded 2.5m fuel tanks Wings Cockpits 2.5m intakes and 0.625m inline intakes
  12. I'll want to have support for ModuleManager 4.1.4 and KSP 1.9.x too.
  13. Started developing plug-ins. 1.3.x will be marked both 1.8.x and 1.9.x compatible.
  14. For some reason, with both Firespitter and Modular Fuel Tanks installed, fuselages use FS tanks instead of MFT tanks. Here is MFT patch: @PART[h_2m_em_fm]:NEEDS[ModularFuelTanks] { MODULE { name = ModuleFuelTanks type = Fuselage volume = 612 basemass = -1 } } And FS patch for the same part: @PART[h_2m_em_fm]:NEEDS[Firespitter] { MODULE { name=FSfuelSwitch resourceNames=Structural;LiquidFuel;LiquidFuel,Oxidizer;LiquidFuel,Oxidizer;LiquidFuel,Oxidizer,MonoPropellant resourceAmounts=0;288;144,176;72,88;100.8,123.2,43.2 basePartMass=0.67 tankMass=0;0;0;0;0 tankCost=0;0;0;0;0 displayCurrentTankCost=false hasGUI=true showInfo=true } } FS patch should be changed to this: @PART[h_2m_em_fm]:NEEDS[Firespitter&!ModularFuelTanks] { MODULE { name=FSfuelSwitch resourceNames=Structural;LiquidFuel;LiquidFuel,Oxidizer;LiquidFuel,Oxidizer;LiquidFuel,Oxidizer,MonoPropellant resourceAmounts=0;288;144,176;72,88;100.8,123.2,43.2 basePartMass=0.67 tankMass=0;0;0;0;0 tankCost=0;0;0;0;0 displayCurrentTankCost=false hasGUI=true showInfo=true } } Doing this would move Firespitter Core into recommended or suggested category instead of required.
  15. Next time you encounter an issue, you can report it on GitHub.
  16. Do you use any other mods (including DLC)?
  17. You have to find tank whose name ends in "(LPGox)" or "(LPG)" for rockets and jets correspondingly.
  18. Do you have any plans for these scripts? I plan to use scripts extensively in LPG module of SSTO Project.
  19. This patch generates 3 errors per part. How I can fix it? Here is the patch: //New, improved LPG code //Set up existing LPG module RESOURCE_DEFINITION{ name = LPG displayName = LPG abbreviation = LPG density = 0.00054 //540 g/l unitCost = 0.256 //Calculated based on American prices for LPG - 0.4 $/l and RP-1 -125$/kg hsp = 2010 flowMode = STACK_PRIORITY_SEARCH transfer = PUMP isTweakable = true volume = 1 } // vvv MFT COMPATIBILITY @TANK_DEFINITION[Default,Fuselage,Structural,ServiceModule,Balloon]{ TANK{ name = LPG amount = 0.0 maxAmount = 0.0 utilization = 5 note = (pressurized) } } TANK_DEFINITION{ name = LPG basemass = 0.000050 * volume TANK{ name = LPG amount = full maxAmount = 100% utilization = 5 note = (pressurized) } TANK{ name = Oxidizer amount = 0.0 maxAmount = 0.0 } } TANK_DEFINITION{ name = LPGox basemass = 0.000050 * volume TANK{ name = LPG amount = full maxAmount = 25.9259259259259259259259259259259259259259259259259259259259259259259259259259259259259259259259259259259259259259259259259259259259259259% utilization = 5 note = (pressurized) } TANK{ name = Oxidizer amount = full maxAmount = 74.0740740740740740740740740740740740740740740740740740740740740740740740740740740740740740740740740740740740740740740740740740740740740740% } } //Generate ModuleLPG for known parts @PART[*]:HAS[!MODULE[ModuleLPG]]:FINAL{ MODULE{ name = ModuleLPG } } @PART[*]:FINAL{ lf = 0 ox = 0 @MODULE[ModuleLPG]{ err_a = false err_t = false err_i = false err_c = false err_r = false err_fs = false } } // Handle LPG +PART[*]:FINAL{ fuel = 0 @title = #$title$ (LPG) @name = #$name$_LPG } //Test amount @PART[*_LPG]:HAS[@MODULE[ModuleLPG]:HAS[~amount]]:FINAL{ @MODULE[ModuleLPG]{ @err_a = true } } @PART[*_LPG]:HAS[@MODULE[ModuleLPG]:HAS[#amount]]:FINAL{ @MODULE[ModuleLPG]{ tmp = 0 @tmp += #$amount$ @err_a = false } @MODULE[ModuleLPG]:HAS[#ąmount[-*]|#tmp[0]|#amount[]|#tmp[NaN]|#tmp[*Infinity]]{ @err_a = true } } //Test Isp mutiplier @PART[*_LPG]:HAS[@MODULE[ModuleLPG]:HAS[~isp]]:FINAL{ @MODULE[ModuleLPG]{ @err_i = true } } @PART[*_LPG]:HAS[@MODULE[ModuleLPG]:HAS[#isp]]:FINAL{ @MODULE[ModuleLPG]{ @tmp = 0 @tmp += #$amount$ @err_i = false } @MODULE[ModuleLPG]:HAS[#isp[-*]|#tmp[0]|#isp[]|#tmp[NaN]|#tmp[*Infinity]]{ @err_i = true } } //Test fuel ratio @PART[*_LPG]:HAS[@MODULE[ModuleLPG]:HAS[~ratio]]:FINAL{ @MODULE[ModuleLPG]{ @err_r = true } } @PART[*_LPG]:HAS[@MODULE[ModuleLPG]:HAS[#ratio]]:FINAL{ @MODULE[ModuleLPG]{ @tmp = 0 @tmp += #$amount$ @err_r = false } @MODULE[ModuleLPG]:HAS[#ratio[-*]|#tmp[0]|#ratio[]|#tmp[NaN]|#tmp[*Infinity]]{ @err_r = true } } @PART[*_LPG]:FINAL{ lf = 0 ox = 0 //Test type @MODULE[ModuleLPG]{ %err_t = true } @MODULE[ModuleLPG]:HAS[#type[stock]|#type[fs]|#type[mfs]]{ @err_t = false } //Test tankage @MODULE[ModuleLPG]{ %err_c = true } @MODULE[ModuleLPG]:HAS[#contents[lpg]|#contents[lpgo]|#contents[none]]{ @err_c = false } //Calculate the fuel ratio @MODULE[ModuleLPG]:HAS[#err_r[true]]{ %ratio = 8 } @MODULE[ModuleLPG]:HAS[#err_r[true]]:NEEDS[SMURFF]{ @ratio /= #$@SMURFFCONFIG/lfofactor$ } } //If fuel switchers are present, take fuel from them instead @PART[*_LPG]:HAS[@MODULE[ModuleFuelTanks]:HAS[#type[Default]|#type[Structural]|#typeServiceModule]|#type[Balloon]]:FINAL{ @fuel += #$MODULE[ModuleFuelTanks]/volume$ !MODULE[ModuleFuelTanks] {} @MODULE[ModuleLPG]{ @err_a = false @err_c = false @amount = #$../fuel$ @contents = lpgo @amount = #$../fuel$ } } @PART[*_LPG]:HAS[@MODULE[ModuleFuelTanks]:HAS[#type[Fuselage]]]:FINAL{ @fuel += #$MODULE[ModuleFuelTanks]/volume$ !MODULE[ModuleFuelTanks] {} @MODULE[ModuleLPG]{ @err_a = false @err_c = false @amount = #$../fuel$ @contents = lpg @amount = #$../fuel$ } } @PART[*_LPG]:HAS[@MODULE[ModuleB9PartSwitch]]:FINAL{ @fuel += #$MODULE[ModuleB9PartSwitch]/baseVolume$ !MODULE[ModuleB9PartSwitch] {} @MODULE[ModuleLPG]{ @err_a = false @err_c = false @amount = #$../fuel$ } } @PART[*_LPG]:HAS[@RESOURCE[LiquidFuel]]:FINAL{ @lf += #$RESOURCE[LiquidFuel]/maxAmount$ @fuel += #$lf$ } @PART[*_LPG]:HAS[@RESOURCE[Oxidizer]]:FINAL{ @ox += #$RESOURCE[Oxidizer]/maxAmount$ @fuel += #$ox$ } //@PART[*_LPG]:HAS[!MODULE[ModuleFuelTanks]]:FINAL{ // //Count resources and decompute the mass // @MODULE[ModuleLPG]:HAS[~amount]{ // amount = 0 // lf = 0 // ox = 0 // lf = #$../lf$ // ox = #$../ox$ // @amount = #$lf$ // @amount += #$ox$ // } // @MODULE[ModuleLPG]:HAS[#ox[0]&#lf[0]]{ // %contents = none // } // @MODULE[ModuleLPG]:HAS[#ox[0]&~lf[0]]{ // %contents = lpg // } // @MODULE[ModuleLPG]:HAS[~ox[0]&~lf[0]]{ // %contents = lpgo // } //} @PART[*_LPG]:HAS[MODULE[ModuleFuelTanks]]:FINAL{ //Count resources and decompute the mass @MODULE[ModuleLPG]:HAS[~amount]{ amount = 0 @amount = #$../MODULE[ModularFuelTanks]/volume$ } @MODULE[ModuleLPG]:HAS[#ox[0]&#lf[0]]{ %contents = none } @MODULE[ModuleLPG]:HAS[#ox[0]&~lf[0]]{ %contents = lpg } @MODULE[ModuleLPG]:HAS[~ox[0]&~lf[0]]{ %contents = lpgo } } @PART[*_LPG]:FINAL{ //Create fuel switchers @MODULE[ModuleLPG]{ newMass = #$../mass$ fs = false mfs = false @fs:NEEDS[Firespitter] = true @mfs:NEEDS[RealFuels|ModularFuelTanks] = true } @MODULE[ModuleLPG]:HAS[#err_t[true]]{ type = stock type:NEEDS[Firespitter] = fs type:NEEDS[RealFuels|ModularFuelTanks] = mfs } //If requested fuel switcher is absent, choose other one @MODULE[ModuleLPG]:HAS[#type[mfs]]:NEEDS[!RealFuels&!ModularFuelTanks]{ @type = stock @type:NEEDS[Firespitter] = fs } @MODULE[ModuleLPG]:HAS[#type[fs]]:NEEDS[!Firespitter]{ @type = stock @type:NEEDS[RealFuels|ModularFuelTanks] = mfs } @MODULE[ModuleLPG]{ massFuel = 0 massRemain = 0 @massFuel = #$amount$ @massFuel *= 5 @massFuel /= #$ratio$ @massRemain = #$../mass$ @massRemain -= #$massFuel$ @newMass = #$amount$ @newMass *= 0.05 @newMass += #$massRemain$ } @mass = #$MODULE[ModuleLPG]/newMass$ SSTOLPG = 1.06 } @PART[bluedog_*_LPG]:FINAL{ //Increased LPG improvement - BDB engines have inferior Isp, so increase by 20% @SSTOLPG = 1.22 } @PART[B9_*_LPG]:FINAL{ //Intermediate LPG improvement -both normal and high efficiency engines @SSTOLPG = 1.05 } @PART[RSB*_LPG]:FINAL{ //Realistic LPG improvement @SSTOLPG = 1.04 } @PART[BAEengine*_LPG]:FINAL{ //Increased LPG improvement - BAE engines have inferior Isp, so increase by 20% @SSTOLPG = 1.15 } @PART[*_LPG]:HAS[#manufacturer[Alcentar]]:FINAL{ //RealEngines or LCA @SSTOLPG = 1.06 //Determine if using LCA pack or RealEngines - the second should improve 4% SSTOTMP = #$MODEL/model$ @SSTOTMP ^= "R(.*?)k" //LCA won't match } @PART[*_LPG]:HAS[#SSTOTMP[ealEnginesPac]]:FINAL{ //Realistic improvement - 4% @SSTOLPG = 1.04 } @PART[*_LPG]:FINAL{//Apply the changes for engine - Rockets and jets, no nukes @MODULE[ModuleEngines*]{ @eligible = false } @MODULE[ModuleEngines*]:HAS[@PROPELLANT[LiquidFuel],@PROPELLANT[Oxidizer]]{ //Rockets //3.5:1 mass OX/LPG eligible = true @PROPELLANT[Oxidizer]{ @ratio = 0.7 //3.5 volumetric } @PROPELLANT[LiquidFuel]{ @name = LPG @ratio = 2 //2 volumetric } @atmosphereCurve { k0 = #$key,0[1, ]$ @k0 *= #$../../SSTOLPG$ @key,0 = #0 $k0$ k1 = #$key,1[1, ]$ @k1 *= #$../../SSTOLPG$ @key,1 = #1 $k1$ } } @MODULE[ModuleEngines*]:HAS[@PROPELLANT[LiquidFuel],@PROPELLANT[IntakeAir]]{ //Jets //3.5:1 mass OX/LPG eligible = true @PROPELLANT[IntakeAir]{ @ratio *= 0.15 } @PROPELLANT[LiquidFuel]{ @name = LPG } @atmosphereCurve { k0 = #$key,0[1, ]$ @k0 *= 1.2 @key,0 = #0 $k0$ } } keep = false !RESOURCE[LiquidFuel|Oxidizer] {} } @PART[*_LPG]:HAS[@MODULE[ModuleEngines*]:HAS[#eligible[true]]]:FINAL{ @keep = true } @PART[*_LPG]:HAS[@MODULE[ModuleLPG]:HAS[!contents[none]]]:FINAL{ @keep = true } //Remove unnecessary parts !PART[*_LPG]:HAS[#keep[false]]:FINAL {} //Apply tanks @PART[*_LPG]:HAS[@MODULE[ModuleLPG]:HAS[#type[stock]&contents[lpg]]]:FINAL{ RESOURCE{ name = LPG amount = #$../MODULE[ModuleLPG]/amount$ @amount *= 5 maxAmount = #$amount$ } } @PART[*_LPG]:HAS[@MODULE[ModuleLPG]:HAS[#type[stock]&contents[lpgo]]]:FINAL{ x = 0.7 @x /= 1.35 y = 2 @y /= 1.35 RESOURCE{ name = LPG amount = #$../MODULE[ModuleLPG]/amount$ @amount *= #$../y$ maxAmount = #$amount$ } RESOURCE{ name = Oxidizer amount = #$../MODULE[ModuleLPG]/amount$ @amount *= #$../x$ maxAmount = #$amount$ } } //TODO Firespitter Fuel Switch @PART[*_LPG]:HAS[@MODULE[ModuleLPG]:HAS[#type[mfs]&contents[lpg]]]:FINAL{ MODULE{ name = ModuleFuelTanks type = LPG basemass = #$../mass$ volume = #$../MODULE[ModuleLPG]/amount$ } } @PART[*_LPG]:HAS[@MODULE[ModuleLPG]:HAS[#type[mfs]&contents[lpgo]]]:FINAL{ MODULE{ name = ModuleFuelTanks type = LPGox basemass = #$../mass$ volume = #$../MODULE[ModuleLPG]/amount$ } } And error pattern ('xxx' stands for any part) [LOG] Applying update SSTOProject/LPG new/@PART[*_LPG]:FINAL to xxx [WRN] Cannot find key newMass in MODULE [ERR] Error - Cannot parse variable search when editing key mass = #$MODULE[ModuleLPG]/newMass$ [WRN] Cannot find key amount in MODULE [ERR] Error - Cannot parse variable search when editing key massFuel = #$amount$ [WRN] Cannot find key amount in MODULE [ERR] Error - Cannot parse variable search when editing key newMass = #$amount$ Mods used: Procedural Parts, SMURFF, Modular Fuel Tanks, both DLC
  20. Some people might want to have more design flexibility, by switching to Modular Fuel System and/or using LPG from SSTO Project.
×
×
  • Create New...