Announcement

Collapse
No announcement yet.

AE Scenario Conversion: Cradle

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

  • #46
    It happens when I use the bloodbath option - or presumbly whenever a captured city is destroyed.
    "

    Comment


    • #47
      I really have no idea how the invalid player comes into play, but it's probably a bad idea to kill units going through a loop that counts them . Separating counting and killing of units is the only way of ultimately cleaning up I can think of at the moment (+ Maquiladora's tmpUnit.valid check, of course -- aaah: + a preliminary check if there are any units at all before doing anything):

      Code:
      HandleEvent(KillCity) 'CRA_MilitiaCityDestroyed' pre {
      unit_t	tmpUnit;
      city_t	tmpCity;
      int_t	tmpUnitsAtLoc;
      int_t	i;
      
      	tmpCity = city[0];
      	if(DisbandCityCheck == 0) {
      		tmpUnitsAtLoc = GetUnitsAtLocation(tmpCity.location);
      		if(tmpUnitsAtLoc > 0) {
      			for(i = 0; i < tmpUnitsAtLoc; i = i + 1) {
      				if(GetUnitFromCell(tmpCity.location, i, tmpUnit)) {
      					if(tmpUnit.valid) {
      						if(CRA_IsMilitia(tmpUnit.type)) {
      							KillUnit(tmpUnit);
      						}
      					}
      				}
      			}
      		}
      	}
      	else {
      		DisbandCityCheck = 0;
      	}
      }
      The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

      Comment


      • #48
        I'm still getting the same error. I'm thinking about removing it all together - its whole purpose seems rather pointless. Its supposed to destroy the militia if a city is destroyed. There are only three ways I can think of this happening - conquest, disbanding, and starvation. If the first occurs, the militia is destroyed anyways by the conquering army. The second is already taken care of by another function. That leaves only starvation - which happens so rarely it doesn't even seem worth covering.
        "

        Comment


        • #49
          Aargh! Well, I'll start one last attempt: Maybe, just maybe the indices of the remaining units at the location used by GetUnitFromCell() get shifted when we kill one of them. In this case separating selection and killing of units could possibly help:

          Code:
          HandleEvent(KillCity) 'CRA_MilitiaCityDestroyed' pre {
          unit_t	tmpUnit;
          unit_t	tmpUnits[];
          city_t	tmpCity;
          int_t	tmpUnitsAtLoc;
          int_t	i;
          
          	tmpCity = city[0];
          	if(DisbandCityCheck == 0) {
          		tmpUnitsAtLoc = GetUnitsAtLocation(tmpCity.location);
          		if(tmpUnitsAtLoc > 0) {
          			for(i = 0; i < tmpUnitsAtLoc; i = i + 1) {
          				if(GetUnitFromCell(tmpCity.location, i, tmpUnit)) {
          					if(tmpUnit.valid) {
          						if(CRA_IsMilitia(tmpUnit.type)) {
          							tmpUnits[i] = tmpUnit;
          						}
          					}
          				}
          			}
          			if(tmpUnits.# > 0) {
          				for(i = 0; i < tmpUnits.#; i = i + 1) {
          					KillUnit(tmpUnits[i]);
          				}
          			}
          		}
          	}
          	else {
          		DisbandCityCheck = 0;
          	}
          }
          The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

          Comment


          • #50
            Same problem. I'm going to post a patch shortly, with this function commented out.
            "

            Comment


            • #51
              Cradle III AE patch

              changes:
              fixed some slic errors in homegaurd and trainfunc slic files.
              Disabled diplomod and frenzy silc files
              Fixed government list in strategy.txt, and added TOO_MANY_CITIES strategy

              Notes: There are 5 different CRA**_gamefile.txt included, each representing a different version of Cradle. You must rename the one you want to use to gamefile.txt and put it into the ctp2_data folder to use it. Cradle III-Pheonix(default) is the default used.

              In order for this to work with the AE, follow Maq's directions here: http://apolyton.net/forums/showpost....11&postcount=3
              Attached Files
              Last edited by EPW; July 16, 2009, 22:00.
              "

              Comment


              • #52
                Excellent, gonna try it out.
                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


                • #53
                  Quick-fix fort healing for Rev 1013 and Cradle. Every improvement with a defensize bounus also heals to 100%.
                  Attached Files
                  "

                  Comment


                  • #54
                    This is a fix for disabling the new trenches, which aren't finished in the AE. And disabling Good Mod slic because goods now work as they should in the AE. The start up of the game is a lot faster without Good Mod.

                    All goes in \CradleIII\default\gamedata
                    Attached Files
                    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


                    • #55
                      New patch for rev 1013. It includes the changes posted above as well as the original patch.
                      Attached Files
                      "

                      Comment


                      • #56
                        One possible issue.

                        'Turns to completion' information by city label is hit or miss....sometimes it matches up, sometimes it is way off. Clicking on the city will give the correct number, but 'endturn' will put it back out of sync. It will even correct itself from time to time during a turn without any action taken by the player.
                        Yes, let's be optimistic until we have reason to be otherwise...No, let's be pessimistic until we are forced to do otherwise...Maybe, let's be balanced until we are convinced to do otherwise. -- DrSpike, Skanky Burns, Shogun Gunner
                        ...aisdhieort...dticcok...

                        Comment


                        • #57
                          Originally posted by hexagonian View Post
                          One possible issue.

                          'Turns to completion' information by city label is hit or miss....sometimes it matches up, sometimes it is way off. Clicking on the city will give the correct number, but 'endturn' will put it back out of sync. It will even correct itself from time to time during a turn without any action taken by the player.
                          Maq fixed it in recently(it was really bugging me too), and it should be in the next AE release.
                          "

                          Comment


                          • #58
                            Turn 7...no save because I wasn't saving at this stage
                            Attached Files
                            Yes, let's be optimistic until we have reason to be otherwise...No, let's be pessimistic until we are forced to do otherwise...Maybe, let's be balanced until we are convinced to do otherwise. -- DrSpike, Skanky Burns, Shogun Gunner
                            ...aisdhieort...dticcok...

                            Comment


                            • #59
                              That's just a debug slic event message, you can disable those in the advanced options menu. They should be disabled by default...
                              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


                              • #60
                                Some impressions about the Apolyton Pack.

                                Macedonians
                                - t131
                                - 16 civs
                                - Gigantic
                                - Very Hard
                                - No AI city cap limits
                                - New Combat

                                Overall, I am really impressed with the AI's actions. On the surface, the changes are subtle, but seeing them in action makes me want to stick with the AP for all future games.

                                - The AI generates more priests, which adds a added level of strategy. I noticed this early on, so I built a lot of scouts to act as my eyes. I did not upgrade them, and thankfully they have been able to intercept all of the incoming priests. However, what appears to be happening is that the AI will also use it's priests to see my scouts. In the past, since the scouts were stealth units, they were safe on their own when next to a normal unit, but it appears that when they are detected by a priest, any adjacent units will pick them off. So in the future I will have to keep them in stacks.

                                - The AI also seems to make peace with other AI's now which adds a level of atmosphere. On the other hand though, they will also jump into war just as frequently. Still, it's nice to see peace treaties being tossed around.

                                - Combat is harder with stealth units. I lost slingers against Priests twice because I was not used to the new rules. That never happened in earlier Cradle...detect a Priest or any stealth units, and they were roadkill.

                                - As much as I do not like the production loss when switching items, it does make the game deeper, and it requires more forethought. So I will adapt...

                                - Why the different colors on the icons for slaves in cities?
                                Yes, let's be optimistic until we have reason to be otherwise...No, let's be pessimistic until we are forced to do otherwise...Maybe, let's be balanced until we are convinced to do otherwise. -- DrSpike, Skanky Burns, Shogun Gunner
                                ...aisdhieort...dticcok...

                                Comment

                                Working...
                                X