Jump to content

Rational Resources 2.0.7.1 [Jun 20, 2024]


JadeOfMaar

Recommended Posts

@Kerman Exploder About SandCastle and Ore: I have experience writing advanced EL recipes that make parts ask for various resources depending on what modules are in them, and SandCastle allows for that and much more. But keeping things simple I'd have to decide between making it require MaterialKits or Equipment (WBI's equivalent to MaterialKits, or rather, USI's Machinery).

The lack or absence of MetalOre/MetallicOre on ice planets is both intentional and already resolved. On one hand: Players are accustomed to shipping and planting the sections for their bases. Many of them love to build big and haul things around, so they must do as they've always done and do so to deliver shipments of refined Metals (assuming it's not too much trouble to travel to/from the nearest rocky world). On the other hand: Hydrates, the primary mined resource that RR focuses on for fuel production, yields MetallicOre and other useful resources when put through the Hydrates Splitter process. Hydrates (meaning water-bearing) is more than abundant on ice worlds so go crazy with that.

@UltraJohn Ok.... that's pretty far out there but not impossible for KSP. Well, the planetary logistics itself is not impossible (see: USI MKS, WOLF). Spawning connective pipes and roads between bases would be a hurdle but would be quite welcome by players who enjoy the idea of having an opportunity to drive fast and smooth between any two or more distant points on the surface of a planet.  An "underground" tunnel entrance network could be easily done using the power of the mini jump gate module from Kerbal Flying Saucers. Choose a destination (hopefully one that's on the same planet), drive in, and respawn at the destination. Having the tunnel entrance itself be a node for the planetary warehouse is pretty interesting in itself. I like it. But........I was hoping you'd throw me an idea that I could imagine making a part for without having to ask someone to write a dll to give it its functions. :D 

Link to comment
Share on other sites

@JadeOfMaar Yeah I do know about the USI stuff, but if I remember correctly it's mainly just connecting stuff within some determined range? My idea is more focused on the roleplay aspect of it, having to actually build a physical connection between bases, although probably not so feasible in KSP to its full potential. Well it is possible to use Kerbal Konstructs to place statics on planets, so perhaps it would be possible to incorporate that code logic somehow into the part placements. But yeah that's a pretty big project. Also that mini jump gate thing sounds kinda cool, I'll have to check out that mod for fun :)

I don't really think I have any other ideas that wouldn't require a dll to function unfortunately.

Link to comment
Share on other sites

On 8/3/2023 at 9:20 AM, JadeOfMaar said:

@Kerman Exploder About SandCastle and Ore: I have experience writing advanced EL recipes that make parts ask for various resources depending on what modules are in them, and SandCastle allows for that and much more. But keeping things simple I'd have to decide between making it require MaterialKits or Equipment (WBI's equivalent to MaterialKits, or rather, USI's Machinery).

The lack or absence of MetalOre/MetallicOre on ice planets is both intentional and already resolved. On one hand: Players are accustomed to shipping and planting the sections for their bases. Many of them love to build big and haul things around, so they must do as they've always done and do so to deliver shipments of refined Metals (assuming it's not too much trouble to travel to/from the nearest rocky world). On the other hand: Hydrates, the primary mined resource that RR focuses on for fuel production, yields MetallicOre and other useful resources when put through the Hydrates Splitter process. Hydrates (meaning water-bearing) is more than abundant on ice worlds so go crazy with that.

@UltraJohn Ok.... that's pretty far out there but not impossible for KSP. Well, the planetary logistics itself is not impossible (see: USI MKS, WOLF). Spawning connective pipes and roads between bases would be a hurdle but would be quite welcome by players who enjoy the idea of having an opportunity to drive fast and smooth between any two or more distant points on the surface of a planet.  An "underground" tunnel entrance network could be easily done using the power of the mini jump gate module from Kerbal Flying Saucers. Choose a destination (hopefully one that's on the same planet), drive in, and respawn at the destination. Having the tunnel entrance itself be a node for the planetary warehouse is pretty interesting in itself. I like it. But........I was hoping you'd throw me an idea that I could imagine making a part for without having to ask someone to write a dll to give it its functions. :D 

