Jump to content

Open Resource System (ORS) - Mod Resource API - version 1.4.2


Fractal_UK

Recommended Posts

So, what am I doing? I think I missed the whole crp bit.

I've made an Interstellar folder for CRP. Those I don't know what common resources are what. Perhaps we should be placing our resourcedefs in those folders as well for mod specific resource so that they are all in a central location.

Things like Water need a place for maps and points.

Edited by WaveFunctionP
Link to comment
Share on other sites

I have a working conversion to Enriched Uranium, Water, ArgonGas, and DepletedUranium. Coverting to EC will take a bit more time, and I have a lot of other things to finish if I ever want to actually release.

That one honestly is more of a display one and not breaking interoperability.

I have all of the KSPI/NFT/etc. resource included here: https://github.com/BobPalmer/CommunityResourcePack/blob/master/GameData/CommunityResourcePack/CommonResources.cfg

The map for Aquifer/Water is already included with that pack. That should be the only ORS map we overlap on because NFT does not have, say, uranium mining. So I can include in the CRP any path you'd like for the KSPI maps. I'm dealing with the pain of moving all of the MKS stuff over this weekend (usual gig of people not deleting the old one), but at least it's a one time pain and it makes it easier for folks to share these down the road. That's absolutly not a required step for KSPI as long as I know where the maps are so I can include a copy :)

Link to comment
Share on other sites

Side note - I have all of my extensions outside of ORS (including a new on-rails resource extractor). So for now I just take the hard dependency on your version of ORS. And I'm 100% cool going with that, and may just need the occassional class or variable exposed. This will save you a lot of testing hassle ;)

Link to comment
Share on other sites

quick question: is there someway to get all the planetary resources currently loaded through the api? dont really want to hardcode all the resource names

Not really, the dictionary where they are stored is private. But you can also just search for all of the ORS planetary resources loaded into the gamedatabase, that's what SCANsat does.

Of course, if ORS has errors loading in these resources then you will have problems, but you would have problems anyway in that case.

There's no real reason for that dictionary to be private or internal though, you can just make it public in this pull request and it might get implemented.

Link to comment
Share on other sites

Not really, the dictionary where they are stored is private. But you can also just search for all of the ORS planetary resources loaded into the gamedatabase, that's what SCANsat does.

Of course, if ORS has errors loading in these resources then you will have problems, but you would have problems anyway in that case.

There's no real reason for that dictionary to be private or internal though, you can just make it public in this pull request and it might get implemented.

Unless this can cause problem, I don't see why this can't be done.

In other news, KSPI experimental is very very close to pre-release so this is definitely the time to be making those changes.

Link to comment
Share on other sites

The repo should contain the access fix.

I think.

ORS makes no sense to me. I'm fairly sure it is magic.

heh, I concur on a lot if it's bits ;)

FYI (And think I mentioned it before), I'll just keep taking a dependency on yours since at this point I can do all of my mods via extension of ORS. But if you ever decide to split these apart and want to focus on KSPI, the offer to handle the fork stands - otherwise, keep on keeping on :)

Link to comment
Share on other sites

Ok, so instead of just opening up body_resource_maps by making it public, I'm trying this.


static Dictionary<string, ORSPlanetaryResourceInfo> body_resource_maps = new Dictionary<string, ORSPlanetaryResourceInfo>();

.
.
.

public static Dictionary<string, ORSPlanetaryResourceInfo> getPlaneteryResourceMapData()
{

return body_resource_maps;

}

This opens up body_resource_maps along with all of it's keys and ORSPlanetaryResourceInfo's methods as well. And hopefully means that there can only ever be one list of osr resources....i think. I've been watching videos on access and inheritance, but to be honest, it turns my head to mush.

Let me know if I'm being a goof... really... cause I'm making wild guesses here about what is the proper way to do things or if you need it to work a different way.

I had to a change a couple of references to body_resource_maps in ORS, but the compiler didn't throw a fit.

kspi experimental will most likely be pre-released today unless you guys need me to hold for something. I plan for pre-release to last a week or so assuming no major problems.

Link to comment
Share on other sites

Ok, so instead of just opening up body_resource_maps by making it public, I'm trying this.


static Dictionary<string, ORSPlanetaryResourceInfo> body_resource_maps = new Dictionary<string, ORSPlanetaryResourceInfo>();

.
.
.

public static Dictionary<string, ORSPlanetaryResourceInfo> getPlaneteryResourceMapData()
{

return body_resource_maps;

}

This opens up body_resource_maps along with all of it's keys and ORSPlanetaryResourceInfo's methods as well. And hopefully means that there can only ever be one list of osr resources....i think. I've been watching videos on access and inheritance, but to be honest, it turns my head to mush.

Let me know if I'm being a goof... really... cause I'm making wild guesses here about what is the proper way to do things or if you need it to work a different way.

I had to a change a couple of references to body_resource_maps in ORS, but the compiler didn't throw a fit.

kspi experimental will most likely be pre-released today unless you guys need me to hold for something. I plan for pre-release to last a week or so assuming no major problems.

Sounds good - Were there any other resources you deprecated so I can take them off the CRP list?

Link to comment
Share on other sites

Sounds good - Were there any other resources you deprecated so I can take them off the CRP list?

Just what is in CRP right now. When I get to the next version and work on resources they'll probably be more changes, (with more mod compatibility stuff) but it'll be several weeks before I even been to consider starting work on kspi again beyond supporting the release.

Current CRP stuff is in my development branch.

Link to comment
Share on other sites

Ok, so instead of just opening up body_resource_maps by making it public, I'm trying this.


