Announcement

Collapse
No announcement yet.

Delevents and recurring headaches!

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

  • Delevents and recurring headaches!

    Events headaches, that is!

    I have stumbled into a problem that our resident CIV-meisters might be able to assist me with!

    I made an event for my current WW2 scenario that is triggered when the Allied player researches tech 99. (Allied Invasion)
    Then the event creates the required units (for invasions) and then takes the tech away, ready to be researched again.

    I thought I was being rather clever doing this. In that, I could merely update the events each game-year and create all the
    numerous invasions of WW2, like D-Day, Avalanche and when 1945 comes, switch to generic invasions at random places...

    And then realised that when delevent is run, it will replicate the event! And it did! When the new files are switched and
    the game is reloaded, the event is run afresh, creating tons of new units and ruining the historical flow...! gah!

    The Allies get double rationed invasions, which is good for them, but bad news for Axis players!
    This problem is tied to the nature of my scenaio, being a multi-file affair...The events get reloaded every few turns.

    What I need to know:
    Is there any way to create events invasions that won't be cloned by delevent when files are switched?

    Question to the wise:
    If the event is only available in summer events files, will it show up in winter events later?

    The event in question...


    ;---Operation Avalanche

    @IF
    RECEIVEDTECHNOLOGY
    technology=99
    receiver=Western Allies
    @THEN
    JUSTONCE
    TEXT
    ^
    ^^ Allied generals unleashed a full invasion on the 'boot' of Italy. The Italians and
    ^^ Germans dig in and prepare to meet the powerful American and British force.
    ^^ If the Axis lose this campaign, then it is one step closer to total collapse...
    ^
    ENDTEXT
    CREATEUNIT
    unit=American GIs
    Count=20
    owner=Western Allies
    veteran=yes
    homecity=None
    locations
    221,121
    224,120
    225,119
    223,115
    endlocations
    PlayWaveFile
    ALLIED.wav
    @ENDIF

    @IF
    RECEIVEDTECHNOLOGY
    technology=99
    receiver=Western Allies
    @THEN
    JUSTONCE
    TakeTechnology
    whom=Western Allies
    technology=99
    @ENDIF


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

  • #2
    PS
    An idea that depends on the above:

    I am thinking of making the invasions as 'windows of oppurtunity', only available in the summer season.
    If you miss the chance to research the invasion tech 99 within the summer, then you cannot invade that year.

    *In 1942 you will be able to plan and execute Operation Torch, by researching tech number 99.
    *If you miss that then you will have to wait till 1943 and try Operation Avalanche. (husky happens anyway)
    *Miss the bus in 1942 and 1943, then you can try for the big one, Operation Overlord. (or the alternate England attack)
    *Miss them all, and you must console yourself with random (and slightly risky) invasions of Europe.

    The Allies have a good tech rate, so you will probably be able to get tech number 99 in good time.
    http://sleague.apolyton.net/index.php?title=Home
    http://totalfear.blogspot.com/

    Comment


    • #3
      Re: Delevents and recurring headaches!

      Originally posted by curtsibling
      And then realised that when delevent is run, it will replicate the event! And it did! When the new files are switched and the game is reloaded, the event is run afresh, creating tons of new units and ruining the historical flow...! gah!
      I don't quite understand what you mean.

      You research tech 99, the events are run (you get a text message, units are created and the tech is taken away again), turns go by... Switching time! Then what happens?

      Do you immediately get the new units? Do you get the text message as well? Is it the same old text message, or the text message belonging to the next invasion?

      Delevent doesn't replicate anything. Delevent does nothing more and nothing less than what its name implies: it deletes all the event data from the savegame.

      Upon reloading that savegame, it will notice there are no events embedded in the savegame and it will look for the available events.txt instead. When the game has loaded, those new events are in memory and the old ones are completely forgotten.

      The only thing I can think of is that when you saved your game you have tech 99 and upon reloading, the next events file's ReceivedTechnology invasion event is triggered.

      That means somehow the tech wasn't taken away. The most likely thing I can think of is this:

      If you discover tech 99 more than once within the span of one events file, only the first discovery will actually trigger the invasion. But in the same vein, only the first discovery will trigger the tech's deletion, so the technology will remain. It doesn't trigger any events anymore because of the JustOnce on those. But when you swap files, delevent the savegame and reload your game, the next invasion is immediately triggered because tech 99 is present.

      Solution: remove the JustOnce modifier from the TakeTechnology event.


      What I need to know:
      Is there any way to create events invasions that won't be cloned by delevent when files are switched?

      Question to the wise:
      If the event is only available in summer events files, will it show up in winter events later?


      As I said above, delevent deletes events, so nothing is cloned and nothing shows up in later events.
      Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

      Comment


      • #4
        I think you may have worked it out, Merc! Good show!

        I will test this now...!

        I have been staring at the events for so long that the
        obvious (the JUSTONCE flag) was not apparent to me.

        Again, you show that you have great clarity of vision -

        Last edited by curtsibling; February 25, 2008, 19:32.
        http://sleague.apolyton.net/index.php?title=Home
        http://totalfear.blogspot.com/

        Comment


        • #5
          Two things:
          1. TAKETECHNOLOGY works fine as a "result" of receiving the the technology you intend to take? Great! This will be good for my Sobieski scenario...

          2. I know I've had problems with repeat invasions (i.e. Operation Torch - again, after I've taken control of North Africa.) But I'd still like the option of researching the seperate invasions (i.e. invading N. Africa in 1942, Husky in 1943, Overlord in '44) if for nothing else than the free units.
          The Ghost of the Disco is ... your mastermind, your mastermind!
          2013: A Union Divided|John III Sobieski|Red Storm

          Comment


          • #6
            I was just wondering how you were running the DELEVENT if you don't have a batch file?

            Do you drag the save file onto the DELEVENT or something?

            Excuse my ignorance if I am asking a stupid question!
            SCENARIO LEAGUE FORUM
            SCENARIO LEAGUE WIKI SITE
            SL INFORMATION THREAD
            CIV WEBRING MULTIPLAYER FORUM

            Comment


            • #7
              Originally posted by McMonkey
              I was just wondering how you were running the DELEVENT if you don't have a batch file?

              Do you drag the save file onto the DELEVENT or something?

              Excuse my ignorance if I am asking a stupid question!
              Yep!

              You drag the SAV file onto the icon, and it should do the trick!

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

              Comment


              • #8
                Originally posted by GhostOfDisco
                Two things:
                1. TAKETECHNOLOGY works fine as a "result" of receiving the the technology you intend to take? Great! This will be good for my Sobieski scenario...

                2. I know I've had problems with repeat invasions (i.e. Operation Torch - again, after I've taken control of North Africa.) But I'd still like the option of researching the seperate invasions (i.e. invading N. Africa in 1942, Husky in 1943, Overlord in '44) if for nothing else than the free units.

                What I have done is to follow Merc's sound advice and remove the JUSTONCE flag from the TAKE TECHNOLOGY events.

                Also, the big invasions are available in the summer events of each year, in the winter you get to research reinforcments.

                This will effectively stop the same events running when the files are switched and the 99 tech researched again.

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

                Comment

                Working...
                X