Announcement

Collapse
No announcement yet.

Question

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

  • Question

    Have you folks seen in Civ3 how a unit's sighting radius increases when the unit stands on top of hills or mountains? I think this is a very interesting feature and I'm wondering if it could be added to CTP2. Has anyone else tried this before?
    Try http://wordforge.net/index.php for discussion and debate.

  • #2
    Inoticed the fact you can see far...

    only play it a couple times... hated it

    Comment


    • #3
      If balanced nicely,say just a one or two extra squares viewing distance, then it would be a good feature to have. Hmmmm, a z dimension in CTP2 terrain? I've no idea, but could be easy to do i guess. Just as units get a bonus defence when on mountains i suppose you could just add a bonus to units view range in the same way?
      'The very basis of the liberal idea – the belief of individual freedom is what causes the chaos' - William Kristol, son of the founder of neo-conservitivism, talking about neo-con ideology and its agenda for you.info here. prove me wrong.

      Bush's Republican=Neo-con for all intent and purpose. be afraid.

      Comment


      • #4
        I can't see any way to do that short of adding an additional unit to the square with the longer sight range, which obviously runs into trouble when the square has 12 units in...

        Comment


        • #5
          Well, it's easy to do but a lot of work. In the same fashion that the units in the 7 Samurai scenario get increasing hitpoints, etc, you can increase vision as well. It requires however that you have multiple versions of every unit: one with vision range 1, one with vision range 2, etc. Your Units.txt file (and other related files) would get 2-3 times bigger than it already it (and it's a lot of type/copy-paste work)...
          Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

          Comment


          • #6
            So it could be done. Would it slow the game down to a crawl with all that extra weight in the Units.txt files etc?
            Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
            CtP2 AE Wiki & Modding Reference
            One way to compile the CtP2 Source Code.

            Comment


            • #7
              I don't think so, not significantly anyway. But then again, noone ever tried tripling the total number of units in the game (and don't forget that in some mods we already almost doubled the number of units compared to the original game)
              Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

              Comment


              • #8
                What would slow the game down (if anything) would be the constant SLIC execution whenever a unit moved. I doubt my P200 could plough through the AI turns very quickly. Perhaps give the AI the long-sight versions everywhere to speed things up.

                Comment


                • #9
                  You'd be surprised. The Alexander scenario has dozens of UnitMove events, doesn't hurt all that much (yes, it's very slow on a P200 but experience shows that that's mostly because of the huge map and loads of cities & units).
                  Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                  Comment


                  • #10
                    I think you guy are going the harder way.
                    The easiest thing to do is to create a invisible improvement under the unit. if unit has vision range 1 it creates a vision 2 imp, if hs vision 2 creates a imp with 3. When the unit move out the tile the imp is destroyed.
                    "Kill a man and you are a murder.
                    Kill thousands and you are a conquer.
                    Kill all and you are a God!"
                    -Jean Rostand

                    Comment


                    • #11
                      Originally posted by Pedrunn
                      I think you guy are going the harder way.
                      The easiest thing to do is to create a invisible improvement under the unit. if unit has vision range 1 it creates a vision 2 imp, if hs vision 2 creates a imp with 3. When the unit move out the tile the imp is destroyed.
                      Actual this is the harder way, first you have to create the tile improvement, but then it isn't finished so you need a second event to finish it, until tehn the unit left the mountain. Then you can only build a tile improvement on land with an owner so you would have to give the land to the civ to which the units belongs. So it would only effective to use the test tile improvement of GoodMod for it. You couldn't pillage without huge problems the tile improvement afterwards. And if you pillage the location you will remove all the tile improvements at that place. So I would say it is possible to do it this way but the price is too high.

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

                      Comment


                      • #12
                        Originally posted by Martin Gühmann


                        Actual this is the harder way, first you have to create the tile improvement, but then it isn't finished so you need a second event to finish it, until tehn the unit left the mountain. Then you can only build a tile improvement on land with an owner so you would have to give the land to the civ to which the units belongs. So it would only effective to use the test tile improvement of GoodMod for it. You couldn't pillage without huge problems the tile improvement afterwards. And if you pillage the location you will remove all the tile improvements at that place. So I would say it is possible to do it this way but the price is too high.

                        -Martin
                        Couldn't you just reach into the structure of each unit to the visionrage through a .slc? it seems that all you would need to do (And I haven't fully undertaken learning all the .slc variables) is write a .slc that says in essence:

                        While terrain = mountain or hills (In another .slc project I was reading about the land was being checked to see who was the owner in order to influence the movement rate, so it seems this could be done),

                        UNIT_[TYPE or whatever the varible should be].visionrage = UNIT_TYPE.visionrange + 1

                        Comment


                        • #13
                          Originally posted by ahenobarb
                          Couldn't you just reach into the structure of each unit to the visionrage through a .slc? it seems that all you would need to do (And I haven't fully undertaken learning all the .slc variables) is write a .slc that says in essence:

                          While terrain = mountain or hills (In another .slc project I was reading about the land was being checked to see who was the owner in order to influence the movement rate, so it seems this could be done),

                          UNIT_[TYPE or whatever the varible should be].visionrage = UNIT_TYPE.visionrange + 1
                          The problem here is there is no slic function that allows us to increase the vision range of an unit. I can damage it and I can add/remove move points, unfortunatly nothing more.

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

                          Comment


                          • #14
                            Originally posted by Martin Gühmann


                            The problem here is there is no slic function that allows us to increase the vision range of an unit. I can damage it and I can add/remove move points, unfortunatly nothing more.

                            -Martin
                            You guys are the experts in this, but in looking at the units.txt file, all the units are set up as C structures. As you know any C structure element can be access by referencing the structure name adding the structure member operator (i.e. '.' ) and the name of the structure element you want to access (in this case, for example "UNIT_ARCHER.visionrange" Visionrange is one of the elments in a unit structure listed in units.txt). Once you have refenced the specific element you want, you should be able to change it.

                            What I don't know is whether you can do this with .slc
                            I'm not certain if .slc only let's you use the variables that are named in the modification section of the CTP2 portion of this site. Or, if once you know a structure name, you can access that structure just like a C strucutre through the .slc file.

                            Since I haven't learned enough about .slc to try to write some code yet (I'm still in the middle of my first real game), I'm passing it along in case one of the experts wants to try their hand at it.

                            Comment


                            • #15
                              Originally posted by ahenobarb
                              You guys are the experts in this, but in looking at the units.txt file, all the units are set up as C structures. As you know any C structure element can be access by referencing the structure name adding the structure member operator (i.e. '.' ) and the name of the structure element you want to access (in this case, for example "UNIT_ARCHER.visionrange" Visionrange is one of the elments in a unit structure listed in units.txt). Once you have refenced the specific element you want, you should be able to change it.

                              What I don't know is whether you can do this with .slc I'm not certain if .slc only let's you use the variables that are named in the modification section of the CTP2 portion of this site. Or, if once you know a structure name, you can access that structure just like a C strucutre through the .slc file.
                              Would it is such easy then you have to answer me this question: Why we need such a function to add additional movement points:

                              AddMovement

                              Another question would be what do you exactly change if you use the dot operator, do you change just the vision range of one particular unit or would it rather change the vision range of all the units of the same type. Of course I didn't tryed it, so at least I will try it afterwards I finished my GOTM, finished GoodMod1 v.1.0 and started with GoodMod2, there such a thing would be very helpfull if it work.

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

                              Comment

                              Working...
                              X