Results 1 to 14 of 14

Thread: Building Card Stumper

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Ramashan's Avatar Artifex
    Join Date
    Apr 2007
    Location
    Los Angeles, CA
    Posts
    4,981

    Default Building Card Stumper

    I have a real stumper that I would like help with.

    Everytime I click on settlements of the barbarian faction that contain a building type barracks muster_field I get a CTD.

    I determined that it is because the game can't find the Unit Card for this building. However, in my data/ui/barbarian folder there are files for this building (#barbarian_muster_field & #barbarian_muster_field_constructed)

    To make it even more confusing, when I run Red Fox's Zeus validator, it shows that the Muster Field card is indeed missing, but lists cards that don't exist in the Barbarian UI folder.

    So, I'm a little confused. Any help would be appreciated.
    Under the Patronage of Lord Condormanius

  2. #2
    MasterOfNone's Avatar RTW Modder 2004-2015
    Join Date
    May 2005
    Location
    England
    Posts
    16,707

    Default Re: Building Card Stumper

    Although it has been reported that missing cards can cause CTDs, this is either extremely rare or incorrect as I have NEVER had that happen to me - and I've done a great deal with buildings. Generally a default image is used.

    Clicking on settlements with a certain building and getting a CTD would be likely to be some set up in DS or EDB which is impossible such as assigning a musterfield to a faction that does not have it in edb. Have you checked this side of things thoroughly?
    "One of the most sophisticated Total War mods ever developed..."
    The Fourth Age: Total War - The Dominion of Men

  3. #3
    Ramashan's Avatar Artifex
    Join Date
    Apr 2007
    Location
    Los Angeles, CA
    Posts
    4,981

    Default Re: Building Card Stumper

    The only thing I can think of it being is the barracks building cards, cause once I remove the building from the settlement in the DS I can click on the settlement in game with out any problems.

    The building is for the slave faction to which I've assigned the barbarian culture to. In the EDB I created several new barracks for the other factions in my mod but have given the original, untouched, vanilla level to the barbarian and roman culture. I've triple checked my coding, putting in both barbarian and slave and testing that way.

    In the DS I have the barracks muster field assigned to the slave faction.

    As I mentioned, what confuses me even more is that the cards are in the Barbarian UI folder but Red Fox's tool isn't even seeing them. Is there a quirk with the Slave faction itself that I'm unaware of? The slave settlements in my mod were copied directly from the vanilla DS and the barracks level I am having a problem with is directly from the vanilla EDB.
    Under the Patronage of Lord Condormanius

  4. #4
    MasterOfNone's Avatar RTW Modder 2004-2015
    Join Date
    May 2005
    Location
    England
    Posts
    16,707

    Default Re: Building Card Stumper

    I'm not sure what you mean. can you post the relevant code excerpts from EDB and DS?
    "One of the most sophisticated Total War mods ever developed..."
    The Fourth Age: Total War - The Dominion of Men

  5. #5
    Ramashan's Avatar Artifex
    Join Date
    Apr 2007
    Location
    Los Angeles, CA
    Posts
    4,981

    Default Re: Building Card Stumper

    Yeah, I was realizing I should do that as I was leaving for work this morning. So, I wont be able to post the code for another 10 hours or so.

    Basically, what I'm saying is. The coding that is causing the problem is vanilla coding. I did not touch it what so ever. The only change I made was making the Slave faction part of the Barbarian culture.
    Last edited by Ramashan; September 14, 2009 at 01:43 PM.
    Under the Patronage of Lord Condormanius

  6. #6
    Ramashan's Avatar Artifex
    Join Date
    Apr 2007
    Location
    Los Angeles, CA
    Posts
    4,981

    Default Re: Building Card Stumper

    Here's the code;

    The EDB Barracks section for the Barbarian culture,

    Code:
    building barracks
    {
        levels muster_field militia_barracks city_barracks army_barracks royal_barracks 
        {
            muster_field requires factions {  barbarian, roman, } 
            {
                capability
                {
            recruit "tarascan slinger"  0  requires factions { barbarian, roman, } 
                }
                construction  2 
                cost  400 
                settlement_min village
                upgrades
                {
                    militia_barracks
                }
            }
            militia_barracks requires factions {  barbarian, roman, } 
            {
                capability
                { 
            recruit "tarascan slinger"  0  requires factions { barbarian, roman, } 
                }
                construction  3 
                cost  600 
                settlement_min town
                upgrades
                {
                    city_barracks
                }
            }
            city_barracks requires factions {  barbarian, roman, } 
            {
                capability
                { 
            recruit "tarascan slinger"  0  requires factions { barbarian, roman, } 
                }
                construction  4 
                cost  1200
                settlement_min large_town
                upgrades
                {
                    army_barracks
                }
            }
            army_barracks requires factions {  roman, } 
            {
                capability
                {
            recruit "tarascan slinger"  0  requires factions { roman, } 
                }
                construction  6 
                cost  2400
                settlement_min city
                upgrades
                {
                    royal_barracks
                }
            }
            royal_barracks requires factions { roman,  } 
            {
                capability
                {
            recruit "tarascan slinger"  0  requires factions { roman, } 
                }
                construction  7 
                cost  4800 
                settlement_min city
                upgrades
                {
                }
            }
        }
        plugins 
        {
        }
    }
    An example of a settlement coded with problem UI building card from the DS

    Code:
    settlement
    {
        level village
        region Tribus_Chattii        ;;Matlatzin
    
        year_founded 0
        population 800
        settlement_tax 50
        plan_set default_set
        faction_creator dacia
        building
        {
            type barracks muster_field
        }
    }
    There are targas for the muster_field in the mod/data/ui/barbarian/buildings folder.

    Can anyone see anything wrong with this?

    As I mentioned, the coding is straight from the vanilla. The only change I made was to make the Slave faction part of the barbarian culture in descr_sm_factions.txt . I've also tried the EDB with 'barbarian' recruitment replaced with 'slave' and it still gives me the same CTD when ever I click on a slave settlement that contains the muster_field building.
    Under the Patronage of Lord Condormanius

  7. #7

    Default Re: Building Card Stumper

    Strange. Everything is coded correctly in descr_buildings? I know most errors there give a crash when loading RTW, but it could be possible.

    Expand your borders, a mod based on XGM 5.

  8. #8
    Ramashan's Avatar Artifex
    Join Date
    Apr 2007
    Location
    Los Angeles, CA
    Posts
    4,981

    Default Re: Building Card Stumper

    descr_buildings? Do you mean export_buildings?

    I added a new description for muster_field_slave and it still CTDs. I'm honestly completely at a loss for this one. As I mentioned, I've created several, at least 7 new building levels with building UI cards and have never had a problem. I just find it rather ironic that coding from the vanilla game would be the level causing me problems.

    Does the faction creator of a settlement effect the UI cards?

    Would the game see the interface in mod UI folder but not the building cards for some reason? Do you think its a pak issue (meaning that I need to pak the barbarian cards to get the game to see them)?

    Any help would be greatful. I have a feeling that this is may be the last problem that I need to ring out of my mod in order to get it running error free. So needless to say, the stumper of it is driving me quite mad.
    Under the Patronage of Lord Condormanius

  9. #9
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: Building Card Stumper

    Quote Originally Posted by Ramashan View Post
    Does the faction creator of a settlement effect the UI cards?
    It might. I found this out when adding a seventh culture to RS2. If the settlement creator is from a different culture than the settlement owner, the settlement creators culture will be applied to many of the building, at least on the battlemap. I found this out because a greek faction created the settlement owned by a nomad faction that I was using for testing the 7th culture and when I used city view at the start of the campaign the settlement was greek (i.e. the ambient buildings), I can't remember if it affected the actual buildings and their cards or not though.

    I also noticed that in your code it looks like you have tabs in the EDB code, those are known to give CTDs, so replace them if you do have tabs.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  10. #10
    makanyane's Avatar Praeses
    Content Emeritus

    Join Date
    Feb 2006
    Posts
    9,093
    Blog Entries
    1

    Default Re: Building Card Stumper

    I've met an issue previously with BI based modfolders where if you don't include the extra BI ui building cards, that appeared in roman and barbarian ui folders (even if you're not using those buildings) you get a CTD (though I'm not sure if that was on campaign load - or viewing settlement) instead of normal case where it would just use the default rtw roman 'barracks' you normally get for buildings without image - usually adding a completely new building just gets you the default rtw roman 'barracks' and no CTD problems if you don't add an image......

    I was a bit fed up with modfoldering bi mod at that stage and just ended up using .bat file to copy the whole roman and barb building ui sections...

    presumably though problem is that certain existing building types are coded to look for a specific image type instead of, as usual for new buildings, reverting to the default?

    Could you explain which .exe you're using and if its in modfolder set up?

    also re:
    I determined that it is because the game can't find the Unit Card for this building. However, in my data/ui/barbarian folder there are files for this building (#barbarian_muster_field & #barbarian_muster_field_constructed)
    don't forget you should also have
    bi\data\ui\barbarian\buildings\construction\#barbarian_muster_field.tga
    though I'm not sure that is relevant to the stage you've got problems with.

  11. #11

    Default Re: Building Card Stumper

    Does using descr_ui_buildings to point to another image solve the CTD?
    Does using that image for another (working) building cause a CTD?

  12. #12

    Default Re: Building Card Stumper

    Yeah, I meant export buildings...
    Going from Aradan's suggestions. Are you using the actual, packed UI cards, or new ones? And if they are new, did you double check that the TGA format is correct?

    Expand your borders, a mod based on XGM 5.

  13. #13
    Ramashan's Avatar Artifex
    Join Date
    Apr 2007
    Location
    Los Angeles, CA
    Posts
    4,981

    Default Re: Building Card Stumper

    I have tried editing descr_ui and added barbarian eastern (as well as other cultures) and it CTDs

    I have not tried using say barracks barracks_tlax, but I will try that. And I will try renaming the image.

    The cards I am trying to access are vanilla. As I said, the problem coding is from the vanilla barracks linked to an unedited Barbarian UI folder (with the exception of replacing some files in the interface folder) taken directly from the pak folder. I have also checked the format of the cards just to make sure that they are indeed targas. (several times actually)

    And when I run Red Foxs Zeus tool, it can't find any of the barbarian cards. So, I'm thinking this holds the key. The game is simply not looking for the cards in the proper place or for the proper culture. I should also try changing the culture of the slave to another I am using in the mod to see if that works.

    I suppose I could also delete the barbarian folder from my mod ui and see if it works, then move it back into the mod folder and test that as well.

    Thanks for the suggestions guys. I'll give it a shot when I get home this evening. Till then, if you have any further suggestions, continue to let me know.
    Under the Patronage of Lord Condormanius

  14. #14
    Ramashan's Avatar Artifex
    Join Date
    Apr 2007
    Location
    Los Angeles, CA
    Posts
    4,981

    Default Re: Building Card Stumper

    @ Makanyane: The .exe should be 1.6 since I installed GOLD with BI. (BI is not loaded by the way) and it is mod foldered.

    Yes, the constructed folder has the cards in it as well. But as you said, I don't think that's where the problem lies.

    Hmm, so you believe that the barracks may be hard coded somehow to look for the cards in the Roman folder and having a problem?

    @Squid: Hm, I just edited the vanilla EDB and the only thing I changed in the barracks level is ownership, so the tabs came right out of the vanilla. But, I'll untab it and see if it does anything.

    I'll also adjust the faction creator and see if that does anything.


    Updated: Well, I changed the level from barracks to barracks_tlax (a custom level I made for another faction) and the settlement loaded fine.

    I also tried changing out the faction creator and faction name in both DS and descr_regions and it CTD's.

    So, I'm just going to give up and create a new barracks level as assign it to the slave faction. I have plenty of levels to spare in the EDB so, I'll do that and just continue my build.

    I just wish I knew what the problem stemmed from. Perhaps, at some point, someone more knowledgeable that I can check out the mod folder and coding and see what I'm missing.
    Last edited by Ramashan; September 15, 2009 at 09:52 PM.
    Under the Patronage of Lord Condormanius

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •