Anyone Else Tried to Mod a New Tech?

I've tried adding this new tech but it's not showing up in the Tech Research.  Anyone have any idea what I'm missing or doing wrong?

 

<?xml version="1.0" encoding="utf-8"?>
<Techs>
    <DataChecksum NoParse="1">
        <Ignore>DisplayName,Description,Image,Color,HotColor,Icon</Ignore>
        <Translate>DisplayName,Description</Translate>
    </DataChecksum>
    <TechDef InternalName="Archery_Mastery_Amarian">
        <DisplayName>Archery Mastery</DisplayName>
        <Description>This breakthrough allows us to craft Compound Longbows. These ranged weapons are more powerful than their lesser counterparts and in the hands of capable archers are deadly compliments to any army.</Description>
        <Image>Archer_Medallion.png</Image>
        <Color>182,7,3</Color>
        <HotColor>255,48,0</HotColor>
        <Rarity>100</Rarity>
        <Category>Warfare</Category>
        <Infinite>0</Infinite>
        <AppearanceChance>100</AppearanceChance>
        <Prereq>
            <Type>Tech</Type>
            <Attribute>Advanced_Archery_Amarian</Attribute>
            <Value>0</Value>
        </Prereq>
        <AIData AIPersonality="AI_General">
            <AIResearchPriority>50</AIResearchPriority>
            <AITradeToGetValue>75</AITradeToGetValue>
            <AITradeOutValue>90</AITradeOutValue>
            <AIAtWarMultiplier>2.0</AIAtWarMultiplier>
            <AIEarlyBuildUpMultiplier>0.25</AIEarlyBuildUpMultiplier>
        </AIData>
    </TechDef>
    <TechDef InternalName="Weapons_Of_Skewering_Trogs">
        <DisplayName>Piercing Weapons</DisplayName>
        <Description>The ultimate art of archery should is highly destructive to an enemy. Be wary though, it takes far greater time to train these archers.</Description>
        <Image>Archer_Medallion.png</Image>
        <Color>161,59,184</Color>
        <HotColor>240,154,243</HotColor>
        <Rarity>60</Rarity>
        <Category>Conquest</Category>
        <Infinite>0</Infinite>
        <AppearanceChance>100</AppearanceChance>
        <Prereq>
            <Type>Tech</Type>
            <Attribute>Weapons_Of_Piercing_Trogs</Attribute>
            <Value>0</Value>
        </Prereq>
        <AIData AIPersonality="AI_General">
            <AIResearchPriority>50</AIResearchPriority>
            <AITradeToGetValue>75</AITradeToGetValue>
            <AITradeOutValue>90</AITradeOutValue>
            <AIAtWarMultiplier>2.0</AIAtWarMultiplier>
            <AIEarlyBuildUpMultiplier>2.0</AIEarlyBuildUpMultiplier>
        </AIData>
    </TechDef>
</Techs>


<TechTrees>
    <TechTree InternalName="TechTree_Amarian">
        <Tech>Archery_Mastery_Amarian</Tech>
    </TechTree>
    <TechTree InternalName="Trog_Tech_Tree">
        <Tech>Weapons_Of_Skewering_Trogs</Tech>
    </TechTree>
</TechTrees>

6,223 views 20 replies
Reply #1 Top

You have to add the tech to the Tech_tree file. I forget the exact name of the xml, but it has tech tree in it.

 Nevermind, I just saw the last few lines of your code. Not sure why. I have a complete seperate tech tree going, and that looks right, but I'm not at home to compare code.

 

Reply #2 Top

missing <Category> probably

Reply #3 Top

You also have to rebuild the Zip file. Adding a new tech isn't easy, there's multiple steps involved and right now we're forced to do a work-around. Dhuran mentions something about it in this thread, check his reply here: https://forums.elementalgame.com/394488

Hope that helps some.

Reply #4 Top

I don't think you have to rebuild the data file unless you're modifying the original values. Just adding to it doesn't mean you have to rebuild. I've got about 20 or so techs that I've added, I certainly didnt have to rebuild the data.zip each time. The only time I had to, was when I modified one of the core techs.

Reply #5 Top

Quoting Heavenfall, reply 2
missing <Category> probably
End of Heavenfall's quote

 

