Would it be possible to create a new tech tree?

By on June 8, 2014 2:52:41 PM from Elemental Forums Elemental Forums

UnleashedElf

Join Date 03/2013
+15

Right now it looks like the game essentially has a tech tree with 2 variants - 1 for Empire and 1 for Kingdom.

 

Would it be possible to create a new tech tree from ground up? Or a third variant?

Locked Post 15 Replies
Search this post
Subscription Options


Reason for Karma (Optional)
Successfully updated karma reason!
June 8, 2014 3:06:42 PM from Elemental Forums Elemental Forums

N/A

Reason for Karma (Optional)
Successfully updated karma reason!
June 8, 2014 4:34:37 PM from Elemental Forums Elemental Forums

I've done a 'third variant' thing.  Essentially, what I did was create a new Allegiance for a faction.

Look up the RaceConfig file for your faction, and you'll need to change this tag.


        <FactionAllegiance>WhateverTheNameOfYourNewAllegianceIs</FactionAllegiance>

Then, assign this allegiance to your faction.  Then, you'll need to figure out which Techs, Improvements and such have the Allegiance Prereq assigned, and create Similar Tech/Improvement (with a different InternalName) for your faction, using this tag.


        <Prereq>
            <Type>Allegiance</Type>
            <Attribute>WhateverTheNameOfYourNewAllegianceIs</Attribute>
        </Prereq>

So far, I've not seen too many consequences for this so far in my testing, other than the the fact that you'll need to create new, Allegiance Specific techs/improvements/etc. for your Allegiance (since Kingdom and Empire are now locked out)

This also gives you some new options r.e. the Traits trees.  Essentially, assign your spiffy new trait to Allegiance:WhateverTheNameOfYourAllegianceIs (via the prereq tag above), and the Trait will appear on your custom faction's trait tree.  Note that the Traits that are assigned to other Allegiances will NOT Appear.  This is how Kingdom ends up with Wisps and Empire ends up with Skeletons on the Mage Tree.  You can also us this to 'rebuild' various Trait Trees (General, Warrior, etc.), although you'll need to assign Allegiances to the Traits you are looking to lock out, if they don't have them already:  This is how I was able to 'lock out' Strength, in order to upen up/replace that Perk Position for a different General Trait Tree Ability I've been working on.



    <AbilityBonus InternalName="StrengthAbility">
        <AbilityBonusType>Unit_Level</AbilityBonusType>
        <AbilityBonusOption InternalName="Strength">
            <Prereq>
                <Type>Allegiance</Type>
                <Attribute>Kingdom</Attribute>
            </Prereq>
        </AbilityBonusOption>
    </AbilityBonus>
   
    <AbilityBonus InternalName="StrengthEmpireAbility">
        <AbilityBonusType>Unit_Level</AbilityBonusType>
        <AbilityBonusOption InternalName="StrengthEmpire">
            <DisplayName>Might</DisplayName>
            <Description>+2 Attack</Description>
            <Icon>Ability_Strength_Icon.png</Icon>
            <PerkTreePosX>0</PerkTreePosX>
            <PerkTreePosY>1</PerkTreePosY>
            <Prereq>
                <Type>Allegiance</Type>
                <Attribute>Empire</Attribute>
            </Prereq>
            <GameModifier>
                <ModType>Unit</ModType>
                <Attribute>AdjustUnitStat</Attribute>
                <StrVal>UnitStat_Attack_Boost</StrVal>
                <Value>2</Value>
                <Provides>+2 Attack</Provides>
            </GameModifier>
            <Type>Aggressive</Type>
            <AIData AIPersonality="AI_General">
                <AIPriority>5</AIPriority>
            </AIData>
        </AbilityBonusOption>
    </AbilityBonus>

BTW, you can 'lock out' techs for a specific faction, simply by assigning a RestrictedAbilityBonusOption tag for that tech.  As an example, DLC04 Undead did this:

<Techs>
    <TechDef InternalName="Agriculture">
        <Prereq>
            <Type>RestrictedAbilityBonusOption</Type>
            <Attribute>DLC04_UndeadFaction</Attribute>
            <Target>Player</Target>
        </Prereq>
    </TechDef>

</Techs>

Which removed Agriculture from the Undead's tech tree.  BTW, tagging an ability to restrict it can easily be done from the Mods folder (just create an .xml file with code similar to the above, as appropriate to what you are trying to restrict, and drop it into the mods folder).

