[GS] Projects artdef

Riker13

King
Joined
Nov 9, 2001
Messages
859
Location
UK
Hi All,
Is there an .artdef for the projects like "Convert to Oil"?

Regards
Riker13:)
 
Code:
<GameInfo>
	<IconTextureAtlases>
		<Row Name="ICON_ATLAS_PROJECTS" IconSize="30"   IconsPerRow="8" IconsPerColumn="8" Filename="Projects30"/>
    	<Row Name="ICON_ATLAS_PROJECTS" IconSize="32"   IconsPerRow="8" IconsPerColumn="8" Filename="Projects32"/>
	    <Row Name="ICON_ATLAS_PROJECTS" IconSize="38"   IconsPerRow="8" IconsPerColumn="8" Filename="Projects38"/>
    	<Row Name="ICON_ATLAS_PROJECTS" IconSize="50"   IconsPerRow="8" IconsPerColumn="8" Filename="Projects50"/>
      <Row Name="ICON_ATLAS_PROJECTS" IconSize="70"   IconsPerRow="8" IconsPerColumn="8" Filename="Projects70"/>
	    <Row Name="ICON_ATLAS_PROJECTS" IconSize="80"   IconsPerRow="8" IconsPerColumn="8" Filename="Projects80"/>
    	<Row Name="ICON_ATLAS_PROJECTS" IconSize="256"  IconsPerRow="8" IconsPerColumn="8" Filename="Projects256"/>

	    <Row Name="ICON_ATLAS_ROAD" IconSize="30" IconsPerRow="1" IconsPerColumn="1" Filename="Road"/>
	</IconTextureAtlases>
	<IconDefinitions>
    <Row Name="ICON_PROJECT_CARNIVAL"               				Atlas="ICON_ATLAS_PROJECTS" Index="10"/>
	<Row Name="ICON_PROJECT_ENHANCE_DISTRICT_ENCAMPMENT"            Atlas="ICON_ATLAS_PROJECTS" Index="11"/>
    <Row Name="ICON_PROJECT_ENHANCE_DISTRICT_HARBOR"                Atlas="ICON_ATLAS_PROJECTS" Index="12"/>
    <Row Name="ICON_PROJECT_ENHANCE_DISTRICT_INDUSTRIAL_ZONE"       Atlas="ICON_ATLAS_PROJECTS" Index="13"/>
    <Row Name="ICON_PROJECT_ENHANCE_DISTRICT_COMMERCIAL_HUB"        Atlas="ICON_ATLAS_PROJECTS" Index="14"/>
    <Row Name="ICON_PROJECT_ENHANCE_DISTRICT_HOLY_SITE"             Atlas="ICON_ATLAS_PROJECTS" Index="15"/>
    <Row Name="ICON_PROJECT_ENHANCE_DISTRICT_CAMPUS"                Atlas="ICON_ATLAS_PROJECTS" Index="16"/>
    <Row Name="ICON_PROJECT_ENHANCE_DISTRICT_THEATER"               Atlas="ICON_ATLAS_PROJECTS" Index="17"/>
    <Row Name="ICON_PROJECT_REPAIR_OUTER_DEFENSES"                         Atlas="ICON_ATLAS_PROJECTS" Index="0"/>
    <Row Name="ICON_PROJECT_LAUNCH_EARTH_SATELLITE"                 Atlas="ICON_ATLAS_PROJECTS" Index="1"/>
    <Row Name="ICON_PROJECT_LAUNCH_MOON_LANDING"                    Atlas="ICON_ATLAS_PROJECTS" Index="2"/>
    <Row Name="ICON_PROJECT_LAUNCH_MARS_REACTOR"                    Atlas="ICON_ATLAS_PROJECTS" Index="3"/>
    <Row Name="ICON_PROJECT_LAUNCH_MARS_HABITATION"                 Atlas="ICON_ATLAS_PROJECTS" Index="4"/>
    <Row Name="ICON_PROJECT_LAUNCH_MARS_HYDROPONICS"                Atlas="ICON_ATLAS_PROJECTS" Index="5"/>
    <Row Name="ICON_PROJECT_MANHATTAN_PROJECT"                      Atlas="ICON_ATLAS_PROJECTS" Index="6"/>
    <Row Name="ICON_PROJECT_OPERATION_IVY"                          Atlas="ICON_ATLAS_PROJECTS" Index="7"/>
    <Row Name="ICON_PROJECT_BUILD_NUCLEAR_DEVICE"                   Atlas="ICON_ATLAS_PROJECTS" Index="8"/>
    <Row Name="ICON_PROJECT_BUILD_THERMONUCLEAR_DEVICE"             Atlas="ICON_ATLAS_PROJECTS" Index="9"/>

    <Row Name="ICON_ROUTE_MEDIEVAL_ROAD"					              Index="0"   Atlas="ICON_ATLAS_ROAD" />
    <Row Name="ICON_ROUTE_INDUSTRIAL_ROAD"					            Index="0"   Atlas="ICON_ATLAS_ROAD" />
    <Row Name="ICON_ROUTE_MODERN_ROAD"					                Index="0"   Atlas="ICON_ATLAS_ROAD" />
  
	</IconDefinitions>
