Azure Ace Starburst, v0.1 Beta

AzureAce

Chieftain
Joined
Dec 1, 2014
Messages
76
Hi, I'm new here, I've been playing Civ for a while, and I made a mod that adds a new civilization into the game. It isn't lore-friendly and it isn't supposed to be, it adds an original character from a fanfic series I'm writing. Anyway, I followed all the tutorials exactly, figured out how stuff works through trial and error, I don't have the SDK because my crappy no-steam laptop and crappier wifi sucks. I've been editing the XML files using Notepad++, I think I've done well so far, but...

Attempt number one: I get a near-exact replica of Elizabeth, custom Traits and Units do not load properly or at all. Upon loading the mod, when I get to the "Select a character/leader" screen, it won't scroll down, allowing me to pick anyone whose name doesn't start with an A. Using Advanced Setup helps, and the game begins, only to be a generic game because at the time, it's just a beta test and nothing non-elizabethian is working.
Attempt number two: Traits seem to be working alright, but now the interface is seriously messed-up and it still won't load my custom units. Attempting to debug using the IGE(Ingame Editor) won't help. Upon starting the game, I see CIV_NAME_0 or something set as my first city's name, the menu colours for the city is messed-up, the Spy and Enemy Unit Within Range icons are stuck on, clicking the settlers does nothing and won't open a menu(Though keyboard buttons work), my city won't let me start Production on anything, leaving me stuck at the game's start... Also, names of my units are messed-up across the board when I mass-summon around twentyish using the IGE just to see what happens. Custom units still won't load. Upon loading the mod, when I get to the "Select a character/leader" screen, it won't scroll down, allowing me to pick anyone whose name doesn't start with an A. Using Advanced Setup helps, though my Civilization's name appears messed-up now, and attempting to load the mod, look at the Details, and then press the Back button makes the game freeze and crash.

Should I upload the XML files I'm using? And is there a way to fix this? If the solution is super-obvious and I just suck, feel free to laugh at me after telling me how to fix it, I promise I won't get mad. I've made Fallout mods, I've got over 1,000 downloads on Nexus for FNV mods, so I know how coding works. I'm probably just missing something obvious or making some stupid rookie error.
 
Moderator Action: Moved to the main C&C forum, the subforums are only for completed files

Ok. Sorry.

So... Should I post the XML and .Modinfo files I'm using? Or, should I copy-paste the information in those files into something like a Spoiler square or a Pastebin link?

Note: The civ's abilities is kinda broken-ish right now, that's because I'm trying to decide which of those abilities I should keep. On the day I release her to the world, she'll be less broken and overpowered.
 
So... Should I post the XML and .Modinfo files I'm using? Or, should I copy-paste the information in those files into something like a Spoiler square or a Pastebin link?

Yes, to the former. No, to the latter.
Attach your mod.
 
Gotcha. By the way, cute avatar. I loved that show, and she was my favourite.

Here's the mod!
 

Attachments

  • Aces Mod.zip
    10.5 KB · Views: 31
If I'd recorded game footage of the mod failing, would I need to upload that, too? I ask because the recordings appear corrupted. My laptop is an unworthy potato, I shall buy a true PC as soon as I can afford one.
 
Code is almost always enough to diagnose the problem. DOn't bother with recording it.
 
Code is almost always enough to diagnose the problem. DOn't bother with recording it.

Good.

By the way, how does it look so far? I looked into other mods to see how they worked and how their coding worked, and I looked into the coding of Civilizations I liked to see how their coding worked. I wanted to combine parts of them to create something new, and then have it branch off into something geniunely original. The Unique Ability's kind of a mess because I'm still trying to decide which of those abilities would suit her best.
 
Well...
Spoiler :
Code:
    <Row>
      <CivilizationType>CIVILIZATION_ACES</CivilizationType>
      [B][COLOR="red"]<UnitClassType>UNITCLASS_MODERN_ARMOR</UnitClassType>[/COLOR][/B]
      <UnitType>UNIT_ACE_ACETANK</UnitType>
    </Row>
    <Row>
      <CivilizationType>CIVILIZATION_ACES</CivilizationType>
      <UnitClassType>UNITCLASS_PIKEMAN</UnitClassType>
      <UnitType>UNIT_ACE_REGENT</UnitType>
    </Row>
    [COLOR="Red"][B]</Row>[/B][/COLOR]
