Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.95.1a is out! (12/10/21); Blog post: Uniquifying the Factions, Part 2 (04/30/22)

Pages: [1] 2 3 4

Author Topic: [0.95.1a] Ore Refinery v0.65 - 03/10/22  (Read 29102 times)

Dazs

  • Captain
  • ****
  • Posts: 391
    • View Profile
[0.95.1a] Ore Refinery v0.65 - 03/10/22
« on: October 29, 2021, 09:45:02 PM »

Ore Refinery

DOWNLOAD
https://drive.google.com/file/d/1AvYmv5-WHw0no0xiNhsCeLRzjCmSvJ02/view?usp=sharing
Nexerelin and it's dependencies required


Adds 4 new toggle abilities (Ore Refinery Rare Ore Refinery   Bio Refinery and Volatiles Refinery) that refine mined resources using heavy machinery and forges them into custom manufactured commodities.


For example: To activate the Ore Refinery, manually assign the ability by right-clicking the ability toolbar on an empty space and select the icon from the drop down menu that appears.
Once activated, it refines 185 ore and 1 heavy machinery in you inventory per day and in return gives 1 custom commodity (Platinum) until the inventory is out of source materials. That shrinks 186 inventory space down to 1 space used at base level. The ability is increased by 10% for every salvage gantry in your fleet and also gets a 10% bump if you have a corrupted nanoforge or 20% for pristine in you inventory (multiple nanoforges do not stack).

The conversion image below is for the Ore Refinery ability in the above example. The math charts are for all three new abilities.


I enjoy the mining function added by NEX but always hated having to toss away low value commodities in my inventory to make room. What this does is "refine" the mined commodity in your inventory and produces these custom resources:
Platinum (base value of 2000) Palladium (base value to 4800)  Biophotovoltaics (base value of 3000) and CompV (base value of 6250)

The first three are equal to the base values of the mined commodity and heavy machinery used to make them as seen in the math charts above. Volatiles Refinery is the exception due to fractional integers I made the output round up instead of down so you should always see a net profit.

I envision this mod as a space saver and the conversion ratio stays the same with the bonuses applied from gantries and nanoforges, only the amount used and made is increased not the overall value. I have balanced the output to be as near to the input in value and all new custom commodities are effected by market demand valuation using their base commodity demand.

I am always open to suggestions and respond as I see them.

If you enjoy my content, please consider buying me a coffee to keep me going! :) on Ko-Fi!

Credits
Spoiler
A special thank you to Timid, the modder formerly known as Techpriest :), for allowing me to modify code from Supply Forge
Testers: IonDragonX, 6chad.noirlee9, mkire, slowpersun, Uhlang, Jaghaimo, cardgame and 5ColouredWalker- Thank you all for your input and patience as I learn to code Java
Alex for his hard work making this game and keeping it up to date all these years

Icons used are royalty free from Vectorstock.com
[close]
Current Changelog
v0.65
   -Added version checker support
   -Replaced the cargo icons for Palladium and Compressed Volatile - TY Yunru for the donation
   -Replaced the cargo icons for Biophotovoltaics and Platinum - Bashed newer hi-rez versions

Past Changelog
Spoiler
v0.6
   -Added compatibility with the latest version of Starsector
   
v0.55
   -Added a new toggle ability that condenses Volatiles into a new custom commodity, Compressed Volatiles Canister or CompV for short
   -Added new altered versions of royalty free icons for above from Vectorstock.com
   -Tidied up all the tool tips and floating text to now show all commodities in proper lower case
   
v0.5
   -Changed some calculations in the files so that the custom commodities show up correctly on the market tool tip -TY Jaghaimo for pointing me in the correct direction!

v0.4
   -As requested, I finally figured out how to have more than one toggle ability per mod - cheer! -mkire ask and ye shall receive! :)
   -Created two new commodities Palladium and Biophotovoltaics
   -Added new royalty free icons for above from Vectorstock.com
   -Scripted a new toggle ability for Rare Ore that converts it into Palladium
   -Scripted a new toggle ability for Organics that converts them into Biophotovoltaics
   -Changed the commodity valuation of Platinum to be more in line with ore -Ty slowpersun for pointing that out

