ProMix Where I can find code, what I need in dll? (price determinant)
In HalflingCore.dll
there is Halfling.Graphics.TextureData
which you can use to load the ship png file into memory. Then use Halfling.IO.TextureDataStream
to extract the ship data from TextureData. Then you'll need to decompress the data using System.IO.Compression.GZipStream
. And then you'll need to parse the decompressed data using Halfling.ObjectBits.OBNode
. That will give you all the ship data such as the lists of parts and doors (and everything else that gets saved with the ship like paint, roles, and crew assignments). Iterate through all the parts and doors, add up their costs (plus 1000 for each crew) and you should have the total cost for the ship.
In Cosmoteer.dll
there is the Cosmoteer.Ships.Ship
class which has a LoadMetrics
static method, which will do all of the above for you and tell you the final cost. But it relies on all of the game data being loaded into memory, so you probably can't use it directly. (But you could decompile it and look at how it works.)
If you have any more questions, please start a new discussion, this discussion isn't really the right place for this.