Announcement

Collapse
No announcement yet.

Wonderful Reality

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

  • #31
    Originally posted by Immortal Wombat
    Would triggering a STOP on the CreateImprovement event also stop the event which is supposed to create the wonder?
    Yes without further modifications. But you could use a global variable if it is set to 0 then the tile improvement can't be build, if it is set to 1 it can be build. So in the event that should build the wonder improvement it will be set to 1 and afterwards to 0 again. But actual I think giving and removing the enabling advance is the way to, because the AI will try only to build the wonder improvments instead of the real ones, so in the end it wouldn't build anything.

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

    Comment


    • #32
      If I gave it an insanely high PW cost, would the AI save up for it, or build cheaper ones?
      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


      • #33
        Originally posted by Immortal Wombat
        If I gave it an insanely high PW cost, would the AI save up for it, or build cheaper ones?
        You could try it but I think the AI will save up for the best tile improvements that are available. I never saw an AI building roads when it was able to build railroads, the same is true for all the other tileimprovements.

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

        Comment


        • #34
          Yeah, good point. It'll have to be the advances then
          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


          • #35
            Uhm, why don't you just give all the TileImps an advance as prerequisite that's impossible to research (i.e. has itself as prerequisite or is disabled with the mod_* SLIC function)?
            Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

            Comment


            • #36
              Extra text file. Not a major problem, but annoying.

              Unless I use Subneural Ads as that advance. Which is basically what I was going to do anyway.
              Last edited by Immortal Wombat; August 4, 2002, 18:39.
              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


              • #37
                So? What's 20k on a 6MB download?
                Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                Comment


                • #38
                  6Mb??
                  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


                  • #39
                    Originally posted by Locutus
                    Uhm, why don't you just give all the TileImps an advance as prerequisite that's impossible to research (i.e. has itself as prerequisite or is disabled with the mod_* SLIC function)?
                    what are the variables for the mod_CanPlayerHaveAdvance function?
                    (int_t, ) ???
                    "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


                    • #40
                      int_t [player], int_t [advanceDB index]
                      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


                      • #41
                        Originally posted by Pedrunn
                        what are the variables for the mod_CanPlayerHaveAdvance function?
                        (int_t, ) ???
                        Just take a look into the WW_mod.slc and you will find this:

                        Code:
                        // Players can not research any new technologies
                        int_f mod_CanPlayerHaveAdvance (int_t thePlayer, int_t theAdvance)
                        {
                        	if (theAdvance == AdvanceDB(ADVANCE_ADV_NAVAL_TACTICS) ||
                        		theAdvance == AdvanceDB(ADVANCE_VERTICAL_FLIGHT_AIRCRAFT) ||
                        		theAdvance == AdvanceDB(ADVANCE_SUPERSONIC_FLIGHT) ||
                        		theAdvance == AdvanceDB(ADVANCE_MASS_TRANSIT) ||
                        		theAdvance == AdvanceDB(ADVANCE_COMPUTER) ||
                        		theAdvance == AdvanceDB(ADVANCE_GLOBAL_ECONOMICS) ||
                        		theAdvance == AdvanceDB(ADVANCE_CORPORATE_REPUBLIC)) {
                        		return 0;
                        	} else {
                        		return 1;
                        	}
                        }
                        So the first argument is the player index in the game in integer form.

                        And the second argument is the advance represented by an integer the DataBase index of the advance.

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

                        Comment


                        • #42
                          Thanks
                          "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


                          • #43
                            Did I mention, the wonder code should work - provided when you test it, you don't complete two wonders on consecutive turns. Otherwise the TI isn't built properly, and problems occur.
                            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


                            • #44
                              This is making the game crash after lauching it. Any suggestion on how to make this code work.
                              Code:
                              int_t ExpansionPlayer;	
                              
                              int_f mod_CanPlayerHaveAdvance(int_t thePlayer, int_t theAdvance) {
                              int_t tmpAdvance;
                              int_t tmpPlayer;
                              	tmpAdvance = theAdvance;
                              	tmpPlayer = thePlayer;
                              	if(tmpPlayer == ExpansionPlayer) {	
                              		if (tmpAdvance == AdvanceDB(ADVANCE_SUBNEURAL_ADS)) { 
                              			return 1;
                              		}
                              		else{
                              			return 0;
                              		}
                              	}
                              	else{
                              		return 0;
                              	}
                              }
                              
                              HandleEvent(EndTurn) 'NobodyCanCreateCities' pre {
                              	ExpansionPlayer = 0;
                              }
                              And this is part of the where ExpansionPlayer is defined.
                              Code:
                              	ExpansionPlayer = ownerNum;
                              	GrantAdvance(ownerNum, AdvanceDB(ADVANCE_SUBNEURAL_ADS));
                              Right before the expansion starts. It is in the beginning of the expandCity function of my code for those who have see the code.

                              PS: Does the RemoveAdvance function work. I have tried to used but not with sucess.
                              "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


                              • #45
                                Ah. You appear to have prevented any player from having any advance. Put the two if() statements the other way around, replace the second 0 with a 1, and you got it.

                                But you don't need it really. SubNeural ads can never be researched anyway, and you just need the RemoveAdvance function in a different handler at the end of that turn to make it work.
                                Set up a player array as a switch, eg:
                                Code:
                                int_t    IsPlayerExpanding[];
                                
                                // In the expandcity function
                                if(sucess == 1){
                                     IsPlayerExpanding[owner] = 1;
                                }
                                
                                // and then later...
                                
                                HandleEvent(endturn) 'remove_ads' pre{
                                     int_t  i;
                                    for(i=0; i < preference("NumPlayers"); i = i + 1){    // or whatever
                                            if(IsPlayerExpanding[i] == 1){
                                                RemoveAdvance(i, AdvanceDB(ADVANCE_SUBNEURAL_ADS));
                                                IsPlayerExpanding[i] = 0;
                                            }
                                       }
                                }
                                or something
                                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

                                Working...
                                X