Logo Platform
logo amplifiers simplified

[SOLVED] How do I add an icon to something?

Reply
Copied to clipboard!
7 years ago
Nov 29, 2017, 7:33:04 AM

So I've created a custom planet type, selectable from the custom faction creation menu. The planet is selectable and loads, but I cannot give it an icon. I've tried multiple different names and file structures, but I cannot get it to use the icons. Here is my file structure:


HomePlanetsUnlocked.xml



    <Plugins>

      <DatabasePlugin DataType="Amplitude.Unity.Gui.GuiElement, Assembly-CSharp-firstpass">

        <ExtraTypes>

          <ExtraType DataType="Amplitude.Unity.Gui.ExtendedGuiElement, Assembly-CSharp-firstpass"/>

        </ExtraTypes>

        <FilePath>Gui/GuiElements[HPU].xml</FilePath>

      </DatabasePlugin>

  </Plugins>


Simulation\FactionTraits[HPUMajor].xml



  <FactionTrait Name="FactionTraitHomePlanetPlanetTypeTerrans"      SubCategory="HomePlanet"    Hidden="true"   Custom="true"    Cost="20"  IgnoreForTraitsCount="true">

    <SimulationDescriptorReference Name="FactionTraitHomePlanetPlanetTypeTerrans"/> <!--For Home Planet colonization-->

  </FactionTrait>



Simulation\SimulationDescriptors[HPUFactionTrait].xml



  <SimulationDescriptor Name="FactionTraitHomePlanetPlanetTypeTerrans"       Type="FactionTrait"/>


Gui\GuiElements[HPU].xml



  <GuiElement Name="FactionTraitHomePlanetPlanetTypeTerrans">

    <Title>%FactionTraitHomePlanetPlanetTypeTerransTitle</Title>

    <Description>%FactionTraitHomePlanetPlanetTypeTerransDescription</Description>

    <Icons>

      <Icon Size="Small" Path="FactionTraitHomePlanetPlanetTypeTerransSmall"/>

      <Icon Size="Large" Path="FactionTraitHomePlanetPlanetTypeTerransLarge"/>

    </Icons>

  </GuiElement>


Resources\



FactionTraitHomePlanetPlanetTypeTerransLarge.png

FactionTraitHomePlanetPlanetTypeTerransSmall.png

Updated 7 years ago.
0Send private message
7 years ago
Nov 30, 2017, 6:18:42 AM

The issue was, I was missing the ExtendedGuiElement. Apparently, the game pulls its icon from the ExtendedGuiElement and the GuiElement simply creates the trait, as such:


GuiElements[HPUPlanetTypes].xml


<ExtendedGuiElement Name="PlanetTypeTerrans">

    <Title>%UniquePlanetTerransTitle</Title>

    <Description>%UniquePlanetTerransDescription</Description>

    <Icons>

      <Icon Size="Small" Path="Bitmaps/Atlased/Notifications/UniquePlanetTerransSmall"/>

      <Icon Size="Medium" Path="Bitmaps/Dynamic/Notifications/UniquePlanetTerransMedium"/>

      <Icon Size="Large" Path="Bitmaps/Dynamic/Planets/PlanetTypeUniqueRaiaLarge"/>

      <Icon Size="Mood" Path="Bitmaps/Dynamic/Notifications/NotificationUniquePlanetRaiaLarge"/>

      <Icon Size="Planetoid" Path="Bitmaps/Dynamic/Planets/PlanetTypeHomeWorldUnitedEmpirePlanetoid"/>

    </Icons>

    <Movies>

      <Movie Path="Movies/Colonization/Terran.mp4" Type="Default"/>

    </Movies>

  </ExtendedGuiElement>

0Send private message
?

Click here to login

Reply
Comment