Sounds like a great idea. Equipment probably make more sense than MaterialKit since SandCastle is a WBI mod and should minimize the chance of any unexpected incompatibility. I'll play around with that idea. https://github.com/0xE1E10/RationalResources/tree/sandcastle I just want to make my spacecrafts are reasonably compatible with what you have in mind for future RR before I launch them on year long journeys. I'll do some field testing to shake out the bugs before sending a PR.

Yeah the lack of MetallicOre on ice makes sense. I like the Equipment idea. Hauling it to the planet makes more sense than magical Ore. :-)

For logistics, I like the conveyor belts idea. But it's probably too much part count for the KSP 1 engine. I'm currently at 20 fps even without large bases. There's an automatic supply line in WBI. https://github.com/Angel-125/WildBlueCore/blob/main/ReleaseFolder/GameData/WildBlueIndustries/00WildBlueCore/Parts/FuelTank/autoSupplier/autoSupplier.cfg https://github.com/Angel-125/WildBlueCore/blob/main/source/WildBlueCore/PartModules/Resources/ModuleSupplyLine.cs It seems to just periodically top up your tank out of thin air based on how long your supply trip took. It doesn't actually remove the resource from the source tank so the producers can be easily double booked and it no longer consume EC or produce heat since the producer is now permanently full. That really break immersion for me.

I think BonVoyage makes a lot more sense. https://github.com/jarosm/KSP-BonVoyage/wiki/ It just respawns your ship at the destination later based on EC cost, dark time, and physical distance. Resources are actually removed from the producer. You can make a supply route by planting flags at the 2 endpoints to be dedicated parking for your truck. You could use the WBI fuel pump if you don't want to hook up the tank to your truck manually. But it could still get tedious if there's a lot of supply routes. This would be my ideal supply line if I can fully automated the resource pick up/drop off and make it happen periodically on its own.

I don't like the long production chains in MKS but their supply line is much better thought out. https://github.com/UmbraSpaceIndustries/MKS/wiki/Functions-(Logistics) Basically you park a rover between 2 tanks and resources now flow between them just like the WBI fuel pump but over longer distances.

The pipeline mass driver in Pathfinder does remove source resource if I'm understanding it correctly. https://github.com/Angel-125/Pathfinder/blob/master/GameData/WildBlueIndustries/Pathfinder/Parts/BoxedParts/Pipeline2.cfg https://github.com/Angel-125/Pathfinder/blob/master/Pathfinder/ResourceDistribution/WBIPipeEndpoint.cs I might try that later.

Link to comment
Share on other sites

1 hour ago, Kerman Exploder said:

Sounds like a great idea. Equipment probably make more sense than MaterialKit since SandCastle is a WBI mod and should minimize the chance of any unexpected incompatibility. I'll play around with that idea. https://github.com/0xE1E10/RationalResources/tree/sandcastle I just want to make my spacecrafts are reasonably compatible with what you have in mind for future RR before I launch them on year long journeys. I'll do some field testing to shake out the bugs before sending a PR.

Yeah the lack of MetallicOre on ice makes sense. I like the Equipment idea. Hauling it to the planet makes more sense than magical Ore. :-)

For logistics, I like the conveyor belts idea. But it's probably too much part count for the KSP 1 engine. I'm currently at 20 fps even without large bases. There's an automatic supply line in WBI. https://github.com/Angel-125/WildBlueCore/blob/main/ReleaseFolder/GameData/WildBlueIndustries/00WildBlueCore/Parts/FuelTank/autoSupplier/autoSupplier.cfg https://github.com/Angel-125/WildBlueCore/blob/main/source/WildBlueCore/PartModules/Resources/ModuleSupplyLine.cs It seems to just periodically top up your tank out of thin air based on how long your supply trip took. It doesn't actually remove the resource from the source tank so the producers can be easily double booked and it no longer consume EC or produce heat since the producer is now permanently full. That really break immersion for me.

