I can’t create new technologies. I searched the forum and studied the topics with gemini pro. I’ll post my codes here. Can you show me what I’m missing?
(I add that much protomods line because I want to iterate If I write wrong rows pages or columns. I try every combination for them. Any help will appreciated <3)
Mod data structure:
mods > local > Data >
protomods.xml, techtreemods.xml, strings,
strings > English > stringmods.xml
Here is Protomods.xml
<protomods>
<Unit name="TownCenter">
<tech mergeMode="add" row="0" page="0" column="5">ypCapitalism</tech>
<tech mergeMode="add" row="2" page="1" column="2">CASS_AdvancedSettlersTech</tech>
<tech mergeMode="add" row="2" page="2" column="2">CASS_AdvancedSettlersTech</tech>
<tech mergeMode="add" row="2" page="3" column="2">CASS_AdvancedSettlersTech</tech>
<tech mergeMode="add" row="2" page="4" column="2">CASS_AdvancedSettlersTech</tech>
<tech mergeMode="add" row="2" page="5" column="2">CASS_AdvancedSettlersTech</tech>
<tech mergeMode="add" row="2" page="6" column="2">CASS_AdvancedSettlersTech</tech>
<tech mergeMode="add" row="2" page="7" column="2">CASS_AdvancedSettlersTech</tech>
<tech mergeMode="add" row="2" page="8" column="2">CASS_AdvancedSettlersTech</tech>
<tech mergeMode="add" row="2" page="9" column="2">CASS_AdvancedSettlersTech</tech>
<tech mergeMode="add" row="2" page="10" column="2">CASS_AdvancedSettlersTech</tech>
</Unit>
<Unit name="Mill">
<tech mergeMode="add" row="2" page="0" column="2">CASS_AdvancedSettlersTech</tech>
<tech mergeMode="add" row="2" page="1" column="2">CASS_AdvancedSettlersTech</tech>
<tech mergeMode="add" row="2" page="2" column="2">CASS_AdvancedSettlersTech</tech>
<tech mergeMode="add" row="2" page="3" column="2">CASS_AdvancedSettlersTech</tech>
<tech mergeMode="add" row="2" page="4" column="2">CASS_AdvancedSettlersTech</tech>
<tech mergeMode="add" row="2" page="5" column="2">CASS_AdvancedSettlersTech</tech>
<tech mergeMode="add" row="2" page="6" column="2">CASS_AdvancedSettlersTech</tech>
<tech mergeMode="add" row="2" page="7" column="2">CASS_AdvancedSettlersTech</tech>
<tech mergeMode="add" row="2" page="8" column="2">CASS_AdvancedSettlersTech</tech>
<tech mergeMode="add" row="2" page="9" column="2">CASS_AdvancedSettlersTech</tech>
<tech mergeMode="add" row="2" page="10" column="2">CASS_AdvancedSettlersTech</tech>
</Unit>
</protomods>
Here is techtreemods.xml
<techtreemods>
<Tech mergeMode="add" name="CASS_AdvancedSettlersTech">
<dbid>1005001</dbid>
<displaynameid>1005001</displaynameid>
<rollovertextid>1005002</rollovertextid>
<icon>resources\art\technologies\icons\supremacy_icon.png</icon>
<cost resourcetype="Food">7500.00</cost>
<cost resourcetype="Gold">7500.00</cost>
<researchpoints>30.00</researchpoints>
<status>OBTAINABLE</status>
<flag>PlayerOnly</flag>
<flag>NoAI</flag>
<Effects>
<Effect type="Data" amount="-75.00" subtype="Cost" resource="Food" relativity="Absolute"><Target type="ProtoUnit">Settler</Target></Effect>
<Effect type="Data" amount="-1.00" subtype="PopulationCount" relativity="Absolute"><Target type="ProtoUnit">Settler</Target></Effect>
<Effect type="Data" amount="-20.00" subtype="TrainPoints" relativity="Absolute"><Target type="ProtoUnit">Settler</Target></Effect>
<Effect type="Data" amount="989.00" subtype="BuildBounty" relativity="Absolute"><Target type="ProtoUnit">Settler</Target></Effect>
<Effect type="Data" amount="2.5" subtype="Velocity" relativity="Absolute"><Target type="ProtoUnit">Settler</Target></Effect>
<Effect type="Data" amount="3.0" subtype="RunVelocity" relativity="Absolute"><Target type="ProtoUnit">Settler</Target></Effect>
</Effects>
</Tech>
</techtreemods>
This is the stringmods.xml
<stringmods>
<StringTable>
<Language name="English">
<String _locID="1005001">Advanced Settlers</String>
<String _locID="1005002">Significantly improves settlers' efficiency. Reduces their cost and train time, increases their movement speed, and they no longer cost population.</String>
</Language>
</StringTable>
</stringmods>
I also checked the %TEMP% folder. All my protomod button lines appear in protoy.xml and tech is present under techtreey.xml
The game can see my mode, but the technology is never shown.
(If somebody have a mod that already works for adding unique new tech, can you share with me?)
Why are you trying to add the same tech multiple times to each building?
Your issue might just be a bunch of extra spaces between lines in the code. I don’t think it likes that.
I’ve been really trying for the last 2 days. I tried one by one and finally went crazy and put them all at the same time
But it didn’t work when it was one.
Each statement in the OP is more deranged than the last.
1 Like
Did you enable the tech for the civ that is supposed to use it?
How can I make “enable” ? Can you teach me?
The values are not important. Actually this is just an experiment (the one that never works)
Each civ has a tech grouping that dictates what they have access to. I forgot what it’s called, but find that for your civ and make sure to enable your tech under that grouping.
Should I research that civ table under protoy? techtreey? or diffrent xml?
<tech name="Age0Russian" type="Normal">
<effects>
<effect mergeMode="add" type="TechStatus" status="obtainable">CASS_AdvancedSettlersTech</effect>
</effects>
</tech>
for example
I update my techtreemods like that:
<techtreemods>
<techtreemods>
<Tech mergeMode="add" name="CASS_AdvancedSettlersTech">
<dbid>1005001</dbid>
<displaynameid>1005001</displaynameid>
<rollovertextid>1005002</rollovertextid>
<icon>resources\art\technologies\icons\supremacy_icon.png</icon>
<cost resourcetype="Food">7500.00</cost>
<cost resourcetype="Gold">7500.00</cost>
<researchpoints>30.00</researchpoints>
<status>OBTAINABLE</status>
<flag>PlayerOnly</flag>
<flag>NoAI</flag>
<Effects>
<Effect type="Data" amount="25" subtype="Cost" resource="Food" relativity="Assign"><Target type="ProtoUnit">Settler</Target></Effect>
<Effect type="Data" amount="0.00" subtype="PopulationCount" relativity="Assign"><Target type="ProtoUnit">Settler</Target></Effect>
<Effect type="Data" amount="5.00" subtype="TrainPoints" relativity="Assign"><Target type="ProtoUnit">Settler</Target></Effect>
<Effect type="Data" amount="999.00" subtype="BuildBounty" relativity="Assign"><Target type="ProtoUnit">Settler</Target></Effect>
<Effect type="Data" amount="6.5" subtype="Velocity" relativity="Assign"><Target type="ProtoUnit">Settler</Target></Effect>
<Effect type="Data" amount="9.0" subtype="RunVelocity" relativity="Assign"><Target type="ProtoUnit">Settler</Target></Effect>
</Effects>
</Tech>
</techtreemods>
<tech name="Age0British" type="Normal" >
<effects>
<effect mergeMode="add" type="TechStatus" status="obtainable">CASS_AdvancedSettlersTech</effect>
</effects>
</tech>
<tech name="Age0Russian" type="Normal">
<effects>
<effect mergeMode="add" type="TechStatus" status="obtainable">CASS_AdvancedSettlersTech</effect>
</effects>
</tech>
</techtreemods>
Still theres no tech in townCenter when try to start new skirmish game (p_q)
People, sorry to bother you. But I guess its time to give up. I spend 25 hours for last 3 days. I able to see results only for protoy.xml. Its too much overwhelming.I try to add as deck card, as tech. But I can only change the in game features. Unable to add one thing.
You ended techtreemods, then put a new tech after that and ended it again.
This is not a Marvel movie, there’s nothing after the ending.
1 Like
I’ve rewritten your code to better express what I think you’re trying to achieve. Some considerations:
-Don’t use AI to write code. I recommend searching the “techtreey.xml” file for a technology that does what you’re looking for, copying it, and modifying it to suit your needs. Pay close attention to the code you’re reproducing and maintain the same structure. The same applies to all other files in your mods. You can also download other people’s mods and review their files.
-The path is: mods > local > (the name of your mod) > Data >
-To make a unit not cost population, you need to add the <flag>DEAllowZeroPopCount</flag> flag to the tech.
-With the code I wrote, you don’t need a “protomods.xml” file; you can also add a command from “techtreemods.xml” using the effect type=“CommandAdd”.
-If you want to know how to correctly place rows, pages, and columns, take a look at the “protoy.xml” file, find the corresponding unit, and check which rows, pages, and columns it already uses.
-If you want to make good mods, you should spend time studying at least the most important files (like “techtreey.xml”); there’s no other option.
<techtreemods>
<tech name="CASS_AdvancedSettlersTech" type="Normal">
<dbid>1005001</dbid>
<displaynameid>1005001</displaynameid>
<rollovertextid>1005002</rollovertextid>
<cost resourcetype="Food">7500.0000</cost>
<cost resourcetype="Gold">7500.0000</cost>
<researchpoints>30.0000</researchpoints>
<status>UNOBTAINABLE</status>
<icon>resources\images\icons\techs\revolution\cult_supreme_being.png</icon>
<flag>DEAllowZeroPopCount</flag>
<effects>
<effect type="Data" amount="25.00" subtype="Cost" resource="Food" relativity="Assign">
<target type="ProtoUnit">Settler</target>
</effect>
<effect type="Data" amount="0.00" subtype="PopulationCount" relativity="Assign">
<target type="ProtoUnit">Settler</target>
</effect>
<effect type="Data" amount="5.00" subtype="TrainPoints" relativity="Assign">
<target type="ProtoUnit">Settler</target>
</effect>
<effect type="Data" amount="999.00" subtype="BuildBounty" relativity="Assign">
<target type="ProtoUnit">Settler</target>
</effect>
<effect type="Data" amount="6.50" subtype="MaximumVelocity" relativity="Assign">
<target type="ProtoUnit">Settler</target>
</effect>
</effects>
</tech>
<tech name="Age0British" type="Normal">
<effects>
<effect type="TechStatus" status="obtainable">CASS_AdvancedSettlersTech</effect>
<effect type="CommandAdd" tech="CASS_AdvancedSettlersTech" page="0" column="5">
<target type="ProtoUnit">TownCenter</target>
</effect>
</effects>
</tech>
<tech name="Age0Russian" type="Normal">
<effects>
<effect type="TechStatus" status="obtainable">CASS_AdvancedSettlersTech</effect>
<effect type="CommandAdd" tech="CASS_AdvancedSettlersTech" page="0" column="5">
<target type="ProtoUnit">TownCenter</target>
</effect>
</effects>
</tech>
</techtreemods>
<stringmods>
<stringtable>
<language name="">
<string _locid="1005001">Advanced Settlers</string>
<string _locid="1005002">Significantly improves settlers' efficiency. Reduces their cost and train time, increases their movement speed, and they no longer cost population.</string>
</language>
</stringtable>
</stringmods>