Announcement

Collapse
No announcement yet.

Need some help from the slic guru's

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

  • Need some help from the slic guru's

    Hi guys, I was wondering if anyone has some more information of the use of regions in slic. The part I really don't understand is this Region name [ x1,y2, x2, y2];. It's the [ x1,y2, x2, y2]; in it i don't understand. I take it x1, y2, stuff is map cooridinates but why is there 4 cooridinates? I thought skorpion59 mentioned that he was working on borders. I can see how this can be done with the region variable.

    Also, in the dutcheese slic documentation for v1.2. I noticed the getstringdbindex, setstringbydbindex, and setstring. Is this like a fprintf or fscanf functions in c. Can we change strings through these three functions. Has anyone tried some of this stuff. I've fooled around with the region stuff but not the string stuff. Thanks guys.



    ------------------
    Gemini

  • #2
    Gemini,

    Yes, you are correct. I am working on borders and this is why I undertook that project.

    Therory:
    Regions are parallelogram's (opposite sides parallel). So x1,y1 is the lower left corner while x2,y2 is the upper right corner of the region expressed as map locations. (This isn't actually right because CTP locations are x1,y1,z1 but I won't go into that now.)
    Syntax:
    Region simple1 [x1,y1,x2,y2];
    Region simple2 [x1,y1,x2,y2];
    Region complex=simple1+simple2;
    Examples:
    Region Test1 [1,1,5,5];
    Region Test2 [15,20,20,30];
    Region TestAll=Test1+Test2;
    Use:
    You want city borders 3 tiles wide and civ borders encompassing all the city borders.
    Boston is at map location 10,18,0. New York is at map location 25,25,0. Do the following:
    Region BostonBorder [7,7,21,21];
    Region NewYorkBorder [22,22,28,28];
    Region CivBorder=BostonBorder+NewYorkBorder;

    Reality:
    Regions don't work. Most of the functions flat do not work (the code was never included). The remaining has code included but the code doesn't always work right. Also, the complex region define doesn't work right. You can do the define without errors but it doesn't produce anything the game can understand or use. So basically, regions are totally useless and I am trying to find other ways to make borders work.

    As for your other questions, I have not messed with that particuliar code yet.

    I'm short on time right now but I think I will be able to spend some time tonight emailing and apolytoning so email me if you have other questions.



    ------------------
    Don, Apolyton Junkie

    Don,
    CtPMaps (Hosted by Apolyton)

    Comment


    • #3
      Hey, Thanks Skorpion59. It's to bad that the regions don't work. I also wish there was some slic v1.2 documentation that would explain how to use some of the new functions so I wouldn't waste hours trying to figure out how to use them!!!!!!!!!!!

      ------------------
      Gemini

      Comment


      • #4
        Gemini,

        Well, I am wasting the hours and days on them so others don't have to. That is why it takes so long. Figuring out what doesn't work, what does work and how it works is taking much more time than I ever imagined.

        ------------------
        Don, Apolyton Junkie

        Don,
        CtPMaps (Hosted by Apolyton)

        Comment


        • #5
          That must be very frustrating at times skorpion59. But we all appreciate your effort to save other people time. I wanted to mention something maybe you already know but maybe you don't so I'll say it anyway. Okay player.researching appears like it does work, I've tested it a bunch of times. It holds the value of what the player is currently researching(obviously). Also addgold(). Does what it is suppose to. But for some reason until recently I didn't think of trying to decrease gold using this function. Just do this: addgold(player, -1000) for example. It would take away 1000 gold. I was also thinking for the view enemy units stack trigger. Instead of using a counter per turn to control how many times a human player can use the view stack trigger why not decrease the players gold by each use.

          ------------------
          Gemini
          [This message has been edited by gemini (edited January 25, 2000).]

          Comment


          • #6
            G,

            Thanks for the info. Any time I can get information that will save me time, I will take it. I had not thought about using a negative with gold. That could come in handy many places. (Like your view stack idea, I like it.) You can use negatives in other functions though. That is how I made my city killer function. Addpops(-25) will blow a city away all in one shot. It is much better than slowly getting rid of a city over many rounds. I then add back x number of settlers depending on how big the city was (Thanks, Wes.) CTP has the option to disband a city of any size but once again, the code wasn't finished so it doesn't work on anything but size 3 or smaller cities.

            If you have any more known working functions (or known not working) or if anybody else has, I would be very interested in you posting them or emailing me with the info. Even if I have the info, I am always interested in other peoples ideas on code. That would help speed up the process. Oh, syntax info would be good too since CTP documentation doesn't always get this right. (Like Region name above, what CTP said was wrong).

            ------------------
            Don, Apolyton Junkie


            [This message has been edited by skorpion59 (edited January 25, 2000).]
            Don,
            CtPMaps (Hosted by Apolyton)

            Comment


            • #7
              Hey skorpion59, ya I never thought about a negative value in the addpops function. Cool Idea!!!!! Also I have been fooling around with alot of slic lately. I had the same syntax errors you probably got when trying to use the region thing.

              Also I was fooling around with the dosellimprovement function. I don't think it works. I kept getting not enough argument errors. At one point I passed in 10 arguments to see what would happen and I still got not enough arguments. Well I'm not the most experienced programmer but I don't think this function works. Too bad. I was hoping that it would because I had the idea that I could use this in some kind of fashion to simulate a bomber bombing a city. It would have a chance that it could destroy a building when air bombing occured. Then I could use the dosellimprovement func to get rid of the improvement. I think that would be so cool. It'd be good for my scenario and also maybe something to spice up the regular game. Oh well. They say I'm just a dreamer.

              ------------------
              Gemini
              [This message has been edited by gemini (edited January 25, 2000).]

              Comment


              • #8
                The idea is interesting. It will be a spy function with a cost
                Apolyton QuickStart for CTP PBEM

                Comment


                • #9
                  Gemini,

                  The following 'Do' SLIC Functions don't work.
                  DoAutoUnload()
                  DoCannotAffordMaintenance()
                  DoCannotAffordSupport()
                  DoCertainRevolution()
                  DoCityWillStarve()
                  DoLandInOcean()
                  DoOutOfFuel()
                  DoSellImprovement()
                  DoYouWillBreakRoute()

                  While these 'Do' Functions do work.
                  DoFreeSlaves()
                  Frees the slaves in city.1, but only works if the city was captured this turn.
                  DoPillageOwnLand()
                  Unit.1 pillages the tile he is on even if it is his.

                  So, I have to say you are out of luck with the DoSellImprovement() Function.

                  You have to be careful when testing this out. Some functions don't work and never have (the code was never implemented at all). While other functions, worked at one time but not any more (the existing code was removed, modified or obseleted in some way). The never worked code is pretty cut and dried. You can't get past the syntax errors when defining it. The used to work code is another story. Generally you can get past the syntax errors but the results are not correct. If you get past the syntax but something just doesn't quite seem to work right, display the function parameters in a messagebox and look to see what is in it. (Important: Make sure you only display the parameters WHILE you are testing the functions. If you try to do this without testing the function, it will throw all the rest of your parameters off and nothing will work, not even good code). For the functions that don't have parameters, you are basically out of luck.
                  WARNING: The above info is generalized and will not bear out 100% of the time. Some of the stuff in CTP is so off the wall it defies any sort of logic at all.

                  Don

                  [This message has been edited by skorpion59 (edited January 26, 2000).]
                  Don,
                  CtPMaps (Hosted by Apolyton)

                  Comment


                  • #10
                    Hey, Thanks for the info Skorpion59. Ya I was wondering if some of the ones you listed above worked. It's really a shame though that slic isn't more powerful because it could add so much more fun. Well I'll talk to you later.

                    ------------------
                    Gemini

                    Comment


                    • #11
                      Could this negative gold function be used to re-do the early Spy abilities, like what we wanted to do with them initially, but couldn't because the 2500 gold was fixed?
                      (The above is a classic example of a run-on sentence. Students, avoid them at all cost.)

                      Comment


                      • #12
                        Wes,

                        Good idea but I doubt it. (Saying this without giving it much thought). You would still have to use the unit's ability as defined in the units.txt file which would still pose the 2500 problem. I could look at it though.

                        Run-on sentence? I don't see no stinkin' run-on sentence. They only hang around English classes, not Internet Forums. (Kind of like the individuals who think people should only use correct English syntax when they make their login names here. Give me a break.)


                        ------------------
                        Don, Apolyton Junkie

                        Don,
                        CtPMaps (Hosted by Apolyton)

                        Comment

                        Working...
                        X