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

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?

                              KaeligRoperhe c'est probablement que le vaisseau à été construit en dehors de la grille, si c'est le cas il suffit de le recentrer

                                thank

                                  a year later

                                  im not sure if i jsut don`t understand or I'm doing something wrong . but what does ![](src mean

                                    Walt Markdown code for the image will be inserted into your post. It will look something like this:

                                    ![image https://i.imgur.com/ESBPciE.png](https://i.imgur.com/ESBPciE.png)

                                    alilfighter ![](src) is the code to insert an image in the forum, you put the description between the [] and you replace src with the link of your picture