Spoiler :
Code:
Units>
    <Row>
      <Type>UNIT_ACE_ACETANK</Type>
      <Description>TXT_KEY_UNIT_ACE_ACETANK</Description>
      <Civilopedia>TXT_KEY_CIV5_INDUSTRIAL_ACETANK_TEXT</Civilopedia>
      <Strategy>TXT_KEY_UNIT_ACE_ACETANK_STRATEGY</Strategy>
      <Help>TXT_KEY_UNIT_HELP_ACETANK</Help>
      <Requirements></Requirements>
      <Combat>260</Combat>
      <RangedCombat>0</RangedCombat>
      <Cost>30</Cost>
      <FaithCost>20</FaithCost>
      <RequiresFaithPurchaseEnabled>1</RequiresFaithPurchaseEnabled>
      <Moves>11</Moves>
      <Immobile>0</Immobile>
      <Range>0</Range>
      <BaseSightRange>5</BaseSightRange>
      [B][COLOR="red"]<Class>UNITCLASS_TANK</Class>[/COLOR][/B]
      <Special></Special>
      <Capture></Capture>
      <CombatClass>UNITCOMBAT_ARMOR</CombatClass>
      <Domain>DOMAIN_LAND</Domain>
      <CivilianAttackPriority></CivilianAttackPriority>
      <DefaultUnitAI>UNITAI_FAST_ATTACK</DefaultUnitAI>
      <Food>0</Food>
      <NoBadGoodies>0</NoBadGoodies>
      <RivalTerritory>0</RivalTerritory>
      <MilitarySupport>1</MilitarySupport>
      <MilitaryProduction>1</MilitaryProduction>
      <Pillage>1</Pillage>
      <PillagePrereqTech></PillagePrereqTech>
      <Found>0</Found>
      <FoundAbroad>0</FoundAbroad>
      <CultureBombRadius>0</CultureBombRadius>
      <GoldenAgeTurns>0</GoldenAgeTurns>
      <FreePolicies>0</FreePolicies>
      <OneShotTourism>0</OneShotTourism>
      <OneShotTourismPercentOthers>0</OneShotTourismPercentOthers>
      <IgnoreBuildingDefense>1</IgnoreBuildingDefense>
      <PrereqResources>0</PrereqResources>
      <Mechanized>1</Mechanized>
      <Suicide>0</Suicide>
      <CaptureWhileEmbarked>0</CaptureWhileEmbarked>
      <PrereqTech>TECH_COMBINED_ARMS</PrereqTech>
      <ObsoleteTech></ObsoleteTech>
      <GoodyHutUpgradeUnitClass>UNITCLASS_MODERN_ARMOR</GoodyHutUpgradeUnitClass>
      <HurryCostModifier>0</HurryCostModifier>
      <AdvancedStartCost>50</AdvancedStartCost>
      <MinAreaSize>-1</MinAreaSize>
      <AirInterceptRange>0</AirInterceptRange>
      <AirUnitCap>0</AirUnitCap>
      <NukeDamageLevel>-1</NukeDamageLevel>
      <WorkRate>0</WorkRate>
      <NumFreeTechs>0</NumFreeTechs>
      <BaseBeakersTurnsToCount>0</BaseBeakersTurnsToCount>
      <BaseCultureTurnsToCount>0</BaseCultureTurnsToCount>
      <RushBuilding>0</RushBuilding>
      <BaseHurry>0</BaseHurry>
      <HurryMultiplier>0</HurryMultiplier>
      <BaseGold>0</BaseGold>
      <NumGoldPerEra>0</NumGoldPerEra>
      <SpreadReligion>0</SpreadReligion>
      <RemoveHeresy>0</RemoveHeresy>
      <ReligionSpreads>0</ReligionSpreads>
      <ReligiousStrength>0</ReligiousStrength>
      <FoundReligion>0</FoundReligion>
      <RequiresEnhancedReligion>0</RequiresEnhancedReligion>
      <ProhibitsSpread>0</ProhibitsSpread>
      <CanBuyCityState>0</CanBuyCityState>
      <CombatLimit>100</CombatLimit>
      <RangeAttackOnlyInDomain>0</RangeAttackOnlyInDomain>
      <RangeAttackIgnoreLOS>0</RangeAttackIgnoreLOS>
      <Trade>0</Trade>
      <NumExoticGoods>0</NumExoticGoods>
      <RangedCombatLimit>0</RangedCombatLimit>
      <XPValueAttack>3</XPValueAttack>
      <XPValueDefense>3</XPValueDefense>
      <SpecialCargo></SpecialCargo>
      <DomainCargo></DomainCargo>
      <Conscription>0</Conscription>
      <ExtraMaintenanceCost>0</ExtraMaintenanceCost>
      <NoMaintenance>0</NoMaintenance>
      <Unhappiness>0</Unhappiness>
      <UnitArtInfo>ART_DEF_UNIT_U_ACE_ACETANK</UnitArtInfo>
      <UnitArtInfoCulturalVariation>0</UnitArtInfoCulturalVariation>
      <UnitArtInfoEraVariation>0</UnitArtInfoEraVariation>
      <ProjectPrereq></ProjectPrereq>
      <SpaceshipProject></SpaceshipProject>
      <LeaderPromotion></LeaderPromotion>
      <LeaderExperience>0</LeaderExperience>
      <DontShowYields>0</DontShowYields>
      <ShowInPedia>1</ShowInPedia>
      <MoveRate>WHEELED</MoveRate>
      <UnitFlagIconOffset>58</UnitFlagIconOffset>
      <PortraitIndex>39</PortraitIndex>
      <IconAtlas>UNIT_ATLAS_2</IconAtlas>
      <UnitFlagAtlas>UNIT_FLAG_ATLAS</UnitFlagAtlas>
    </Row>
  </Units>
First of all, that second </Row> has no place there and is regarded as a syntax error. The entire file will be dumped by the game database updater, along with all the rest of the civ data.
Welcome to the wonderful world of computers. :p

Secondly, well, I've highlighted that discrepancy, and I trust you can figure out the error there.

Third, don't even bother with this:
Spoiler :
Code:
 <UnitGameplay2DScripts>
    <Row>
      <UnitType>UNIT_ACE_ACETANK</UnitType>
      <SelectionSound>AS2D_SELECT_TANK</SelectionSound>
      <FirstSelectionSound>AS2D_BIRTH_TANK</FirstSelectionSound>
    </Row>
  </UnitGameplay2DScripts>
4th... this isn't incorrect, but it will do absolutely nothing:
Spoiler :
Code:
<Unit_ResourceQuantityRequirements>
    <Row>
      <UnitType>UNIT_ACE_ACETANK</UnitType>
      <ResourceType>RESOURCE_OIL</ResourceType>
      <Cost>0</Cost>
    </Row>
  </Unit_ResourceQuantityRequirements>
