Jump to content

NOW MORE Free Steam Games for plugin design! I want to spawn parts!


Recommended Posts

Hey guys, 

I'm the mod tinkerer behind The gold standard.

What I need:

I am looking for someone to build a plugin module that will spawn parts (different sized gold nuggets) through the default right-click part menu, check if resources for selected sizes are available (goldore and electricity), if not green vanilla message reads not enough resources, if resources are available spawn part at specified location using specified resources. 

Ideally spawn location, resource amounts/types and item to be spawned would be configurable within the config for the part module 

What you get:

Like the title reads, I'm willing to outsource the plugin creation. Choose your steam games (we'll talk on costs), add me to steam and I'll send them your way.  I will of course credit the plugin creator throughout the mod documentation, it is your work I just want to play with it. :wink:

 

Let me know if you think this is within your capabilities!

I did attempt loading up both realchutes and extraplanetary launchpads source code to try to attempt this kind of functionality. 

It became apparent very quickly that I am new to plugin creation and not willing to put in the required time it would take to learn the process. 

The help of the community would be awesome, so please do let me know if you are going to attempt to build this plugin or if you have any insights into how to go about making the code for others to get a head start!

Fly safe!

Edited by Dewar
Link to post
Share on other sites
  • 1 month later...

Just a 'suggestment' (a saying from my phillo wife) 
You could check out what @RoverDude did for spawning 'resource lodes' in MKS. He did something very similar that I saw on a stream showing an asset spawning within a certain range and then the player had to work out how to mine it. He spent the whole stream wrangling this overweight bolder to be close enough to his base. I have a vague memory of him giving up after the last 5 or so metres and resorted to repeatedly head butting the mostly inflatable base with a Kerbal to get within logics range.

I could give it a shot, but I'd first need to check for permission with @RoverDude on if I could potentially leverage his already brilliant work. All gifts and prizes would have to go to him as all I'd end up doing is cobble bits of his code (if permission was granted of course) into the mod idea you've put forward. It would mean RD wouldn't have to spend time on a mod that wasn't his.

I've learnt by doing lots of stuff ups and finish with the knowledge of those stuff ups after having rewritten the code once I know it inside and out. My current tinkering project that is on the backburner is not something too close to what's been done before, so the learning process is a bit slower as there is no good chunks of code to learn from.

 

Github Code References:
MKS Resource Lode Rock (Similar to your nugget)
MKS Resource Scanner (To find lodes)
MKS Lode PartModule

Edited by wile1411
Link to post
Share on other sites

@Dewar - I've sent my request to Roverdude for permission to use his code as a starting point / initial nugget of information. (ugh... pun not intentional, but :blush:

I had a question regarding those nuggets you have in your screenshot. I did some quick calcs based on the GoldOre Resource definition from the mod and got these figures.

GoldOre
mass   units   Funds
-------------------------------------
500t   47.6k   2.381M
100t    9.5k     476k
20t     1.9k      95k
4t       381      19k

These numbers are based on resource centric values which kinda assumes that the given mass of GoldOre resource is in the object. You mentioned that you'd like to move to a non-resource way of collecting the gold and have the user 'recover' the nugget on Kerbin in order to access the funds they represent. If that's the case, then these nugget are effectively 'parts' that are lying around on a celestial body.

Did you have a plan on how much a person should earn for recovering each sized nugget? Would it only be based on the ore content or some other figure?

As parts have their own values and mass which dictates their recovery value, there is nothing really holding you to the fixed resource calculations you could say a 500t nugget is 5Mil in value. This doesn't conflict with the resource as the resource wouldn't exist and the justification of the value would be like any other part - an arbitrary number the mod maker set. This kind of frees you up as to what you wanted to value for effort to be.

Having said that....

Couple of ideas for the modification:

To have more flexibility, you could have three hidden resources in the spawned nugget. Those would be Gold, GoldOre & something else that added deadweight and all three would be disabled for transfer meaning they couldn't be mined in-situ as you've mentioned in the OP. As KSP 'parts' usually don't have dynamic weights / values, they would end up having the same values across multiple copies of the same nugget part. You could use the ratio of the three hidden resources to give that dynamic value/mass. It could be said that this ratio would represent the 'purity' of the nugget and would avoid the "sameiness" feeling of having to recover the same mass / value nugget every time. It would also promote exploration to find better value targets for transporting them back to Kerbin.

Another factor (no idea how to do this yet) would be to allow a player to split a nugget into smaller sizes. This would have some mass losses built into the process when splitting. (eg 500t into 4x100t / 100t into 4x20t / 20t into 4x4t. )

Alternatively, you could have the split nuggets split into the same mass values (500t into 5x100t) but it would result in less purity in the smaller nuggets. This also promotes bringing back the larger rocks for bigger returns. They still get good values, but a high return for effort would be rewarded for the bigger nuggets.

e.g.:
500t Nugget = 50% GoldOre, 40% Gold, 10% Junk  ~ 7.9M Funds
100t Nugget = 55% GoldOre, 35% Gold, 10% Junk  ~ 1.4M Funds
   20t Nugget = 65% GoldOre, 25% Gold, 10% Junk  ~ 229k Funds
     4t Nugget = 70% GoldOre, 20% Gold, 10% Junk  ~ 40k Funds
(All fund values calculated based on resource costs / mass. Junk = 0 funds, but mass of 0.01.)

The idea would be the have the percentages float in a range to give the nuggets some variability. Also means that the junk portion wouldn't always by 10%. could be more, could be less.

I figure you'd want the reward to be higher for bringing back the bigger rocks and the decision to split a nugget into a small size would mean a bit of a drop in value.

Anywho - just floating some ideas to see what you think.

Edited by wile1411
Link to post
Share on other sites
2 minutes ago, Burning Kan said:

@wile1411when i understand u right MKS spawns ressources objects over a planet?have u some example pics link (cant find any),thats sounds fantastic

also your attentions to make this cool mod even futher impressive,thx u both

unfortunately the old twitch streams are unavailable now, so it's all from memory. Only reference I could find is from a dev POV with the code references I already posted. I've not got any response from the @RoverDude Pm, but it's only been a day and I'm not in a hurry nor pushing for anything as this is all just suggestions so far.

Link to post
Share on other sites

@Dewar - I've slowly been reading through the GoldStandard thread and finally got to the point were you mentioned the idea that prompted this thread request.

Apologies if my above first suggestion was way off target. It now makes sense why you were looking at extra-planetary launch-pads for this. I'm mainly a tinkerer in getting things to work in plugins than a 'mod developer'.  I've managed to get some of my own code to run when clicking buttons in the right click menu and playing with configs. I mainly look at what other people have done in their mods and see if those parts could work for what I want to happen in a plugin. All of it has been personal use, so I've not 'released' a mod as yet.


As I understand it, you still want the mining aspect of the mod to remain as is, but would like to generate a nugget asset using the resources of GoldOre and Electric Charge.

Questions regarding Nugget generation (i.e. how simple should it be?)

 - Are the Nuggets created overtime (like EL) or is it an immediate part spawn provided there is enough GoldOre to generate the desired sized nugget?
 - If it's immediate spawn, does that mean you are not wanting to model the time required to convert GoldOre into the Nugget?

 - If it's built over time (like EL), does the nugget generation process need to be able to function in background? 
 - Related, did you want to have a similar productivity functionality that is part of EL to take into account Kerbal XP Levels, Stupidity, BadA$$-ness when creating a nugget?
 

Is there any desire to include the Gold resource into the part? I know it's not really necessary as Nugget could just have it's Funds value set in part definition. You might be asking why add Gold as a resource to the nugget part. One thought is already mentioned above, in that if there wasn't a resource, all 4t nuggets would have the same initial spawned part fund value.

Sideways suggestion to include the Gold Resource: (It would need to be a hidden resource so no transferring or mining could be done) Nugget part could include the module: 'ModuleAblator' with a setting 'ablativeResource = Gold'. You could then tweak the ablation settings so the Gold would ablate off quickly. Yes, it would act as a bad heat shield, but you'd lose a good chunk of its funds value due to ablation loses in returning back to Kerbin. This would promote keeping the nuggets safe on the return journey and not just throwing them into the atmosphere like asteroids.

 

The more a look at my guesses for what you are after, the more I'm finding my capabilities only able to have a go at making a simple module that just spawns the part. EC & GoldOre would be a requirement, but would be immediately subtracted as expenses to the process. Additional complexities like; time to generate the part or productivity start to involve background processing and other things which I'd need to strip and rebuild from someone elses code, but would be mostly over my head.

I'm thinking I could cobble together pieces of code from EL for the part that does the spawning of a nugget. I more pretty sure the rest of the plugin would be managed through the PAW (part action window) with various buttons appearing as conditions are met for resource requirements and what not.

Edited by wile1411
Link to post
Share on other sites

@wile1411  Hey there!

Sorry I'm in the middle of a coding boot-camp at the moment so I have been really slow to respond to anything other than sleep and food.

First thanks so much for looking into the code and spitballing ideas. I love when I can get some feedback, and even better, a coder for basic functionality.

I think I got through everything you mentioned about but do let me know if I missed something. 

To the replies!

On 5/8/2018 at 5:19 PM, wile1411 said:

Alternatively, you could have the split nuggets split into the same mass values

Splitting shouldn't be necessary, I'm thinking just a parts menu that would give you the option to spawn different sizes based off resource availability (ie gold and electricity).

 

