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

Civopedia Has Wonder Display Error

Discussion in 'Bugs and Crashes' started by CIVPlayer8, Oct 2, 2012.

  1. CIVPlayer8

    CIVPlayer8 Chieftain

    Joined:
    Aug 5, 2011
    Messages:
    443
    Location:
    Texas
    Hello, I have a strange problem. In my Civilopedia, both in game and in the menu, the Civilopedia doesn't show the majority of the Great Wonders. Not only this, but I also can't select them, to view their information, but this problem isn't in vanilla. No other list has this problem. This problem is not only for C2C, however, I also saw it in the vanilla game. Any ideas on how to fix this bug?
     

    Attached Files:

  2. Dancing Hoskuld

    Dancing Hoskuld Warlord

    Joined:
    Jul 5, 2004
    Messages:
    22,994
    Gender:
    Male
    Location:
    Canberra, Australia
    It is a problem in the XML somewhere :sigh: some unit/building/promotion/civic/etc is not quite right.
     
  3. CIVPlayer8

    CIVPlayer8 Chieftain

    Joined:
    Aug 5, 2011
    Messages:
    443
    Location:
    Texas
    Are you having this problem as well? I'm having it with vanilla, but I can select the wonders on the list, so I wouldn't think so.
     
  4. ls612

    ls612 Deity Moderator

    Joined:
    Mar 10, 2008
    Messages:
    8,063
    Location:
    America
    Great, I haven't even added anything, only tweaked stuff. :rolleyes: And, I have no kriffing idea what causes it. Although I supposed it could be stepped through in the debugger to see what is wrong. Not that I'm volunteering to do that, I have a lot of RL on my hands.
     
  5. Vokarya

    Vokarya Chieftain

    Joined:
    Mar 25, 2011
    Messages:
    6,063
    Can you select Chichen Itza at all? If you can, then I would say the problem is the next Wonder down, which is Choquequirao. There is some modification showing up in the Modules\Praetyre\Project Hades\Custom_Religions\Andean folder. If you pull that folder out, what happens?
     
  6. CIVPlayer8

    CIVPlayer8 Chieftain

    Joined:
    Aug 5, 2011
    Messages:
    443
    Location:
    Texas
    That did it! Thanks man! :D What do you suppose caused this?
     
  7. JosEPh_II

    JosEPh_II TBS WarLord

    Joined:
    Jun 20, 2007
    Messages:
    15,163
    Gender:
    Male
    Location:
    Western IL. cornfields
    It also makes the Andean Religion impossible to found whatever it is that is wrong with the Custom_Religions\Andean folder.

    JosEPh
     
  8. Vokarya

    Vokarya Chieftain

    Joined:
    Mar 25, 2011
    Messages:
    6,063
    As was said above, it's an XML clash. When I was coding the Warden, I tried inserting my own XML to let the Ranger upgrade to the Warden, but it led to generating a phantom unit with no name and was somehow a female unit, so I removed it and asked Dancing Hoskuld to modify his existing code.
     
  9. Dancing Hoskuld

    Dancing Hoskuld Warlord

    Joined:
    Jul 5, 2004
    Messages:
    22,994
    Gender:
    Male
    Location:
    Canberra, Australia
    I am looking at those folders now to see if I can fix it.
     
  10. Desolator

    Desolator Chieftain

    Joined:
    Jul 16, 2009
    Messages:
    99
    I found two problems in Paetyre's module.

    First:
    BONUS_CONCRETE does not exist, maybe replaceable with BONUS_CEMENT (deleting it works too) (Assets\Modules\Praetyre\Project Hades\Buildings\CIV4BuildingInfos.xml)
    Spoiler :
    Code:
    		<BuildingInfo>
    			<BuildingClass>BUILDINGCLASS_HOUSE_OF_PARLIMENT</BuildingClass>
    			<Type>BUILDING_HOUSE_OF_PARLIMENT</Type>
    			<ConstructCondition>
    				<Or>
    				<Has>
    				<GOMType>GOM_BONUS</GOMType>
    				<ID>BONUS_BRICKS</ID>
    				</Has>
    				<Has>
    				<GOMType>GOM_BONUS</GOMType>
    				<ID>[COLOR="Red"]BONUS_CONCRETE[/COLOR]</ID>
    				</Has>
    				</Or>
    				</ConstructCondition>
    			<Bonus>BONUS_FURNITURE</Bonus>
    			<PrereqBonuses>
    				<Bonus>BONUS_FIBERGLASS</Bonus>
    				<Bonus>BONUS_GLASS</Bonus>
    			</PrereqBonuses>
    			<iPrereqPopulation>20</iPrereqPopulation>
    		</BuildingInfo>

    Second:
    The CHOQUEQUIRAO partial (modular) override does not work for some reason. It works if you copy over ALL definitions (from Assets\Modules\DancingHoskuld\Custom_Religions\Andean\Andean_CIV4BuildingInfos.xml) and add in the BONUS_BRICKS.
     
  11. ls612

    ls612 Deity Moderator

    Joined:
    Mar 10, 2008
    Messages:
    8,063
    Location:
    America
    Good looking. Praetyre (and all of us really) should be checking all of our changes ingame before committing new stuff. That way we can avoid some of the SNAFUs like this.
     
  12. Dancing Hoskuld

    Dancing Hoskuld Warlord

    Joined:
    Jul 5, 2004
    Messages:
    22,994
    Gender:
    Male
    Location:
    Canberra, Australia
    The CHOQUEQUIRAO problem suggests a problem in the dll in the WoC handling of the XML. Especially since it works for the Monastery which is in the same format and file(s) I have looked at the XML and it is fine as far as I can see.
     
  13. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    25,275
    Gender:
    Male
    Location:
    Las Vegas
    That first problem was understandable. A debug dll run would've shown that problem existed but its not the sort of error that would stop a mod loading even if such an error were existing in the core.

    Its the second issue that I find troubling and my thoughts echo DH's on that. @Desolator: Do you mean for some reason it needs all tag definitions shown in the module's building definition? Or do you mean that it is all bonus prereqs that need to be included if you're going to add another one? The latter would be normal. The prior... we have an issue somehow that I'd think AIAndy or Koshling should take a look at as its far beyond me but is very concerning. Is this problem happening elsewhere? Could it be taking place if the module's schema differs from the core's schema?
     
  14. Praetyre

    Praetyre Chieftain

    Joined:
    Nov 19, 2009
    Messages:
    935
    Gender:
    Male
    Location:
    Auckland, New Zealand
    I find it strange that I never got an actual error popping up for me when my folder was activated with "BONUS_CONCRETE". I do playtest my material quite thoroughly, though in retrospect I should have caught the Civilopedia error sooner and pinpointed it to my folder; I took it to be some sort of memory issue like black tiles and didn't think my changes had directly caused it. I'll try to be more thorough in future.
     
  15. Desolator

    Desolator Chieftain

    Joined:
    Jul 16, 2009
    Messages:
    99
    Yes I meant the first. As DH said the monastery override worked within the same file (with same tags) so there is no apparent reason why it is not working for the CHOQUEQUIRAO.

    In the latest SVN (SVN 3878) I edited the Modules\Praetyre\Project Hades\Custom_Religions\Andean\Andean_CIV4BuildingInfos.xml this way for testing purposes:
    Spoiler :
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by lcollins (Firaxis Games) -->
    <!-- Sid Meier's Civilization 4 -->
    <!-- Copyright Firaxis Games 2005 -->
    <!-- -->
    <!-- Building Infos -->
    <Civ4BuildingInfos xmlns="x-schema:Andean_CIV4BuildingsSchema.xml">
    	<BuildingInfos>
    		<BuildingInfo>
    			<BuildingClass>BUILDINGCLASS_ANDEAN_MONASTERY</BuildingClass>
    			<Type>BUILDING_ANDEAN_MONASTERY</Type>
    			<AndDependencyTypes>
                 	<DependencyType>RELIGION_ANDEAN</DependencyType>
     			</AndDependencyTypes>
    			<Bonus>BONUS_BRICKS</Bonus>
    			<PrereqBonuses>
    				<Bonus>BONUS_FURNITURE</Bonus>
    			</PrereqBonuses>
    		</BuildingInfo>
    		<BuildingInfo>
    			<BuildingClass>BUILDINGCLASS_CHOQUEQUIRAO</BuildingClass>
    			<Type>BUILDING_CHOQUEQUIRAO</Type>
    			<AndDependencyTypes>
                 	<DependencyType>RELIGION_ANDEAN</DependencyType>
     			</AndDependencyTypes>
    			<PrereqBonuses>
    				<Bonus>[COLOR="Red"]BONUS_CAT[/COLOR]</Bonus>
    			</PrereqBonuses>
    		</BuildingInfo>
    	</BuildingInfos>
    </Civ4BuildingInfos>

    Great Wonder listing in Civilopedia is broken as before, going to religions, andeanism and hovering the mouse over CHOQUEQUIRAO crashes the game.
    Attaching the dump and the logs.
     

    Attached Files:

  16. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    The minidump pinpoints that very precisely, so I should be able to reproduce and fix it easily later today. Just for my edification - does BONUS_CAT exist at all (in another module presumably?) or is it just a non-existent bonus type used here in this test case?
     
  17. Praetyre

    Praetyre Chieftain

    Joined:
    Nov 19, 2009
    Messages:
    935
    Gender:
    Male
    Location:
    Auckland, New Zealand
    Cat is a new resource added by Hydro; I've no idea what it's doing in the Choquequirao, which only needs Bricks with my folder enabled, but maybe DH left it in by mistake during his edits.
     
  18. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    No, no - it's not there in the SVN. Desolator just managed to reproduce the problem by adding it is all - it's just a test case
     
  19. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    I'm a bit confused as to how this could be arising in the SVN since Praetyre's module is not activated in the modular loading control XML. Can I assume its only people who are activating it in their own copies that are seeing this issue?

    Edit - ok found the problem - it is a WoC loading issue - I'll push a fix later today

    It arises when one version of a building specifies bonus yields which don't actually include any non-0 changes!

    @DH - in the base definition of the building is this:
    Code:
    			<BonusYieldModifiers>
    				<BonusYieldModifier>
    					<BonusType>BONUS_STONE</BonusType>
    					<YieldModifiers>
    						<iYield>0</iYield>
    						<iYield>0</iYield>
    						<iYield>0</iYield>
    					</YieldModifiers>
    				</BonusYieldModifier>
    			</BonusYieldModifiers>
    
    The WoC merging code didn't handle this (which I'll fix), but why is it even there?? Basically it's saying that the building gives extra yields when you have stone of...er...well nothing actually!
     
  20. JosEPh_II

    JosEPh_II TBS WarLord

    Joined:
    Jun 20, 2007
    Messages:
    15,163
    Gender:
    Male
    Location:
    Western IL. cornfields
    This addition of Cat is probably the reason I couldn't found Andeanism after I researched the founding tech 1st.

    It kept showing up in my list of tradeable techs but still had the little praying hands symbol on it. Plus if I went into the Religion Advisor it would list eh date but instead of listing me Or Unknown it listed Other. Very strange.

    I'll look to see if I made a screenshot. That was several days back.

    Anyway I hope Andeanism gets "fixed" soon or has been already on the SVN.

    Edit: Nope no screenie I forgot I had cleaned out the screenshot folder.
    JosEPh
     

Share This Page