Announcement

Collapse
No announcement yet.

Mac Conversion

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    So, after a quick scan, and some partial testing I added file type identification support for single player, email, hot seat, and network games. I also added the same for the French and German text files (.fre, .ger).

    Henrik, you have mail.

    Comment


    • #17
      Just to see if this will actually work, I have made a zip archive and will a try to attach it to this message.
      Attached Files

      Comment


      • #18
        Looks good so far.
        Vote Democrat
        Support Democracy

        Comment


        • #19
          Originally posted by Insane
          So, after a quick scan, and some partial testing I added file type identification support for single player, email, hot seat, and network games. I also added the same for the French and German text files (.fre, .ger).
          Seems to be working perfectly

          I had no idea there was an email game filetype in the game. As of now people are using the tcp/ip game type to play email games as PBEM was never fully implemented. While interesting the .eml files are not loadable by civ it would seem (you cannot select load email game in game and if you double click the file you only get the normal game setup screen.)

          Thanks a lot for the new version of the program

          I do have another request though, would it be possible to allways substitute the rows after @REALLYQUIT in the game.txt file with these lines:
          Code:
          @REALLYQUIT
          @width=280
          @title=Confirmation
          @button=Quit
          @button=Cancel
          @button=Save Game
          Do you really want to quit?
          ?
          This is the only change this file needs to be usable. While other differences between the PC and mac versions exists, this is the difference that causes the game to crash (and it only happens when you try to quit the game so you may infact launch the scenario without realising that the game.txt isn't working).

          Some scenario creators like to do fancy things with these files (ie they change the text on the buttons or change the width of the box for instance). Therefore these lines won't allways look the same in all files (but it'll naturaly allways start with @REALLYQUIT). Often when I convert manually I transfer these things for flavor but it's not necesary to do so. Therefore this automated program wouldn't need to look at the content that at all but rather just replace the entire dialogue box with the lines above.

          The standard PC version looks like this:
          Code:
          @REALLYQUIT
          @width=320
          @title=Confirmation
          Do you really want to quit?
          
          No
          Yes
          The difference is really that the Mac version uses buttons and has a save option while the PC version has checkboxes and lacks the save option.
          No Fighting here, this is the war room!

          Comment


          • #20
            I had no idea there was an email game filetype in the game. As of now people are using the tcp/ip game type to play email games as PBEM was never fully implemented.
            And I had no idea that it wasn't fully implemented. The filetype existed, so I converted it... Oh well, it doesn't hurt anything.

            I do have another request though, would it be possible to allways substitute the rows after @REALLYQUIT in the game.txt file with these lines:
            In theory, anything is possible.

            Is this at the end of the file or do I have to parse the description block out of the middle of the file?

            The optimal scenario involve trying to be somewhat intelligent about the contents. This might result in a better overall conversion experience.

            Are the Yes, and No (Quit, Cancel) buttons ever removed?

            Are they always the first two buttons?

            Are there order dependencies (i.e. Quit, Cancel and No, Yes implies that the order of these buttons is reversed on the Mac)?

            What do these scenario makers do with the checkboxes? Somehow I don't imagine you can substitute the checkboxes with buttons.

            Is the difference between the dialog sizes a constant or a ratio? Knowing this, we could make a reasonable attempt at sizing the dialog.

            I don't necessarily expect you to have answers to these questions, but knowing the answers would be helpful.

            Comment


            • #21
              On Macs, compared to PCs, "retire" and "no" are switched, so in a modpack or scenario, if I press "no", it will cause me to retire.
              Vote Democrat
              Support Democracy

              Comment


              • #22
                Originally posted by Insane
                In theory, anything is possible.

                Is this at the end of the file or do I have to parse the description block out of the middle of the file?
                It's in the middle of the file. Though I think what the game looks for is the line @reallyquit which could just as well be situated at the bottom of the file. I haven't actually tried moving it though.

                Are the Yes, and No (Quit, Cancel) buttons ever removed?

                Are they always the first two buttons?
                They haven't been in any scenarios I have played. Though if an author wanted to he could remove them... That'd probably cause irritation though, as it would mean he would be prohibiting people from quiting his scenario. They are allways in the same order (the game doesn't have any other way of telling them apart).

                Are there order dependencies (i.e. Quit, Cancel and No, Yes implies that the order of these buttons is reversed on the Mac)?
                Correct, in a the PC version of the game.txt no/cancel comes first and quit second, on the mac the opposite is true.

                What do these scenario makers do with the checkboxes? Somehow I don't imagine you can substitute the checkboxes with buttons.
                Ah, checkbox is probably not the correct term... What do you call those little dots that you can click to signify your choice?
                They are used here on apolyton when selecting what icon should be displayed next to a post or thread title. That's what is used in the PC version, the PC version also adds an ok button to this dialouge automatically (and the mac version doesn't which is why it crashes if you launch with a PC game.txt when the quiting dialogue is brought up. With the mac version there would be no way to close the quit dialoge.)

                This is what a customized PC dialogue might look like (this particular one is from Age of War by Phenix Benton) :

                Code:
                @REALLYQUIT
                @width=320
                @title=Confirmation
                Do you really want to quit?
                
                No, today Europe, tomorrow, THE WORLD!
                Yes, the wife/girlfriend/significant other is glaring at me ominously.
                This is what I did to keep his version of the dialouge:

                Code:
                @REALLYQUIT
                @width=320
                @title=Confirmation
                @button=Yes, the wife/girlfriend/significant other is glaring at me ominously.
                @button=No, today Europe, tomorrow, THE WORLD!
                @button=Save Game
                Do you really want to quit?
                Mind you this will get you some rather long buttons which might look a bit wierd to some. As I said an automated program needn't handle this unless you want it to (though if you do it would obviously be a plus)

                Is the difference between the dialog sizes a constant or a ratio? Knowing this, we could make a reasonable attempt at sizing the dialog.
                Civ automatically adds to the length of the box should the text not fit in one row. All that the width does is tell the program how long one row is.

                I don't necessarily expect you to have answers to these questions, but knowing the answers would be helpful.
                Well I tried to do my best. Hope it's helpfull

                On Macs, compared to PCs, "retire" and "no" are switched, so in a modpack or scenario, if I press "no", it will cause me to retire.
                Actually this is once again a difference between the PC and mac version, for some reason mac Civ will add a cancel and an quit button to this dialouge but the no/yes dots won't do a thing for you as the mac version relies on those two buttons instead.
                Quit is the one you get when you press enter (even if the dot that's selected says "no"). As you'll notice you'll still retire if you select yes and then hit enter though (I haven't tested though but this would be the logical thing to assume).
                The only way to say no is to push cancel.

                The programers have not been consequent in their use of buttons/dots in the game when porting civ for the mac. In most cases the PC and mac version both use dots though (for instance in the diplomacy dialouge).

                Btw I've been using the new version of the program to change the filetype/creator for .net files since I last posted and I'd like to request a new feature.
                Would it be possible to replace the original file when converting .net files instead of creating a duplicate in the converted folder?
                Saves need to be in the same folder as the scenario (well really the mod files) they bellong to, and it gets kind of tedious to move them back all the time (when I download my email turns I save them in the apropriate scenario folder imidietly to avoid confusion).
                No Fighting here, this is the war room!

                Comment


                • #23
                  Ah, ok, so this won't be trivial then.

                  If the dialog can be anywhere then the file needs to be parsed, edited, and written back out.

                  I misunderstood regarding the (radio) buttons. I thought you had said they added new ones, not just changed the titles. That helps because they will always be in the same order, they would just need to be reversed (and save added).

                  Civ automatically adds to the length of the box should the text not fit in one row. All that the width does is tell the program how long one row is.
                  I'm not sure how to read this. Does this mean I can always set the width to 280 and Civ will adjust the width as needed? Or does it mean that if I don't calculate the correct width Civ will add height to the dialog and wrap to a scond line?

                  Regarding the "Retire" dialog... it sounds like the correct thing to do is to just strip the radio buttons out and let the Quit/Cancel buttons work in their default mode?

                  The programers have not been consequent in their use of buttons/dots in the game when porting civ for the mac.
                  I expect they were trying to achieve a consistent "Mac Interface" (rightmost button is always the "safe" one) across all the dialogs... the original PC programmers were under no such constraints.

                  Would it be possible to replace the original file when converting .net files instead of creating a duplicate in the converted folder?
                  The tool was written with the mindset of "Do no damage", thus everything is copied to a new folder, in a known location. I suppose it might be possible to special case a run against a single game file (as opposed to an entire scenario). But the lack of a consistent resultant location might confuse some users. Maybe a better answer would be a tool that simply does in place conversions of game files? But multiple toos is also confusing in its own way.

                  Comment


                  • #24
                    Originally posted by Insane
                    I'm not sure how to read this. Does this mean I can always set the width to 280 and Civ will adjust the width as needed? Or does it mean that if I don't calculate the correct width Civ will add height to the dialog and wrap to a scond line?
                    Civ will do the second of those things.

                    Regarding the "Retire" dialog... it sounds like the correct thing to do is to just strip the radio buttons out and let the Quit/Cancel buttons work in their default mode?
                    Yes. In the mac original files (in the support folder) this is what that dialoge looks like.

                    I expect they were trying to achieve a consistent "Mac Interface" (rightmost button is always the "safe" one) across all the dialogs... the original PC programmers were under no such constraints.
                    I suppose so. They've also generally increased the width suposedly to make things look better.

                    The tool was written with the mindset of "Do no damage", thus everything is copied to a new folder, in a known location. I suppose it might be possible to special case a run against a single game file (as opposed to an entire scenario). But the lack of a consistent resultant location might confuse some users. Maybe a better answer would be a tool that simply does in place conversions of game files? But multiple toos is also confusing in its own way.
                    A separate version for just converting savefiles might be the way to go if you ask me. It'd be of great help to us PBEM players.
                    No Fighting here, this is the war room!

                    Comment


                    • #25
                      Originally posted by Henrik

                      A separate version for just converting savefiles might be the way to go if you ask me. It'd be of great help to us PBEM players.
                      Ok, last weekend was playtime for me... this weekend, something for Henrik.
                      Attached Files

                      Comment


                      • #26
                        /me makes mental note to download when he gets home.

                        Good work Insane!
                        I'm not conceited, conceit is a fault and I have no faults...

                        Civ and WoW are my crack... just one... more... turn...

                        Comment


                        • #27
                          Originally posted by Insane
                          Just to see if this will actually work, I have made a zip archive and will a try to attach it to this message.
                          It works. And now no more Photoshop .bmp manual converting

                          Thanks a lot man

                          Comment

                          Working...
                          X