BTW, you can try this approach for traits on the trait trees (restrictedability), but essentially (at least in my experience) it just 'greys out' the trait in question, but doesn't make it disappear completely.  My guess as to why this happens is that the trait tree assumes that since it's an ability, you might end up with that ability at some point during the game, hence you MIGHT be able to get it at some point so it's 'holding out' for ya.  However, as noted above, Allegiance flat adds it to the Path Tree if you share that Allegiance, and doesn't add it if you don't share the allegiance that is coded to the trait.

 

As for creating a new tech tree, well I'm not sure Primal's approach is bulletproof (my testing indicates otherwise).  From what I've seen, while you can add techs to a tech tree, just removing them on your 'custom_techtree.xml' file isn't going to work, as the game will still 'fill in the blanks'.

Specifically, what I've seen is that a tech can still appear on the tree if it has at least one prereq (tech) that is on that tree, whether or not it is part of your custom tree (the game defaults to TechTree_Amarian for guidance), UNLESS it is locked out via the Allegiance or RestrictedAbility tag.

Primal, I am interested in hearing what you were able to find out on this, as I'd like to know what worked in your case and what you found that didn't work.

 

Also, you need to understand just HOW MANY INTERDEPENDENCIES there are on TechTree_Amarian at this point (there are literally thousands of them at this time).  Many items, weapons, armor, spells, other techs and especially improvements have Tech Prereqs, so if you create a custom tech for your faction, and use it to replace an existing tech, you may find a LOT OF THINGS disappearing from your game.

So consider this carefully before you go willy nilly down the 'I'm building a new tech tree' path.  I think you'll find that repurposing/redesigning the existing tree to your needs will be in some cases much easier than just building a whole new tree.  Other modders have went down this road, and found out it ends up being a LOT more work  than it appears to be on the surface, and often requires a LOT of extra code for the stuff you now need to 'create' for your custom/new techs. 

This is why you currently don't see more than a very small handful of unique tech trees (other than those that modify the Amarian tree) from the Modding Community in E:LH.  I'm sure this is why Stardock ultimately abandoned TechTree_Trog, as it required having to duplicate a bunch of code so it could work for the second tech tree.  Why have two Definitions for essentially the same item throughout the various files, when it could be consolidated into one file simply by eliminating the second tech tree?  In retrospect, it turns out to be much easier to just have one tech tree, and apply modificatons to that tree, and it reduces the code overhead by a huge amount (you don't need to have two versions of a lot of things with only one tech tree).

Of course, if your goal is to 'break' huge numbers of things ingame (make them unavailable), and WANT to create truly unique improvements, a radically different tech tree, a completely different list of spells, etc. to replace them with, then this might make more sense.  We did have a Doctor Who mod in EWOM at some point, with it's own tech tree.

Reason for Karma (Optional)
Successfully updated karma reason!
June 8, 2014 4:37:09 PM from Elemental Forums Elemental Forums

Yeah the hard part would be creating new improvements, weapons, and other things.

 

Let's see:

 

- Improvements

- Spells

- Equipment

- Buffs (like army size and "refined")

 

You may be right that it is a lot more work. Hmm ... can you copy the current tech tree and mod it?

Reason for Karma (Optional)
Successfully updated karma reason!
June 8, 2014 5:00:37 PM from Elemental Forums Elemental Forums

N/A

Reason for Karma (Optional)
Successfully updated karma reason!
June 8, 2014 5:04:59 PM from Elemental Forums Elemental Forums

As I said, I want to hear what Primal was actually able to do (besides adding a tech). I am also very interested in this topic, and the more info the better!

What I've found in my current testing is that new techs (this can still be a standalone file) need to be in the Core/Data/English/OnlySP file, and that you'll need to add the name of your tech to the core TechTree_Amarian.xml file, under the appropriate category.  The TechTree_Amarian.xml  file lists all of the techs which are tied to the ingame tech tree window, without regard to Allegiance, RestrictedAbility, and similar tags. 

I did 'create' a new tech tree file - TechTree_Banshee.xml, which I then assigned to my faction via the RaceConfig file -, which I then placed into the core OnlySP folder after putting it into the mods folder didn't have any effect, and assigned that tech tree to my Banshees, but the new techs didn't show up.  More importantly, the techs which I had deleted from the modified Banshee (Modified Amarian) tree still showed up on the tech tree ingame.  So, instead, I ended up adding this to the TechTree_Amarian code (here is a snippet from my code):


            <Tech>Trading</Tech>
            <Tech>Wildland_Allies</Tech>
            <!-- Added Techs for Banshee Faction -->
            <Tech>Brutish_Allies</Tech>
            <Tech>Overlord_Of_The_Wastes</Tech>
            <Tech>Unholy_Rituals</Tech>
            <Tech>Sacrificial_Beasts</Tech>
            <Tech>Spiritual_Pursuits</Tech>
            <Tech>Refined_SacrificialRituals</Tech>
            <!-- End of Added Techs -->
        <Category>Warfare</Category>
            <Tech>Advanced_Archery</Tech>
            <Tech>Archery</Tech>

So my Core/Only_SP folder currently has three files in it.

  • Techs_Amarian.xml (unmodified)
  • Techs_AddonBanshee.xml (standalone file I added here, all of my new techs are in this file)
  • TechTree-Amarian.xml (this file is modified, with the additional code I added above)

Note that I REALLY hate modifying core files, so if a new list can indeed be created, that will work properly, I'm all ears!

Reason for Karma (Optional)
Successfully updated karma reason!
June 8, 2014 5:05:49 PM from Elemental Forums Elemental Forums

I'll have to take a look at your mod and investigate.

 

Reason for Karma (Optional)
Successfully updated karma reason!
June 8, 2014 5:11:19 PM from Elemental Forums Elemental Forums

Quoting UnleashedElf,

I'll have to take a look at your mod and investigate.

 

 

I hope to have the beta for my mod posted up in a day or two.  I'll let you know when it is released.  In the meantime, I'd love to hear what Primal was able to figure out!

Reason for Karma (Optional)
Successfully updated karma reason!
June 8, 2014 5:28:11 PM from Elemental Forums Elemental Forums

Ok sure, will keep an eye on it. Thanks for the update.

 

I should also check out Primal's Xtra series of mods as well to see what other possibilities are there.

Reason for Karma (Optional)
Successfully updated karma reason!
June 8, 2014 5:32:35 PM from Elemental Forums Elemental Forums

@Primal,

What I've noticed is that the behavior is rather erratic r.e. the tech tree.  As for 'assigning a valid tech tree', well I did that, assigned the appropriate name to the RaceConfig.xml, and no joy.  If it's hit or miss, that means it's not bulletproof, so while it may work for you, it may or may not work for others.

I've found that tech tree modifications can be VERY finicky... I had to rename some techs just to get them to 'appear' for the custom faction (Unholy_Rituals used to be AgricultureBanshee, wouldn't appear under that name, but it then appeared when I completely changed the tech name instead of just having AgricultureBanshee as the techdef name).  This makes no sense to me either, but that's what happened.

