Jump to content

The resource meag research thread!


Recommended Posts

Watching the development of TAC, ECLSS and my own Universal Storage mod, I think it might help to have a discussion on resource units, densities and naming.

Ideally you could have the same resource with multiple names, Aliases. Then every modder could use his own prefered name and still be compatible. In fact I've started a thread in the suggestion section for that.

http://forum.kerbalspaceprogram.com/threads/74406-Aliases-for-resources-%28for-the-modders%29-also-units

In the meantime...

For New Horizons mods we've been using liters as the basic unit of measurement. It makes perfect sense for liquids and gasses and even though a liter of solid food doesn't seem to make sense it's 1000cm3 (or .001m3) which does.

From there I use wikipedia to find the densities of each resource (kg per liter) and for things like Oxygen and Hydrogen I took the density of the gas and the liquid. Liquids are essentially incompressible so the diffrence between the gas and the solid gives you a good idea of how much resource you can fit into a space of a given size.

I'll use Oxygen as an example.

Gas O2 (at STP) has a density of 0.001429 kg per liter.

Liquid O2 has a density of 1.141 kg per liter.

So if you compress your O2 gas to a liquid you can fit roughly 798 as much in the same space.

http://en.wikipedia.org/wiki/Oxygen

All of the above gives me the following resource.

RESOURCE_DEFINITION

{

name = Oxygen

// units = Liters

// state = gas

density = 0.0000014290

flowMode = ALL_VESSEL

transfer = PUMP

isTweakable = true

}

And when creating a part with a tank size of 14 liters I could fit 14*798 liters of oxygen in it.

RESOURCE

{

name = Oxygen

amount = 11172

maxAmount = 11175

}

So what is the point of this thread anyway?

For modders to come together, research and agree of a standard set of resources we can all use to increase the compatibility on our mods.

Link to comment
Share on other sites

For real world mods, yes, use use these values. For more casual mods, I don't see these values catching on. I know what your doing, your making the densities equal their real world values. This is overkill for a game, and most mods.

I would approximate some of the numbers some to make them easier to work with. Using 12 digit decimals is, messy... Also rounding to the nearest 2 digits would make it much more appealing. The kind of accuracy your doing is not necessary and probably prone to some rounding errors.

Also oxidizer is already a resource and I don't want to mess with stock values even if they are off from the real world.

Link to comment
Share on other sites

12 digit decimals would messy if they are exposed to the player, but they aren't. The goal is to add layers for people who want to expose them, but not add any complexity for someone who just wants to play the game. As a player I never see that 12 place value, in fact I'm not even going to know it's there, so no added complexity, but if you want that accuracy as an advanced player it is there.

And of course, if we as modders are going to pick a standard set of units, it might as well be real world values as the least arbitrary choice.

Link to comment
Share on other sites

One thing I'd suggest is looking at what other mods already have - i.e. when doing my mod, I looked at BioMass, TAC, EL, etc. with an eye to making sure I played nice, and found some really good consistency with the exception of TAC (which I believe will be addressed in a later release due to the changes in calculation of time).

Side note - there is also this thread specifically on unified resource guidelines: http://forum.kerbalspaceprogram.com/threads/61296-Unified-Resource-Guidelines-and-Catalog-for-Modders

Link to comment
Share on other sites

Side note - there is also this thread specifically on unified resource guidelines: http://forum.kerbalspaceprogram.com/threads/61296-Unified-Resource-Guidelines-and-Catalog-for-Modders

That thread is exactly what I was trying to achieve with this. I did try searching on the subject but couldn't find anything.

Ultimately I doubt Squad will publish a master list of resources so it's up to us as modders, and the big resource mods in particular to agree to a set of rules we can all use. I'd be more than happy to create a resources.cgf file for common use, but it needs the backing of the main modders to use it or it's useless.

Edited by Paul Kingtiger
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...