I think BonVoyage makes a lot more sense. https://github.com/jarosm/KSP-BonVoyage/wiki/ It just respawns your ship at the destination later based on EC cost, dark time, and physical distance. Resources are actually removed from the producer. You can make a supply route by planting flags at the 2 endpoints to be dedicated parking for your truck. You could use the WBI fuel pump if you don't want to hook up the tank to your truck manually. But it could still get tedious if there's a lot of supply routes. This would be my ideal supply line if I can fully automated the resource pick up/drop off and make it happen periodically on its own.

I don't like the long production chains in MKS but their supply line is much better thought out. https://github.com/UmbraSpaceIndustries/MKS/wiki/Functions-(Logistics) Basically you park a rover between 2 tanks and resources now flow between them just like the WBI fuel pump but over longer distances.

The pipeline mass driver in Pathfinder does remove source resource if I'm understanding it correctly. https://github.com/Angel-125/Pathfinder/blob/master/GameData/WildBlueIndustries/Pathfinder/Parts/BoxedParts/Pipeline2.cfg https://github.com/Angel-125/Pathfinder/blob/master/Pathfinder/ResourceDistribution/WBIPipeEndpoint.cs I might try that later.

Are you aware of the simple logistic mod. It may offer features you are looking for.

Link to comment
Share on other sites

On 8/4/2023 at 10:16 PM, Svm420 said:

Are you aware of the simple logistic mod. It may offer features you are looking for.

Looks great. I'll try it.

But WBI's fuel pump can also do something similar one tank at a time. This looks more polished though. Looks like it's physics range only if I'm understanding correctly. Might still need the WBI pipeline mass driver to get the equivalent of MKS planetary logistics.

On second thought, I'm beginning to see the wisdom of the simple Automatic Supply Line in WBI. It doesn't look too hard to extend SImple Logistics to support planet-wide transfers. Problem is if we take resource from vessel outside physics range, does the unloaded vessel still re-generate the resource in the background? So what Angel-125 is doing isn't really that different from how KSP 1 handles resources in background vessels.

One thing I can do is to add notes to my vessels about where resources are coming from and going to and deduct the right amount in my head.

If we really want to do this right automatically, we need the per second rate of all resources on all vessels on the planet. Probably send excess resource to a planet-wide pool when the generator vessel is loaded. But record the per second rate instead of the amount. Then on the receive side, we could refill by taking the per second rate from the planet-wide total. It actually adds surprisingly little compared to just using Automatic Supply Line with good self-discipline.

Link to comment
Share on other sites

This is probably a similar issue like you've explained with SMX about stock parts and modded parts, but it would be a nice QoL feature if there was a better consistency between the names of fuel switches.

For example, the stock parts having the fuel name as "LiquidFuel" but the parts from Mk2 Expansion being "LF" instead. I've noticed this happening with many different types of fuel. Not a big deal, but it does lead to some minor confusion once in a while when I'm trying to find what I'm looking for!

118Cb8A.png

Link to comment
Share on other sites

@UltraJohn That's a truly interesting one for me to face. I'd have to change my tank options' titles to follow CryoTanks' convention. They would go:
From LqdAmmonia, LqdCO2, LqdCO, LqdCO + Oxidizer, LqdNitrogen, LqdOxygen, Water
To   LNH4, LCO2, LCO, LCO/Ox, LN2, LO2, H2O.

...They could all get descriptions so on mouseover tooltip the full names return and are still easy on the eyes for the not-Chemistry-nerds amongus. :P

Link to comment
Share on other sites

8 hours ago, JadeOfMaar said:

@UltraJohn That's a truly interesting one for me to face. I'd have to change my tank options' titles to follow CryoTanks' convention. They would go:
From LqdAmmonia, LqdCO2, LqdCO, LqdCO + Oxidizer, LqdNitrogen, LqdOxygen, Water
To   LNH4, LCO2, LCO, LCO/Ox, LN2, LO2, H2O.

...They could all get descriptions so on mouseover tooltip the full names return and are still easy on the eyes for the not-Chemistry-nerds amongus. :P

Ah so it's CryoTanks that have the abbreviations then? I'd much prefer to have the long names like the way yours are currently.

Looking at the configs for CryoTanks, it's using localization to set their display names. It should be fairly simple to just add a patch that modifies this, like what Community Part Titles does and get their full names instead. It's mainly just line 18 to line 24 that needs to be patched, I think.