I'll try the 'custom tree' again, and see if it performs differently this time.  This'll be my fourth bout.  Note that all I'm doing is renaming the appropriate headers in TechTree_Amarian.xml and changing the appropriate entries, then deleting a few techs  just to see if it'll change anything, then saving to the new filename.

Reason for Karma (Optional)
Successfully updated karma reason!
June 8, 2014 6:18:38 PM from Elemental Forums Elemental Forums

N/A

Reason for Karma (Optional)
Successfully updated karma reason!
June 8, 2014 6:31:51 PM from Elemental Forums Elemental Forums

So I appear to have solved it on my end.  While creating/renaming Internal Name TechTree_Amarian to TechTree_Banshee (in the TechTree_Banshee.xml of the the TechTrees.xml, as well as in the RaceConfig for my banshees)) never did seem to take (note that I created an entirely new TechTree file each time, rather than editing the 'broken' one), changing the InternalName to BansheeTechTree in both files seems to have worked out, and it is now functioning 'normally'.

So in my case, there must have been a 'hidden character/tab/return/protocol' or something that crept into the name (don't understand, all I did was cut &  paste the .xml into a new file, highlight, and change Amarian to Banshee).  That finicky thing...

In any case, BansheeTechTree seems to be working correctly, so I'm going with it.  Now I can restore 'TechTree_Amarian' to it's default!  That's all I really wanted.  Let's just hope that this is an isolated incident...

 

As long as it works for everyone else, I'm a happy camper.

Reason for Karma (Optional)
Successfully updated karma reason!
June 8, 2014 6:51:22 PM from Elemental Forums Elemental Forums

N/A

Reason for Karma (Optional)
Successfully updated karma reason!
June 8, 2014 6:53:59 PM from Elemental Forums Elemental Forums

Primal, I cannot access the image you have posted.

Reason for Karma (Optional)
Successfully updated karma reason!
June 8, 2014 6:57:59 PM from Elemental Forums Elemental Forums

N/A

Reason for Karma (Optional)
Successfully updated karma reason!
June 8, 2014 7:12:13 PM from Elemental Forums Elemental Forums

Thanks. Yeah - got it to work in chrome. It's a browser thing I guess.

 

Reason for Karma (Optional)
Successfully updated karma reason!
Stardock Forums v1.0.0.0    #108433  walnut3   Server Load Time: 00:00:00.0000235   Page Render Time: