[HELP] Creating a race or faction dependent tile improvement?

I have created a new race that I have named Draconic

    <DisplayName>Draconic</DisplayName>
    <RaceClassification>Draconic</RaceClassification>

I have created a new tile that I want available only to this race.  I have tried the both of the codes below and neither work.  The building shows up in the tech window as available only to Draconic, but I am not able to build it with my Draconic people.

   <Prereq>
      <Type>Race</Type>
      <Attribute>Draconic</Attribute>
    </Prereq>

    <Prereq>
      <Type>Allegiance</Type>
      <Attribute>Draconic</Attribute>
    </Prereq>

I have also tried to make it specific to the faction to no avail.

    <Prereq>
      <Type>Faction</Type>
      <Attribute>Draconis</Attribute>
    </Prereq>

    <Prereq>
      <Type>Faction</Type>
      <Attribute>CustomFaction_Draconis</Attribute>
    </Prereq>

Suggestions???

3,133 views 6 replies
Reply #1 Top

I believe that the only possible allegiances are Empire and Kingdom. Try one of those and see if it works.

Reply #2 Top

Have you tried setting the type to your internal race ID instead of the DisplayName? If your internal race ID was CustomRace_Draconic the tag would look like this...

   <Prereq>
      <Type>Race</Type>
      <Attribute>CustomRace_Draconic</Attribute>
    </Prereq>

I've not tested that or anything, just throwing it out there.  Let me know if it works. :)

Reply #3 Top

The internal name for the race is Draconic so sadly CustomRace_Draconic wouldn't do anything.

It works if I set Allegiance to Empire or Kingdom, but that's not what I want.

Eventually I want to be able to have specific tech trees for individual races so that each one will play out differently.  This will also be necessary if we are to have theme mods.  Otherwise Elves, Dwarves, and humans would use the same tech tree which makes no sense to me.

The only other possible fix I can think of is to make a new Allegiance separate from Kingdom or Empire, but as yet I don't know how to do that.

Reply #4 Top

What Tech Tree a faction/race uses is completely separate from their Allegiance. It just happens that by default, there are only two tech trees in Elemental: The Amarian one (which is used for all Kingdom races) and the Trog one (for the Empire races).

In fact, near as I can tell, the only thing Allegiance actually does is satisfy the Prereq conditions of buildings and determine whether they show up on the top or bottom of the Faction select list... Life/Death spellbook, terrain type, etc are all actually properties of the Race.

 

So, yeah... the best way to handle this currently would be to have a completely separate Tech Tree for your custom race and assign in in the *.xml file (the tag/property is <TechTree>).

Reply #5 Top

Quoting midnighthike, reply 3

Eventually I want to be able to have specific tech trees for individual races so that each one will play out differently.
End of midnighthike's quote

Which sounds truly awesome and will really get me started modding if we ever figure out how to do that. I wish you the best of luck and hope you get this figured out soon, sadly I haven't the foggiest clue how to do it.

Reply #6 Top

When I was searching around in the 'Elemental/data/english/core improvements' I found an xml 'KraxisImprovements' that contains the following code

    <Prereq>
      <Type>Race</Type>
      <Attribute>Kraxis</Attribute>
    </Prereq>

This leads me to believe that what I am trying to do should be possible without creating an entirely new techtree.

I tried doing it this way and it didn't work, so I'm not sure if I was doing something wrong or if this feature was abandoned or what.

The race Kraxis doesn't exist, but the Krax do.