Announcement

Collapse
No announcement yet.

Modding Dales RtW Mod

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

  • Modding Dales RtW Mod

    Dale suggested I post this here so here goes.

    Commonwealth Infantry path rather than basic infantry path.

    Tanks

    Could employ British Crusader IIIs as already in game or even better include the Australian developed AC1-4 Sentinel tanks ranging from the 2pdr armed AC1 up to the 17pdr armed AC4.

    Fighters

    The RAAF employed British Spitfires and US P-40s and P-51s during the war so any of these could be incorporated. Altenatively a path starting from the CAC Wirraway progressing to the CAC Boomerang and then to the CAC Mustang variants or British Meteors.

    Bombers

    Australia produced both Beufighters and Mosquitos during the war so either of these could be fit in.

    The above is what I'd like have a go at. First and easiest will be for me to just sub in elements already existent (eg Crusaders, P-40s etc.) So is this somthing that requires me to work with Python or XML or both and what would be the suggested utilities for doing said work? I see there are a couple of threads on Python here which I have had a brief look through.


    Obviously creation of all new elements is going to be rather more involved I wouldn't even know where to start with designing a new graphic for a CAC Wirraway or a Sentinel tank. Is it as difficult as it seems?

    thanks in advance

    Dan

  • #2
    Hey Dan,

    I'll start with Crusader III's (adding them to Australia).

    C-III's are a unique unit for the UK, so that means we need to look at the UK's definition in the XML files.

    What are the XML files? The XML files are text-based files (which are fairly easy to read what they're doing) which contain all of the settings for Civ4. All XML files are located in ..\Asets\XML\
    Anyways, back to the problem at hand: adding C-III's to Australia.

    To modify a Civ's settings you need to go into the Civ XML file. This is in ..\XML\Civilizations\CIV4CivilizationInfos.xml
    Open this file in notepad (or other text editor, just DO NOT USE MS WORD!).

    Inside you will find the definitions for all the Civs in the game. If you locate CIVILIZATION_WW2_AUSTRALIA (search for it) you'll find Australia's definition. Scrolling down you will find a tag labelled: Units. This currently has nothing in it. Yet if you look at the UK you'll find this:

    [xml]


    UNITCLASS_WW2_EARLY_INFANTRY
    UNIT_WW2_INF0_ENG


    UNITCLASS_WW2_IMPROVED_INFANTRY
    UNIT_WW2_INF1_ENG


    UNITCLASS_WW2_ADVANCED_INFANTRY
    UNIT_WW2_INF2_ENG


    UNITCLASS_WW2_TANK
    UNIT_WW2_TAN0_ENG


    UNITCLASS_WW2_LIGHT_TANK
    UNIT_WW2_TAN1_ENG


    UNITCLASS_WW2_HEAVY_TANK
    UNIT_WW2_TAN2_ENG


    UNITCLASS_WW2_FIGHTER
    UNIT_WW2_FIG0_ENG


    UNITCLASS_WW2_IMPROVED_FIGHTER
    UNIT_WW2_FIG1_ENG


    UNITCLASS_WW2_JET_FIGHTER
    UNIT_WW2_FIG2_ENG


    UNITCLASS_WW2_BOMBER
    UNIT_WW2_BOM0_ENG


    UNITCLASS_WW2_IMPROVED_BOMBER
    UNIT_WW2_BOM1_ENG


    UNITCLASS_WW2_JET_BOMBER
    UNIT_WW2_BOM2_ENG


    [/xml]

    Now just so you don't have to search through all the units, the C-III is:

    [xml]

    UNITCLASS_WW2_LIGHT_TANK
    UNIT_WW2_TAN1_ENG

    [/xml]

    So all we need to do is copy this entry to Australia's definition! Thus we get this:

    [xml]


    UNITCLASS_WW2_LIGHT_TANK
    UNIT_WW2_TAN1_ENG


    [/xml]

    That concludes lesson 1: allowing Australia to build Crusader-III's. Once completed let me know and we'll go to lesson 2: adding AC1-4 Tank to Australia.

    Comment


    • #3
      Thats great Dale, thanks very much. I'll have a go on the weekend.

      Dan

      Comment


      • #4
        Okay finally got around to doing this.

        I initially modded in the US and UK tanks and aircraft that were mentioned at the top. That worked well so now I've created the new ones. Here is were I stand at the moment

        [xml]
        xml:



        UNITCLASS_WW2_CAVALRY
        UNIT_WW2_CAVALRY_AUS


        UNITCLASS_WW2_EARLY_INFANTRY
        UNIT_WW2_INF0_ENG


        UNITCLASS_WW2_IMPROVED_INFANTRY
        UNIT_WW2_INF1_ENG


        UNITCLASS_WW2_ADVANCED_INFANTRY
        UNIT_WW2_INF2_ENG


        UNITCLASS_WW2_TANK
        UNIT_WW2_TAN0_AUS


        UNITCLASS_WW2_LIGHT_TANK
        UNIT_WW2_TAN1_AUS


        UNITCLASS_WW2_HEAVY_TANK
        UNIT_WW2_TAN2_AUS


        UNITCLASS_WW2_FIGHTER
        UNIT_WW2_FIG0_USA


        UNITCLASS_WW2_IMPROVED_FIGHTER
        UNIT_WW2_FIG1_USA


        UNITCLASS_WW2_JET_FIGHTER
        UNIT_WW2_FIG2_ENG


        UNITCLASS_WW2_BOMBER
        UNIT_WW2_BOM0_ENG


        UNITCLASS_WW2_IMPROVED_BOMBER
        UNIT_WW2_BOM1_ENG


        UNITCLASS_WW2_JET_BOMBER
        UNIT_WW2_BOM2_ENG



        [/xml]

        As you can see I've added Light Horse to replace cavalry and created new Oz specific tanks. Now I think I have correctly traced the links to modify the other files

        Taking the light tank as an example I've replaced it with the Matilda II, updating the Civ4GameText_WW2_Objects.xml file as such

        [xml]
        TXT_KEY_UNIT_WW2_TAN1_AUS
        Matilda II
        Char Matilda II
        Crusader III-Panzer
        Carro Matilda II
        Tanque Matilda II
        [/xml]

        and the UnitInfos file as such

        [xml]
        UNITCLASS_WW2_LIGHT_TANK
        UNIT_WW2_TAN1_AUS

        NONE
        NONE
        UNITCOMBAT_ARMOR
        DOMAIN_LAND
        UNITAI_ATTACK
        NONE
        NONE
        TXT_KEY_UNIT_WW2_TAN1_AUS
        TXT_KEY_UNIT_TANK_PEDIA
        TXT_KEY_UNIT_WW2_TANK_STRATEGY
        ADVISOR_MILITARY
        0
        0
        0
        0
        0
        0
        0
        1
        1
        1
        1
        0
        0
        0
        0
        0
        0
        0
        0
        0
        0
        1
        1
        0
        0
        0
        0
        0
        0
        0
        1
        0
        0
        0


        UNITCLASS_WW2_HEAVY_TANK
        1









        UNITAI_ATTACK
        1


        UNITAI_ATTACK_CITY
        1


        UNITAI_PILLAGE
        1









        NONE
        NONE
        NONE
        NONE
        NONE
        BUILDING_WW2_BUILD21
        TECH_WW2_TECH12

        BONUS_OIL



        0
        720
        0
        -1
        0
        -1
        3
        0
        0
        0
        0
        -1
        0
        0
        0
        0
        0
        0
        0
        0
        0




        25
        100
        0
        0
        4
        2
        0
        0
        0
        0
        0
        0
        60
        5
        0
        0
        0
        0
        0












        0
        0
        NONE
        NONE
        0
        0
        12
        0
        5
        25

        1
        1.75
        1
        1
        1

        1
        ART_DEF_UNIT_WW2_TAN1_ENG


        FORMATION_TYPE_DEFAULT

        0
        0
        0
        0


        PROMOTION_BLITZ
        1


        NONE
        0
        [/xml]

        I think I've updated all the necessary links, I've run a test game and the things seem to work okay but I've not been all the way through the upgrade path yet.

        My biggest problem now seems to be graphics. How do I go about creating a dds image for these. I've looked the art folders and there seem to be multiple images including ones for damage etc. Also when I opened the dds files I see the images are actually a flat three-view format. Does the game engine somehow built the little 3D icons from these flat images? I tried using a dds converter utility I found to convert a photo of a Matilda II but it wouldn't work. What is the process for including a unique graphic for new units and what are the recommended utilities?

        thanks

        Dan
        Last edited by danrh; January 8, 2008, 23:45.

        Comment


        • #5
          ah bugger,
          how do I stop the forum dumping all the xml coding?

          Dan

          Comment


          • #6
            Firstly, instead of using "quote" and "/quote" tags, use "xml" and "/xml" tags.

            As for the art work, do you have a unit in mind to be the matilda? It's not as simple as changing a dds file to make a new unit graphic. You need a mesh, which becomes a nif file, animations which become kfm files and then the dds file which is the skin.

            I'm not an artist, so I can't really help you. I just recycle units made by others.

            Art is done through \Mods\Assets\XML\Art\Civ4ArtDefines_Unit.xml

            Define a new art segment for a unit, then in the unit xml redirect the art tag to the new art type you created.

            Comment


            • #7
              Hmm okay thanks. So the art is all done by moddifying existing stuff from the game. Is there a repository somewhere where one can find files that folks have made for public use? I haven't seen alot of discussion about Civ art while I've looking through here and at CF.


              Dan

              Comment


              • #8
                CFC is the best place to get artwork from. Link: http://forums.civfanatics.com/downloads.php?do=cat&id=5

                Comment


                • #9
                  Well I found a few items at CFC but not everything so I've embarked on trying to learn graphics myself. However having been successful with introducing some new units I've been thinking of going a bit further. I'm looking to build a mod on top of the basic RtW tech tree but introducing some new unit classes. I've attached a spreadsheet with my initial work and was just wondering if the game mechanics could cope with having a number of choices available at each level ie early light, medium and heavy tanks, advanced light, medium and heavy tanks. How does it currently chose between building units? Where is the coding for making such a determination? XML or Python?

                  cheers

                  Dan
                  Attached Files

                  Comment

                  Working...
                  X