Announcement

Collapse
No announcement yet.

Slic So Compicated!!!!!

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

  • Slic So Compicated!!!!!

    This kind of message would have probably come up long ago; and from time to time,

    "I DON'T UNDERSTAND SLIC"

    ive even tried the "getting started with SLIC" by Peter Triggs. but still no help. I have also looked through the god dam Activision help stuff in this Apolyton site.

    I mean you see pure modders or should i say SLICers in here doing loads of new SLICs and Mods and its pretty much amazing what you can do with SLIC.

    What i'm really loking for is a (any kind) file that edits the AI and makes them sign treaties with each other - you sign a military pact with someone and in no time they want you to attack their enemys (pretty much every civ)

    And so far none of these 'Diplomods' have been able to do that

    When im looking through SLIC files (trying to learn off them) i see all these 'short words' wich i dont understand.

    Whats this abbreviation mean
    'int_t'
    (yes i dint even know what that is)

    i dont know how everyone else find it SOOO easy

    WHY IS SLIC SO DIFFICULT TO UN DERSTAND!!!!!!!

  • #2
    Re: Slic So Compicated!!!!!

    Originally posted by freestyler
    What i'm really loking for is a (any kind) file that edits the AI and makes them sign treaties with each other - you sign a military pact with someone and in no time they want you to attack their enemys (pretty much every civ)

    And so far none of these 'Diplomods' have been able to do that
    I thought the new version did to some extent? I'm sure Peter or Martin could tell you
    Hate to say it, but SLIC can do this easily, if you just want the AI to like each other. To make it have any kind of discretion about who to sign with takes more time.
    When im looking through SLIC files (trying to learn off them) i see all these 'short words' wich i dont understand.

    Whats this abbreviation mean
    'int_t'
    (yes i dint even know what that is)

    i dont know how everyone else find it SOOO easy
    Its not easy by any means, and I had tremendous difficulty getting into it. (Search for the number of "SLIC help" threads I started a few months ago )
    You're going to hate me for saying this, but it really is a matter of practise, and reading through SLIC coding to see what it does. Most of the MedMod stuff is heavily commented so Wes can understand it so it can be easy enough to look through it, and see things like:
    PHP Code:
    KillUnit(tmpUnit
    and figure out it means that the game kills the unit that is defined as tmpUnit. (temporary unit)

    Personally I think the way Wouter and Peter go about explaining it is a little wierd for complete non-programmers, but I haven't got time to do a different explaination.

    Basically, I started by reading through the Activision docu, and then figuring the functions. ( I printed out the docu, then read it every time I took a dump. I got to understand the simpler bits of it quite fast that way )
    'int_t'
    int_t is a definer. Note it is always followed by another word, something like 'i' or 'tmpNum' This is how to define a variable.
    Code:
    int_t tmpNum;
    just means that whenever the word 'tmpNum' comes up in the code, the game will know to treat it as an integer.
    Unit_t, location_t, army_t all work the same. (with units, locations, armies etc)

    SLIC is complex to learn well, but if you can recognise what are the complex bits, and what are the simpler bits, then getting used to it from the bottom up is the way to go. For simple SLIC, avoid Locutus' stuff avoid AI functions (dale's mostly ), avoid Peter's SLIC, because its all cramped and has far too many 'time-saving' functions . Avoid the Alexander scenario.
    My first SLIC that worked (just) was the wonderunits code in Cradle, that is entirely based on a few events, and a few simple functions. Martin's slics are fairly simple stuff too, based on one or two events, and a messagebox or so. The Big Mc has just done some simple stuff too, but the layout is a bit dodgy

    Anyway, having insulted everyone here I'll close by saying I will do a quick-guide for newbies, based on event-based programming, rather than object-orientated rubbish as soon as I have a spare hour or so. (Maybe Friday/Saturday)

    Good Luck, don't get mad.

    Ben
    Concrete, Abstract, or Squoingy?
    "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

    Comment


    • #3
      the main reason SLIC i so hard to learn is that it is a programming language, and as programming languages go its not very elegant eighter. this also explains why SLIC is so powerfull, you can program whole new things with it
      i will recoment that you learn the basics of programming in some other language that is well documented and perhaps has a few good introduction texts on how to learn to program.
      this might seem like a detour, but if you learn to program in another language first then its much easyer (like in, almost no effort) to learn SLIC.
      i will recoment that you start out with Java because the syntax is almost the same as SLIC, the development tools are free to download and a comprehensive guide for complete newbies can be located at suns website

      the guide
      java programming, learn java, java examples, java sample code, getting started with java


      now if someone just had a link to a site that has some info on event driven programming

      i hope this helps
      klaus

      Comment


      • #4
        I think I know your problem you have looked at the scenarios from Activision and the amount of text scares you. it's not like that. A bit of slic can be only 5 lines. Keep it simple make small amounts of slic to start with to billed up your confidence ( its how I started with only being able to program in vb) . if you still cant get it to work make a copy of the Activision ones and just alter the lines of code you get to see what line does to the relevant code. You can use this in your own scenario later by implementing the copied lines(the jigsaw and hammer approach).

        just Keep it simple

        Good luck
        "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


          The promised quick-guide

          Not perfect, but probably not finished either.
          Attached Files
          Concrete, Abstract, or Squoingy?
          "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

          Comment


          • #6
            Wow!!! Theres quite alot of info here, i think i'll go and take a look at it all,

            Thanks for the time & effort you put into it,

            Cheers!!!

            Comment


            • #7
              just down loaded the slic help file chance is I may find something useful I put this reply up because I don't like downloading stuff without telling the person I will let you know what I think later.
              "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


              • #8
                looked at it it looks interesting found out how to do while coding.

                I will look at it when I am stuck but there is still stuff that I am a bit of with. like the mod I made so that the AI gets new armies at the side of there city but it did the other AI too.
                "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


                • #9
                  Originally posted by The Big Mc
                  I will look at it when I am stuck but there is still stuff that I am a bit of with. like the mod I made so that the AI gets new armies at the side of there city but it did the other AI too.
                  Post the code (copy-paste it in) and we'll see. I suspect its triggering on every AI turn, you'll need to select which AI you want.

                  if(player[0] == 2) {

                  or similar.
                  Concrete, Abstract, or Squoingy?
                  "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

                  Comment


                  • #10
                    thanks it's does small bits of codes you don't find in the Activision scenarios.
                    "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


                    • #11
                      I did slic, works good, got to test it like.

                      I have had a problem with an if to find if player 0 has over 6000. I tried to find the relevent code in the Activision stuff but it's mostly in the msg boxes can you help
                      "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


                      • #12
                        Why not to give SLIC advice from school, and the joys of editing posts...

                        I assume you mean you mean player[0]...

                        There is no built-in variable for player gold, so you have to use a function:
                        Code:
                        if(PlayerGold(player[0]) >= 6000){
                        Concrete, Abstract, or Squoingy?
                        "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

                        Comment


                        • #13
                          thanks again.

                          I normally look at the Activision stuff to see if there is a bit of code to do it I found a small bit but it was in an msg box.

                          The code is for bank robbery I posted the first go about a month a go and it's a bout time an improved it.
                          "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


                          • #14
                            I made a new bit of slic for barbarians to sell cites see exchange cites and I added a file were I explained what the slic did to all the people who are just starting with slic
                            "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


                            • #15
                              I am looking for how to add slaves to a city there most be some code to do it some where.
                              "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