Announcement

Collapse
No announcement yet.

Basic XML Help

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

  • Basic XML Help

    Someone else suggested that I provide this thread here.

    So what online resources are available through Apolyton help XML n00bs such as myself in editting the game? It looks like the Modwiki is still incomplete.

    I want to edit units and I tried to start with editting the cargo specs of the Caravel.

    So I located the Unit Info XML file under Assets and then I went directly to the info regarding Caravel. I want to edit the type of cargo that it can carry and maybe its capacity too.

    I tried using the modwiki resource here on Apolyton, but the Unit section is not created yet.


    EDIT: I tried copying and pasting the XML text to show you guys what I'm talking about, but I guess you can't copy and past XML text.

    The Caravel is just an example in my difficulty in locating the XML text I need to edit. For future reference, how do I locate the right text in XML documents when I want to edit anything else in particular?
    A lot of Republicans are not racist, but a lot of racists are Republican.

  • #2
    It's a learning process. There may be resources out there, but my advice is to just poke around until you find the appropriate XML fields and then adjust them, see if anything changes in game, and keep going. Sometimes you will need to adjust more than one XML file to change things (resources, music used, etc.,); sometimes one file is all that is needed.

    If you spend a few hours really digging into the XML you'll start to get a feel for how the files interact. A little foreknowledge with HTML is helpful, but even that isn't necessary.

    Your Caravel thing sounds simple enough. Lines 10140 through 10142 in Assets/XML/Units/CIV4UnitInfos.xml seem to deal directly with the type and capacity of cargo. I don't think, for that modification, you should need to change anything else:

    < SpecialCargo>SPECIALUNIT_PEOPLE< /SpecialCargo>
    < DomainCargo>DOMAIN_LAND< /DomainCargo>
    < iCargo>1< /iCargo>

    (The last line is not defining "true," it is defining the number of spaces available. If you look at Galleon, for example, that iCargo number is 3. Oh, and I included spaces in the < > so they would display; those spaces are not in the code itself.)
    One of these days I'll make 501 posts, and you won't have to look at my silly little diplomat anymore.
    "Oh my God, what a fabulous room. Are all these your guitars?"

    Comment


    • #3
      thanks, rjw
      A lot of Republicans are not racist, but a lot of racists are Republican.

      Comment


      • #4
        I have another problem with XML documents.

        When I open XML documents, it uses Internet Explorer to open them. Do I need another program to open and use XML documents? Because at this point, I am unable to edit any text in the XML documents, and I get a warning from IE's information bar at the top that says it restricted the file from showing active content that could access my computer.

        What do I need to do to fully use all XML documents under the Assets folder? Thank you for any help.
        A lot of Republicans are not racist, but a lot of racists are Republican.

        Comment


        • #5
          Use right-click "open with" and then select your program. Don't let it use the default program (IE).

          I just use notepad.

          Dale

          Comment


          • #6
            So when you open it with a program such as Notepad, you just have to make sure you save it as a .xml file then, correct?
            A lot of Republicans are not racist, but a lot of racists are Republican.

            Comment


            • #7
              Yes. The extension (xml) must be preserved lest you corrupt the file.

              But that is pretty easy to maintain.
              One of these days I'll make 501 posts, and you won't have to look at my silly little diplomat anymore.
              "Oh my God, what a fabulous room. Are all these your guitars?"

              Comment


              • #8
                To put it another way, it's exactly the same process as creating / modifying an HTML file in Notepad (if you have any experience with that).
                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


                • #9
                  I will try modifying some really basic XML factors and specs tonight to get a feel for it.
                  A lot of Republicans are not racist, but a lot of racists are Republican.

                  Comment


                  • #10
                    Well I have changed the size of huge world maps and increased maximum of civilizations from 11 to 14.

                    But I got a question; what does the TargetNumCities tagline mean in the WorldInfo.xml document?
                    A lot of Republicans are not racist, but a lot of racists are Republican.

                    Comment


                    • #11
                      Also, am I right in guessing that ClimateInfo.xml document is the only document I need to modify to change percentages of different terrain types (such as desert and grasslands)?

                      I want to know what numbers I should enter in the appropriate taglines in this document to decrease the percentage of desert and jungle for temperate climate worlds. That is, if I'm correct that ClimateInfo is where I go, to make such changes in generating new maps in game setup.
                      A lot of Republicans are not racist, but a lot of racists are Republican.

                      Comment


                      • #12
                        (RE: TargetNumCities)

                        My guess would be that it is the target number of cities the AI attempts to settle, at a minimum. But this is only my initial guess. I am looking at the file as I write this. I will try to find the schema file where this is defined and see if that provides further illumination.
                        One of these days I'll make 501 posts, and you won't have to look at my silly little diplomat anymore.
                        "Oh my God, what a fabulous room. Are all these your guitars?"

                        Comment


                        • #13
                          Originally posted by rjwoer
                          (RE: TargetNumCities)

                          My guess would be that it is the target number of cities the AI attempts to settle, at a minimum. But this is only my initial guess. I am looking at the file as I write this. I will try to find the schema file where this is defined and see if that provides further illumination.
                          Thank you for looking into this. Just get back to me when you have time.
                          A lot of Republicans are not racist, but a lot of racists are Republican.

                          Comment


                          • #14
                            Also, I want to change how many continents and/or islands are generated when I choose a Continent-style map in the game setup.

                            What .xml document do I need to open? I tried several in the GameInfo folder, but could not find the appropriate file? Or do I need to look into something else, like Python?
                            A lot of Republicans are not racist, but a lot of racists are Republican.

                            Comment


                            • #15
                              Map scripts I believe is Python....Don't know where however, sorry
                              "Dumb people are always blissfully unaware of how dumb they really are."
                              Check out my Blog!

                              Comment

                              Working...
                              X