1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

How to Create a Civilization in BTS

Discussion in 'Civ4 - Modding Tutorials & Reference' started by CaptainLepidus, Jan 3, 2010.

  1. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,831
    Location:
    DE/NL/FR
    Aaaah....crap, i see the tutorial doesn't cover that part.

    Okay, ultra short introduction:
    In UnitInfos.xml you have this:
    PHP:
    ART_DEF_UNIT_ASSYRIAN_BATTERING_RAM
    in your unit entry.
    That's the link to the art, if you want to add custom art.
    These art entries then have to be created in the XML\Art\ files.
    For new unit entries you go to XML\Art\ArtDefines_units.xml, for Civilzations to XML\Art\ArtDefines_Civilizations.xml etc.

    In these files you have then entries like this:
    PHP:
            <UnitArtInfo>
                <
    Type>ART_DEF_UNIT_LION</Type>
                <
    Button>,Art/Interface/Buttons/Units/Lion.dds,Art/Interface/Buttons/Unit_Resource_Atlas.dds,6,5</Button>
                <
    fScale>0.61</fScale>
                <
    fInterfaceScale>1.3</fInterfaceScale>
                <
    bActAsLand>0</bActAsLand>
                <
    bActAsAir>0</bActAsAir>
                <
    NIF>Art/Units/Lion/Lion.nif</NIF>
                <
    KFM>Art/Units/Lion/Lion.kfm</KFM>
                <
    SHADERNIF>Art/Units/Lion/Lion_FX.nif</SHADERNIF>
                <
    ShadowDef>
                    <
    ShadowNIF>Art/Units/01_UnitShadows/LionShadow.nif</ShadowNIF>
                    <
    ShadowAttachNode>LionBip Spine1</ShadowAttachNode>
                    <
    fShadowScale>1.0</fShadowScale>
                </
    ShadowDef>
                <
    fBattleDistance>0.35</fBattleDistance>
                <
    fRangedDeathTime>0.28</fRangedDeathTime>
                <
    bActAsRanged>0</bActAsRanged>
                <
    TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
                <
    AudioRunSounds>
                    <
    AudioRunTypeLoop/>
                    <
    AudioRunTypeEnd/>
                </
    AudioRunSounds>
            </
    UnitArtInfo>
    Copy such an entry. Change ART_DEF_UNIT_LION to ART_DEF_UNIT_ASSYRIAN_BATTERING_RAM. Then you have lion graphics for your battering ram, but if you do this accordingly also for the civ and the leaderhead, then your mod shouldn't crash anymore.

    Then you have to get some art, just use something from our database ;).
    Important are then the entries for the buttons and this part:
    PHP:
                <NIF>Art/Units/Lion/Lion.nif</NIF>
                <
    KFM>Art/Units/Lion/Lion.kfm</KFM>
                <
    SHADERNIF>Art/Units/Lion/Lion_FX.nif</SHADERNIF>
    In this case there's a folder "Art" in the assets folder, which has a folder "Units", which has a folder "Lion" in which these files are (and many more; all are needed).
    If you have a new unit, put it somewhere into the Art folder of your mod, put the unit there, and change the above mentioned paths.
    If there is no .kfm file in the unit folder, then the modder should have mentioned which to use instead.
    If there is no _FX.nif in the folder, then use the normal .nif file.
    Ignore the button for now until it works, and ask if you have problems with any of these parts.
     
  2. civlearner99

    civlearner99 Chieftain

    Joined:
    May 1, 2011
    Messages:
    42
    Location:
    MA, USA
    Thank you!
     
  3. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,831
    Location:
    DE/NL/FR
    Hey, new page ;).
     
  4. civlearner99

    civlearner99 Chieftain

    Joined:
    May 1, 2011
    Messages:
    42
    Location:
    MA, USA
    Error! Something is wrong with my ArtDefinesLeaderHead and ArtDefinesUnits files! Help! Here are my files.
     

    Attached Files:

  5. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,831
    Location:
    DE/NL/FR
    Take a look at the error messages ;).
    The first one complaines about this:
    PHP:
    <fBattleDistance>1,45</fBattleDistance>
    Take a look at the other entries ;). It's an american program, they don't use commas as separators, they use points. Put 1.45 in, that's all :).


    The second one complaines about missing tags.
    You don't have something for KFM, NoShaderNIF and BackgroundKFM, but that doesn't mean that you can let them out.
    Add after the .nif part
    PHP:
    <KFM/>
    <
    NoShaderNIF>art/LeaderHeads/Sennacherib.dds</NoShaderNIF>
    <
    BackgroundKFM/>
    that should make it load. And remove the comma before the button. If you have only one button, the comma is not needed and will crash the game (don't know why :dunno:).
     
  6. civlearner99

    civlearner99 Chieftain

    Joined:
    May 1, 2011
    Messages:
    42
    Location:
    MA, USA
    Erroron ArtDefinesUnit. Apparently I can't leave ShadowDef empty. Please tell me what to do!
     

    Attached Files:

  7. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,831
    Location:
    DE/NL/FR
    Take the shadow definition of another unit ;).
    And somehow the entry:
    PHP:
    <BackgroundKFM/>
    slipped into the unit artdefines, take it out, it's wrong there.


    And additionally, i see the unit button for your UU is bigger than 64*64...don't do that. There is somewhere a memory limit, so that unit and building buttons can't be bigger than this size.
    And while it doesn't appear so, flags should also be quadratic and not stretched into one direction.
     
  8. civlearner99

    civlearner99 Chieftain

    Joined:
    May 1, 2011
    Messages:
    42
    Location:
    MA, USA
    I did what you said, fixed a few errors and now when I boot up the mod, it says: Tag> Barbarian is wrong or something. Could you please look at it?
     

    Attached Files:

  9. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,831
    Location:
    DE/NL/FR
    Out of whatever reason you have 2 times CIVILIZATION_MINOR in your civilizationInfos.xml and you don't have CIVILIZATION_BARBARIAN in there. Change the second CIVILIZATION_MINOR to CIVILIZATION_BARBARIAN, then it should hopefully work.

    Other things:
    In ArtDefines_Civilizations you have Art/Interface/TeamColor/assyrian_flag.dds, but the name of the file is actually assyrianflag.dds, you have for the button Art/Interface/Buttons/Civilizations/assyrian_flag-_button.dds, but the filename is assyrianflag - button.dds, for the leader you have Art/interface/LeaderHeads/Sennacherib_-button.dds, but the file name is Sennacherib -leaderbutton.dds. And remove the comma before the buttons, it will crash the game later.
     
  10. danjuno

    danjuno Emperor

    Joined:
    Feb 19, 2010
    Messages:
    1,935
    Gender:
    Male
    I did.
     
  11. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,831
    Location:
    DE/NL/FR
    Ah, sorry, i confused your files with some other files, and thought you didn't add the needed things :blush:.

    First error:
    civilizationInfos.xml: BUILDING_ARIZONAN_REFINERY
    buildingInfos.xml: ARIZONAN_REFINERY

    Second error:
    you actually forgot to change your copy of LEADER_LINCOLN in LeaderheadInfos.xml, so that LEADER_CHARLES_POSTON is not there in the file, but Lincoln is there twice.
     
  12. civlearner99

    civlearner99 Chieftain

    Joined:
    May 1, 2011
    Messages:
    42
    Location:
    MA, USA
    Thanks so much! Now my game works perfectly except for one thing- In gameplay my unique unit is a red blob! A little help here...:undecide::undecide:
     
  13. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,831
    Location:
    DE/NL/FR
    Rule of thumb: If something is pink in the game, then the game can't find the art -> check your XML\Art\ArtDefines_Unit.xml if you've really put the right paths into there. Check twice if you maybe have somewhere a small typo, if somewhere are 2 characters flipped, or something similar.
     
  14. civlearner99

    civlearner99 Chieftain

    Joined:
    May 1, 2011
    Messages:
    42
    Location:
    MA, USA
    I could not find anything wrong with the file. Maybe you can find a mistake.:please::please:
     

    Attached Files:

  15. danjuno

    danjuno Emperor

    Joined:
    Feb 19, 2010
    Messages:
    1,935
    Gender:
    Male
    Do I change BUILDING_ARIZONAN_REFINERY in civinfos to ARIZONAN_REFINERY or the other way around in buildinginfos?
     
  16. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,831
    Location:
    DE/NL/FR
    Can't see the problem :dunno:, but i don't know what exactly is needed to use 2D images as units.
    I'd suggest that you try it with a normal 3D unit. There's a battering ram in this civ (funnily it's also assyria, but it's an old civ, for the base game, not for the expansions).

    Doesn't matter as long it's the same in both files ;).
    Most people here go with the "normal" prefixes like BUILDING_, UNIT_ etc.
     
  17. civlearner99

    civlearner99 Chieftain

    Joined:
    May 1, 2011
    Messages:
    42
    Location:
    MA, USA
    For this mod, how do I add in the ModernAfrican as my UU? Please help!!!:confused::confused::confused::confused:
     

    Attached Files:

  18. civlearner99

    civlearner99 Chieftain

    Joined:
    May 1, 2011
    Messages:
    42
    Location:
    MA, USA
    I know I keep asking questions! Maybe after you sort this out, you could write a step by step tutorial without any flaws?
     
  19. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,831
    Location:
    DE/NL/FR
    You've by accident downloaded a Civilization 3 unit, not an unit for Civ4 ;).
    Get a fitting Civ4 unit, then everything should work as before, and as i see you don't need any other help, the rest is already done for this civ :).

    Uh, if that was so easy :D, and if i had the time :/.

    I'll maybe write a FAQ in the next time, and maybe somewhen afterwards another "adding stuff" tutorial, but that will not be in the next time.
     
  20. civlearner99

    civlearner99 Chieftain

    Joined:
    May 1, 2011
    Messages:
    42
    Location:
    MA, USA
    How do I set the programming? I'm extremely confused!
     

    Attached Files:

Share This Page