</GameInfo>
I don't believe an actual artdef is necessary since projects aren't really an animated "thing" in the game.

You can add a new set of art dds files to the game via an "ImportFiles" ModBuddy action type. And then add the code to hook up the <IconTextureAtlases> and <IconDefinitions> to those imported files within an "UpdateIcons" type of Modbuddy action. Hilarity ( :wallbash: ) seems to ensue when using this method for Leader "splash" diplo screens and game start-up Dawn Of Man screens, however.

Code:
<GameInfo>
  <IconTextureAtlases>
    <Row Name="ICON_ATLAS_XP2_PROJECTS" IconSize="30"  IconsPerRow="4" IconsPerColumn="4" Filename="XP2_Projects30"/>
    <Row Name="ICON_ATLAS_XP2_PROJECTS" IconSize="32"  IconsPerRow="4" IconsPerColumn="4" Filename="XP2_Projects32"/>
    <Row Name="ICON_ATLAS_XP2_PROJECTS" IconSize="38"  IconsPerRow="4" IconsPerColumn="4" Filename="XP2_Projects38"/>
    <Row Name="ICON_ATLAS_XP2_PROJECTS" IconSize="50"  IconsPerRow="4" IconsPerColumn="4" Filename="XP2_Projects50"/>
    <Row Name="ICON_ATLAS_XP2_PROJECTS" IconSize="80"  IconsPerRow="4" IconsPerColumn="4" Filename="XP2_Projects80"/>
    <Row Name="ICON_ATLAS_XP2_PROJECTS" IconSize="256" IconsPerRow="4" IconsPerColumn="4" Filename="XP2_Projects256"/>
  </IconTextureAtlases>
  <IconDefinitions>
    <Row Name="ICON_PROJECT_CONVERT_REACTOR_TO_OIL"				      Atlas="ICON_ATLAS_XP2_PROJECTS" Index="0"/>
    <Row Name="ICON_PROJECT_DECOMMISSION_OIL_POWER_PLANT"	      Atlas="ICON_ATLAS_XP2_PROJECTS" Index="14"/>
		<Row Name="ICON_PROJECT_UNUSED_XP2_ICON_1"						      Atlas="ICON_ATLAS_XP2_PROJECTS" Index="1"/>
    <Row Name="ICON_PROJECT_TERRESTRIAL_LASER"						      Atlas="ICON_ATLAS_XP2_PROJECTS" Index="2"/>
    <Row Name="ICON_PROJECT_ORBITAL_LASER"								      Atlas="ICON_ATLAS_XP2_PROJECTS" Index="3"/>
    <Row Name="ICON_PROJECT_CONVERT_REACTOR_TO_URANIUM"		      Atlas="ICON_ATLAS_XP2_PROJECTS" Index="4"/>
    <Row Name="ICON_PROJECT_DECOMMISSION_NUCLEAR_POWER_PLANT"		Atlas="ICON_ATLAS_XP2_PROJECTS" Index="15"/>
    <Row Name="ICON_PROJECT_COTHON_CAPITAL_MOVE"					      Atlas="ICON_ATLAS_XP2_PROJECTS" Index="5"/>
    <Row Name="ICON_PROJECT_LAUNCH_MARS_BASE"							      Atlas="ICON_ATLAS_XP2_PROJECTS" Index="6"/>
    <Row Name="ICON_PROJECT_LAUNCH_EXOPLANET_EXPEDITION"	      Atlas="ICON_ATLAS_XP2_PROJECTS" Index="7"/>
		<Row Name="ICON_PROJECT_CARBON_RECAPTURE"							      Atlas="ICON_ATLAS_XP2_PROJECTS" Index="8"/>
		<Row Name="ICON_PROJECT_SEND_AID"											      Atlas="ICON_ATLAS_XP2_PROJECTS" Index="9"/>
		<Row Name="ICON_PROJECT_TRAIN_ATHLETES"								      Atlas="ICON_ATLAS_XP2_PROJECTS" Index="10"/>
		<Row Name="ICON_PROJECT_TRAIN_ASTRONAUTS"							      Atlas="ICON_ATLAS_XP2_PROJECTS" Index="11"/>
		<Row Name="ICON_PROJECT_CONVERT_REACTOR_TO_COAL"			      Atlas="ICON_ATLAS_XP2_PROJECTS" Index="12"/>
    <Row Name="ICON_PROJECT_DECOMMISSION_COAL_POWER_PLANT"			Atlas="ICON_ATLAS_XP2_PROJECTS" Index="16"/>
		<Row Name="ICON_PROJECT_RECOMMISSION_REACTOR"					      Atlas="ICON_ATLAS_XP2_PROJECTS" Index="13"/>
	</IconDefinitions>
