Pallada-Class Protected Cruiser

Lord Tirian

Erratic Poster
Joined
Nov 30, 2007
Messages
2,724
Location
Liverpool, UK

Civ 5 conversion of Refar's Avrora model for Civ IV. Mesh tweaks (added detail, improved UV layout), new texture, UI icons (portrait, flag and strategic view) and added effects/animation by me. Many thanks to Deliverator (and his brilliant tools) and wolfdog (for the Ironclad template to get the thing imported)!

Recommended scale (see screenshots with other ships): 0.086

You can find the download and more screenshots here.
 
My compliments, very good work, it seems like it was already in the game.
I'm surely going to use it!
 
Superb Unit. I know it stemed from CBP discussions Please will some kind soul make this into a small mod to pop it into my game I tried tonight and got myself all muddled up. :(
 
Note that this ship fires from the side, so you need to use it with Ship of the Line/frigate template.

Beautiful unit !
 
Can anyone point me in the direction of how to set up the icons in SQl I am having trouble getting the portrait and unit flag to show up in game.
 
Can anyone point me in the direction of how to set up the icons in SQl I am having trouble getting the portrait and unit flag to show up in game.

Agree,

Unefortyunately I don't know how to add units,can you please make a "cruiser mod"?i definitely wanted to use this ship. :(
 
Hello Chrisbburn and makrisgialos,

here is an example of the code required to make a mod from this unit, this one is in XML :

Code:
<GameData>

	<UnitClasses>
		<Row>
			<Type>UNITCLASS_PROTECTED_CRUISER</Type>
			<Description>TXT_KEY_UNIT_PROTECTED_CRUISER</Description>
			<DefaultUnit>UNIT_PROTECTED_CRUISER</DefaultUnit>
		</Row>
	</UnitClasses>

	<Units>
		<Row>
			<Class>UNITCLASS_PROTECTED_CRUISER</Class>
			<Type>UNIT_PROTECTED_CRUISER</Type>
			<PrereqTech>TECH_ELECTRONICS</PrereqTech>			<!-- Put the technologie you want as prereq here-->
			<Combat>50</Combat>
			<RangedCombat>45</RangedCombat>
			<Cost>250</Cost>
			<FaithCost>500</FaithCost>
			<RequiresFaithPurchaseEnabled>true</RequiresFaithPurchaseEnabled>
			<Moves>7</Moves>
			<Range>2</Range>
			<CombatClass>UNITCOMBAT_NAVALRANGED</CombatClass>
			<Domain>DOMAIN_SEA</Domain>
			<DefaultUnitAI>UNITAI_ASSAULT_SEA</DefaultUnitAI>
			<Description>TXT_KEY_UNIT_PROTECTED_CRUISER</Description>
			<Civilopedia>TXT_KEY_UNIT_PROTECTED_CRUISER_PEDIA</Civilopedia>
			<Strategy>TXT_KEY_UNIT_PROTECTED_CRUISER_STRATEGY</Strategy>
			<Help>TXT_KEY_UNIT_PROTECTED_CRUISER_HELP</Help>
			<MilitarySupport>true</MilitarySupport>
			<MilitaryProduction>true</MilitaryProduction>
			<Pillage>true</Pillage>
			<ObsoleteTech>TECH_MODERN_NAVAL_WARFARE</ObsoleteTech>			<!-- Put the technologie you want as obsolete here-->
			<IgnoreBuildingDefense>true</IgnoreBuildingDefense>
			<Mechanized>true</Mechanized>
			<AdvancedStartCost>60</AdvancedStartCost>
			<MinAreaSize>20</MinAreaSize>
			<XPValueAttack>3</XPValueAttack>
			<XPValueDefense>3</XPValueDefense>
			<UnitArtInfo>ART_DEF_UNIT_PROTECTED_CRUISER</UnitArtInfo>
			<UnitArtInfoCulturalVariation>true</UnitArtInfoCulturalVariation>
			<UnitFlagAtlas>UNITS_PALLADA_FLAG_ATLAS</UnitFlagAtlas>
			<UnitFlagIconOffset>0</UnitFlagIconOffset>
			<PortraitIndex>33</PortraitIndex>
			<IconAtlas>PROTECTED_CRUISER_ATLAS</IconAtlas>
			<MoveRate>BOAT</MoveRate>
		</Row>
	</Units>
	
	<Unit_ClassUpgrades>
		<Row>
			<UnitType>UNIT_PROTECTED_CRUISER</UnitType>
			<UnitClassType>UNITCLASS_BATTLESHIP</UnitClassType>			<!-- Put the upgrade for the protected cruiser here-->
		</Row>
	</Unit_ClassUpgrades>
	
	<Unit_FreePromotions>
		<Row>
			<UnitType>UNIT_PROTECTED_CRUISER</UnitType>
			<PromotionType>PROMOTION_INDIRECT_FIRE</PromotionType>
		</Row>
		<Row>
			<UnitType>UNIT_PROTECTED_CRUISER</UnitType>
			<PromotionType>PROMOTION_ONLY_DEFENSIVE</PromotionType>
		</Row>	
	</Unit_FreePromotions>

	<Unit_AITypes>
		<Row>
			<UnitType>UNIT_PROTECTED_CRUISER</UnitType>
			<UnitAIType>UNITAI_ASSAULT_SEA</UnitAIType>
		</Row>
		<Row>
			<UnitType>UNIT_PROTECTED_CRUISER</UnitType>
			<UnitAIType>UNITAI_RESERVE_SEA</UnitAIType>
		</Row>
		<Row>
			<UnitType>UNIT_PROTECTED_CRUISER</UnitType>
			<UnitAIType>UNITAI_ESCORT_SEA</UnitAIType>
		</Row>	
	</Unit_AITypes>

	<Unit_Flavors>
		<Row>
			<UnitType>UNIT_PROTECTED_CRUISER</UnitType>
			<FlavorType>FLAVOR_NAVAL</FlavorType>
			<Flavor>27</Flavor>
		</Row>
	</Unit_Flavors>
	
	<IconTextureAtlases>
		<Row>
			<Atlas>PROTECTED_CRUISER_ATLAS</Atlas>
			<IconSize>256</IconSize>
			<Filename>ShipAtlas256.dds</Filename>
			<IconsPerRow>8</IconsPerRow>
			<IconsPerColumn>8</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>PROTECTED_CRUISER_ATLAS</Atlas>
			<IconSize>128</IconSize>
			<Filename>ShipAtlas128.dds</Filename>
			<IconsPerRow>8</IconsPerRow>
			<IconsPerColumn>8</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>PROTECTED_CRUISER_ATLAS</Atlas>
			<IconSize>80</IconSize>
			<Filename>ShipAtlas80.dds</Filename>
			<IconsPerRow>8</IconsPerRow>
			<IconsPerColumn>8</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>PROTECTED_CRUISER_ATLAS</Atlas>
			<IconSize>64</IconSize>
			<Filename>ShipAtlas64.dds</Filename>
			<IconsPerRow>8</IconsPerRow>
			<IconsPerColumn>8</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>PROTECTED_CRUISER_ATLAS</Atlas>
			<IconSize>45</IconSize>
			<Filename>ShipAtlas45.dds</Filename>
			<IconsPerRow>8</IconsPerRow>
			<IconsPerColumn>8</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>PROTECTED_CRUISER_ATLAS</Atlas>
			<IconSize>32</IconSize>
			<Filename>ShipAtlas32.dds</Filename>
			<IconsPerRow>8</IconsPerRow>
			<IconsPerColumn>8</IconsPerColumn>
		</Row>
		
		<Row>
			<Atlas>UNITS_PALLADA_FLAG_ATLAS</Atlas>
			<IconSize>32</IconSize>
			<Filename>cruiserflag.dds</Filename>
			<IconsPerRow>1</IconsPerRow>
			<IconsPerColumn>1</IconsPerColumn>
		</Row>
	</IconTextureAtlases>

	<Language_en_US>
		<Row Tag="TXT_KEY_UNIT_PROTECTED_CRUISER">
			<Text> YOUR HELP TEXT HERE.</Text>
		</Row>
		<Row Tag="TXT_KEY_UNIT_PROTECTED_CRUISER_HELP">
			<Text>Protected Cruiser</Text>
		</Row>
		<Row Tag="TXT_KEY_UNIT_PROTECTED_CRUISER_PEDIA">
			<Text> YOUR PEDIA TEXT HERE.</Text>
		</Row>
		<Row Tag="TXT_KEY_UNIT_PROTECTED_CRUISER_STRATEGY">
			<Text> YOUR STRATEGY TEXT HERE.</Text>
		</Row>
	</Language_en_US>

	<!-- CODE FOR THE ARTDEFINES -->
	
	<ArtDefine_UnitInfos>
		<Row>
			<Type>ART_DEF_UNIT_PROTECTED_CRUISER</Type>
			<DamageStates>1</DamageStates>
		</Row>
	</ArtDefine_UnitInfos>
	<ArtDefine_UnitInfoMemberInfos>
		<Row>
			<UnitInfoType>ART_DEF_UNIT_PROTECTED_CRUISER</UnitInfoType>
			<UnitMemberInfoType>ART_DEF_UNIT_MEMBER_PROTECTED_CRUISER</UnitMemberInfoType>
			<NumMembers>1</NumMembers>
		</Row>
	</ArtDefine_UnitInfoMemberInfos>
	<ArtDefine_UnitMemberInfos>
		<Row>
			<Type>ART_DEF_UNIT_MEMBER_PROTECTED_CRUISER</Type>
			<Scale>0.086</Scale>
			<Domain>Sea</Domain>
			<Model>cruiser.fxsxml</Model>
			<MaterialTypeTag>METAL</MaterialTypeTag>
			<MaterialTypeSoundOverrideTag>METALLRG</MaterialTypeSoundOverrideTag>
		</Row>
	</ArtDefine_UnitMemberInfos>
	<ArtDefine_UnitMemberCombats>
		<Row>
			<UnitMemberType>ART_DEF_UNIT_MEMBER_PROTECTED_CRUISER</UnitMemberType>
			<EnableActions>Idle Attack RunCharge AttackCity Bombard Death BombardDefend Run Fortify CombatReady AttackSurfaceToAir</EnableActions>
			<HasShortRangedAttack>1</HasShortRangedAttack>
			<HasLeftRightAttack>1</HasLeftRightAttack>
			<HasRefaceAfterCombat>0</HasRefaceAfterCombat>
			<HasIndependentWeaponFacing>1</HasIndependentWeaponFacing>
		</Row>
	</ArtDefine_UnitMemberCombats>
	<ArtDefine_UnitMemberCombatWeapons>
		<Row>
			<UnitMemberType>ART_DEF_UNIT_MEMBER_PROTECTED_CRUISER</UnitMemberType>
			<Index>0</Index>
			<SubIndex>0</SubIndex>
			<VisKillStrengthMin>25.0</VisKillStrengthMin>
			<VisKillStrengthMax>50.0</VisKillStrengthMax>
			<HitEffect>ART_DEF_VEFFECT_CANNON_IMPACT_$(TERRAIN)</HitEffect>
			<WeaponTypeTag>EXPLOSIVE</WeaponTypeTag>
			<WeaponTypeSoundOverrideTag>EXPLOSION20POUND</WeaponTypeSoundOverrideTag>
		</Row>
	</ArtDefine_UnitMemberCombatWeapons>
</GameData>

You will need to customize some data to your own needs (prereq tech, obsolete tech, combat values, texts for the pedia, help and strategy,...). The settings in this code are from my own mod and will not fit a vanilla tech tree.

Don't forget to set the VFS of all graphic files (.dds, .fxsxml, .gr2) to true.
And you need to make a small mod, if you don't know how a good start is here

and here is in SQL the code to set the strategicview icon :

Code:
INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset) VALUES ('ART_DEF_UNIT_PROTECTED_CRUISER',										'Unit',		'svcruiser.dds');

