JackyWhackyBoi What's the exact error?
How to save, share, and play ship designs
Oof, turns out it was my impatience that was the error, just had to wait a few minutes to get it working... Srry XD
@Walt I can't get my ships onto any forum post/discussion. It just gives me a red popup saying "Oops! Something went wrong. Please reload the page and try again."
Solarwatch That's an error with the forum. Nothing Walt can do about it. Use Imgur instead, and then post the link.
Walt, can I request you send me .exe which will return price of ship according to his image?
ProMix I do not have time to create an exe that can do that, sorry, it'd be a fair amount of work. But most of the code that would be needed to parse the ship files already exists in the Cosmoteer.dll and HalflingCore.dll files, which I think you should be able to hook into from your own C# program.
I will try
By the way, I use PascalABC.NET
- Edited
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.
I can transfer files by discord chatting somebody and showing a ship file.
J'ai un problème, j'ai des vaisseau qui son considéré "illégal " et je ne sais pas comment les rendre légales
KaeligRoperhe Edit them in blueprint mode and fix anything that's flashing red.
Et quand c'est tout le vaisseau qui est en rouge?