Edited by UltraJohn
Link to comment
Share on other sites

2 hours ago, UltraJohn said:

so it's CryoTanks

Yep.

2 hours ago, UltraJohn said:

It should be fairly simple to just add a patch that modifies this

But MM doesn't allow editing LOC definitions (MM runs after they're parsed per the game language setting) so I'd have to patch every fuel switcher's existing tank options to change their titles to new LOC keys.

Blowfish, owner of B9PS said so:

On the subject of LOC... there's probably a crap ton I may need to do that I've ignored.

Link to comment
Share on other sites

Extremely small, non-critical issue which I've also filed on the GitHub page:

When using RationalResourcesSquad together with CRP, Restock, and Restock+ the Twin-Boar and Pug engines gain the option to run on hydrolox, methalox, and carbon monoxide/lox in addition to the stock kerolox variant. However, with Waterfall and Waterfall Restock installed these variants all still use Waterfall's default kerolox engine plume textures. This is understandable for the carbon monoxide/lox variant since Waterfall doesn't come with a plume texture for that, but it does come with plume textures for hydrolox and kerolox engines.

Link to comment
Share on other sites

2 hours ago, JadeOfMaar said:

But MM doesn't allow editing LOC definitions (MM runs after they're parsed per the game language setting) so I'd have to patch every fuel switcher's existing tank options to change their titles to new LOC keys.

I'm wondering then, how is it that Community Part Titles can edit the localization of all the stock parts? It seems like they just add a new localization config and it overwrites the stock ones. Another example is Mk2Expansion patch where they also add a new localization config, but also patch some existing parts that were not using it to point to the new one.

But maybe I'm just understanding it incorrectly. In any case, I suppose I could just manually edit the CryoTanks loc file to the names I want, but that's not exactly a good long term solution. Not that CryoTanks receives updates often anyway, so it probably wouldn't matter.

Link to comment
Share on other sites

12 hours ago, EdisonMaxwell said:

Will the RRSquad sub mod conflict with Interstellar fuel switch and B9 parts switch?

I dealt with this issue for release 1.45 (RR Squad will do nothing.)

12 hours ago, EdisonMaxwell said:

Does the RRAluminum sub mod generate the same aluminum that Interstellar uses?

Yes. That modlet was created for this exact reason.

Link to comment
Share on other sites

A followup for the discussion about the naming convention of the fuel types. Turns out it IS possible to "patch" the localization files, with a small caveat. In order to do so you must have your modified LOC load before the original and it will take priority. For example I've set the cfg file path to 'GameData/000a/Localization.cfg' to make it load before CryoTanks. See example picture:

810KQZk.png

Which is done with a simple cfg file like this:

Localization
{
	en-us
	{
		#LOC_CryoTanks_switcher_fuel_lh2 = LiquidHydrogen
		#LOC_CryoTanks_switcher_fuel_lh2ox = Hydrolox
		#LOC_CryoTanks_switcher_fuel_ox = Oxidizer
		#LOC_CryoTanks_switcher_fuel_lf = LiquidFuel
		#LOC_CryoTanks_switcher_fuel_lfox = LiquidFuel + Oxidizer
		#LOC_CryoTanks_switcher_fuel_methane = LiquidMethane
		#LOC_CryoTanks_switcher_fuel_methalox = Methalox
	}
}

This means that we can better unify the naming convention across RR and CryoTanks.

I have a few variations in mind for the naming of all the tanks:

1. Abbreviations vs full name, for example: LqdFuel vs LiquidFuel

2. Spacing, for example: LiquidFuel vs Liquid Fuel

3. Combinations, for example: Liquid Hydrogen + Oxidizer vs Hydrolox

 

I think it would make sense to stick to one specific naming convention, as currently it's all over the place. Like currently we have "LF + Ox" on some parts and "LF/Ox" on others (abbreviations, with '+', '/' and spacing on one but not the other), then "LiquidFuel" (Full name), but then also "LqdHydrogen" (again abbreviation).