Edit : as attachment my IconsAtlas file as set in the <IconTextureAtlases> lines, the vfs of the files in it must be set to true as well.
 

Attachments

  • Ships.zip
    511.7 KB · Views: 137
Thanks very much I will get it tested tonight. I had worked through and got as far as getting the model to work just not the icons.
 
Thanks very much I will get it tested tonight. I had worked through and got as far as getting the model to work just not the icons.
Hey, did you get my PM? I didn't hear back afterwards, so I thought you were fine - if you want to, I can just upload the entire test mod I made for it (the main reason I haven't yet is that I didn't have time to balance the gameplay stats of the cruiser yet).

Since there's some demand, I might just turn this into a little standalone mod (as I said, I just didn't have time to crunch the numbers to find a good spot for the unit yet and didn't want to step on CBP's toes).
 
WOW,

Thanks a lot Hulfgar!!!!!!You are n1!!!!! :D

Which files are included however?
I know to add this only to classes.xml and units.xml

For example,i see unitclasses.xml and units.xml
There are more i guess?If yes,can you tell us which should we edit?
 
Hey, did you get my PM? I didn't hear back afterwards, so I thought you were fine - if you want to, I can just upload the entire test mod I made for it (the main reason I haven't yet is that I didn't have time to balance the gameplay stats of the cruiser yet).

