Changing of Improvements

Weird title, but whatever. Anyways, I am creating a new race/faction (I did both), and want them to play completely different than any other race. Now, I've been able to create the race and faction, like I said, and even the new tech tree. However, I can't seem to get it to take the new improvement list. I basically took KraxisSpecificImprovements.xml and copied it, and made a couple changes to reflect my new race's name, and tech tree and whatnot. It doesn't quite work for some reason. Well, it doesn't seem to read it at all. It seems to default to the empire improvement list.

2,892 views 5 replies
Reply #1 Top

In your <Raceconfig> make sure that <FactionAllegiance> is set to your new faction name. Also, each building needs a pre-prequisite for that allegiance, like this:

        <Prereq>
            <Type>Allegiance</Type>
            <Attribute>Empire</Attribute>
        </Prereq>

I believe (I COULD BE WRONG) that the kraxis specific files are outdated and only included by mistake. You should base your stuff off coreraceconfigs.xml and

EmpireUnlimitedImprovements.xmlEmpireSpecialImprovements.xml and so on

 

Reply #2 Top

Well, if you change  <FactionAllegiance> to your faction name, you won't be able to select the faction to play a game. At least right now, you HAVE to have allegiance to either Kingdom or Empire...at least to play a sandbox game.

 

 

Reply #3 Top

So I'm still trying to figure out how to do this. Anytime I just change one of the core ones (in the new cloned file), it just doesn't show up. At least when I try to specify this:

Code: xml
  1. &lt;Prereq&gt;
  2. &lt;Type&gt;Race&lt;/Type&gt;
  3. &lt;Attribute&gt;Racename&lt;/Attribute&gt;
  4. &lt;/Prereq&gt;

I must be missing something. I've tried various versions of that including using Faction instead, with no luck. Again, the improvement just disappears. Like the prereq isn't being met.

Reply #4 Top

Honestly, that's why I think you shouldn't use the kraxis files as a base. We don't even know if that particular prereq is possible, or working.

A workaround is to make your entire race the empire (or kingdom) faction, then include a completely new tech for your race in the raceconfig. Just like how they did archers (see MasterArchersBonus1 in AbilityBonuses.xml). Then require that tech, along with other techs, for your units and buildings and items and whatnot.

This way, only your race has access to that one tech, and that one tech enables all your different things.

The only downside I can think of is that you'll still be stuck with the basic buildings that don't require a tech for the faction you choose.

Edit: Just to be clear; I'm not trying to make you give up. For all that's glorious, keep trying! I'm just throwing ideas at you, maybe someone else will pick up and correct me!

Reply #5 Top

Ok I got it! Well, I have to give big props to BlackRainZ who figured it out. I kind of had it, but I wasnt aware of the createxmlbinary thing, so when I made half my changes, it didn't affect anything because I didnt rebuild the data file. But basically I created a seperate race, and change the RaceClassification to the name of my race. Then add a prereq to the starting buildings (such as labor pit, lore shop, etc). Like so..

<Prereq>

<Type>Race</Type>

<Attribute>Fallen</Attribute>

</Prereq>

Then you have to rebuild the data.zip (the ever important step I was missing!)

Now, since in my race's raceconfig (and race file) the Raceclassification is set to my Race's name (rather than Fallen...all Empire's seem to default to Fallen for raceclassification), those initial starting buildings don't show for my race, but show up for all other Empire factions. All other buildings for this race will have tech prereqs (seeing as how they have a seperate tech tree).

I nearly fried my brain getting this to work, and I'm not even the one who eventually got it to work! Oh well, onto the modding...