I wish you were right, but "<Category>Warfare</Category>" and "<Category>Conquest</Category>" are in there.

Reply #6 Top

Quoting Aerion, reply 5

Quoting Heavenfall, reply 2missing <Category> probably
 

I wish you were right, but "<Category>Warfare</Category>" and "<Category>Conquest</Category>" are in there.
End of Aerion's quote

Actually, in looking at it again, I guess you were referring to the Category tags in the TechTree part.  I added.

 

Related question:  If you list multiple prerequisites on a weapon or other item, is that an AND or an OR condition?  In other words, will having attained either prerequisite or must you attain both prerequisites?

Reply #7 Top

Quoting impinc, reply 4
I don't think you have to rebuild the data file unless you're modifying the original values. Just adding to it doesn't mean you have to rebuild. I've got about 20 or so techs that I've added, I certainly didnt have to rebuild the data.zip each time. The only time I had to, was when I modified one of the core techs.
End of impinc's quote

Ahh ok. See, this is why I'm NOT the Team programmer...LoL. I knew it had something to do with rebuilding the zip, just wasn't sure what.

Reply #8 Top

Quoting Aerion, reply 6

Quoting Aerion Istari, reply 5
Quoting Heavenfall, reply 2missing <Category> probably
 

I wish you were right, but "<Category>Warfare</Category>" and "<Category>Conquest</Category>" are in there.
Actually, in looking at it again, I guess you were referring to the Category tags in the TechTree part.  I added.

 

Related question:  If you list multiple prerequisites on a weapon or other item, is that an AND or an OR condition?  In other words, will having attained either prerequisite or must you attain both prerequisites?
End of Aerion's quote

It is "OR"

Sorry, I should have specified where the missing category was. Did you manage to get it working?

Reply #9 Top

You don't have to rebuild data.zip to modify a core item.  You just need to put the item data in the Items folder.  It appears to overwrite the loaded core data.

Reply #10 Top

Quoting Heavenfall, reply 8

Quoting Aerion Istari, reply 6
Quoting Aerion Istari, reply 5
Quoting Heavenfall, reply 2missing <Category> probably
 

I wish you were right, but "<Category>Warfare</Category>" and "<Category>Conquest</Category>" are in there.
Actually, in looking at it again, I guess you were referring to the Category tags in the TechTree part.  I added.

 

Related question:  If you list multiple prerequisites on a weapon or other item, is that an AND or an OR condition?  In other words, will having attained either prerequisite or must you attain both prerequisites?
It is "OR"

Sorry, I should have specified where the missing category was. Did you manage to get it working?
End of Heavenfall's quote

I've made the change.  I haven't had a chance to test it yet.  I'll let you know. 

I suspected it was OR based on the fact that both types of tech tree techs are listed.  DARN!!  Would be nice for higher level items to be able to require multiple techs to make it harder to beeline to a particular tech.

Thanks!!!

Reply #11 Top

I need to retract my earlier statement :D

Listing several techs does not necessarily make it "OR"

For example, consider the Kingdom tech Light Armor that requires TWO techs before it becomes available.

        <Prereq>
            <Type>Tech</Type>
            <Attribute>Cutting_Weapons_Amarian</Attribute>
            <Value>0</Value>
        </Prereq>
        <Prereq>
            <Type>Tech</Type>
            <Attribute>Blunt_Weapons_Amarian</Attribute>
            <Value>0</Value>
        </Prereq>

I believe that the <value> tags give additional meaning to the prereq, although I haven't tested that.

Anyway that is good news because it means our tech trees don't just branch off but can combine as well.

Reply #12 Top

I saw your original post about it being OR and got sad heh. I had built up a tree with a few techs that needed two other techs to open up. I wonder if that Value tag sets if it is AND or OR?

 

Reply #13 Top

Quoting Heavenfall, reply 11
I need to retract my earlier statement

Listing several techs does not necessarily make it "OR"

For example, consider the Kingdom tech Light Armor that requires TWO techs before it becomes available.

        <Prereq>
            <Type>Tech</Type>
            <Attribute>Cutting_Weapons_Amarian</Attribute>
            <Value>0</Value>
        </Prereq>
        <Prereq>
            <Type>Tech</Type>
            <Attribute>Blunt_Weapons_Amarian</Attribute>
            <Value>0</Value>
        </Prereq>

