Announcement

Collapse
No announcement yet.

Using CSPL to Create an Event File For ToT

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

  • #16
    I ended up working on CSPL for a bit tonight...

    I updated the CSPLcompanion.bat according to your/his zip and fixed the choice thing too. I found out a way to do the choice thing in Windows XP, without using choice.

    I also solved all those things you mentioned in the CSPL fixes file. The manual had a whole bunch more errors too, I fixed those as well. I also took the liberty to adjust the images used in the manual. I cropped them a little bit and made their file size a lot smaller. so the entire download is now less than half the original size (more than 2/3 of the entire package was due to 3 big images used for the manual).

    Here's the update:
    Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

    Comment


    • #17
      Can anyone mention what kind of 'events' are possible with CSPL?

      http://sleague.apolyton.net/index.php?title=Home
      http://totalfear.blogspot.com/

      Comment


      • #18
        Originally posted by Mercator
        I ended up working on CSPL for a bit tonight...

        I updated the CSPLcompanion.bat according to your/his zip and fixed the choice thing too. I found out a way to do the choice thing in Windows XP, without using choice.

        I also solved all those things you mentioned in the CSPL fixes file. The manual had a whole bunch more errors too, I fixed those as well. I also took the liberty to adjust the images used in the manual. I cropped them a little bit and made their file size a lot smaller. so the entire download is now less than half the original size (more than 2/3 of the entire package was due to 3 big images used for the manual).

        Here's the update:
        http://apolyton.net/upload/view.php?file=859_CSPL.zip
        Nice work. Much cleaner presentation!

        Curt: Think of CSPL as "on-the-fly" hex editing of the game, while it's in process! (as opposed to editing a dormant save file). As a result, almost anything you can imagin, can be achieved. See my next post for more details.
        To La Fayette, as fine a gentleman as ever trod the Halls of Apolyton

        From what I understand of that Civ game of yours, it's all about launching one's own spaceship before the others do. So this is no big news after all: my father just beat you all to the stars once more. - Philippe Baise

        Comment


        • #19
          CSLP, as I understand it, is an external program that runs simultaneously with ToT. It hex-edits the save file as you go.

          The manual that comes with CSLP describes very generally the types of events possible with CSPL:

          UNITS thread: is the thread which scans (read and write) units from Civ memory
          CITIES thread: is the thread which scans (read and write) cities from Civ memory
          GLOBAL thread: is the thread which scans (read and write) game's global variables (Difficulty Level,Barbarian Activity,etc...) from Civ memory
          WONDERS thread: is the thread which scans (read and write) wonders from Civ memory
          MAPS thread: is the thread which scans (read and write) maps data structure from Civ memory
          CIVS thread: is the thread which scans (read and write) civilizations from Civ memory
          ATTACKS thread: this thread is used to manage attacks: it run continuosly and, when a battle take place, store infos about winner and loser units.
          Beyond that, Curt, I don't really know specifically what events are possible, except I think it's very broad and well beyond what's possible with the built-in events.
          Tecumseh's Village, Home of Fine Civilization Scenarios

          www.tecumseh.150m.com

          Comment


          • #20
            CSPL Example (a program by Angelo)

            I recently discovered a small program from Angelo, called the "CSPL Example Save Game". To help show some of the possibilities of CSPL, he created four small events and compiled them into a CSPL executable. The readme notes that was only tested in Win98, but I just ran it in winXP and it worked fine. If you're interested, here's CSPL in action:

            1) Unzip into any folder on your computer (location is meaningless).

            2) Launch ToT

            3) Open the file "cspltest.sav" (it's in the new folder)

            4) Launch the CSPL 4-event program, "csplclient.exe" (also in the new folder)

            5) Open the file "readme.txt" (also in the new folder)

            6) You could read the whole thing, but to run the test, move to the section titled "FEATURES OF THIS EXAMPLE PROGRAM" and follow his directions. The four events demonstrate:

            - seamless movement from one map to another (without the teleport links ala Kyokujitsu)
            - units which can't be built unless an improvement is present in the city.
            - units which can change from one type to another at the press of a key
            - an event triggered by the movement of a unit into a specific hex.

            Hopefully this will help folks visualize some of the infinite possibilities inherent in CSPL. The Civ2 community may never get the source code, but this is definitely a close second. Speaking of which - if we can't find programmers willing to tackle CSPL, what hope is there of getting people with the exact same skills to work on the source?
            Attached Files
            To La Fayette, as fine a gentleman as ever trod the Halls of Apolyton

            From what I understand of that Civ game of yours, it's all about launching one's own spaceship before the others do. So this is no big news after all: my father just beat you all to the stars once more. - Philippe Baise

            Comment


            • #21
              Maybe this is "the" project, then.
              Tecumseh's Village, Home of Fine Civilization Scenarios

              www.tecumseh.150m.com

              Comment


              • #22
                Re: CSPL Example (a program by Angelo)

                Originally posted by Kull
                Nice work. Much cleaner presentation!
                Thanks. For the presentation I just made the screenshots fit on the screen and fixed those wrongly layed-out sections in chapter 3. Preformatted code still screws things up sometimes.

                I haven't actually ever tried CSPL. I didn't test the changes to the batch file either, except to make sure the menu worked, so I hope it works. The 2 environment variables I also left like in the 0.2 version. So they still need to be edited.

                I'll have to have a look at that example later.

                Originally posted by Kull
                Hopefully this will help folks visualize some of the infinite possibilities inherent in CSPL. The Civ2 community may never get the source code, but this is definitely a close second. Speaking of which - if we can't find programmers willing to tackle CSPL, what hope is there of getting people with the exact same skills to work on the source?
                Zero. We hardly have any people capable of editing a wiki page, making a website, let alone hex-editing or programming. And those who do tend to be ones who've all but lost interest in Civ2 (e.g. me, St Leo, Catfish and Angelo Scotto).
                Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

                Comment


                • #23
                  Ahem. I know HTML and how to work a Wiki page. Agricola and Curt know hex-editing. I believe we can find a way.

                  @Curt: Think of this: What do we mainly hexedit? The Global Warming Trigger. Now, do you remember that old Harrison Ford movie called "Force 10 from Navarone"? ( http://www.imdb.com/title/tt0077572/ ) In the movie the Allied team aims to take out a dam and destroy a bridge blocking the Germans from invading part of Yugoslavia.

                  Now let's say we have a scenario that aims to depict a raid on hydroelectric dam and a major bridge. The object for the player is to blow up the dam, release the water, and take out the bridge.

                  We start off by hexediting the global warming trigger out of the game and placing a bunch of pollution tiles on the map. Then we create an event called "explosives ignite" when the damn trigger unit is killed and CSPL hexedits global warming back into the game. With sufficient pollution tiles on the map global warming occurs and the areas surrounding the dammed river change to "flooded land".

                  Comment


                  • #24
                    Excellent idea!

                    The trigger alone could have many uses, such a 'black death'
                    -type plague or a magic ice age in a fantasy scenario...

                    http://sleague.apolyton.net/index.php?title=Home
                    http://totalfear.blogspot.com/

                    Comment


                    • #25
                      @Harry: Excellent idea... But why make it so hard on yourself? You'd be relying on the inner workings of global warming. The advantage of CSPL is that you don't have to do that anymore. You could just as easily use CSPL to simply change large swaths of terrain into the terrain you want.

                      E.g. as one of the examples Kull gave, an event can be triggered when a unit enters a square. You could have a huge well-defended area full of Germans. It's your task to get one of your men onto the dam tile. You could even represent getting inside the dam by using multiple maps.

                      The dam square is a transporter which gets you to a second map, inside the dam. Upon entering you use CSPL to change the unit to one with higher movement rate, so you can increase the scale of the inside of the dam (if necessary). When your unit reaches the right square, the terrain changes.

                      Even better, say, when you enter the trigger square an immobile explosive device unit is created on it and it has to remain in that square for X turns (and not be found by Germans, that is), after which it will "explode". and cause the terrain changes.

                      You could even spread the terrain changes over several turns. First the dam itself will "flood", then the area around it will gradually be flooded, say, giving your men enough time to get to "higher ground" (I forgot the exact plot of the movie, haven't seen it in a while).
                      Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

                      Comment


                      • #26
                        Most of that could be accomplished within the existing events structure of ToT. You would have to use an invisible '0' strength trigger unit, but otherwise it's doable.

                        I'm intrigued by Kull's idea that we could limit production of certain units to cities with specific improvements, eg. only cities with factories could produce artillery or tanks. This is something I've been wishing for for awhile.
                        Tecumseh's Village, Home of Fine Civilization Scenarios

                        www.tecumseh.150m.com

                        Comment


                        • #27
                          Originally posted by techumseh
                          Most of that could be accomplished within the existing events structure of ToT. You would have to use an invisible '0' strength trigger unit, but otherwise it's doable.
                          Maybe so, but the ChangeTerrain action is very limiting. And using CSPL you wouldn't have to worry about reaching the maximum event space.
                          Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

                          Comment


                          • #28
                            I've been thinking about this CSLP thing. I'm no programmer, so my idea may be unrealistic. And I'm sure that Jorrit is correct about the lack of people with skills that are still interested in Civ2. But when have we ever let the cold winds of reality stop us?

                            Would it be possible to create a stock program based on CSLP which could be used with any scenario? There would be some fields that needed to be filled in I'm sure, eg. the name of the scenario.

                            If this were possible, then a few standard functions could be established for starters - such as changing units into something else if a trigger is hit, or allowing specific units to be created only in cities with a certain improvement. The specific event types could be determined later. I'm just wondering if the concept of a derivative program that would be useable by someone without programming experience on any scenario has merit?
                            Tecumseh's Village, Home of Fine Civilization Scenarios

                            www.tecumseh.150m.com

                            Comment


                            • #29
                              Well, that would be possible, but then it would require programming to make that program. And I think there was a reason Angelo Scotto didn't go so far as to make that thing himself.

                              I had a look at that example program, by the way. I think it might actually have been the first time I saw CSPL in action. And to be honest, it was rather sluggish and flukey.

                              Oh, and it's CSPL.
                              Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

                              Comment


                              • #30
                                And I'm cixelsid!
                                Tecumseh's Village, Home of Fine Civilization Scenarios

                                www.tecumseh.150m.com

                                Comment

                                Working...
                                X