Similarly, none of this does anything but is technically not incorrect:
Spoiler :
Code:
  <Units>
    <Row>
      <Type>UNIT_ACE_ACETANK</Type>
      <Description>TXT_KEY_UNIT_ACE_ACETANK</Description>
      <Civilopedia>TXT_KEY_CIV5_INDUSTRIAL_ACETANK_TEXT</Civilopedia>
      <Strategy>TXT_KEY_UNIT_ACE_ACETANK_STRATEGY</Strategy>
      <Help>TXT_KEY_UNIT_HELP_ACETANK</Help>
      [COLOR="blue"][B]<Requirements></Requirements>[/B][/COLOR]
      <Combat>260</Combat>
      [B][COLOR="blue"]<RangedCombat>0</RangedCombat>[/COLOR][/B]
      <Cost>30</Cost>
      <FaithCost>20</FaithCost>
      <RequiresFaithPurchaseEnabled>1</RequiresFaithPurchaseEnabled>
      <Moves>11</Moves>
      [B][COLOR="blue"]<Immobile>0</Immobile>
      <Range>0</Range>[/COLOR][/B]
      <BaseSightRange>5</BaseSightRange>
      <Class>UNITCLASS_TANK</Class>
      [B][COLOR="blue"]<Special></Special>
      <Capture></Capture>[/COLOR][/B]
      <CombatClass>UNITCOMBAT_ARMOR</CombatClass>
      <Domain>DOMAIN_LAND</Domain>
      [B][COLOR="blue"]<CivilianAttackPriority></CivilianAttackPriority>[/COLOR][/B]
      <DefaultUnitAI>UNITAI_FAST_ATTACK</DefaultUnitAI>
      [B][COLOR="blue"]<Food>0</Food>
      <NoBadGoodies>0</NoBadGoodies>
      <RivalTerritory>0</RivalTerritory>[/COLOR][/B]
      <MilitarySupport>1</MilitarySupport>
      <MilitaryProduction>1</MilitaryProduction>
      <Pillage>1</Pillage>
      <PillagePrereqTech></PillagePrereqTech>
      [B][COLOR="blue"]<Found>0</Found>
      <FoundAbroad>0</FoundAbroad>
      <CultureBombRadius>0</CultureBombRadius>
      <GoldenAgeTurns>0</GoldenAgeTurns>
      <FreePolicies>0</FreePolicies>
      <OneShotTourism>0</OneShotTourism>
      <OneShotTourismPercentOthers>0</OneShotTourismPercentOthers>[/COLOR][/B]
      <IgnoreBuildingDefense>1</IgnoreBuildingDefense>
     [B][COLOR="blue"] <PrereqResources>0</PrereqResources>[/COLOR][/B]
      <Mechanized>1</Mechanized>
      [B][COLOR="blue"]<Suicide>0</Suicide>
      <CaptureWhileEmbarked>0</CaptureWhileEmbarked>[/COLOR][/B]
      <PrereqTech>TECH_COMBINED_ARMS</PrereqTech>
      [B][COLOR="blue"]<ObsoleteTech></ObsoleteTech>[/COLOR][/B]
      <GoodyHutUpgradeUnitClass>UNITCLASS_MODERN_ARMOR</GoodyHutUpgradeUnitClass>
      [B][COLOR="blue"]<HurryCostModifier>0</HurryCostModifier>[/COLOR][/B]
      <AdvancedStartCost>50</AdvancedStartCost>
      <MinAreaSize>-1</MinAreaSize>
      [B][COLOR="blue"]<AirInterceptRange>0</AirInterceptRange>
      <AirUnitCap>0</AirUnitCap>[/COLOR][/B]
      <NukeDamageLevel>-1</NukeDamageLevel>
      [B][COLOR="blue"]<WorkRate>0</WorkRate>
      <NumFreeTechs>0</NumFreeTechs>
      <BaseBeakersTurnsToCount>0</BaseBeakersTurnsToCount>
      <BaseCultureTurnsToCount>0</BaseCultureTurnsToCount>
      <RushBuilding>0</RushBuilding>
      <BaseHurry>0</BaseHurry>
      <HurryMultiplier>0</HurryMultiplier>
      <BaseGold>0</BaseGold>
      <NumGoldPerEra>0</NumGoldPerEra>
      <SpreadReligion>0</SpreadReligion>
      <RemoveHeresy>0</RemoveHeresy>
      <ReligionSpreads>0</ReligionSpreads>
      <ReligiousStrength>0</ReligiousStrength>
      <FoundReligion>0</FoundReligion>
      <RequiresEnhancedReligion>0</RequiresEnhancedReligion>
      <ProhibitsSpread>0</ProhibitsSpread>
      <CanBuyCityState>0</CanBuyCityState>[/COLOR][/B]
      <CombatLimit>100</CombatLimit>
      [B][COLOR="blue"]<RangeAttackOnlyInDomain>0</RangeAttackOnlyInDomain>
      <RangeAttackIgnoreLOS>0</RangeAttackIgnoreLOS>
      <Trade>0</Trade>
      <NumExoticGoods>0</NumExoticGoods>
      <RangedCombatLimit>0</RangedCombatLimit>[/COLOR][/B]
      <XPValueAttack>3</XPValueAttack>
      <XPValueDefense>3</XPValueDefense>
      [B][COLOR="blue"]<SpecialCargo></SpecialCargo>
      <DomainCargo></DomainCargo>
      <Conscription>0</Conscription>
      <ExtraMaintenanceCost>0</ExtraMaintenanceCost>
      <NoMaintenance>0</NoMaintenance>
      <Unhappiness>0</Unhappiness>[/COLOR][/B]
      <UnitArtInfo>ART_DEF_UNIT_U_ACE_ACETANK</UnitArtInfo>
      [B][COLOR="blue"]<UnitArtInfoCulturalVariation>0</UnitArtInfoCulturalVariation>
      <UnitArtInfoEraVariation>0</UnitArtInfoEraVariation>
      <ProjectPrereq></ProjectPrereq>
      <SpaceshipProject></SpaceshipProject>
      <LeaderPromotion></LeaderPromotion>
      <LeaderExperience>0</LeaderExperience>
      <DontShowYields>0</DontShowYields>[/COLOR][/B]
      <ShowInPedia>1</ShowInPedia>
      <MoveRate>WHEELED</MoveRate>
      <UnitFlagIconOffset>58</UnitFlagIconOffset>
      <PortraitIndex>39</PortraitIndex>
      <IconAtlas>UNIT_ATLAS_2</IconAtlas>
      <UnitFlagAtlas>UNIT_FLAG_ATLAS</UnitFlagAtlas>
    </Row>
  </Units>
Similar situation going on with the other UU.