On 5/10/2018 at 10:07 PM, wile1411 said:

 - Are the Nuggets created overtime (like EL) or is it an immediate part spawn provided there is enough GoldOre to generate the desired sized nugget?
  - If it's immediate spawn, does that mean you are not wanting to model the time required to convert GoldOre into the Nugget?

 

The mining speed and time to produce the gold resource needed for a spawn event is quite long (at least intended to be). 

Although a spawn over-time mechanic would be cool, I don't think it needs to be implemented in the first re-release.

I would just do immediate spawning for the time being, and if possible (using the api you mentioned) perhaps it could spawn "docked" to the gold spawning object to prevent kraken shenanigans and orbital issues.

On 5/10/2018 at 10:07 PM, wile1411 said:

Nugget part could include the module: 'ModuleAblator' with a setting 'ablativeResource = Gold'. You could then tweak the ablation settings so the Gold would ablate off quickly.

I love this idea, consider it added! 

On 5/10/2018 at 10:07 PM, wile1411 said:

I'm thinking I could cobble together pieces of code from EL for the part that does the spawning of a nugget. I more pretty sure the rest of the plugin would be managed through the PAW (part action window) with various buttons appearing as conditions are met for resource requirements and what not.

If you feel that this is something you are capable of awesome!! Visual studio and C scare me.

I'll see if I can get my current build pushed to github so that you can see the source files and objects.

Oh! you mentioned something about the gold nuggets being parts with values... to elaborate (after your thoughts on ablator): 

I think I would make the "gold ablator" worth half of the funds, the other half would need to be the gold nugget itself. Otherwise if you did get it back to Kerbin with all the ablator drained rage would surely ensue.

Just a thought!

Feel free to message me, or respond here. 

I'll try to respond as quickly as I can, but again, I currently have no life!

Ciao!

Link to post
Share on other sites
On 5/19/2018 at 7:12 AM, Dewar said:

@wile1411  Hey there!

Sorry I'm in the middle of a coding boot-camp at the moment so I have been really slow to respond to anything other than sleep and food.

First thanks so much for looking into the code and spitballing ideas. I love when I can get some feedback, and even better, a coder for basic functionality.

<snip>

Splitting shouldn't be necessary, I'm thinking just a parts menu that would give you the option to spawn different sizes based off resource availability (ie gold and electricity).

No prob. I hope I can be of some help, so we'll see how far I can take it before a proper coder needs to step in :)
The splitting idea was only something that came up when I misread the first post - no all good not using it.

On 5/19/2018 at 7:12 AM, Dewar said:

The mining speed and time to produce the gold resource needed for a spawn event is quite long (at least intended to be). 

Although a spawn over-time mechanic would be cool, I don't think it needs to be implemented in the first re-release.

I would just do immediate spawning for the time being, and if possible (using the api you mentioned) perhaps it could spawn "docked" to the gold spawning object to prevent kraken shenanigans and orbital issues.

Insta-spawn it is. That's something like the end result of a few mods that I can think of / can reference and try to make work within a stand alone mod.

On 5/19/2018 at 7:12 AM, Dewar said:

<snipped ModuleAblator idea>

I love this idea, consider it added! 

I'll note this on the PM later in the week, but I had some additional thoughts about the limitations and effects of ablator in it's normal use.. I think this might need it's own code rather than reuse the moduleablator. (I still need to test on a modded fueltank to see if I can evaporate the fuel at a rate that seems reasonable - if it works, bonus!)

 

On 5/19/2018 at 7:12 AM, Dewar said:

If you feel that this is something you are capable of awesome!! Visual studio and C scare me.

I'll see if I can get my current build pushed to github so that you can see the source files and objects.

Oh! you mentioned something about the gold nuggets being parts with values... to elaborate (after your thoughts on ablator): 

I think I would make the "gold ablator" worth half of the funds, the other half would need to be the gold nugget itself. Otherwise if you did get it back to Kerbin with all the ablator drained rage would surely ensue.

Just a thought!

Hmm. I would of thought having just 'gold' would promote people protecting it from reentry. Adding goldablator would mean an additional resource and that could also add extra mass to the nugget - and I've seem you already going up and down with the masses trying to find the sweet spot. Adding the extra resource goldablator might push it into the realm of overly complicated when you could simply reduce the ablation effect of the existing gold resource itself. (Just a suggestment though :) )

On 5/19/2018 at 7:12 AM, Dewar said:

 

Feel free to message me, or respond here. 

I'll try to respond as quickly as I can, but again, I currently have no life!

Hahah! - I'm not the speediest either these days - so don't rush to think you have to get back by a certain time. 

I'll move the coding chat to PM from here on :)

Link to post
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...