Announcement

Collapse
No announcement yet.

civ specific city buildings

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

  • civ specific city buildings

    hi all

    i want to make some buildings only available to some civ's - like special units. I guess i would need at least two building types for the building class i want to split (in the buildininfo.xml) and have to specify (in the civinfo.xml) which civ can build which type. I can remember there was a thread about this long ago, but i cant find. So mabe someone else can tell me, what to change. To give an exact example: i want the Taj Mahal only available to indians (all the other civ's get no wonder of this class). If someone can work out this for me i will do the rest myself.

    thanks in advance
    Lars

  • #2
    If you have Warlords, you could try copying the code for each civ's Unique Buildings.
    Ceeforee v0.1 - The Unofficial Civ 4 Editor -= Something no Civ Modder should ever be without =- Last Updated: 27/03/2009
    "Just because I'm paranoid doesn't mean there's no conspiracy"

    Comment


    • #3
      Define your buildings in Assets/XML/Buildings/CIV4BuildingInfos.xml if they aren't there already and then add them to Assets/XML/Civilizations/CIV4CivilizationInfos.xml like this:

      Code:
      			<Buildings>
      				<Building>
      					<BuildingClassType>BUILDINGCLASS_LIBRARY</BuildingClassType>
      					<BuildingType>BUILDING_ARABIAN_MADRASSA</BuildingType>
      				</Building>
      			</Buildings>
      In this example the Madrassa replaces the Library but if you change <BuildingClassType> to BUILDINGCLASS_MADRASSA (and define this class in CIV4BuildingClassInfos.xml, as it currently doesn't exist) it doesn't replace anything but still only the Arabs can build it (in addition to the Library). If you want more than one per civ, just add more <Building> sections. You can do with wonders in the same way, the game treats buildings and wonders the same.

      Should work in both Warlords and vanilla Civ4.
      Last edited by Locutus; August 25, 2006, 10:06.
      Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

      Comment


      • #4
        @MMC

        sadly i don't have warlords - only the normal civ (vanilla is it called?)

        @Locutus

        Do i have to use different buildingclass - names than default? As i unstood you i simply put buildingclass_taj_mahal in the builingclasstype and building_taj_mahal in the buildingtype (used the default names) in the civinfo.xml. This way (i thought) i would'nt have to touch the buildingclasses.xml nor the buildinginfo.xml. But this does not seem to disable this building for other civ's. Still everybody can build it. Btw - i got no error message - so the code itself seems to be correct. Any ideas how to disable this building for other civs?

        thanks

        edit some minutes later...

        what if i put a "none" under default building in building classes? will try...
        Last edited by icheben; August 25, 2006, 13:57.

        Comment


        • #5
          Okay, I looked into this. To do what you want, you do have to mod CIV4BuildingClassInfos.xml: you have to set the <DefaultBuilding> to NONE for any building you want to make unique. This makes it unbuildable by default, but still buildable by anyone who has it listed in the CIV4CivilizationInfos.xml file.
          Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

          Comment


          • #6
            That was my thought too. But he gives me an error message for the buildinginfo.xml (did'nt touch this file) - may be he is looking for a building named "none"?

            edit: Error message was because of a typo - had to use big letters for the "NONE" i think. Still all civ's can build that damn wonder. Will try starting a new game.
            Last edited by icheben; August 25, 2006, 14:37.

            Comment


            • #7
              Ok, tried a new game (to be sure my changes were in) custom scenario with earth map. Still all civs can build taj mahal - so the changes you suggested, lucutus, are not working. Is it possible that even the custom scenarios have their own rules overwriting the ones defined by xml? Seems to be true at least for starting units and starting techs. If so how can i change that? Want to play the eart map with MY rules! Still need help...

              thank you

              Comment


              • #8
                Well, I tested it an it works fine for me. If you use one of the earth maps that came with the game it should work fine. To be sure, start a regular game on a random map first to check if it works there. But first, the game may be loading the files from cache and therefore ignoring any recent changes you made. Hold the Shift button while loading the game to force it to clear the cache and load your changes.
                Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                Comment


                • #9
                  Ha! This could be it! Thanks

                  Comment


                  • #10
                    Grrr - they still build it!!! Is it possible to empty the cache manually by deleting something? Just to be sure. All the other changes i made seem to work fine. Btw, wich infos are stored in saves? Some changes doesn't seem to work after reloading (even with shift-key pressed). Are there some things you can't change "in-game"?

                    thank you

                    Comment


                    • #11
                      Did some intensive testing:

                      Made Stonehenge have as default building "NONE" and removed the obsolete tech and maxstartera to make Stonehenge buildable all the time. Then i started a new game. No Stonehenge available for me to build as it should be for all the other civ's. I played this game - played it quite long. On a turn near 1350 Kyrus (opponent) finaly built it. But how did he do that? This wonder has default building "NONE" and there was no entry for Stonehenge anywhere in civinfo.xml. Are wonders sometimes selected and completed randomly for the AI (like it was in CIV I)?

                      Comment

                      Working...
                      X