6th: This:
Spoiler :
Code:
<Language_en_US>
    <Row Tag="TXT_KEY_UNIT_ACE_REGENT">
      <Text>Regent Clone</Text>
    </Row>
    <Row Tag="TXT_KEY_CIVILOPEDIA_UNITS_MEDIEVAL_REGENT_TEXT">
      <Text>A clone of Regent, the Head of Security at the High Aces Theatre and Casino.</Text>
    </Row>
    <Row Tag="TXT_KEY_UNIT_ACE_REGENT_STRATEGY">
      <Text>The Regent Clone is an Ace unique unit. This unit replaces the Pikeman unit. The Regent Clone is significantly stronger than the Pikeman unit, which it replaces. Fitting, as it is a clone of Regent, the Head of Security at the High Aces Casino, and possibly the strongest being in the universe. Regent Clone units are deadly against mounted units due to inherited genetic memory of their Equestrian training.</Text>
    </Row>
    [B][COLOR="Red"]<Row Tag="TXT_KEY_UNIT_HELP_REGENT">
      <Text>The Regent Clone is an Ace unique unit. This unit replaces the Pikeman unit. The Regent Clone is stronger than the Pikeman unit, which it replaces. They are clones of Regent, the Head of Security at the High Aces Casino.[/COLOR][/B]  </Language_en_US>
There is neither a </Text> tag closing the <Text> row nor a </Row> tag closing the row. This is therefore 2 syntax errors, causing the game to dump the entire file, causing the units to not exist, causing the civ to not have any unique components. And you must have at least 2 UCs if you don't want crashes and a screwy civ selection screen.
 
Gotcha. By the way, cute avatar. I loved that show, and she was my favourite.

Here's the mod!

Thanks, I actually just released my Civ based around her this weekend. I'm still working on formatting my post to this forum's completed Civilizations section, though, so my signature hasn't been updated yet.

As far as your mod goes, straight away in your modinfo file I see you have this:
Code:
<UpdateDatabase>XML/GameInfo/CIV5IconTextureAtlases.xml</UpdateDatabase>
..But I don't think this file exists in your mod?

Furthermore, your description of the Setup screen not displaying any Civs past a certain point is usually indicative of your Civ not having two uniques defined.

Your Civ technically does have two UU's defined, but here's the problem:
You have an error in your Units.xml file, which causes the entire file to be discarded, and thus your Civ now technically has zero uniques since they never made it into the database.

You should look into enabling logging.

According to the Database log:
Code:
[4117887.929] [B]table Language_en_US has no column named Units[/B]
[4117887.929] In Query - insert into Language_en_US('Tag', 'Text', 'Units', 'Unit_AITypes', 'Unit_ClassUpgrades', 'Unit_FreePromotions', 'Unit_Flavors', 'Unit_ResourceQuantityRequirements', 'UnitGameplay2DScripts', 'Language_en_US') values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
[4117887.929] In XMLSerializer while updating table Language_en_US from file [B]XML/Units.xml[/B].

