Support | News | Classic | F.A.Q. | Discord | Discussions | Wiki | Roadmap

JackyWhackyBoi What's the exact error?

    Oof, turns out it was my impatience that was the error, just had to wait a few minutes to get it working... Srry XD

      5 months later

      @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.

        6 months later

        Walt, can I request you send me .exe which will return price of ship according to his image?

          ProMix I do not have a standalone exe that can do that.

            Walt Can you create this or give me algorithm, please?

              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

                  Walt Where I can find code, what I need in dll? (price determinant)

                    • 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.

                      Walt Thank. Where I can tolk with you?

                        ProMix Either start a new topic here on the forum or ping me on Discord.

                        Walt I find you in Discord. ProMix#2142

                          Walt But I can't write you

                            14 days later

                            I can transfer files by discord chatting somebody and showing a ship file.

                              3 months later

                              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?