[BNW] Why can't I build anything at the first turn after adding buildings by modbuddy?

BABITS

Chieftain
Joined
Jan 20, 2020
Messages
11
Hi,everyone,I've got the issue for hours and havn't solved yet.
Like the title,if I don't add the buildings.xml into action,it'll be ok.But when I add some new buildings, things went bad. I have taken sevral hours to discover what problem was, but I don't get the idea yet. Now the situation is very strange. Sometimes it works normally, but sometimes it doesn't. Feeling like the same xml code sometimes work normally, sometimes not, what's wrong?
I'm a beginner making Mods, and this is my first time to write here,so any suggestions is accepted.
HTML:
<Buildings>
        <Row>
            <Type>BUILDING_KONGON_REDTEA</Type>
            <BuildingClass>BUILDINGCLASS_WINDMILL</BuildingClass>
            <Cost>200</Cost>
            <GoldMaintenance>1</GoldMaintenance>
            <PrereqTech>TECH_ECONOMICS</PrereqTech>
            <Description>TXT_KEY_BUILDING_REDTEA</Description>
            <Civilopedia>TXT_KEY_CIV5_BUILDINGS_REDTEA_TEXT</Civilopedia>
            <Strategy>TXT_KEY_BUILDING_REDTEA_STRATEGY</Strategy>
            <Help>TXT_KEY_BUILDING_REDTEA_HELP</Help>
            <Flat>true</Flat>
            <SpecialistType>SPECIALIST_ENGINEER</SpecialistType>
            <SpecialistCount>1</SpecialistCount>
            <MinAreaSize>-1</MinAreaSize>
            <ConquestProb>66</ConquestProb>
            <BuildingProductionModifier>25</BuildingProductionModifier>
            <HurryCostModifier>4</HurryCostModifier>
            <IconAtlas>BW_KG_1</IconAtlas>
            <PortraitIndex>2</PortraitIndex>
            <Happiness>4</Happiness>
            <GoldenAgeModifier>5</GoldenAgeModifier>
        </Row>
    </Buildings>
Update: I have uploaded my mod, I'm very eager for your help.
Moderator Action: Welcome to CivFanatics. Moved thread to main C&C forum as that is the best place for questions to be seen. Best of luck with your modding. leif
 

Attachments

  • Kancolle Kongou (v 1).zip
    829.7 KB · Views: 40
Last edited:
  1. It's better to just take the mod from the game's MODS folder, zip it, and attach the result directly to a post. It is far easier to look at your actual code and the actual structure of the mod as it is being seen by the game than any attempt to determine what you are doing wrong by analyzing descriptions of the problem, or out-of-context snippets of the code.
  2. Very often what a new modder thinks the problem is and what the problem actually is are two different things. Having the actual mod as you are currently trying to use it allows us to look for the actual problem, and if all else fails to simply drop the mis-behaving mod into our MODS folder and run the mod to see what the game tells us.
  3. Zip the version of the mod the game is actually trying to use, which will be found as a sub-folder in ~\Documents\My Games\Sid Meier's Civilization 5\MODS. Zip the whole sub-folder for your mod.
  4. See: whoward69's zip your mods and attach tutorial
  5. If the zipped folder is too large for the forum to accept then upload the zipped mod to a file-sharing site such as dropbox and provide a link where the mod can be downloaded.
    • Mediafire is not really a very good choice any more because they have become rife with spam and malware, as well as attempts to get you to download unwanted and uneeded kludge by confusing the layout of the download pages. You'll note for example that Mediafire links are no longer allowed on Steam, whereas CFC (this site) and dropbox links are still allowed.
 
  1. It's better to just take the mod from the game's MODS folder, zip it, and attach the result directly to a post. It is far easier to look at your actual code and the actual structure of the mod as it is being seen by the game than any attempt to determine what you are doing wrong by analyzing descriptions of the problem, or out-of-context snippets of the code.
  2. Very often what a new modder thinks the problem is and what the problem actually is are two different things. Having the actual mod as you are currently trying to use it allows us to look for the actual problem, and if all else fails to simply drop the mis-behaving mod into our MODS folder and run the mod to see what the game tells us.
  3. Zip the version of the mod the game is actually trying to use, which will be found as a sub-folder in ~\Documents\My Games\Sid Meier's Civilization 5\MODS. Zip the whole sub-folder for your mod.
  4. See: whoward69's zip your mods and attach tutorial
  5. If the zipped folder is too large for the forum to accept then upload the zipped mod to a file-sharing site such as dropbox and provide a link where the mod can be downloaded.
    • Mediafire is not really a very good choice any more because they have become rife with spam and malware, as well as attempts to get you to download unwanted and uneeded kludge by confusing the layout of the download pages. You'll note for example that Mediafire links are no longer allowed on Steam, whereas CFC (this site) and dropbox links are still allowed.
Thanks to your advice. This is my mod.
 

Attachments

  • Kancolle Kongou (v 1).zip
    829.7 KB · Views: 30
The problem with not being able to select anything to build at the first turn is because of your Battleship Unit, not your building.
Code:
<GameData>
	<Units>
		<Row>
			<Class>UNITCLASS_BATTLESHIP</Class>
			<Type>UNIT_KONGON_BATTLESHIP</Type>
			<PrereqTech>TECH_TELEGRAPH</PrereqTech>