Personally I would like to see them displayed as in my example cfg, with maybe the exception of Hydrolox/Methalox. If we were to keep it unified it would have to display as LiquidHydrogen + Oxidizer to keep it similar to something like LiquidFuel + Oxidizer, which does not have a bespoke name. Although I think using "Lqd" instead of "Liquid" would be great too!

I'd like to hear your thoughts on this :)

Edited by UltraJohn
Link to comment
Share on other sites

On 8/18/2023 at 11:38 AM, UltraJohn said:

A followup for the discussion about the naming convention of the fuel types. Turns out it IS possible to "patch" the localization files, with a small caveat. In order to do so you must have your modified LOC load before the original and it will take priority. For example I've set the cfg file path to 'GameData/000a/Localization.cfg' to make it load before CryoTanks.

Ohhhh. That's pretty nice. I think I'll avoid using this, personally, and prefer patching and all what effort is required to do so. As a modmaker (and having caused cases of "retaliatory modding" and then having to do the same) this kinda feels like malware kinds of hijacking: creating another mod's specific keys before that mod does so it can't apply its defaults in the first place. On the other hand, having this be a modlet on its own, not necessarily within the suite of RR, is something I won't argue against since mods like Community Part Titles and Community Real Agencies Pack exist (though they likely don't use this method).

On 8/18/2023 at 11:38 AM, UltraJohn said:

I think it would make sense to stick to one specific naming convention, as currently it's all over the place. Like currently we have "LF + Ox" on some parts and "LF/Ox" on others (abbreviations, with '+', '/' and spacing on one but not the other), then "LiquidFuel" (Full name), but then also "LqdHydrogen" (again abbreviation).

If you want me to align my tank titles a certain way to fit the convention you want, I don't mind doing it. RR is largely lacking localization and I'd like to fix that at some point. Once that's done you can piggyback on it with your LOC alignment plans.

Link to comment
Share on other sites

2 minutes ago, JadeOfMaar said:

I won't argue against since mods like Community Part Titles and Community Real Agencies Pack exist (though they likely don't use this method).

Actually this is how Community Part Titles patches all of the stock parts and mods with LOC files already. I got the idea from this file here. For other parts that don't have LOC already, they either patch the name directly to a different name, or add their own reference to a LOC file.

Another way of patching the names without overwriting the existing LOC data, would be to patch the subtypes of the tanks and then edit the @title parameter to point to your own LOC file. I think this might be more trouble than it's worth though, considering the first option. And yeah having it as an optional download would (probably) be fine in terms of compatibility between the two mods.

11 minutes ago, JadeOfMaar said:

If you want me to align my tank titles a certain way to fit the convention you want, I don't mind doing it. RR is largely lacking localization and I'd like to fix that at some point. Once that's done you can piggyback on it with your LOC alignment plans.

Right, well I think yours are already good as it is, so I'm not sure how much actually needs to change here, if anything. It's mainly the issue of CryoTanks abbreviating a lot of their titles. Let's take a look at the stock tank vs CryoTanks tank

Spoiler

92mLn3L.png

On the left it already looks pretty good, apart from the top one being abbreviated to "LF + Ox" rather than being "LiquidFuel + Oxidizer." I don't think this is from RR or CryoTanks, as I can't locate the cfg where this subtype is defined.

On the right is where the CryoTanks definitions are. The top 5 needs to be changed to the same as the left side. That can be fixed by using this LOC file:

Spoiler
Localization
{
	en-us
	{
		#LOC_CryoTanks_switcher_fuel_lh2 = LqdHydrogen
		#LOC_CryoTanks_switcher_fuel_lh2ox = Hydrolox
		#LOC_CryoTanks_switcher_fuel_ox = Oxidizer
		#LOC_CryoTanks_switcher_fuel_lf = LiquidFuel
		#LOC_CryoTanks_switcher_fuel_lfox = LiquidFuel + Oxidizer
		#LOC_CryoTanks_switcher_fuel_methane = LqdMethane
		#LOC_CryoTanks_switcher_fuel_methalox = Methalox
	}
}

So basically the naming convention I'd follow is this:

1. Using the shorthand for Liquid fuels aka "LqdMethane", "LqdHydrogen", etc,  with the exception of the stock "LiquidFuel" which keeps its long name, since this isn't a real world fuel anyway.

2. two or more fuels are kept separate using " + " (space plus space) e.g. "LqdCO + Oxidixer."

3. Either keep "Hydrolox" and "Methalox" as it is, or separate them into "LqdHydrogen + Oxidizer" and "LqdMethane + Oxidizer". As the game still considers these two fuels as separate entities in a tank I think the second option would be better? It makes sense because the VAB part list shows engine fuels as separate.

3y3J9m1.png

Also, I've yet to figure out how to modify the Propellants display to also use the Full name rather than like "LH2." Perhaps you know?

Link to comment
Share on other sites

49 minutes ago, UltraJohn said:

Actually this is how Community Part Titles patches all of the stock parts and mods with LOC files already. I got the idea from this file here. For other parts that don't have LOC already, they either patch the name directly to a different name, or add their own reference to a LOC file.

Ohhh. The more you know.

44 minutes ago, UltraJohn said:

On the left it already looks pretty good, apart from the top one being abbreviated to "LF + Ox" rather than being "LiquidFuel + Oxidizer." I don't think this is from RR or CryoTanks, as I can't locate the cfg where this subtype is defined.

Check B9PS' default tank type configs.

47 minutes ago, UltraJohn said:

3. Either keep "Hydrolox" and "Methalox" as it is, or separate them into "LqdHydrogen + Oxidizer" and "LqdMethane + Oxidizer". As the game still considers these two fuels as separate entities in a tank I think the second option would be better? It makes sense because the VAB part list shows engine fuels as separate.

Tough call. :o

47 minutes ago, UltraJohn said:

Also, I've yet to figure out how to modify the Propellants display to also use the Full name rather than like "LH2." Perhaps you know?

This is controlled by the abbreviation key within the RESOURCE_DEFINITION{}.

Link to comment
Share on other sites

26 minutes ago, JadeOfMaar said:

Check B9PS' default tank type configs.

Yeah I don't see it in there in any of the files. Maybe I'm blind?

Spoiler
B9_TANK_TYPE
{
	name = LFO
	title = #LOC_B9PartSwitch_tank_type_lfo // LFO
	tankMass = 0.000125
	tankCost = 0.25

	RESOURCE
	{
		name = LiquidFuel
		unitsPerVolume = 0.45
	}
	RESOURCE
	{
		name = Oxidizer
		unitsPerVolume = 0.55
	}
}

and

#LOC_B9PartSwitch_tank_type_lfo = LFO

 

 

26 minutes ago, JadeOfMaar said:

This is controlled by the abbreviation key within the RESOURCE_DEFINITION{}.

Ahhh, CommunityResourcePack then! So these are LOC controlled as well.

#LOC_CRP_LqdHydrogen_DisplayName = Liquid Hydrogen
#LOC_CRP_LqdHydrogen_Abbreviation = LH2

I'm tempted to edit these as well to just use the full display name, unless the abbreviation keyword is also used in other GUI displays where it might pose an issue having a longer name. In which case I think it could be a possible solution to just modify the VAB part menu instead with a Harmony patch.. Thinking out loud here.. :D 

Edit: Also used for the Propellant gauge in flight. Maybe others. On further contemplation I think I'll keep the abbreviation keywords as is for now.

Edited by UltraJohn
Link to comment
Share on other sites

How do i store carbon? I can't seem to find a way...

I'm using realfuels, and i just want to make kerosene to refuel my SSTO

Edit: nevermind, i just forgot to install something.

Edit 2: wait i just realized it's incompatible with realfuels according to CKAN, but realfuels doesn't add options to the ore tanks

Edited by isdi0
problem not resolved
Link to comment
Share on other sites

4 hours ago, JadeOfMaar said:

@EdisonMaxwell Within the KSPI ecosystem there's another water-like resource called Liquid Water. Why this exists is beyond me.

That's the water resource I'm talking about. Its the only water like resource that shows up and only on the spherical tanks. I have not seen this mod's version of water in any tank. I also want to point out that this mod's versions of the NERVA engine don't show up in the regular parts list.

Edited by EdisonMaxwell
Clarity
Link to comment
Share on other sites

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