public static Dictionary<string, ORSPlanetaryResourceInfo> getPlaneteryResourceMapData()
{

return body_resource_maps;

}

This opens up body_resource_maps along with all of it's keys and ORSPlanetaryResourceInfo's methods as well. And hopefully means that there can only ever be one list of osr resources....i think. I've been watching videos on access and inheritance, but to be honest, it turns my head to mush.

Might be better to make it a property:


public static Dictionary<string, ORSPlanetaryResourceInfo> PlanetaryResourceMapData { get { return body_resource_maps; } }

I'm not sure why ORSPlanetaryResourceMapData inherits from MonoBehaviour. It doesn't hook into any of the MonoBehaviour events, nor override any of the messaging functions (Awake, Start, OnGUI, etc.) It's just a collection of static methods that are used by other modules.

Link to comment
Share on other sites

Might be better to make it a property:


public static Dictionary<string, ORSPlanetaryResourceInfo> PlanetaryResourceMapData { get { return body_resource_maps; } }

I'm not sure why ORSPlanetaryResourceMapData inherits from MonoBehaviour. It doesn't hook into any of the MonoBehaviour events, nor override any of the messaging functions (Awake, Start, OnGUI, etc.) It's just a collection of static methods that are used by other modules.

I followed this advice, latest dev version has the change.

I'll in the process of posting the pre-release which includes the change.

Link to comment
Share on other sites

Greetings,

Speaking to the mission of ORS, to help standardize resource types, I would ask about the following items, and if the is currently a standard.

1. Hydrogen (liquid, as a fuel)

2. CO2 (gaseous, as a resource)

3. Oxygen (liquid, as a fuel)

I am working on the following:

http://forum.kerbalspaceprogram.com/threads/92433-WIP-0-24-2-More-Fuel-Types-Adapts-to-new-mods-no-engine-configs-needed

, and would like to be in full compliance with any existing standards. I will gladly change my framework to ensure that this mod is fully integrated with ORS.

Thanks!

Link to comment
Share on other sites

Greetings,

Speaking to the mission of ORS, to help standardize resource types, I would ask about the following items, and if the is currently a standard.

1. Hydrogen (liquid, as a fuel)

2. CO2 (gaseous, as a resource)

3. Oxygen (liquid, as a fuel)

I am working on the following:

http://forum.kerbalspaceprogram.com/threads/92433-WIP-0-24-2-More-Fuel-Types-Adapts-to-new-mods-no-engine-configs-needed

, and would like to be in full compliance with any existing standards. I will gladly change my framework to ensure that this mod is fully integrated with ORS.

Thanks!

Hey,

ORS is about implementing your own resources. There is a second plugin that tries to keep all the used ORS resources compatible. Its called Community Resource Pack. You should post there.

Link to comment
Share on other sites

I think it has been mentioned here before that different ORS dll versions are not compatible, but the first post still has the old version. The new mod MapResourceOverlay uses that one and it breaks KSP Interstellar Lite which uses the latest one.

Link to comment
Share on other sites

I think it has been mentioned here before that different ORS dll versions are not compatible, but the first post still has the old version. The new mod MapResourceOverlay uses that one and it breaks KSP Interstellar Lite which uses the latest one.

Yup, unfortunately Fractal made the thread so we will at some point need to make a separate ORS thread (same as happened with KSPI). What I need to figure out is exactly why/how ORS is not working as intended in it's tolerance of multiple versions (I am pretty sure why, but want to do some tests first).

Link to comment
Share on other sites

Hi!

Really enjoying tinkering with this stuff :)

Few questions though:

1. Any way to change the display of resources. I've tried making the resource-point texture semi transparent, but they still appear as huge solid blobs.

b7c0465cd5.jpg

2. Any way to power requirements to ORSResourceScanner and an animation component to ORSModuleResourceExtraction , or will I need to develop a plugin?

3. How does resource conversion work, will I need to make a plugin for this too?

Really just trying to set up a very simple resource system for myself a.k.a. Kethane Ultra Lite

Thanks for any help! :)

Edited by Beale
Link to comment
Share on other sites

Hi!

Really enjoying tinkering with this stuff :)

Few questions though:

1. Any way to change the display of resources. I've tried making the resource-point texture semi transparent, but they still appear as huge solid blobs.

http://puu.sh/bidX6/b7c0465cd5.jpg

There's a mod for that: http://forum.kerbalspaceprogram.com/threads/92393-0-24-2-MapResourceOverlay-for-Science-and-ORS-Resources-VERSION-0-2-4%2802-09-14%29

Link to comment
Share on other sites

Hi!

Really enjoying tinkering with this stuff :)

Few questions though:

1. Any way to change the display of resources. I've tried making the resource-point texture semi transparent, but they still appear as huge solid blobs.

http://puu.sh/bidX6/b7c0465cd5.jpg

2. Any way to power requirements to ORSResourceScanner and an animation component to ORSModuleResourceExtraction , or will I need to develop a plugin?

3. How does resource conversion work, will I need to make a plugin for this too?

Really just trying to set up a very simple resource system for myself a.k.a. Kethane Ultra Lite

Thanks for any help! :)

For your other questions:

2. Plugins. I've done both for Karbonite - feel free to nose around the code, it's CC :)

3. See point 2 above. Solved problem.

For my own curiosity... given that everything I've seen thus far is pretty much the same as Karbonite minus the parts (it's just a single resource skin over ORS with the plugins you asked about above), why not Karbonite?

(to be clear - more mods is awesome - but I am always interested to see what kind of stuff I missed on - it's where I get ideas for improvements).

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