This is the hint that says there's a problem with your Units file.
Upon closer inspection, (And I have to say, as much as I love whoward for all of his knowledge, man do I hate when people leave literally every line in his template files even when they're not used/changed and have default values) you have this error:

Code:
  <Language_en_US>
[...snipped...]
    <Row Tag="TXT_KEY_UNIT_HELP_REGENT">
      <Text>The Regent Clone is an Ace unique unit. This unit replaces the Pikeman unit. The Regent Clone is stronger than the Pikeman unit, which it replaces. They are clones of Regent, the Head of Security at the High Aces Casino.
  </Language_en_US>

You have started a new <Row>, then started defining the <Text> ... then you failed to close both the Text and the Row tags, causing it to assume that every single thing after that is supposed to be added into the Language database, and it freaks out because it has no idea what all that means.

This causes a cascade of errors as the game now has no idea what to do with the rest of your Civilization file, as the Database prints numerous errors about not finding stuff starting with PlayerColors.. which just so happens to be right after you've defined the UU's for your Civ.
 
Third, don't even bother with this:
Spoiler :
Code:
 <UnitGameplay2DScripts>
    <Row>
      <UnitType>UNIT_ACE_ACETANK</UnitType>
      <SelectionSound>AS2D_SELECT_TANK</SelectionSound>
      <FirstSelectionSound>AS2D_BIRTH_TANK</FirstSelectionSound>
    </Row>
  </UnitGameplay2DScripts>

I have to say, I know this really doesn't do anything, but I've added this to my mod and I would prefer more people do so simply because not doing so outputs an error into the logs, and that annoys me, haha. I'm pretty happy that my Civ outputs zero errors into the logs.
 
I have to say, I know this really doesn't do anything, but I've added this to my mod and I would prefer more people do so simply because not doing so outputs an error into the logs, and that annoys me, haha. I'm pretty happy that my Civ outputs zero errors into the logs.
:confused: I don't recall ever seeing an error in the logs related to sound scripts - or lack thereof - with any of my civs. Or maybe I'm just bad at remembering things. What kind error does that allegedly spit out?

Ooh, and nice catch with the icon atlas file not existing but being referenced in the .modinfo! To that point, this file doesn't exist either:
Code:
  <Actions>
    <OnModActivated>
      [B][COLOR="Red"]<UpdateDatabase>XML/Buildings.xml</UpdateDatabase>[/COLOR][/B]
      <UpdateDatabase>XML/Civilization.xml</UpdateDatabase>
      <UpdateDatabase>XML/Leader.xml</UpdateDatabase>
      <UpdateDatabase>XML/Trait.xml</UpdateDatabase>
      <UpdateDatabase>XML/Units.xml</UpdateDatabase>
      <UpdateDatabase>XML/GameInfo/CIV5IconTextureAtlases.xml</UpdateDatabase>
      <UpdateDatabase>XML/DiplomacyResponses.xml</UpdateDatabase>
    </OnModActivated>
  </Actions>
 
Just that it's missing an entry for that table.

Here's a random example from one of the Touhou Civs:
Code:
[4119030.683] Validating UnitGameplay2DScripts
[4119030.683] Missing Entry for UNIT_FAIRY_HERALD
[4119030.683] **** VALIDATION FAILED *****

This pops up an error for every single unit which doesn't have an entry defined in that table. It doesn't actually cause any problems that I can see, but I'm a stickler for clean logs. :/

Edit:
I should note that even in an unmodded game, this validation will fail for the UNIT_BARBARIAN_HORSEMAN -- it doesn't appear here because my Civ is loaded, and my Civ has a file specifically written to fix Firaxis' sloppiness to get rid of the barbarian horseman error.

Edit2:
For anyone interested, here is my "Fix-BNW-Errors.xml" file:
Code:
<GameData>
	<!-- Fixes annoying vanilla errors being logged repeatedly -->
	<UnitGameplay2DScripts>	
		<Row>
			<UnitType>UNIT_BARBARIAN_HORSEMAN</UnitType>
			<SelectionSound>AS2D_SELECT_HORSEMAN</SelectionSound>
			<FirstSelectionSound>AS2D_BIRTH_HORSEMAN</FirstSelectionSound>
		</Row>
	</UnitGameplay2DScripts>
	<ArtDefine_LandmarkTypes>	
		<Row>
			<Type>SPECIAL</Type>
			<LandmarkType>LayoutHandler</LandmarkType>
			<FriendlyName>Special</FriendlyName>
		</Row>
	</ArtDefine_LandmarkTypes>
</GameData>

This gets rid of a good 20+ lines of errors in the logs.
 
I have to say, I know this really doesn't do anything, but I've added this to my mod and I would prefer more people do so simply because not doing so outputs an error into the logs, and that annoys me, haha. I'm pretty happy that my Civ outputs zero errors into the logs.

AggressiveWimp is incorrect regarding the <UnitGameplay2DScripts> table. It is used to define which sounds play when the unit is created, auto-selected during the human player's turn, or manually selected by the human during the human player's turn. Otherwise the game defaults to using that annoying "spung" noise you get from (I think) barbarian brutes.

This:
Code:
<UnitGameplay2DScripts>
	<Row>
		<UnitType>UNIT_CRUSADER_LEGION</UnitType>
		<SelectionSound>AS2D_SELECT_SWORDSMAN</SelectionSound>
		<FirstSelectionSound>AS2D_BIRTH_SWORDSMAN</FirstSelectionSound>
	</Row>
</UnitGameplay2DScripts>
Gives me the Swordsman's sounds and not the annoying generic "spung" noise.


[edit]
Towards the bottom of this file is a complete listing of the Firaxis-Used <SelectionSound> and <FirstSelectionSound> tags. Just be aware that file is WIP and I am throwing forum format codes into it so I can later-on copy directly from it to forum posts in a modding reference I am working on in addition to the Newer Modders Most Common Mistakes thingie AW and I and a few others have thread-talked about.
 
AggressiveWimp is incorrect regarding the <UnitGameplay2DScripts> table. It is used to define which sounds play when the unit is created, auto-selected during the human player's turn, or manually selected by the human during the human player's turn. Otherwise the game defaults to using that annoying "spung" noise you get from (I think) barbarian brutes.

This:
Code:
<UnitGameplay2DScripts>
	<Row>
		<UnitType>UNIT_CRUSADER_LEGION</UnitType>
		<SelectionSound>AS2D_SELECT_SWORDSMAN</SelectionSound>
		<FirstSelectionSound>AS2D_BIRTH_SWORDSMAN</FirstSelectionSound>
	</Row>
</UnitGameplay2DScripts>
Gives me the Swordsman's sounds and not the annoying generic "spung" noise.


[edit]
Towards the bottom of this file is a complete listing of the Firaxis-Used <SelectionSound> and <FirstSelectionSound> tags. Just be aware that file is WIP and I am throwing forum format codes into it so I can later-on copy directly from it to forum posts in a modding reference I am working on in addition to the Newer Modders Most Common Mistakes thingie AW and I and a few others have thread-talked about.

Hmm...

Okay, thanks for everything so far. If I wanted to add a custom building to this Civ, something science-boosting and money-related(But with no culture boost ever), possibly her High Aces Casino, how would I go that? I'd want it to either replace something unimportant, or be a new thing you can make from the start of the game.

And if I fixed the errors you mentioned, would that fix the XML files and get them ready to be used in-game?
 
If you want to create buildings, go look at LeeS' building guide in his signature above.
There is no better resource for XML building construction right now.

As for your last question, only you can answer that right now. Load it up and see. If it still doesn't work, check your logs, fix, and repeat.
 
Ok, thanks. Also, the tanks are supposed to cost no oil. I designed it that way, for two reasons.

1. I'm not even sure if they have Oil in Equestria. If not, why would their tanks be designed to use that resource?
2. Magitech.
 
Well...
Spoiler :
Code:
    <Row>
      <CivilizationType>CIVILIZATION_ACES</CivilizationType>
      [B][COLOR="red"]<UnitClassType>UNITCLASS_MODERN_ARMOR</UnitClassType>[/COLOR][/B]
      <UnitType>UNIT_ACE_ACETANK</UnitType>
    </Row>
    <Row>
      <CivilizationType>CIVILIZATION_ACES</CivilizationType>
      <UnitClassType>UNITCLASS_PIKEMAN</UnitClassType>
      <UnitType>UNIT_ACE_REGENT</UnitType>
    </Row>
    [COLOR="Red"][B]</Row>[/B][/COLOR]
Spoiler :
Code:
Units>
    <Row>
      <Type>UNIT_ACE_ACETANK</Type>
      <Description>TXT_KEY_UNIT_ACE_ACETANK</Description>
      <Civilopedia>TXT_KEY_CIV5_INDUSTRIAL_ACETANK_TEXT</Civilopedia>
      <Strategy>TXT_KEY_UNIT_ACE_ACETANK_STRATEGY</Strategy>
      <Help>TXT_KEY_UNIT_HELP_ACETANK</Help>
      <Requirements></Requirements>
      <Combat>260</Combat>
      <RangedCombat>0</RangedCombat>
      <Cost>30</Cost>
      <FaithCost>20</FaithCost>
      <RequiresFaithPurchaseEnabled>1</RequiresFaithPurchaseEnabled>
      <Moves>11</Moves>
      <Immobile>0</Immobile>
      <Range>0</Range>
      <BaseSightRange>5</BaseSightRange>
      [B][COLOR="red"]<Class>UNITCLASS_TANK</Class>[/COLOR][/B]
      <Special></Special>
      <Capture></Capture>
      <CombatClass>UNITCOMBAT_ARMOR</CombatClass>
      <Domain>DOMAIN_LAND</Domain>
      <CivilianAttackPriority></CivilianAttackPriority>
      <DefaultUnitAI>UNITAI_FAST_ATTACK</DefaultUnitAI>
      <Food>0</Food>
      <NoBadGoodies>0</NoBadGoodies>
      <RivalTerritory>0</RivalTerritory>
      <MilitarySupport>1</MilitarySupport>
      <MilitaryProduction>1</MilitaryProduction>
      <Pillage>1</Pillage>
      <PillagePrereqTech></PillagePrereqTech>
      <Found>0</Found>
      <FoundAbroad>0</FoundAbroad>
      <CultureBombRadius>0</CultureBombRadius>
      <GoldenAgeTurns>0</GoldenAgeTurns>
      <FreePolicies>0</FreePolicies>
      <OneShotTourism>0</OneShotTourism>
      <OneShotTourismPercentOthers>0</OneShotTourismPercentOthers>
      <IgnoreBuildingDefense>1</IgnoreBuildingDefense>
      <PrereqResources>0</PrereqResources>
      <Mechanized>1</Mechanized>
      <Suicide>0</Suicide>
      <CaptureWhileEmbarked>0</CaptureWhileEmbarked>
      <PrereqTech>TECH_COMBINED_ARMS</PrereqTech>
      <ObsoleteTech></ObsoleteTech>
      <GoodyHutUpgradeUnitClass>UNITCLASS_MODERN_ARMOR</GoodyHutUpgradeUnitClass>
      <HurryCostModifier>0</HurryCostModifier>
      <AdvancedStartCost>50</AdvancedStartCost>
      <MinAreaSize>-1</MinAreaSize>
      <AirInterceptRange>0</AirInterceptRange>
      <AirUnitCap>0</AirUnitCap>
      <NukeDamageLevel>-1</NukeDamageLevel>
      <WorkRate>0</WorkRate>
      <NumFreeTechs>0</NumFreeTechs>
      <BaseBeakersTurnsToCount>0</BaseBeakersTurnsToCount>
      <BaseCultureTurnsToCount>0</BaseCultureTurnsToCount>
      <RushBuilding>0</RushBuilding>
      <BaseHurry>0</BaseHurry>
      <HurryMultiplier>0</HurryMultiplier>
      <BaseGold>0</BaseGold>
      <NumGoldPerEra>0</NumGoldPerEra>
      <SpreadReligion>0</SpreadReligion>
      <RemoveHeresy>0</RemoveHeresy>
      <ReligionSpreads>0</ReligionSpreads>
      <ReligiousStrength>0</ReligiousStrength>
      <FoundReligion>0</FoundReligion>
      <RequiresEnhancedReligion>0</RequiresEnhancedReligion>
      <ProhibitsSpread>0</ProhibitsSpread>
      <CanBuyCityState>0</CanBuyCityState>
      <CombatLimit>100</CombatLimit>
      <RangeAttackOnlyInDomain>0</RangeAttackOnlyInDomain>
      <RangeAttackIgnoreLOS>0</RangeAttackIgnoreLOS>
      <Trade>0</Trade>
      <NumExoticGoods>0</NumExoticGoods>
      <RangedCombatLimit>0</RangedCombatLimit>
      <XPValueAttack>3</XPValueAttack>
      <XPValueDefense>3</XPValueDefense>
      <SpecialCargo></SpecialCargo>
      <DomainCargo></DomainCargo>
      <Conscription>0</Conscription>
      <ExtraMaintenanceCost>0</ExtraMaintenanceCost>
      <NoMaintenance>0</NoMaintenance>
      <Unhappiness>0</Unhappiness>
      <UnitArtInfo>ART_DEF_UNIT_U_ACE_ACETANK</UnitArtInfo>
      <UnitArtInfoCulturalVariation>0</UnitArtInfoCulturalVariation>
      <UnitArtInfoEraVariation>0</UnitArtInfoEraVariation>
      <ProjectPrereq></ProjectPrereq>
      <SpaceshipProject></SpaceshipProject>
      <LeaderPromotion></LeaderPromotion>
      <LeaderExperience>0</LeaderExperience>
      <DontShowYields>0</DontShowYields>
      <ShowInPedia>1</ShowInPedia>
      <MoveRate>WHEELED</MoveRate>
      <UnitFlagIconOffset>58</UnitFlagIconOffset>
      <PortraitIndex>39</PortraitIndex>
      <IconAtlas>UNIT_ATLAS_2</IconAtlas>
      <UnitFlagAtlas>UNIT_FLAG_ATLAS</UnitFlagAtlas>
    </Row>
  </Units>
First of all, that second </Row> has no place there and is regarded as a syntax error. The entire file will be dumped by the game database updater, along with all the rest of the civ data.
Welcome to the wonderful world of computers. :p

Secondly, well, I've highlighted that discrepancy, and I trust you can figure out the error there.

Third, don't even bother with this:
Spoiler :
Code:
 <UnitGameplay2DScripts>
    <Row>
      <UnitType>UNIT_ACE_ACETANK</UnitType>
      <SelectionSound>AS2D_SELECT_TANK</SelectionSound>
      <FirstSelectionSound>AS2D_BIRTH_TANK</FirstSelectionSound>
    </Row>
  </UnitGameplay2DScripts>
4th... this isn't incorrect, but it will do absolutely nothing:
Spoiler :
Code:
<Unit_ResourceQuantityRequirements>
    <Row>
      <UnitType>UNIT_ACE_ACETANK</UnitType>
      <ResourceType>RESOURCE_OIL</ResourceType>
      <Cost>0</Cost>
    </Row>
  </Unit_ResourceQuantityRequirements>
Similarly, none of this does anything but is technically not incorrect:
Spoiler :
Code:
  <Units>
    <Row>
      <Type>UNIT_ACE_ACETANK</Type>
      <Description>TXT_KEY_UNIT_ACE_ACETANK</Description>
      <Civilopedia>TXT_KEY_CIV5_INDUSTRIAL_ACETANK_TEXT</Civilopedia>
      <Strategy>TXT_KEY_UNIT_ACE_ACETANK_STRATEGY</Strategy>
      <Help>TXT_KEY_UNIT_HELP_ACETANK</Help>
      [COLOR="blue"][B]<Requirements></Requirements>[/B][/COLOR]
      <Combat>260</Combat>
      [B][COLOR="blue"]<RangedCombat>0</RangedCombat>[/COLOR][/B]
      <Cost>30</Cost>
      <FaithCost>20</FaithCost>
      <RequiresFaithPurchaseEnabled>1</RequiresFaithPurchaseEnabled>
      <Moves>11</Moves>
      [B][COLOR="blue"]<Immobile>0</Immobile>
      <Range>0</Range>[/COLOR][/B]
      <BaseSightRange>5</BaseSightRange>
      <Class>UNITCLASS_TANK</Class>
      [B][COLOR="blue"]<Special></Special>
      <Capture></Capture>[/COLOR][/B]
      <CombatClass>UNITCOMBAT_ARMOR</CombatClass>
      <Domain>DOMAIN_LAND</Domain>
      [B][COLOR="blue"]<CivilianAttackPriority></CivilianAttackPriority>[/COLOR][/B]
      <DefaultUnitAI>UNITAI_FAST_ATTACK</DefaultUnitAI>
      [B][COLOR="blue"]<Food>0</Food>
      <NoBadGoodies>0</NoBadGoodies>
      <RivalTerritory>0</RivalTerritory>[/COLOR][/B]
      <MilitarySupport>1</MilitarySupport>
      <MilitaryProduction>1</MilitaryProduction>
      <Pillage>1</Pillage>
      <PillagePrereqTech></PillagePrereqTech>
      [B][COLOR="blue"]<Found>0</Found>
      <FoundAbroad>0</FoundAbroad>
      <CultureBombRadius>0</CultureBombRadius>
      <GoldenAgeTurns>0</GoldenAgeTurns>
      <FreePolicies>0</FreePolicies>
      <OneShotTourism>0</OneShotTourism>
      <OneShotTourismPercentOthers>0</OneShotTourismPercentOthers>[/COLOR][/B]
      <IgnoreBuildingDefense>1</IgnoreBuildingDefense>
     [B][COLOR="blue"] <PrereqResources>0</PrereqResources>[/COLOR][/B]
      <Mechanized>1</Mechanized>
      [B][COLOR="blue"]<Suicide>0</Suicide>
      <CaptureWhileEmbarked>0</CaptureWhileEmbarked>[/COLOR][/B]
      <PrereqTech>TECH_COMBINED_ARMS</PrereqTech>
      [B][COLOR="blue"]<ObsoleteTech></ObsoleteTech>[/COLOR][/B]
      <GoodyHutUpgradeUnitClass>UNITCLASS_MODERN_ARMOR</GoodyHutUpgradeUnitClass>
      [B][COLOR="blue"]<HurryCostModifier>0</HurryCostModifier>[/COLOR][/B]
      <AdvancedStartCost>50</AdvancedStartCost>
      <MinAreaSize>-1</MinAreaSize>
      [B][COLOR="blue"]<AirInterceptRange>0</AirInterceptRange>
      <AirUnitCap>0</AirUnitCap>[/COLOR][/B]
      <NukeDamageLevel>-1</NukeDamageLevel>
      [B][COLOR="blue"]<WorkRate>0</WorkRate>
      <NumFreeTechs>0</NumFreeTechs>
      <BaseBeakersTurnsToCount>0</BaseBeakersTurnsToCount>
      <BaseCultureTurnsToCount>0</BaseCultureTurnsToCount>
      <RushBuilding>0</RushBuilding>
      <BaseHurry>0</BaseHurry>
      <HurryMultiplier>0</HurryMultiplier>
      <BaseGold>0</BaseGold>
      <NumGoldPerEra>0</NumGoldPerEra>
      <SpreadReligion>0</SpreadReligion>
      <RemoveHeresy>0</RemoveHeresy>
      <ReligionSpreads>0</ReligionSpreads>
      <ReligiousStrength>0</ReligiousStrength>
      <FoundReligion>0</FoundReligion>
      <RequiresEnhancedReligion>0</RequiresEnhancedReligion>
      <ProhibitsSpread>0</ProhibitsSpread>
      <CanBuyCityState>0</CanBuyCityState>[/COLOR][/B]
      <CombatLimit>100</CombatLimit>
      [B][COLOR="blue"]<RangeAttackOnlyInDomain>0</RangeAttackOnlyInDomain>
      <RangeAttackIgnoreLOS>0</RangeAttackIgnoreLOS>
      <Trade>0</Trade>
      <NumExoticGoods>0</NumExoticGoods>
      <RangedCombatLimit>0</RangedCombatLimit>[/COLOR][/B]
      <XPValueAttack>3</XPValueAttack>
      <XPValueDefense>3</XPValueDefense>
      [B][COLOR="blue"]<SpecialCargo></SpecialCargo>
      <DomainCargo></DomainCargo>
      <Conscription>0</Conscription>
      <ExtraMaintenanceCost>0</ExtraMaintenanceCost>
      <NoMaintenance>0</NoMaintenance>
      <Unhappiness>0</Unhappiness>[/COLOR][/B]
      <UnitArtInfo>ART_DEF_UNIT_U_ACE_ACETANK</UnitArtInfo>
      [B][COLOR="blue"]<UnitArtInfoCulturalVariation>0</UnitArtInfoCulturalVariation>
      <UnitArtInfoEraVariation>0</UnitArtInfoEraVariation>
      <ProjectPrereq></ProjectPrereq>
      <SpaceshipProject></SpaceshipProject>
      <LeaderPromotion></LeaderPromotion>
      <LeaderExperience>0</LeaderExperience>
      <DontShowYields>0</DontShowYields>[/COLOR][/B]
      <ShowInPedia>1</ShowInPedia>
      <MoveRate>WHEELED</MoveRate>
      <UnitFlagIconOffset>58</UnitFlagIconOffset>
      <PortraitIndex>39</PortraitIndex>
      <IconAtlas>UNIT_ATLAS_2</IconAtlas>
      <UnitFlagAtlas>UNIT_FLAG_ATLAS</UnitFlagAtlas>
    </Row>
  </Units>
Similar situation going on with the other UU.

6th: This:
Spoiler :
Code:
<Language_en_US>
    <Row Tag="TXT_KEY_UNIT_ACE_REGENT">
      <Text>Regent Clone</Text>
    </Row>
    <Row Tag="TXT_KEY_CIVILOPEDIA_UNITS_MEDIEVAL_REGENT_TEXT">
      <Text>A clone of Regent, the Head of Security at the High Aces Theatre and Casino.</Text>
    </Row>
    <Row Tag="TXT_KEY_UNIT_ACE_REGENT_STRATEGY">
      <Text>The Regent Clone is an Ace unique unit. This unit replaces the Pikeman unit. The Regent Clone is significantly stronger than the Pikeman unit, which it replaces. Fitting, as it is a clone of Regent, the Head of Security at the High Aces Casino, and possibly the strongest being in the universe. Regent Clone units are deadly against mounted units due to inherited genetic memory of their Equestrian training.</Text>
    </Row>
    [B][COLOR="Red"]<Row Tag="TXT_KEY_UNIT_HELP_REGENT">
      <Text>The Regent Clone is an Ace unique unit. This unit replaces the Pikeman unit. The Regent Clone is stronger than the Pikeman unit, which it replaces. They are clones of Regent, the Head of Security at the High Aces Casino.[/COLOR][/B]  </Language_en_US>
There is neither a </Text> tag closing the <Text> row nor a </Row> tag closing the row. This is therefore 2 syntax errors, causing the game to dump the entire file, causing the units to not exist, causing the civ to not have any unique components. And you must have at least 2 UCs if you don't want crashes and a screwy civ selection screen.

Out of curiousity... Some of those things I didn't use... What do they do? And would it be possible for me to make some kind of uber-worker unit that finishes improvements at a crazy speed, or give myself a common supersoldier that can do Hurry Production/Great Scientist moves because of "Pointing guns to the heads of workers" reasons, or something like that? If so, that'd really come in handy if I ever made an evil villain Civ.
 
Yes, you can make a Super Worker. I used one when testing a custom improvement that I was adding into my Civ.

The simplest way to figure out what most things in the game do (at least relating to those XML tags) is to get a handy tool that can search multiple files at once (I use Sublime Text) and simply search the entire Civ5 assets folder for occurrences of the tag you're interested in.

This is will invariably pull up the file in which the tag is defined as part of a "Schema" which would give you all other tags available to that particular file type. For example, in the Buildings XML file, at the very top, is a list of every single XML tag that can be used for buildings.

Once you have this, it's pretty easy to look through the results and find things that you recognize from the game's vanilla assets (Oh, this tag is used on THAT building.. so that's what it does!) and you can figure out what effect it gives that way.

Edit:
Here's an example from a few months ago when I was perusing the XML files for the first time trying to figure things out.
Spoiler :
XML Tags from the Buildings XML file:
Code:
CityConnectionTradeRouteModifier        Used by Machu Picchu - +25% CCTR Gold
FreeGreatPeople                Used by Leaning Tower of Pisa - +1 Choice of great person
ExtraMissionarySpreads            Used by Great Mosque of Djenne - +1 Extra spreads to missionaries and GP&#8217;s
ReligiousPressureModifier            Used by Grand Temple - +100% Religious pressure from city
ExtraSpies                    Used by National Intel Agency - +1 Spy when built
TradeRouteRecipientBonus            Used by East India Company - +4 Gold to city owner with wonder
TradeRouteTargetBonus            Used by East india Company - +2 Gold to other owners to city with wonder
NumTradeRouteBonus            Used by Petra - +1 trade route
 
Ok, thanks. Also, the tanks are supposed to cost no oil. I designed it that way, for two reasons.

1. I'm not even sure if they have Oil in Equestria. If not, why would their tanks be designed to use that resource?
2. Magitech.
What AggressiveWimp was pointing out is that having the resource <Cost> set to "0" is the same as not even including any of this, so why add the text for that into your XML file:
Code:
<Unit_ResourceQuantityRequirements>
    <Row>
      <UnitType>UNIT_ACE_ACETANK</UnitType>
      <ResourceType>RESOURCE_OIL</ResourceType>
      <Cost>0</Cost>
    </Row>
  </Unit_ResourceQuantityRequirements>
The default for all units for all resources is to use "0" of any resource, so adding a <Unit_ResourceQuantityRequirements> table with a value of "0" for <Cost> is unnecessary. Only those units that will use up a resource are generally shown with an entry in the <Unit_ResourceQuantityRequirements> table. Though if you were using one of whoward's unit-making templates (utilities) I can see how you could end up doing what you did. What you did has the same effect as if you had deleted that whole bit of code from your mod's Units file.

Spoiler purists :
yes, the default value for <Cost> within table <Unit_ResourceQuantityRequirements> is "1". But that is not the same thing as every unit defaulting to requiring a resource.
 
Top Bottom