v0.3
   -Cleaned up the code, deleting several references and graphics for compressing other commodities.
   -I tired oh I tried to get more than one toggle ability in the same mod but this is my release version and I am happy with it. :)

v0.2
   -Added an all new conversion chart to the forum
   -Adjusted the ratios in the formula to increase the compression for a base savings of 186 to 1    
   -Increased the price of Platinum to 2000 and set it's demand closer to the combination of ore and heavy machinery

v0.1
   -Ready for test release
   -Separated the ability from the mod Junk Yard Dogs to form it's own utility mod.   
   -Ore forged to Platinum a success!
   -Rare Ore turned to Palladium a failure :( Keeping the resource and it's icon in the mod for future use.
   -Added Platinum as a resource
   -Added Palladium as a resource
   -Added royalty free icons for above from Vectorstock.com
   -Obtained permission from Techpriest to modify code from Supply Forge
[close]

IonDragonX

  • Admiral
  • *****
  • Posts: 780
    • View Profile
Re: Utility MOD "Ore Refinery" test release v0.1
« Reply #1 on: October 30, 2021, 01:36:46 PM »

Hey! Thanks for this.  ;D
I'm actually glad that you separated this from your faction, allowing other players to pick/choose how they want.
Just to clarify, the 10% and 20% bonus to the ability is just temporal, the 101->6 conversion rate doesn't change, right?
« Last Edit: October 30, 2021, 01:56:04 PM by IonDragonX »
Logged

Dazs

  • Captain
  • ****
  • Posts: 391
    • View Profile
Re: Utility MOD "Ore Refinery" test release v0.1
« Reply #2 on: October 30, 2021, 04:07:10 PM »

Hey! Thanks for this.  ;D
I'm actually glad that you separated this from your faction, allowing other players to pick/choose how they want.
Just to clarify, the 10% and 20% bonus to the ability is just temporal, the 101->6 conversion rate doesn't change, right?
Thank you that is nice to hear. I felt no one plays in a vacuum and with mods like Roider's Union that focus on mining it would get more use.

As to your question: It is why I posted two examples, a before and after if you will. The base amount will be the same unless you go into the settings and fiddle with the numbers. The gantry and nanoforage increases are just mutable bonuses that increase and decrease as they are added/subtracted from the player's fleet.

Dazs

  • Captain
  • ****
  • Posts: 391
    • View Profile
Re: Utility MOD "Ore Refinery" test release v0.2
« Reply #3 on: November 02, 2021, 01:59:42 PM »

v0.2 released today.

I received some private DMs regarding the ratios and if I could make the conversion greater. I made several adjustments (see changelog) and increased the compression. I also made new charts on the main page that should be more clear on what this mod does. I am currently working on an option to compress rare ore for the next patch but am having some issues getting two active abilities in the same mod, so um let's just say it's a work in progress :)

As always, I am open to suggestions or question whether it is a reply here or you feel more comfortable sending me a direct DM (ty to IondragonX for remining me that was a thing) and  I will get back to you asap.

Dazs

  • Captain
  • ****
  • Posts: 391
    • View Profile
Re: Utility MOD "Ore Refinery" Release Candidate v0.3 11/06/21
« Reply #4 on: November 06, 2021, 04:57:29 AM »

Feeling good about this version and asking a kind moderator to move it to the main mod forum and perhaps add it to the Mod Index under Utility Mods. :)

I hope other rock hoppers find this useful

mkire

  • Lieutenant
  • **
  • Posts: 85
    • View Profile
    • Email
Re: [0.95a] Ore Refinery v0.3 - 11/06/21
« Reply #5 on: November 07, 2021, 02:41:07 PM »

is there any demand added to markets for platinum bars? also it would be neat if there was a 'bar' for organics and rare ore.

looking forward to using this in my next game
Logged

JUDGE! slowpersun

  • Admiral
  • *****
  • Posts: 614
    • View Profile
