Announcement

Collapse
No announcement yet.

Mr Ogre? (TP, let´s put all SLIC questions here)

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

  • Mr Ogre? (TP, let´s put all SLIC questions here)

    Sorry to bother, but it seems that more question arise all the time about SLIC. Just wanna pop these questions... (nagging again, i know. Im just a perfectionist )

    Is there no SetPlayerByIndex? Just want to have all the players as they started to be able to use all their names in the demographics... (and know how many they are)

    I noticed that player.1.gold worked but player.1.discoveries gave the number 148 (total number of advances????), when i had researched 10/70, what does it really show? is there any other variable for the amount of sciences one have discovered or must one check each and every with HasAdvance(player, advance_name)?
    Which by the way i didn´t get to work, even this didn´t work
    if HasAdvance(g.player, ADVANCE_AGRICULTURE) {
    code
    }
    this never happend, what´s wrong? i tried changing everything...

    And the total pop? must one sum all from the cites or? I thought since it is displayed everyturn it must be a variable...

    More, Land. Is there a variable for the amount of land owned or?

    Can one change the size of messageboxes or have multiple textcommandos in the same window (i have tried but failed)

    Textvariables like player.1.civ, can you make those user defined?


  • #2
    I´ll keep on, but this one must be easy, it´s only me that is stupid.

    I use a loop to check all cities(aCity is the counter), and
    SetCityByIndex(1, player, aCity); is said to be used to snoop through cities.

    But how can one make a loop that calls on city.1 then city.2 then city.3?

    can one write city.aCity or?

    Comment


    • #3
      Bumping this againg... (i cry myself to sleep every night for not being able to continue :-) )

      Comment


      • #4
        Well I can’t really identify your specific problem, you need to post some more details on this problem if you want any useful help.

        Enslave them all!

        Thomas Diemar
        <font color=EE0000>Enslave them all!!
        Thomas Diemar
        </font>

        Comment


        • #5
          There's a SetPlayer() function that does what you want, I think. IE SetPlayer(1, 2) will make player.1 refer to player #2.

          You're right about player.discoveries. It's useless. It SHOULD be returning the number of advances that player has discovered, but isn't. It's fixed for 1.2, thanks for pointing it out.

          For HasAdvance, you need to preface the second argument with ID_. It's keying off string IDs, and string IDs in SLIC always use ID_whatever. So, try if(HasAdvance(g.player, ID_ADVANCE_AGRICULTURE)) and see where that gets you. It's confusing, I know, sorry.

          You can't have multiple text commands per messagebox, or change the size. There's nothing for total population, you'll have to add it up yourself.

          There are some small additions for dealing with strings in 1.2. It's not everything people have asked for, but I think it'll allow most of what people are actually trying to do.
          
          Sorry it took so long to answer these.
          Joe Rumsey - CTP Programmer

          Comment


          • #6
            Thanks alot man! X-Mas again!

            Comment


            • #7
              Another short one:

              SetCityByIndex(index, player, cityindex)

              Both me and TP have been trying "snoop through a players cities" with this one and failed, getting a out of bounds value.
              We have used mostly Index=1 ,player=player, and cityindex=countervariable, and tried acess the city.1.stuff. But then comes the out of boundry error.

              Now that i think of it´, it might be that we use player=player, maybe one need a number like for SetPlayer(). I will try that, but if you can, please clear this confusion!

              Thanks a million already, can´t wait for patch 1.2 !

              Comment


              • #8
                Urgh. My fault, glad you caught it. SetCityByIndex is broken. I fixed it just now. Wait for 1.2.
                Joe Rumsey - CTP Programmer

                Comment


                • #9
                  Im glad it was busted! I felt so stupid not getting it to work properly

                  Mr Ogre, do you want tips on what SLIC commands to implement or? Maybe tolate for 1.2 or?

                  Comment


                  • #10
                    Depp,

                    We all know since a couple of days that the patch has already left the programmers and is in testing. So I don't think there is much room to change things now.

                    Let's trust Activision on the whole patch and Mr. Ogre on the SLIC part. I am sure there will be enough things which will undermine the relationship to my girl-friend :-)

                    TP

                    Comment

                    Working...
                    X