Jump to content

[1.10.x]FuelWings: v4 - Fuel customization in Stock, B9, & B9 ProceduralWings! - 11/08/2020


Tortoise

Recommended Posts

:FOR[MOD] tells module manager that this patch is part of MOD, and that it should be run between :BEFORE[MOD] and :AFTER[MOD] patch sets. it also tells module manager that this patch is part of MOD, and so any patch that :NEEDS[MOD] should also be run.

I see, but in this case it should (correct me if I'm wrong please) be superfluous because this is the one and only .cfg file of this mod and it is named after the mod. At least theoretically. Practically, it could be a good idea to always use it so you don't forget it the one time you really need it.

Link to comment
Share on other sites

I see, but in this case it should (correct me if I'm wrong please) be superfluous because this is the one and only .cfg file of this mod and it is named after the mod. At least theoretically. Practically, it could be a good idea to always use it so you don't forget it the one time you really need it.

there are three conditions that satisfy :NEEDS[MOD]:

  1. there is a folder "KSP\GameData\MOD"
  2. There is a plugin loaded MOD.dll (regardless of location)
  3. There is at least one MM patch declaring it is :FOR[MOD]

if you do any of those, you're fine. if you do more then one, then you have some backups in case you change something, (i.e. rename your plugin ala RemoteTech2.dll)

Link to comment
Share on other sites

I would love to see this applied to procedural wings. Or at least have someone walk me through applying this to p-wings.

the problem with PWings is that you can't be sure how large it is at patch time, so you'd need a runtime plugin to do some dynamic mathmagics to get the fuel capacity right. if you wanted to just add a static value to all PWings, then you could do an easy MM patch to add the resource amount and a crossfeed enabler node, but then every Pwing, no matter how big, would have 150 fuel, or whatever.

Link to comment
Share on other sites

I really love the concept of this mod, but am holding off for 2 reasons.

1. Having to pick between Liquid or LOX before starting the game. I think this could easily be integrated with Modular Fuels (I'll consider the config posted above as a hotfix), but so that it isn't a dependency you should just make the wing Liquid fuel only (since generally when using wings, you have a air-breathing engine).

2. P-Wing/all wing integration. I'm no programmer, but there should be some way to determine wing size and feed that back into Fuelwings, FAR appears to do it in the editor... I'd be happy if there was a "recalculate" button in the editor. Also applying to all wing part loaded (not specify only squad wings) would allow use of B9 wings etc.

Keep up the great work.

Edited by azza276
Link to comment
Share on other sites

I really love the concept of this mod, but am holding off for 2 reasons.

1. Having to pick between Liquid or LOX before starting the game. I think this could easily be integrated with Modular Fuels (I'll consider the config posted above as a hotfix), but so that it isn't a dependency you should just make the wing Liquid fuel only (since generally when using wings, you have a air-breathing engine).

2. P-Wing/all wing integration. I'm no programmer, but there should be some way to determine wing size and feed that back into Fuelwings, FAR appears to do it in the editor... I'd be happy if there was a "recalculate" button in the editor. Also applying to all wing part loaded (not specify only squad wings) would allow use of B9 wings etc.

Keep up the great work.

Hello,

1. You can choose when installing the mod between liquid fuel only or liquid fuel / oxidizer so what you are asking has already been done. As for Modular Fuels that mod is obsolete, it has become Real Fuels and Modular Fuel Tanks.

2. Adding a fixed amount of fuel to P-Wings is easy but having it adjust fuel amounts as the wing dimensions change is something else entirely. If anybody has any ideas on how to pull that off I'd be happy to help. As for creating a MM patch that could somehow determine what a 'wing' is and auto-magically apply a config to it... well, good luck with that.

If you are wanting a config for a particular mod's wings I'd be happy to help.

Link to comment
Share on other sites

Hello,

1. You can choose when installing the mod between liquid fuel only or liquid fuel / oxidizer so what you are asking has already been done. As for Modular Fuels that mod is obsolete, it has become Real Fuels and Modular Fuel Tanks.

2. Adding a fixed amount of fuel to P-Wings is easy but having it adjust fuel amounts as the wing dimensions change is something else entirely. If anybody has any ideas on how to pull that off I'd be happy to help. As for creating a MM patch that could somehow determine what a 'wing' is and auto-magically apply a config to it... well, good luck with that.

If you are wanting a config for a particular mod's wings I'd be happy to help.

Thanks Jim.

I was talking about the Modular Fuel Tanks Mod, just trying to avoid typing too many words - digital shorthand, sorry if it caused confusion.

For the pWings, I'd be happy to look at that but I don't know what to look for. The configs don't seem to yield much so the code may be in its plugin dll... And like I said, ferram may know how to check the wing size. Or could the mass indicate a suitable fuel load? e.g. Add 1 unit of fuel for every 0.001 ton then add fuel mass?

I see what you mean by it being difficult to check which parts are actual wings...

Do you have (or could make) any configs for B9 wings?

Cheers

Azza

Link to comment
Share on other sites

Updated to v1.8! :)

Say thanks to some users who commented on the thread offering suggestions, and other mod API developers.


v1.8 (11/6/15) for KSP 0.25
*Major code revisions making file size much lower and increasing organization of code.
*Implemented ModularFuelTanks support which gives the ability to switch fuels in the editor.
*Nerfed maximum fuel values
*(Does not require initial selection of wings with LF or LF/LOX anymore. Just 1 FuelWings folder) Supports all stock fuels

Link to comment
Share on other sites

Would it be possible to add the B9 wings into your mod? I like the idea of this mod but I am not a fan of the paper thin spaceplane wings.

I just made one up for B9. like literally just then when I saw youtr post. With the modders permission I will post up.

That being said Tortoise, is it ok if I put up a Fuel Wings B9 config? You are more than welcome to use it.

Also I noted in your FW.cfg, you are missing the 'g' in fuselage for the structuralwing3 (about line 77).

these are the B9 wings I added fuel to;

AtWNvIM.jpg

Edited by azza276
Link to comment
Share on other sites

Somehow, my wings already have the capacity to carry fuel, while not using this FuelWings mod. What other mods have fuel wings and are they compatible with this one?

I'm aware of any other mod that adds fuel to stock wings. But if your stock wings already have a fuel resource then it may conflict with this mod.

If you've installed a version of FuelWings prior to 1.4 then this may be your problem (And you won't have a "FuelWings" folder in GameData) so you should read the note in the README on how to solve it.

Link to comment
Share on other sites

Somehow, my wings already have the capacity to carry fuel, while not using this FuelWings mod. What other mods have fuel wings and are they compatible with this one?

Perhaps you downloaded and used a config I posted a long time ago which added fuel to wings. (never listen to anyone who tells you it can't be done!)

Link to comment
Share on other sites

I have already sent this patch to Tortoise, but I will post it here should anyone take interest.

Below is a replacement for the FW.cfg file from v2.0, intended to be more concise, clear, and introduce modularity. There are mutually-exclusive modifications for ModularFuelTanks and/or RealFuels versus without, and the former (MFT/RF) will remove extant RESOURCE nodes in the wings. The ordering tags (FOR vs BEFORE or AFTER) could have been reworked to remove the "needs not MFT and not RF", but this is slightly more clear if more verbose.

The 'volume' in the tanks has been reduced (again?), but do note that the non-MFT/RF configs are padded a little extra by a factor of roughly 1.5. Note that any other configs that add LiquidFuel to the wing parts is a case not caught here -- to prevent overwrite by these, adding :HAS[!RESOURCE[LiquidFuel]] should catch this, but I cannot guarantee untested behavior.


{
MODULE
{
name = ModuleCrossFeed
}
}

// ==================

@PART[wingConnector,wingConnector2]:NEEDS[!ModularFuelTanks&!RealFuels]:FOR[FuelWings]
{
RESOURCE
{
name = LiquidFuel
amount = 60
maxAmount = 60
isTweakable = True
}
}

@PART[deltaWing,sweptWing2]:NEEDS[!ModularFuelTanks&!RealFuels]:FOR[FuelWings]
{
RESOURCE
{
name = LiquidFuel
amount = 55.5
maxAmount = 55.5
isTweakable = True
}
}

@PART[structuralWing,structuralWing2,wingConnector3]:NEEDS[!ModularFuelTanks&!RealFuels]:FOR[FuelWings]
{
RESOURCE
{
name = LiquidFuel
amount = 27
maxAmount = 27
isTweakable = True
}
}

@PART[sweptWing1]:NEEDS[!ModularFuelTanks&!RealFuels]:FOR[FuelWings]
{
RESOURCE
{
name = LiquidFuel
amount = 22.5
maxAmount = 22.5
isTweakable = True
}
}

@PART[delta_small]:NEEDS[!ModularFuelTanks&!RealFuels]:FOR[FuelWings]
{
RESOURCE
{
name = LiquidFuel
amount = 15
maxAmount = 15
isTweakable = True
}
}

@PART[wingConnector4,wingConnector5]:NEEDS[!ModularFuelTanks&!RealFuels]:FOR[FuelWings]
{
RESOURCE
{
name = LiquidFuel
amount = 12
maxAmount = 12
isTweakable = True
}
}

@PART[structuralWing3,wingStrake]:NEEDS[!ModularFuelTanks&!RealFuels]:FOR[FuelWings]
{
RESOURCE
{
name = LiquidFuel
amount = 10.5
maxAmount = 10.5
isTweakable = True
}
}

@PART[structuralWing4]:NEEDS[!ModularFuelTanks&!RealFuels]:FOR[FuelWings]
{
RESOURCE
{
name = LiquidFuel
amount = 6
maxAmount = 6
isTweakable = True
}
}

// ================

@PART[wingConnector,wingConnector2]:NEEDS[ModularFuelTanks|RealFuels]
{
!RESOURCE[*],* {}
MODULE
{
name = ModuleFuelTanks
volume = 40
type = Fuselage
}
}

@PART[deltaWing,sweptWing2]:NEEDS[ModularFuelTanks|RealFuels]
{
!RESOURCE[*],* {}
MODULE
{
name = ModuleFuelTanks
volume = 37
type = Fuselage
}
}

@PART[structuralWing,structuralWing2,wingConnector3]:NEEDS[ModularFuelTanks|RealFuels]
{
!RESOURCE[*],* {}
MODULE
{
name = ModuleFuelTanks
volume = 18
type = Fuselage
}
}

@PART[sweptWing1]:NEEDS[ModularFuelTanks|RealFuels]
{
!RESOURCE[*],* {}
MODULE
{
name = ModuleFuelTanks
volume = 15
type = Fuselage
}
}

@PART[delta_small]:NEEDS[ModularFuelTanks|RealFuels]
{
!RESOURCE[*],* {}
MODULE
{
name = ModuleFuelTanks
volume = 10
type = Fuselage
}
}

@PART[wingConnector4,wingConnector5]:NEEDS[ModularFuelTanks|RealFuels]
{
!RESOURCE[*],* {}
MODULE
{
name = ModuleFuelTanks
volume = 8
type = Fuselage
}
}

@PART[structuralWing3,wingStrake]:NEEDS[ModularFuelTanks|RealFuels]
{
!RESOURCE[*],* {}
MODULE
{
name = ModuleFuelTanks
volume = 7
type = Fuselage
}
}

@PART[structuralWing4]:NEEDS[ModularFuelTanks|RealFuels]
{
!RESOURCE[*],* {}
MODULE
{
name = ModuleFuelTanks
volume = 4
type = Fuselage
}
}
@PART[delta_small,deltaWing,structuralWing*,sweptWing*,wingConnector*,wingStrake]:NEEDS[CrossFeedEnabler],*

It is left as an exercise to the user or maintainer to mirror this in the B9 wings, as I do not have non-Squad wings installed nor do I wish to pursue completeness in a mod that is not my own.

Link to comment
Share on other sites

Just had a brain storm.....

I think I figured out the P-wing fuel issue.

Procedural parts maybe the answer. Procedural parts automatically adjusts the volume amount of the tank for the part as the part changes size both length and diameter. So with that said, it maybe possible to add that module to the procedural wings parts in addition to the fuelwings plugin.

Unfortunately I do not have the skills or the time to check over this myself. But I think it would 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...