There is no such thing as TECH_TELEGRAPH

Also, BNW does not use UNITCOMBAT_NAVAL. This is a designation that is only valid when running the original Vanilla version of Civ5. BNW uses one of UNITCOMBAT_NAVALRANGED, UNITCOMBAT_NAVALMELEE, UNITCOMBAT_SUBMARINE, or UNITCOMBAT_CARRIER. Battleships are UNITCOMBAT_NAVALRANGED:
Code:
DOMAIN_SEA (contains the following unitcombat subtypes)
	UNITCOMBAT_NAVALRANGED
		UNITCLASS_GALLEASS
			UNIT_GALLEASS
			UNIT_VENETIAN_GALLEASS
		UNITCLASS_TRIREME
			UNIT_BYZANTINE_DROMON
		UNITCLASS_FRIGATE
			UNIT_FRIGATE
			UNIT_ENGLISH_SHIPOFTHELINE
		UNITCLASS_BATTLESHIP
			UNIT_BATTLESHIP
		UNITCLASS_MISSILE_CRUISER
			UNIT_MISSILE_CRUISER
	UNITCOMBAT_NAVALMELEE
		UNITCLASS_GALLEY
			UNIT_GALLEY
		UNITCLASS_TRIREME
			UNIT_TRIREME
			UNIT_CARTHAGINIAN_QUINQUEREME
		UNITCLASS_PRIVATEER
			UNIT_PRIVATEER
			UNIT_DUTCH_SEA_BEGGAR
		UNITCLASS_CARAVEL
			UNIT_CARAVEL
			UNIT_PORTUGUESE_NAU
			UNIT_KOREAN_TURTLE_SHIP
		UNITCLASS_IRONCLAD
			UNIT_IRONCLAD
		UNITCLASS_DESTROYER
			UNIT_DESTROYER
	UNITCOMBAT_SUBMARINE
		UNITCLASS_SUBMARINE
			UNIT_SUBMARINE
		UNITCLASS_NUCLEAR_SUBMARINE
			UNIT_NUCLEAR_SUBMARINE
	UNITCOMBAT_CARRIER
		UNITCLASS_CARRIER
			UNIT_CARRIER
Your Civilization has no Spy Names assigned to it. Without Spy Names assigned the game will Crash to Desktop as soon as the first player in the game reaches the Renaissance Era. Generally mod-makers provide 9 Spy names for a civilization.
 
The problem with not being able to select anything to build at the first turn is because of your Battleship Unit, not your building.
Code:
<GameData>
    <Units>
        <Row>
            <Class>UNITCLASS_BATTLESHIP</Class>
            <Type>UNIT_KONGON_BATTLESHIP</Type>
            <PrereqTech>TECH_TELEGRAPH</PrereqTech>
There is no such thing as TECH_TELEGRAPH

Also, BNW does not use UNITCOMBAT_NAVAL. This is a designation that is only valid when running the original Vanilla version of Civ5. BNW uses one of UNITCOMBAT_NAVALRANGED, UNITCOMBAT_NAVALMELEE, UNITCOMBAT_SUBMARINE, or UNITCOMBAT_CARRIER. Battleships are UNITCOMBAT_NAVALRANGED:
Code:
DOMAIN_SEA (contains the following unitcombat subtypes)
    UNITCOMBAT_NAVALRANGED
        UNITCLASS_GALLEASS
            UNIT_GALLEASS
            UNIT_VENETIAN_GALLEASS
        UNITCLASS_TRIREME
            UNIT_BYZANTINE_DROMON
        UNITCLASS_FRIGATE
            UNIT_FRIGATE
            UNIT_ENGLISH_SHIPOFTHELINE
        UNITCLASS_BATTLESHIP
            UNIT_BATTLESHIP
        UNITCLASS_MISSILE_CRUISER
            UNIT_MISSILE_CRUISER
    UNITCOMBAT_NAVALMELEE
        UNITCLASS_GALLEY
            UNIT_GALLEY
        UNITCLASS_TRIREME
            UNIT_TRIREME
            UNIT_CARTHAGINIAN_QUINQUEREME
        UNITCLASS_PRIVATEER
            UNIT_PRIVATEER
            UNIT_DUTCH_SEA_BEGGAR
        UNITCLASS_CARAVEL
            UNIT_CARAVEL
            UNIT_PORTUGUESE_NAU
            UNIT_KOREAN_TURTLE_SHIP
        UNITCLASS_IRONCLAD
            UNIT_IRONCLAD
        UNITCLASS_DESTROYER
            UNIT_DESTROYER
    UNITCOMBAT_SUBMARINE
        UNITCLASS_SUBMARINE
            UNIT_SUBMARINE
        UNITCLASS_NUCLEAR_SUBMARINE
            UNIT_NUCLEAR_SUBMARINE
    UNITCOMBAT_CARRIER
        UNITCLASS_CARRIER
            UNIT_CARRIER
Your Civilization has no Spy Names assigned to it. Without Spy Names assigned the game will Crash to Desktop as soon as the first player in the game reaches the Renaissance Era. Generally mod-makers provide 9 Spy names for a civilization.
My thanks beyond words. seem that there are many things I don't know. So could you please give me some present tutorials of modding. I just read the classical Kael guide and Civ5 Wiki. something might be outdated and I just don't know.
 
Top Bottom