Announcement

Collapse
No announcement yet.

Medmod2 serious bugs?

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

  • Medmod2 serious bugs?

    Hi i'm new to this forum, just discovered it a week ago when i was looking for a patch for ctp2. I realy enjoy playing it again after so many years. It's a shame i didn't found out about you guys (& girls?) earlier, reading about so many improvements to the game. Keep up the good work!

    So i've started playing ctp2 + patch + medmod2 to get a glimpse of the cool improvements. Unfortunately when reaching ±1500AD i discovered some serious bugs which were so bad it wasn't fun anymore to keep on playing,..

    - I was always getting less PW than stated in the Empire manager, when i set PW to 0% i even got negative PW's.

    Ok i could live with that small bug, cause i was producing enough PW's anyway.

    But the next bug i encountered wasn't fun anymore.
    I think it started when i finished researching "Germ Theory" a thing i realy needed because all my cities were overcrowded. In my capital i was building the London Exchange wonder (for over 50 turns, and still about 50 turns to go). I saved a lot of money because i wanted to buy that wonder, for approx. 700k gold.
    But the next turn it appeared i still have to wait another 98 turns and the rush buy would cost me 1.960.000 instead of ±750k.
    The Germ Theory triggered some kind of feat of wonder, that would cause a population boom. I guess it's this Feat of Wonder that screwed all producion in my cities. But the production numbers were about the same, only the turns i had to wait were much longer as if it resetted all gathered production.

    Is there someone that can help me fix this problem? For instance, is it possible to disable that feat of wonder? (íf that's the thing causing the problem)

    All help is welcome.

  • #2
    It seems to be in MM2_scenario.SLC in ...\ctp2_data\default\gamedata. If you open this file with notepad and look for this part:

    Code:
      ///////////////////////////////////////////////////////////////////////
     /// Population Boom code for the Medieval Mod II by David Reznichek ///    
    ///////////////////////////////////////////////////////////////////////
    
    // Author: 	David Reznichek (aka Jules)
    // Email: 	dreznich at chorus dot net
    // Last Update:	24 July 2001
    
    
      ///////////////////////////////
     /// Demographic Shifts code ///
    ///////////////////////////////
    
    // This section handles the two major demographic shifts
    // that occur in the game. The first is a population boom
    // following the discoveries of Germ Theory and later
    // Immunization. The second occurs when the player
    // possesses both Contraception and Equal Rights which
    // ends the growth spurt.
    //
    // The idea behind this is the so-called Four Demographic
    // Transitions in the lifespan of a culture. You start out
    // with a high birth rate, but balanced by a high death
    // rate. So your population grows slowly. Eventually you
    // get to high birth rate but low death rate, hence the
    // population booms. So you have the rapid growth rates
    // in the West during the 19th century which accompanied
    // important advances in medicine. These were introduced to
    // the Third World in the 20th century.
    //
    // The widespread use of improved methods of birth control
    // coupled with the growing numbers of independent career
    // women has dramatically reduced birth rates in the West
    // during the second half of the 20th century. These
    // reforms are presently being attempted in the Third
    // World, but it's slow-going there for now. This is the
    // third transition: low birth rate and death rate, slower
    // population growth.
    //
    // In the game, when a civ discovers Germ Theory a free
    // improvement will be created in each of its cities that
    // gives +10% food. The same thing happens after discovering
    // Immunization, for a total bonus of +20% food. Then once
    // the civ has both Contraception and Equal Rights the
    // buildings are removed from all cities.
    
    
    // generate popup messages when
    // advances are discovered
    
    messagebox 'POP_BOOM_STARTS_MSG' {
      Text(ID_POP_BOOM_STARTS);
      Show();
    }
    
    messagebox 'POP_BOOM_ENDS_MSG' {
      Text(ID_POP_BOOM_ENDS);
      Show();
    }
    
    HandleEvent(GrantAdvance) 'AnnouncePopBoom' post {		// when player gets an advance
      int_t advanceType;
      advanceType = value[0];
      advance[0] = advanceType;
      if (advanceType == AdvanceDB(ADVANCE_GERM_THEORY) ||
          advanceType == AdvanceDB(ADVANCE_IMMUNIZATION)) {		// if player got Germ Theory or Immunization
        Message(player[0], 'POP_BOOM_STARTS_MSG');			// then show message
      } elseif (advanceType == AdvanceDB(ADVANCE_CONTRACEPTION) &&
                HasAdvance(player[0], ID_ADVANCE_EQUAL_RIGHTS)) {	// or if player got Contraception and has Equal Rights
                   advance[1] = AdvanceDB(ADVANCE_EQUAL_RIGHTS);
                   Message(player[0], 'POP_BOOM_ENDS_MSG');		// then show message
      } elseif (advanceType == AdvanceDB(ADVANCE_EQUAL_RIGHTS) &&
                HasAdvance(player[0], ID_ADVANCE_CONTRACEPTION)) {	// or if player got Equal Rights and has Contraception
                   advance[1] = AdvanceDB(ADVANCE_CONTRACEPTION);
                   Message(player[0], 'POP_BOOM_ENDS_MSG');		// then show message
      }
    }
    
    
    // place or remove buildings when advances
    // are discovered as appropriate
    
    HandleEvent(BeginTurn) 'GetGermTheory' post {
      city_t tmpCity;
      int_t i;
      for (i = 0; i < player[0].cities; i = i + 1) {				// this will loop through player's cities
         GetCityByIndex(player[0], i, tmpCity);
         if (CityIsValid(tmpCity)) {
           if (!HasAdvance(player[0], ID_ADVANCE_CONTRACEPTION) ||
               !HasAdvance(player[0], ID_ADVANCE_EQUAL_RIGHTS))   {			// if player has neither Contraception nor Equal Rights
             if (HasAdvance(player[0], ID_ADVANCE_GERM_THEORY)) {			// and has Germ Theory
               if (!CityHasBuilding(tmpCity, "IMPROVE_GERM_THEORY")) {		// and city does not have Germ Theory building
                 Event:CreateBuilding(tmpCity, BuildingDB(IMPROVE_GERM_THEORY));	// then create Germ Theory building
               }
             } elseif (CityHasBuilding(tmpCity, "IMPROVE_GERM_THEORY")) {		// if player does not have advance but city has building
                     DestroyBuilding(tmpCity, BuildingDB(IMPROVE_GERM_THEORY));	// then destroy building
             }
           } elseif (CityHasBuilding(tmpCity, "IMPROVE_GERM_THEORY")) {		// if player has both Contraception and Equal Rights and city has building
                   DestroyBuilding(tmpCity, BuildingDB(IMPROVE_GERM_THEORY));	// then destroy building
           }
         }
      }
    }
    
    HandleEvent(BeginTurn) 'GetImmunization' post {
      city_t tmpCity;
      int_t i;
      for (i = 0; i < player[0].cities; i = i + 1) {
         GetCityByIndex(player[0], i, tmpCity);
         if (CityIsValid(tmpCity)) {
           if (!HasAdvance(player[0], ID_ADVANCE_CONTRACEPTION) ||
               !HasAdvance(player[0], ID_ADVANCE_EQUAL_RIGHTS))   {
             if (HasAdvance(player[0], ID_ADVANCE_IMMUNIZATION)) {
               if (!CityHasBuilding(tmpCity, "IMPROVE_IMMUNIZATION")) {
                 Event:CreateBuilding(tmpCity, BuildingDB(IMPROVE_IMMUNIZATION));
               }
             } elseif (CityHasBuilding(tmpCity, "IMPROVE_IMMUNIZATION")) {
                     DestroyBuilding(tmpCity, BuildingDB(IMPROVE_IMMUNIZATION));
             }
           } elseif (CityHasBuilding(tmpCity, "IMPROVE_IMMUNIZATION")) {
                   DestroyBuilding(tmpCity, BuildingDB(IMPROVE_IMMUNIZATION));
           }
         }
      }
    }
    and probably delete it. Make a backup of the file though obviously. It may cause some other problems, but I don't have MM2 installed to test what might happen, so just come back if anything else needs fixing to continue without problems.
    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


    • #3
      Thanks,

      I've found and revomed the code,. but unfortunatly it didn't fix the problem.
      I have to check and find out again what could trigger the bug.

      Comment


      • #4
        The change won't affect any current games you have. You'll need to start again to see if that has fixed the bug.

        Comment


        • #5
          I think I know what might work.Go to the CtP2 prgram file .Open it and then look for a file names -userprofile-
          In this file look along the list for- DebugSlic=Yes change it to =No .I have played this mod and recall if you dont do this, at times some slic files will cause a bug or crash.Good luck.

          Comment


          • #6
            Originally posted by cap601
            The change won't affect any current games you have. You'll need to start again to see if that has fixed the bug.
            Can he reload slic to carry on with the same game? I have no idea about those things.
            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
              in the scenario/cheat editor there is a reload slic option
              Formerly known as "E" on Apolyton

              See me at Civfanatics.com

              Comment


              • #8
                Originally posted by Maquiladora


                Can he reload slic to carry on with the same game? I have no idea about those things.
                The problem is that that wouldn't fix the bug if the code was faulty. The code works by adding a dummy building that gives the bonus and by removing it after other conditions are met. Deleting the code would just stop the building ever being removed. If the building can be sold manually then reloading the SLIC could stop the problem.

                NB: I have no experience of SLIC whatsoever.

                Comment


                • #9
                  Originally posted by E
                  in the scenario/cheat editor there is a reload slic option
                  No E, cheating is a bad and therefore using the cheat editor is a bad idea, too. Espeacilly if we have better a way to do it. Simply open the chat window by typing the apostrophe key (') for instance and then enter: /reloadslic

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

                  Comment

                  Working...
                  X