Announcement

Collapse
No announcement yet.

How to fix the Cruise Missle bug?

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

  • How to fix the Cruise Missle bug?

    I noticed that the Cruise Missle unit is not working right. Because if you have a City/Air Base/Cruiser near enough, you could actually use your Cruise Missle to 'bombard' the enemy and than refuel the missle to be reused the next turn. In real life, a Missle could never be used more than once.(like Nukes, they blows themself up went attacking) But somehow this unit doesn't work the same way as a nuke does.
    So any idea about fixing it?
    ==========================
    www.forgiftable.com/

    Artistic and hand-made ceramics found only at www.forgiftable.com.

  • #2
    Have noticed the same (actually I'm using the little undocumented "feature" when the AIs are too aggressive).

    Have not tried to make any solutions on that, but what about the settings for bombard_rounds? As far as I remember, default values are 30 (20?). What if value is changed to 1?
    First they ignore you. Then they laugh at you. Then they fight you. Then you win.

    Gandhi

    Comment


    • #3
      what does the value 'bombard_round' does?
      ==========================
      www.forgiftable.com/

      Artistic and hand-made ceramics found only at www.forgiftable.com.

      Comment


      • #4
        there is no way to make it works like a nuke just without pollution?
        ==========================
        www.forgiftable.com/

        Artistic and hand-made ceramics found only at www.forgiftable.com.

        Comment


        • #5
          It is probably how many rounds of combat are simulated by a bombard strike. Remember of course these are one sided rounds and aren't shown, I would imagine therefore reducing it would reduce the effectiveness of a bombardment.

          Comment


          • #6
            Cant be that hard to do that with Slic! After Bombard is done, kill the unit. I am no SLIC expert but simply from the logic it should be possible.

            However it gets more difficult when you attack normaly with a cruise missle. Or when you stack it with others and then attack. This way, cruise missles wont work anymore.
            *wonders whats happening when you attack with a stacked nuke*

            So, cruise missles may not be stacked but you can load them on subs or Missle-destroyers for example.

            Ata

            Comment


            • #7
              I guess there are many SLIC expert here, they probably can help, is SLIC something like C++ ?
              ==========================
              www.forgiftable.com/

              Artistic and hand-made ceramics found only at www.forgiftable.com.

              Comment


              • #8
                SLIC is a C-like language. In CTP, there are a lot of kludges that make it work pretty well. The CTP2 version is also a C-like language, only more so than CTP's. For example, to create a function in CTP, you would put the script into an aborted message box:

                messagebox 'Blah'
                {
                Abort();
                Do {stuff}
                }

                In CTP2, it would look like this:

                void_f Blah()
                {
                Do {stuff}
                return;
                }

                SLIC has evolved into a much more powerful tool in CTP2. We are also trying to work out an interface that will allow non-programmer type people to create scripts for scenarios. More to come.

                Comment


                • #9
                  With all due respect, St Swithin, but I don't think that's what these people wanted to know (though I very much like the info about CtP2 being a SLIC guru ). I think these people just wanted a fix to the missile bug.

                  Well, Ata, you're absolutely right, it should be a piece of cake through SLIC! Now why didn't I think of that?
                  Anyway, here's the code that *should* do the trick. Mind that I'm at my university right now and can't try it out:

                  Code:
                  trigger 'MissileBugFix' when (special.attacked) {
                     if (unit.1 = UnitType("UNIT_CRUISE_MISSILE")) {
                        KillUnit(unit.1);
                     }
                  }
                  To get this to work, open the script.slc file in the correct folder (if your mod is in a scenario folder it would be [ctp_folder]\scenarios\[scen_name]\ctp_data\gamedata or if the mod overwrote your original game files it's in [ctp_folder]\ctp_data\gamedata - mind that I could be slightly wrong about the names, I'm doing this from the top of my head) and past this code into the file (just in the top of the file would suffice, any other place as well, as long as you don't mix any of the existing triggers up). Well hope that helps/works ,

                  Locutus

                  PS Dida, you'd be surprised to see how little SLIC experts there are, even though it's IMHO not hard to learn (though I'm a programmer and hence biased).
                  [This message has been edited by Locutus (edited May 26, 2000).]
                  Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                  Comment


                  • #10
                    Stupid me, it seems that I can't make even the simplest trigger without making at least three mistakes (of which two are plain stupid). Well, here a working and tested version:

                    Code:
                    TypeUnit missile;
                    
                    trigger 'MissileBugFix' when (special.bombarded) {
                       if (unit.type == UnitType("UNIT_CRUISE_MISSILE")) {
                          missile = unit;
                          EnableTrigger('MissileBugFixTimer');
                          StartTimer(1, 1);
                       }
                    }
                    
                    trigger 'MissileBugFixTimer' when (timer.expired) {
                       KillUnit(missile);
                       DisableTrigger('MissileBugFixTimer');
                    }
                    Let me know if anyone has any problems,

                    Locutus
                    Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                    Comment


                    • #11
                      Hi, I copied and pasted your lines in my script.slc file at the very end but it doesn't work, my cruise missiles can still bombard and return. Right now, I don't have much time but when I get back I'll test it again while trying different stuff.

                      Cya
                      "When we forge weapons, we also forge war. When we forge tools, we also forge civilization. "

                      Comment


                      • #12
                        The code worked for me. I opened cheat mode to give myself a cruise missile and when I bombarded with it it got killed as planned.

                        Comment


                        • #13
                          Very strange, Flyercraft, it should work, especially since it does work for both Paul and me It'd be great if you could try again and if it still doesn't work, could you tell me some details about the situation: what mods do you use, do you use them over the standard game-files or in a scenario folder, what unit did you try to attack and under what terrain, etc.? I don't know what to look for so anything could be important.
                          Have others tried it yet and if so, did it work?

                          Locutus
                          Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                          Comment


                          • #14
                            One thing that could cause this problem: did you start a new game after changing the slic code? As far as I know changing to the slic script only affects new games and not old saved games.

                            Comment


                            • #15
                              Heh, actually the problem was that I was using a saved game to conduct tests. I remembered reading something saying that the user needed to start a new game for each new mod because the saved stored info about the codes . But after being able to use new mods with old games I thought they made a mistake saying that it won't work.

                              But now I know that it's the scripts that are saved! Anyway, thanks for helping even thought I made a wring test
                              "When we forge weapons, we also forge war. When we forge tools, we also forge civilization. "

                              Comment

                              Working...
                              X