Re: [0.95a] Ore Refinery v0.3 - 11/06/21
« Reply #6 on: November 07, 2021, 03:43:11 PM »

is there any demand added to markets for platinum bars? also it would be neat if there was a 'bar' for organics and rare ore.

Rare ore would be nice, but how do you make oil into a bar?  Closest equivalent would I guess be some sort of plastic, but that's not very realistic.  However, would be nice if this mod adds ability for refining industry to still use platinum bars/inventory item this mod produces... unless it already does and that just isn't very clear in OP.  I understand that this mod is basically just intended to reduce inventory clutter for stuff that gets sold, but would be nice for its functionality to hook into the colony system in the game (even if only for a player's colonies).  Also cool that it gives a reason for a player to drag a corrupted nano forge around!
Logged
I wasn't always a Judge...

Dazs

  • Captain
  • ****
  • Posts: 391
    • View Profile
Re: [0.95a] Ore Refinery v0.3 - 11/06/21
« Reply #7 on: November 07, 2021, 04:48:29 PM »

Thank you for your interest. I originally made this part of my faction mod and had plans to use the Platinum in a planetary industry but I had a couple requests to make it a separate mod for people who like to mine but would rather play a faction like Roiders Union or HMI so I changed my faction's industry to use standard commodities and made this a separate mod.

As to converting other commodities well I tried several ways but I could just not figure a way to have more than one toggle ability work. I am just a player who enjoys the game and sadly not a very good coder but I haven't given up. I figured I would release it as-is so other players could use the functionality while I figured it out.

Uhlang

  • Commander
  • ***
  • Posts: 157
    • View Profile
Re: [0.95a] Ore Refinery v0.3 - 11/06/21
« Reply #8 on: November 07, 2021, 05:22:09 PM »

The mod's name made me think of the Arc Smelter hullmod from prv Starworks, but I see that this is something quite different.

I'm too used to using Arc Smelters to turn ore into metals, then turning those metals into supplies with Supply Forge, but I'll probably get this for those occasions when the smelters aren't fast enough. Hate throwing away perfectly good ore.
Logged

Dazs

  • Captain
  • ****
  • Posts: 391
    • View Profile
Re: [0.95a] Ore Refinery v0.3 - 11/06/21
« Reply #9 on: November 07, 2021, 05:39:00 PM »

I did look into how that hull mod was made when I was making this but it used out of date code and was frankly so radically different than the approach I took that I really couldn't get any inspiration. Prv's solution was elegant though and I wish I could do something similar.

I actually intended to use this as a way of turning ore into metals for Supply Forge but decided to go another way. Firstly I am overloaded with metal just in regular gameplay that is was a moot point and secondly metal sells for so little, it wasn't an efficient method of compressing cargo space. I have a couple avenues with the mod and I've just finished up my faction mod so I'll work on tinkering with this next.

JUDGE! slowpersun

  • Admiral
  • *****
  • Posts: 614
    • View Profile
Re: [0.95a] Ore Refinery v0.3 - 11/06/21
« Reply #10 on: November 08, 2021, 11:43:55 AM »

Thank you for your interest. I originally made this part of my faction mod and had plans to use the Platinum in a planetary industry but I had a couple requests to make it a separate mod for people who like to mine but would rather play a faction like Roiders Union or HMI so I changed my faction's industry to use standard commodities and made this a separate mod.

I guess my only remaining question is whether you also intend to bind this mod's functionality to either a low OP cost hull mod or maybe a custom ship at some point?  I have tried it and I like it (if only also for making mining stations much easier to loot), but seems almost too useful without some minimal confinement to when one can use the ability.  Only problem is that adding something like that prolly will make the mod much harder to remove (ie, less of a utility mod).

Also, but for whatever reason the game's economic system doesn't seem to respect the platinum bar's valuation very well.  Seems like you at most get half value max from markets (since no possibility of shortages).  Still easier than schlepping around a bunch of ore, but was this intentional, or just a side effect of game's econ model and a lack of resource shortages for a custom commodity?  This mod would be MUCH more useful if fuel usage was partially parameterized to total inventory space used (ie, more mass being dragged around in space, more fuel used), but since that I guess might kill supply/fuel ratio, unlikely to ever occur (or maybe vanilla game already tried that?  But if not, would make this mod and the nebula fuel mod kinda required, so maybe not.).
Logged
I wasn't always a Judge...

Dazs

  • Captain
  • ****
  • Posts: 391
    • View Profile
Re: [0.95a] Ore Refinery v0.4 - 11/08/21
« Reply #11 on: November 08, 2021, 02:12:47 PM »

v0.4 released today - See Changelog for details

@slowpersun:

 I took your comment regarding valuation to heart and changed the commodity category or all three abilities to match the raw resource category they are made from. The base values all line up however they are all economic commodities and are subject to market value and taxes. For example, if you were to sell 185 ore and 1 heavy machinery and compare that to the value to selling 1 Platinum they should be very close. Keep in mind if you actually sell that ore, it may lower that market's demand and valuation for the Platinum. I did my best to make it all balance out and not be a money cheat. I feel that even if the match is slightly off, there is an overall increased profit by being able to haul an increased amount of high value commodities instead of jettisoning low value ones.

As to it being a hull mod, I originally went that route and wanted to tie it into a specific ship in my faction mod but I had issues assigning a toggle ability to a hull mod. It may be possible but not at my skill level at this time.

I see your point regarding fuel usage but I do not know a way of using a variable like that in a commodities price as distances and fuel use are so varied. May be a thing but I am just a fan of this game that has no experience in Java code. Again, if I come across a way as I learn I will try to factor it.

@mkire:
Ask and you shall receive :)

JUDGE! slowpersun

  • Admiral
  • *****
  • Posts: 614
    • View Profile
Re: [0.95a] Ore Refinery v0.4 - 11/08/21
« Reply #12 on: November 09, 2021, 11:04:12 AM »

I took your comment regarding valuation to heart and changed the commodity category or all three abilities to match the raw resource category they are made from. The base values all line up however they are all economic commodities and are subject to market value and taxes. For example, if you were to sell 185 ore and 1 heavy machinery and compare that to the value to selling 1 Platinum they should be very close. Keep in mind if you actually sell that ore, it may lower that market's demand and valuation for the Platinum. I did my best to make it all balance out and not be a money cheat. I feel that even if the match is slightly off, there is an overall increased profit by being able to haul an increased amount of high value commodities instead of jettisoning low value ones.

Sorry, wasn't trying to convince you to refactor code or anything.  Just was curious, figured you might need to add a little language explaining that there was some total loss to the process/using the skill.  To be fair, likely some ore would literally be lost in any sort of refining/smelting process, although maybe less with some futuristic device; thus, the values prolly wouldn't have stacked up perfectly.  I was just more surprised that the max average value seemed to roughly equal out pretty close to half value of the expected price (although yes, you are correct, some of the variation in pricing would be due to whatever algorithm the game uses to vary commodity value/simulate shortages).  But thanks anyway!

Edit:  Spelling
« Last Edit: November 11, 2021, 01:32:32 PM by slowpersun »
Logged
I wasn't always a Judge...

Dazs

  • Captain
  • ****
  • Posts: 391
    • View Profile
Re: [0.95a] Ore Refinery v0.4 - 11/08/21
« Reply #13 on: November 09, 2021, 11:37:33 AM »

Not a problem, always glad to get feedback. When I made this I honestly wondered if I was just making it for myself :)

cardgame

  • Commander
  • ***
  • Posts: 131
  • Sonic Rainboom
    • View Profile
    • Email
Re: [0.95a] Ore Refinery v0.4 - 11/08/21
« Reply #14 on: November 10, 2021, 09:03:38 PM »

Something is wrong with the valuations in my game - the refined rare material, palladium, is only valued at 2k on the market tabs (F1). Interestingly, despite the most expensive market listing it for 2200, I was able to sell it on Cruor for 3k. Still, though, a far cry off from the value of the combined ores listed in the OP.

Platinum is working just fine. Love the concept and am having actual fun as a miner now.
Logged
Pages: [1] 2 3 4