Announcement

Collapse
No announcement yet.

Immediately showing Great Library link for advance breakthrough

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

  • Immediately showing Great Library link for advance breakthrough

    Hi,

    What I'm trying to do is whenever you gain an advance, the Great Library entry for that advance will automatically pop up. However, I can't seem to find an event that is related to the discovery of a new advance.

    Is there such an event, should I try a different approach or is it simply impossible?

    (My goal with CTP2 is to mod it so it plays more like Alpha Centauri).


    - Azulthar

  • #2
    The GrantAdvance event is the event on that you need to use in the event handler, the LibraryAdvance function is needed to open the Great Library.

    Code:
    HandleEvent(GrantAdvance)'MG_ShowAdvance'post{
        if(IsHumanPlayer(value[0])){
             LibraryAdvance(value[1]);
        }
    }
    Let's hope value[1] is the database index of the advance in question. The whole code just needs to be copied into a slic file that is already recognized by the game and of course if you add it to an already started game you have to /reloadslic. To do it just open the chat screen by typing the apostrophe key (') and enter: /reloadslic

    Disclaimer: The code is untried, untested, might be buggy.

    -Martin
    Civ2 military advisor: "No complaints, Sir!"

    Comment


    • #3
      Actually, value[0] is the AdvanceDB index. This works fine:

      Code:
      HandleEvent(GrantAdvance)'MG_ShowAdvance'post{
          if(IsHumanPlayer(player[0])){
               LibraryAdvance(value[0]);
          }
      }

      Comment


      • #4
        Azulthar

        Nice to see a new face

        What parts of alpha century do you want to convert to ctp2?
        "Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
        The BIG MC making ctp2 a much unsafer place.
        Visit the big mc’s website

        Comment


        • #5
          Thanks all.

          The Library entry pops up, but it's always showing the same entry (adv. military tactics). I've experimented a bit with the values but I can't remember if I tried value[0] is an argument. I will try it right now and let you know if it works.

          The Big MC:
          Not the graphics or the setting or anything like that. It's more the level of detail that AC had that appeals to me.

          I'd also like to have just a few unique civs instead of the large number you get now (but all play the same). The first step towards this is to remove the random advances gained at the start of the game and then give some based on your civ. Hope this can be done.

          *added*
          Well, value[0] works! Then again, you already mention this in your post...
          Last edited by Azulthar; March 5, 2003, 08:32.

          Comment


          • #6
            Very easy all you need to do is edit a file and no one will get the advances.

            Alternately just put some slic together to remove the advances when the game begins.
            "Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
            The BIG MC making ctp2 a much unsafer place.
            Visit the big mc’s website

            Comment

            Working...
            X