Since there's some demand, I might just turn this into a little standalone mod (as I said, I just didn't have time to crunch the numbers to find a good spot for the unit yet and didn't want to step on CBP's toes).
Yes thanks got your PM just been busy with other things. I still couldnt get the icons to work with the SQL you sent so I cheated and copied and pasted Hulgars. Thanks for the support though both of you. Now I have a working Mod. I haven't looked at balancing quite yet just got it sat between Frigate and Battleship. Requires 1 coal and unlocks at Dynamite.
 
Hello makrisgialos,

don't add the code to existing Civ5 files : editing vanilla files is bad and can lead to huge problems from incompatibility with mods to CPU meltdown :)

You need to make a small mod to get your unit working safely. You can make as many files as Firaxis did (spliting units and unitclasses in 2 files for example) or just put everything in 1 file.

<UnitClasses>
This part defines the class of the new unit. Each time you create a new unit you need to create a new class for it

Here are set the stats of the unit.
From my example you will need to balance some data to your own needs :
(what you have to balance is in red, what you can keep stays in black)

<PrereqTech> set the technologie prereq. For a vanilla tech tree Dynamite could be a good choice as Chrisbburn did

<Combat> The melee strength of the unit. Should be between the Frigate and the Battleship.
<RangedCombat> The range strength of the unit. Should be between the Frigate and the Battleship.
<Cost> How much the unit will cost to build
<FaithCost> Same but in faith, it's 2x the cost (or less or more if you wish :) )
<RequiresFaithPurchaseEnabled> With this setting the religion must allow the purchase with Faith. If it's not defined then Faith Purchase is enabled in all cases (I think).
<Moves> How many tiles the unit can move
<Range> How far the unit can fire. Vanilla settings are 3.
<ObsoleteTech> At which Tech the unit is obsolete, for vanilla settings it should be when the Battleship unlocks.

