Announcement

Collapse
No announcement yet.

File switching

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

  • File switching

    It seems as though many scenarios today can't do without multiple events, rules, graphics etc. files. I'm personally a bit ambivalent about this. On the one hand, this stretches the limits of the game; while it doesn't remove them entirely, it grants you incredibly much space. On the other hand, however, changing your files every other turn can become a nuisance.
    I'm wondering how other people think about this, as I'm currently working on a scenario idea. Yaroslav has pointed out that changing files every 12 turns could become tiresome. I think I agree with this, especially because the turns would be rather short, not as long as in "Red Front" or "Herbstnebel", but rather only about 10 units to move, so a turn wouldn't be longer than 1-2 minutes.
    Imagine I'd double the amount of turns to 24 turns-that would propably still not do.
    The problem is that it's not events, but rules and graphic files that would be changed. There is no way around it, if I want to do it the way I want to.
    So, the question is, whether a files change every 12 or 24 turns would be acceptable or not.
    Personally, I still favour the idea, if only because it isn't possible to do the things I want to otherwise.
    12
    Yes
    75.00%
    9
    No
    25.00%
    3
    Follow the masses!
    30,000 lemmings can't be wrong!

  • #2
    I don't think file changing should happen any more often than 4 times in a game. And that's pushing it.

    How many turns would the scenario last?

    You're not thinking about seasons, are you?
    Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

    Comment


    • #3
      I find file changing quite tiresome. It's one of the reasons I prefer Test of Time for bigger scenarios.
      Tecumseh's Village, Home of Fine Civilization Scenarios

      www.tecumseh.150m.com

      Comment


      • #4
        I've only done it once or twice.

        I fear file changing.

        I just know that I'll screw something up.

        Lost in America.
        "a freaking mastermind." --Stefu
        "or a very good liar." --Stefu
        "Jesus" avatars created by Mercator and Laszlo.

        Comment


        • #5
          Whats an example of a scenario with file switching? I've seen ones with different rules and events files depending on who you pick as the human player, though no same game many file sets.
          Visit First Cultural Industries
          There are reasons why I believe mankind should live in cities and let nature reclaim all the villages with the exception of a few we keep on display as horrific reminders of rural life.-Starchild
          Meat eating and the dominance and force projected over animals that is acompanies it is a gateway or parallel to other prejudiced beliefs such as classism, misogyny, and even racism. -General Ludd

          Comment


          • #6
            Well, some examples would be "Red Front" and "Second Front" by Nemo, "Herbstnebel" by Darthveda and "Imperium Romanum" by BeBro (all excellent scenarios).

            File switching would be easy, by simply activating a batch file.

            Maybe there are alternatives. Until now, I didn't want to say what I want to simulate, but it figures that this won't give too much of the scenario away; I want to simulate days on an hourly basis, with 12 daylight hours and 12 nightime hours, people sleeping, nightcamps and so on. This is about all I want to say right now.
            Sleeping people and all that can be simulated by turninterval and givetechnology events, and Leonardo's Workshop, but I wanted day and night graphics. Thing is that events would propably be so large that file switching would be invetibale in any case.
            The whole scenario would then last for several "days", maybe ten or so. That'd total to 120 turns on hourly base, 240 turns on half-hour base. I could make it longer, either by adding more "days" or shortening turn length to 15 minutes. The latter option would make files switching more bearable because it would happen only every 48 turns.
            Of course, the turns could be a minute each, but in order to make that realistic, the map would have to be larger than possible, and the scenario would then be unbearably long.

            Any ideas?
            Follow the masses!
            30,000 lemmings can't be wrong!

            Comment


            • #7
              I'm probably gonna regret saying this, but...

              If you force people to turn on autosaving, it might be possible to write a program that tracks what turn you're in. You'd also need to run that program, before you start, obviously.
              (I'm not sure exactly when the game autosaves, but surely one would save at the start/end of each turn.)

              This program could then automatically swap the files while you're playing.

              If Civ2 autosaves at the start of a turn, the program could even copy the autosave and remove the events.

              A text event in the game would then simply tell you to load this newly created savegame.

              That would pretty much automate the whole process. You only have to start a program before you start the scenario, and load a new savegame when asked.

              If civ2 memory becomes involved, things could be made even more advanced. So you wouldn't even need to do any file swapping or reloading, just start a program.

              But this is all purely hypothetical. I'm just rambling about! Please don't make me do this! No... NOOOO!

              Well, seriously, there might be some possibilities there... But equally seriously, I don't have the time.
              Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

              Comment


              • #8
                LMAO!!!!

                @ Mercator!

                Lost in America.
                "a freaking mastermind." --Stefu
                "or a very good liar." --Stefu
                "Jesus" avatars created by Mercator and Laszlo.

                Comment


                • #9
                  Mercator, did I ever tell you how I love your avatar?

                  Seriously, if anybody would actually be ready to try this, that would be very cool. If not, well, then not...
                  Follow the masses!
                  30,000 lemmings can't be wrong!

                  Comment


                  • #10
                    Excellent idea Mercator When will it be ready?
                    http://sleague.apolyton.net/index.ph...ory:Civ2_Units

                    Comment


                    • #11
                      Well thanks!

                      ... But sucking up to me isn't going to work you know.


                      Ahem... I did a little testing with Civ2 (that's easy enough). It seems the XX_auto.sav is saved at the beginning of every turn. So to make my idea work, the program should do the following:

                      1. Whenever the XX_auto.sav changes (i.e. a new turn has started), check the game turn.
                      2. When the "swapping turn" arrives, swap the files and delete the events.
                      3. Copy the XX_auto.sav to another savegame, say "your_new_game.sav".

                      Steps 2 and 3 are probably best achieved by letting the "tracking program" launch a batch file when the time is ready.

                      That's all there should be to it.

                      There's one more thing the scenario maker should do:
                      - At the desired turn, show a text event that tells the player to load the new "your_new_game.sav".

                      But... The autosave is actually only created AFTER the text event has been OK'ed.
                      So it could take a few seconds until the program "triggers", all files are copied, and the new savegame created.

                      The game will then continue again from the beginning of that same turn. Since the events have been cleared, you won't see the text message again.

                      This could actually be pretty easy to do...

                      I'm a sucker.
                      Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

                      Comment


                      • #12
                        Right...

                        As usual, I wasted my evening trying to work something out.

                        I attached a little example scenario (the CiC Alexander scenario, so I guess it should work on CiC/FW/MGE).

                        Before you start the scenario (it doesn't really matter when, as long as it is before the first swap on turn 4) start the CivSwap application.

                        The rest you should be able to find out as you go along.

                        I don't have any fail-safe routines built in, so if you would do anything I didn't expect in the batch file or so, CivSwap is likely to crash.

                        It obviously also slows down your computer a bit, since it constantly tracks whether the autosave has changed.
                        I don't know exactly how much, but I didn't notice too much on my rather old PII 350MHz PC (except when the files are being swapped).


                        If you want to know how it works, you'd have to look at the CivSwap.ini, swap.bat, events.txt and events2.txt files.

                        There are a few more things you would need to know before you start using it as a scenario creator, but you'd better try it out before I go into any further detail.

                        CivSwap attachment is now here.
                        Last edited by Mercator; October 15, 2003, 11:32.
                        Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

                        Comment


                        • #13
                          This has other potentials, such as an expanded events.txt Great work!
                          Visit First Cultural Industries
                          There are reasons why I believe mankind should live in cities and let nature reclaim all the villages with the exception of a few we keep on display as horrific reminders of rural life.-Starchild
                          Meat eating and the dominance and force projected over animals that is acompanies it is a gateway or parallel to other prejudiced beliefs such as classism, misogyny, and even racism. -General Ludd

                          Comment


                          • #14
                            I'm going to regret asking this before examining this more closely, but my mouth's big enough for another foot. Looks pretty useful!

                            CivSwap.exe generates a %2 to pass on to Swap.bat, right? Does it have an input dialog that allows you to edit the name of %2 to use for other "XX"'s? Or does it simply look for any new file whose name contains "_auto.sav"? How is the 4 and 8 in the ini file used to determine the correct file to use? Works for any time scale?

                            Am I missing some basic stuff or jumping way ahead on the project timeline?

                            But this is all purely hypothetical. I'm just rambling about! Please don't make me do this! No... NOOOO!
                            Excellent idea Mercator When will it be ready?


                            This poll has no banana!
                            El Aurens v2 Beta!

                            Comment


                            • #15
                              Originally posted by Boco
                              CivSwap.exe generates a %2 to pass on to Swap.bat, right?
                              Yep, CivSwap appends the name of the autosave as an extra argument.

                              Does it have an input dialog that allows you to edit the name of %2 to use for other "XX"'s? Or does it simply look for any new file whose name contains "_auto.sav"?


                              When CivSwap is started, it starts looking for a file called "??_auto.sav", where ? can be any character, that is more recent than the CivSwap program startup time.
                              There should only be one... unless you're playing the same scenario on different instances of civ2 simultaneously .

                              That file (with the "??" resolved) will be the one that is monitored for changes, and that file will be passed as the argument.
                              You can see the name of the file in the CivSwap titlebar.


                              How is the 4 and 8 in the ini file used to determine the correct file to use? Works for any time scale?


                              4 and 8 are the civ2 turn numbers. They correspond to the turn numbers used in the events file.

                              As you can see in the CivSwap.ini, the swap.bat is called with an argument ("weird" or "normal" in this case). That argument is used in the swap.bat batch file (as %1) to determine which operations to perform.


                              Since CivSwap calls the batch file with arguments, it would still be possible to do the swapping manually too.
                              That is, after the IF statements, instead of GOTO end I could have added the usual choice menu. That way people can do the swapping both manually and automatically.


                              Am I missing some basic stuff or jumping way ahead on the project timeline?


                              You're missing some basic stuff.
                              And you didn't actually play the scenario, did you? You just looked at the text files...

                              CivSwap is still a bit buggy, but fortunately, that doesn't have any consequences in this case. The bug kind of resolves itself... But there are still a few things to fix.

                              Oh yes... As usual, CivSwap would require the VB6 Run-Time Files. But everybody already has those of course, since everyone has MapEdit.
                              If you don't, you can download them from my utility website:
                              http://www.civgaming.net/mercator/mapedit/




                              Bastards!
                              Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

                              Comment

                              Working...
                              X