I have natrual resources avaialable on asteroids, moons, planets, etc…
My data feed for these from file looks like so: 0 521 147487 1459 204 0 0 0
Defined as so:
Gemstones 0
Metal Alloys 521
Metal Ores 147487
Minerals 1459
Precious Metals 204
Seeds 0
Spices 0
Water 0
I am trying to rework my ship mining laser system and base it on a “most avaialable is more likely to be mined.” When a ships mining laser is fired, it pings the server, and gets a result back. Right now it is based on a hardcoded percentage system with a Random int used to find what you get.
That method works for the above quantities because it was designed on that default asteroid set up. But…not all planetoids are the same. A moon made of ice may only have water and minerals available.
Ice Moon example:
Gemstones 0
Metal Alloys 0
Metal Ores 0
Minerals 14591
Precious Metals 0
Seeds 0
Spices 0
Water 578471
Any suggestions on how to take my numbers and base a “selection criteria” on the quantities? Should a mining laser ping possible return nothing?