Announcement

Collapse
No announcement yet.

How to make "BombardRange" work?

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

  • How to make "BombardRange" work?

    I am thinking of set "BombardRange" from 1 to 2 or even more, so, for example, my Artillery can bombard enemy troops without moving beside the target troop. Can this be done? I tried modify units.txt, no luck. Pls help.

  • #2
    Sorry FrenzyHuman, no can do.

    Tried it myself a while ago and I also went here in hope of finding some info but they all said the same as I'm telling you now:

    The bombardment range is fixed to 1 no matter what you enter in the .txt files. Maybe you could do something in SLIC (just guessing) like:
    -create an artillery unit on a square next to target.
    -use it to bombard nearby square.
    -kill the newly created unit.

    I don't know how that will work in general (AI?) but let
    me know if you try it.
    So much to do in so little time...

    Comment


    • #3
      I would modify these entries in the unit.txt:

      BombardRange 1

      And it might help if you would modify this order especially the range entry in the order.txt:

      PHP Code:
      ORDER_BOMBARD {
        
      Gold 0
        Move 100
        EventName 
      "BombardOrder"

        
      LocalizedName str_ldl_order_bombard
        StatusText str_ldl_order_bombard

        TargetPretest
      :EnemyCity
        UnitPretest_CanBombard  

        Range 1

        CPIcon 
      "upsi01.tga"
        
      ButtonLocation 8
        DefaultIcon ICON_ORDER_BOMBARD
        
      # FIXME - these are the default special action cursors
        
      Cursor 7
        InvalidCursor 8

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

      Comment


      • #4
        Thank you DDowell, I understand what you said.

        Thanks to Martin too, while I don't quite understand that block of PHP code, to be frank

        Comment


        • #5
          Originally posted by FrenzyHuman
          Thanks to Martin too, while I don't quite understand that block of PHP code, to be frank
          Its an extract from orders.txt

          Martin was pointing out that you might want to find that extract, and chaneg the line:
          Code:
          Range 1
          To perhaps Range 2 in order for it to work.
          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
            Originally posted by FrenzyHuman
            Thanks to Martin too, while I don't quite understand that block of PHP code, to be frank
            Actual it isn't PHP code, I just used the PHP syntax highlighting feature of this feature, I could also use the simplw Quote or Code tag. You can find this piece of code in a file called Orders.txt (this time spelled correctly) in your ..\ctp2_data\defaut\gamedata\ folder, the same directory where you find the unit.txt. So what I actual suggested was to open the orders.txt with any editor e.g. notepad (if you want to modify the file for the original game, if you want to modify a file of Cradle, MedPack2, ApolytonPack or GoodMod you need to look for a file with a CRA_, MM2_, APOL_ or GM1_ prefix). Once you opend this file go to the ORDER_BOMBARD entry that I quoted above and modify the Range entry, I just would increase the number there and look what happens. Note maybe you have to modify every BombardRange entry in your unit.txt, too.
            -Martin
            Civ2 military advisor: "No complaints, Sir!"

            Comment


            • #7
              Thank you all, now it's clear, I will try and see what happens.

              Comment


              • #8
                So? What happened?
                Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                Comment


                • #9
                  Originally posted by Locutus
                  So? What happened?

                  lol

                  Comment


                  • #10
                    Yes, I'm curious how this comes out as well. It always struck me as strange that the artillery had such limited range.
                    "Guess what? I got a fever! And the only prescription is ... more cow bell!"

                    Comment


                    • #11
                      What puzzles me about that order that Martin posted above is "TargetPretest:EnemyCity". It doesn't seem to stop you from bombarding enemy units in the field.

                      Comment


                      • #12
                        I think this would only a problem if you only made a bombard goal for bombarding cities but Wes already fixed this by adding a bombard goal for units. By the way has someone a shure idea what these distance to Home/Enemy Boni lines could mean in addation to the short discription here on Apolyton?

                        -Martin


                        PHP Code:
                        GOAL_BOMBARD {
                          
                        SquadClass:CanDefend
                          SquadClass
                        :CanAttack
                          SquadClass
                        :CanBombard

                          TargetType
                        :City
                          TargetOwner
                        :HotEnemy

                          Execute    ORDER_BOMBARD
                         
                          ThreatBonus         
                        -100
                          EnemyValueBonus         
                        -100 //WW from 100
                          
                        AlliedValueBonus            0 //WW from 1000
                          
                        PowerBonus                0 //WW from 150
                          
                        DistanceToHomeBonus        15
                          DistanceToEnemyBonus        15
                          ChokePointBonus          100
                          UnexploredBonus         
                        -999999
                          ObsoleteArmyBonus            0
                          TreaspassingArmyBonus        0

                          ThreatenType
                        :DestroyCity
                          ThreatenBonus 5000

                          ForceMatch
                        :Bombard

                          TargetProtectionWonder WONDER_THE_FORBIDDEN_CITY
                        }

                        GOAL_BOMBARD_UNIT {        //WW this goal is used for bombarding enemy units
                          
                        SquadClass:CanDefend
                          SquadClass
                        :CanAttack
                          SquadClass
                        :CanBombard

                          TargetType
                        :AttackUnit    //WW added
                          
                        TargetType:SpecialUnit    //WW added
                          
                        TargetOwner:HotEnemy

                          Execute    ORDER_BOMBARD
                         
                          ThreatBonus         
                        -100
                          EnemyValueBonus         
                        -100 //WW from 100
                          
                        AlliedValueBonus            0 //WW from 1000
                          
                        PowerBonus                0 //WW from 150
                          
                        DistanceToHomeBonus        15
                          DistanceToEnemyBonus        15
                          ChokePointBonus          100
                          UnexploredBonus         
                        -999999
                          ObsoleteArmyBonus            0
                          TreaspassingArmyBonus        0

                          ThreatenType
                        :None
                          ThreatenBonus 0

                          ForceMatch
                        :Bombard

                          TargetProtectionWonder WONDER_THE_FORBIDDEN_CITY

                        Civ2 military advisor: "No complaints, Sir!"

                        Comment


                        • #13
                          Both of those goals refer to "Execute ORDER_BOMBARD", which is where the pretest is. It's still puzzling.

                          "the short discription here on Apolyton? "

                          Do you mean the documentation or the discussion between WesW and Richard Myers?

                          Comment


                          • #14
                            That *is* odd, Peter... maybe TargetPretest is defunct? I think I've seen the AI bombard units so it doesn't seem to be stopping it...
                            Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                            Comment


                            • #15
                              Hi Guys,

                              I think the topic here was "if bombard range can be extended from 1 to 2",
                              not "if AI can bombard unit/city or not".

                              Am I right about this?

                              While there was no problem for AI to bombard unit or city in the original CTPII game,
                              as far as I experienced.

                              Back to bombard range, I still haven't got any luck to make it further than 1.

                              The solution to create a temporary unit close to target and bombard the target,
                              then kill the temporary unit is very complicated. Because of the terrain, for example,
                              you have a battle ship with bombard range 2 to bombard an inland city which is located
                              one square to the ocean, then how can you do that?
                              change the terrain as well while bombarding?

                              Comment

                              Working...
                              X