Announcement

Collapse
No announcement yet.

PW City Improvement wanted!

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

  • #16
    YAHOO!

    Thanks sooo much!!

    Now, {clearing throat} I can now experiment having your code as a basis, I ma now ready to crash my game..er..um..I mean learn to properly write code

    It works, U R Da Man and in honor of you, I shall name my 100th city, (Hey in Trolldom, it IS quite an HONOR!! ) after you!!

    Now, I am headed to church and when I return, I am off and running!!
    Oh and since Mail isnt running this date, your "IT Consultant Fee" SHOULD be in the mail maybe..tommorrow..perhaps..hmm..

    WOW, I even feel writing this, because as Ren and Stimpy say to each other..I feel like such an

    Thanks again my friend!!
    I shall keep you posted!!

    Later!!

    Troll
    Hi, I'm RAH and I'm a Benaholic.-rah

    Comment


    • #17
      HOLD DA PRESSES!!!!!!!!!!!

      Ugh!

      This code works fine with one exception, it gives the pW ok, but only one time!

      I would like it to do it each turn, is this possible?

      I looked through all the scripts of slc and couldnt see what exactly to put to achieve such a task.

      I was reading an article on Scripting from Joe Rumsey-June 18, 1998 (I think he went by the name of MR.Ogre-a CTP Programmer) and it had some interesting points, it stated that when both g.player AND unit.built are listed, the trigger will ONLY be checked when the unit is built.
      I was thinking that this is probably the same for improvements, you only get the additional PW ONCE, that being when a University is built.

      I also noticed some remarks about "LOOPING", which I am making a stab-in-the-dark, that this would mean the trigger would actually "LOOP" or re-occur?..My question is "HOW"?

      Hmm, lots of learning to do, but am looking for any/all input!!

      ~Peace~

      Troll
      Hi, I'm RAH and I'm a Benaholic.-rah

      Comment


      • #18
        eh? I'm sure it repeated correctly for me. I'll go check again. There's no reason I can see that it won't work again...

        Comment


        • #19
          It's certainly repeating correctly for me. Are you getting it just once ever, or just once for each city? What if two cities build their universities on the same turn?

          Comment


          • #20
            Originally posted by J Bytheway
            It's certainly repeating correctly for me. Are you getting it just once ever, or just once for each city? What if two cities build their universities on the same turn?
            Wll, I have right now 39 cities built and was monitoring actual "PW" bank and noticed for 3 turns it stayed at 500 pw, but will go back and monitor closely, HEY, it was late, maybe I was seeing things..

            Ill repost to verify and get back.....

            Thanks!

            Troll
            Hi, I'm RAH and I'm a Benaholic.-rah

            Comment


            • #21
              Remember that if you have a saved game from before you made the change you must reload SLIC for the changes to take effect. Do this by opening the chat window (with the apostrophe) and typing /reloadslic

              Comment


              • #22
                Originally posted by J Bytheway
                Remember that if you have a saved game from before you made the change you must reload SLIC for the changes to take effect. Do this by opening the chat window (with the apostrophe) and typing /reloadslic
                Ok Thanks!!

                Now, (BIG SHEEPISH GRIN) It is working correctly now, and I guess what I must have done was sleep and for whatever reason when I woke up, forgot to open my eyes!!!

                Thanks for all the help!!

                On another issue, did you see my post on canals?




                ~Peace~

                Troll
                Hi, I'm RAH and I'm a Benaholic.-rah

                Comment


                • #23
                  [QUOTE] Originally posted by J Bytheway


                  Code:
                  trigger 'AddUniPW' when(g.player) {
                    SetPlayer(1, g.player);
                    i=0;
                  
                    while (i < player.1.cities) {
                      SetCityByIndex(1, player.1, i);
                      if (CityHasBuilding(city, "IMPROVE_UNIVERSITY")) {
                        SetPW(player.1, player.1.publicworkslevel + 10 * city.population);
                      }
                      i = i + 1;
                    }
                  }


                  Ok, In the above trigger, if I wanted to also make an additional building do the same, I see where you need the exact city improvement name, but also saw where you had 'AddUniPW' ...is the "UNI" in that just an abbreviation and say if I had for instance marketplace could I put Baz..I believe Bazaar is the entry..

                  Just asking..

                  Thanks

                  Troll
                  Hi, I'm RAH and I'm a Benaholic.-rah

                  Comment


                  • #24
                    The name 'AddUniPW' could be anything at all - so long as it's different from the names of all the other triggers. You could use 'AddBuildingPW' If your trigger covers more than one building, or 'TrollsAmazingZoonyTrigger' if you wanted to be strange.

                    The only place where you'll ever use this name is when you cancel a trigger (so that it won't execute any more).

                    Comment


                    • #25
                      Originally posted by J Bytheway
                      The name 'AddUniPW' could be anything at all - so long as it's different from the names of all the other triggers. You could use 'AddBuildingPW' If your trigger covers more than one building, or 'TrollsAmazingZoonyTrigger' if you wanted to be strange.

                      The only place where you'll ever use this name is when you cancel a trigger (so that it won't execute any more).
                      Whats wrong with 'TrollsAmazingZoonyTrigger'



                      Ok, so I could put anything, understood, and now if I want to I can add an additional building!

                      Really Appreciate the help

                      Troll
                      Hi, I'm RAH and I'm a Benaholic.-rah

                      Comment


                      • #26
                        Wow!
                        Thanks for advice, I well..YOU showed me how and although it is a real baby step, did my first and it works fine!
                        I made granary "SILO" as an additional PW providing structure.
                        The way i figure is that even in real life (Which of Course TROLLDOM is) there are many ways of providing PW, some through taxes and some through bonds and well, even some from other civs..er..I mean municipalities assisiting ones growth.

                        Well, I shall ponder other possible triggers!!



                        Peace

                        Troll
                        Hi, I'm RAH and I'm a Benaholic.-rah

                        Comment

                        Working...
                        X