I believe that the <value> tags give additional meaning to the prereq, although I haven't tested that.


Anyway that is good news because it means our tech trees don't just branch off but can combine as well.

End of Heavenfall's quote

 

Does Light Armor require both techs or just one of the two?  When I tried two tech prerequisite, I had the items appear when only one tech had been attained.   But I agree that changing the Value tag might be the key.  When I did mine, I left both Values at 0.  I might experiment with that some tonight.  I'll let you know what I figure out, if anything.

 

Reply #14 Top

Based on my testing, I'm not sure the Value tag has any effect.  I tried putting a '0' and a '1' in either one or the other and both prerequisites and I could see no difference.  It appears that multiple prerequisites are an OR condition.  I think I'll post in the Ideas forum for the DEVs to fix this.

Reply #15 Top

Have you tried taking the value tags out completely? Looking at other tech in the game a Prereq of type Tech generally shows the skill from the two tres (Amarian and Trogs) with a value of "0". We know this sets an OR condition based on having only one tech while in play. Now we alo know from items the ProductionRequirements are an AND condition such as 4 gold, 3 materials, 2 iron. You could test to see if you can make a ProductionRequirement a Tech type with "0" Value and place teo of them and see if that works.

My educated guess. Hope it helps. B)

Reply #16 Top

I'm telling you, you can't get light armor without first getting both those techs. There's something special about it. Maybe it's because the values are the same?

Edit: Here's an idea. Maybe prereqs are handled differently for items+improvements, and for techs.

Reply #17 Top

Quoting Heavenfall, reply 16
I'm telling you, you can't get light armor without first getting both those techs. There's something special about it. Maybe it's because the values are the same?
End of Heavenfall's quote

 

Though I haven't tested it myself, I believe you when you say Light Armor requires both.  But, I started out with <Value>0</Value> on both prereq techs.  Getting either tech gave the item. 

 

Is Light Armor a tech?  If so, having two prereq on a tech might work as an AND.  I'm referring to having two prereq on an item.  But having a tech require two prereqs is an improvement.  My whole idea is to keep someone from bee-lining to a high level item.  This could serve my purpose.

 

Reply #18 Top

Yes, TechDef tags may in fact use the Prereqs in an AND configuration by default. The opposite of what appears to happen to weapons, armour and items. At some point I hope we get some form of definitive documentation from SD. Modding in the dark is always full of suprises.

Reply #19 Top

Improvements also have multiple prerequisites where the type is different, for example requiring both a tech and a certain allegiance.

        <Prereq>
            <Type>Tech</Type>
            <Attribute>CnC_Amarian</Attribute>
        </Prereq>
        <Prereq>
            <Type>Allegiance</Type>
            <Attribute>Kingdom</Attribute>
        </Prereq>

Clearly, this building is not available from the start since you need the tech. It is also not available to empire, as they don't meet the prereq. So the improvement effectively has two prereqs. Although it really doesn't have to, since only Kingdom players can access the tech.

Nevertheless, it proves that multiple prereqs does not follow the "OR" rule when the types are different for an improvement.

Reply #20 Top

Quoting Heavenfall, reply 19
Improvements also have multiple prerequisites where the type is different, for example requiring both a tech and a certain allegiance.

        <Prereq>
            <Type>Tech</Type>
            <Attribute>CnC_Amarian</Attribute>
        </Prereq>
        <Prereq>
            <Type>Allegiance</Type>
            <Attribute>Kingdom</Attribute>
        </Prereq>

Clearly, this building is not available from the start since you need the tech. It is also not available to empire, as they don't meet the prereq. So the improvement effectively has two prereqs. Although it really doesn't have to, since only Kingdom players can access the tech.

Nevertheless, it proves that multiple prereqs does not follow the "OR" rule when the types are different for an improvement.
End of Heavenfall's quote

That you can have multiple prereqs with an AND for Improvements when they are from different categories does not follow that the same will work for items.  It may be that installations, like techs, follow different rules.  But it is worth testing to see if this is true.  I'll let you know what I discover.