</GameInfo>
 
Last edited:
Thanks LeeS this is what I did but for some reason the icon in the Tech tree does not show and the one in the Pedia shows then shows something else then may show again?
Which made me think there was a .artdef, strange. There are no issues on the database logs.
Any clues or do you need to see my data.
 
Random icons showing anywhere is usually an issue with no actual proper hook-up of a "thing" to the desired Icon.

Are you sure in table IconDefinitions you have "ICON_" prefixed to the actual XML "name" of the ProjectType ?
 
<GameInfo>
<IconTextureAtlases>
<Row Name="ICON_ATLAS_BRIT_PROJECTS" IconSize="30" IconsPerRow="4" IconsPerColumn="4" Filename="Brit_Projects30"/>
<Row Name="ICON_ATLAS_BRIT_PROJECTS" IconSize="32" IconsPerRow="4" IconsPerColumn="4" Filename="Brit_Projects32"/>
<Row Name="ICON_ATLAS_BRIT_PROJECTS" IconSize="38" IconsPerRow="4" IconsPerColumn="4" Filename="Brit_Projects38"/>
<Row Name="ICON_ATLAS_BRIT_PROJECTS" IconSize="50" IconsPerRow="4" IconsPerColumn="4" Filename="Brit_Projects50"/>
<Row Name="ICON_ATLAS_BRIT_PROJECTS" IconSize="80" IconsPerRow="4" IconsPerColumn="4" Filename="Brit_Projects80"/>
<Row Name="ICON_ATLAS_BRIT_PROJECTS" IconSize="256" IconsPerRow="4" IconsPerColumn="4" Filename="Brit_Projects256"/>
</IconTextureAtlases>
<IconDefinitions>
<Row Name="ICON_PROJECT_CONVERT_REACTOR_TO_COPPER" Atlas="ICON_ATLAS_BRIT_PROJECTS" Index="1"/>
</IconDefinitions>
</GameInfo>
 
<GameInfo>
<Types>
<Row Type="PROJECT_CONVERT_REACTOR_TO_COPPER" Kind="KIND_PROJECT"/>
</Types>
<Projects>
<Row ProjectType="PROJECT_CONVERT_REACTOR_TO_COPPER" Name="LOC_PROJECT_CONVERT_REACTOR_TO_COPPER" ShortName="LOC_PROJECT_CONVERT_REACTOR_TO_COPPER_SHORT_NAME" Description="LOC_PROJECT_CONVERT_REACTOR_TO_COPPER_DESCRIPTION" PrereqDistrict="DISTRICT_INDUSTRIAL_ZONE" PrereqTech="TECH_ELECTROMAGNETICS" Cost="200" AdvisorType="ADVISOR_GENERIC"/>
</Projects>
<Projects_XP2>
<Row ProjectType="PROJECT_CONVERT_REACTOR_TO_COPPER" CreateBuilding="BUILDING_BCOHTS_REACTOR"/>
</Projects_XP2>

<Project_BuildingCosts>
<Row ProjectType="PROJECT_CONVERT_REACTOR_TO_COPPER" ConsumedBuildingType="BUILDING_FOSSIL_FUEL_POWER_PLANT"/>
</Project_BuildingCosts>

</GameInfo>
 
It looks ok so far as I can see. Not sure why you are getting mystery icons. I use the method your code is using without trouble on simple building mods that don't have 3d models.

I'd need to see the mod itself to figure out anything further.

Other than the Index number you are using, of course. If there is only one icon the Index number ought to be 0.
 
No there are seventeen Icons altogether but I am only using the second one in so Index 1 :)
I may use the other Icons at a future date.
On a side note LeeS how do you post code on the forums rather than copy and paste as I do? (Only been on these forums since 2001!)
I will take one more look at my mod then I will have to post it to you to take a look.
Thanks Again LeeS.
 
use [.code]Your Code goes here[./code]

But without the period signs. I have to add the period signs or the forum will turn it into a code block without you being able to see what is needed. So the result without the period signs is
Code:
Your Code goes here
 
Solved the issue, I forgot to put .dds at the end of the ICON name. :crazyeye:
Thanks for your help as usual LeeS.
 
ooof. Yes! I see it now. Obvious as a snowstorm now that you point it out.

You need the full filename with extension when using this method of adding the icon-files to the game's Virtual File System. You can only skip the extention name (.dds) when you use the artdef , xlp, and tex method of adding the icons into the game's "systems".

:xmascheers:
 
Back
Top Bottom