<Unit_ClassUpgrades>
In which unitclass your Protected Cruiser will upgrade. For vanilla settings it should be the Battleship.

<Unit_FreePromotions>
Which promotions the unit will get at start. At minimum should be the battleship's promotions.

<Unit_AITypes>
Tells the AI how to use the unit. Same settings as the Battleship.

<Unit_Flavors>
Tells the AI how much value it gives the unit to build it. Same settings as the Battleship.

<IconTextureAtlases>
The table defines the icons and flag for the unit (not the strategic view icon)
The lines
<UnitFlagAtlas>UNITS_PALLADA_FLAG_ATLAS</UnitFlagAtlas> and
<IconAtlas>PROTECTED_CRUISER_ATLAS</IconAtlas>
in the Units table work with the IconTextureAtlases.

<Language_en_US>
replace all YOUR HELP TEXT HERE. with your own text. My best friend for the pedia part is wikipedia :)


CODE FOR THE ARTDEFINES The following tables tell the game which arts to use and how (with which templates for the animations). You don't need to change anything at all here. The template I used is from the frigate because the protected cruiser fires from the side

<ArtDefine_UnitInfos>

<ArtDefine_UnitInfoMemberInfos>

<ArtDefine_UnitMemberInfos>

<ArtDefine_UnitMemberCombats>

<ArtDefine_UnitMemberCombatWeapons>

If you want a resource prereq for your unit (coal is the best and more accurate choice) then add those lines :

Code:
	<Unit_ResourceQuantityRequirements>
		<Row>
			<UnitType>UNIT_PROTECTED_CRUISER</UnitType>
			<ResourceType>RESOURCE_COAL</ResourceType>
		</Row>
</Unit_ResourceQuantityRequirements>

Again you can put all of this in 1 XML file and you write 1 SQL for the strategicview.
Both files must be loaded/activated via a mod that you can do with Modbuddy.

I could make the mod for you but I think it's better if you do it. You will learn how to make your own mod and in the future it will be easier for you.
Kael's guide will tell you all you need for this (90% of the work is done with the code I gave you).

If you need more help just ask :)

ah and ... don't edit the vanilla files ! :)
 
Top Bottom