The tutorials don't answer my question.
It just tells you how to make it happen not why it happens.
I am trying to emulate the way the engine recognises which unique file belongs to which internal file, so my tech tree viewer can handle appended files.
since your talking about the tech tree specifically, here are the important bits. I used color coding to link items
YorTechDefs.xml
[code]
<Tech>
<InternalName>YorCollectiveManufacturingTech</InternalName>
<GenericName>CollectiveManufacturingTech</GenericName>
<DisplayName>YorCollectiveManufacturingTech_Name</DisplayName>
<TechTree>Yor_Tree</TechTree>
<ShortDescription>YorCollectiveManufacturingTech_ShortDec</ShortDescription>
<Description>YorCollectiveManufacturingTech_Dec</Description>
<ColorDef>TechYellow</ColorDef>
<Icon>GC3_Production_Tech_Icon.png</Icon>
<Bink>GC3_lndustrail_Temp.bk2</Bink>
<ResearchCost>29</ResearchCost>
<TechPoints>1</TechPoints>
<AICategoryWeight>
<Military>16</Military>
<Growth>22</Growth>
<Tech>20</Tech>
<Diplomacy>8</Diplomacy>
<Expansion>14</Expansion>
<Wealth>12</Wealth>
<Influence>10</Influence>
<Fortification>18</Fortification>
</AICategoryWeight>
<Prerequ>
<Techs>
<Option>PropagationTech</Option>
</Techs>
<TechAge>
<Option>AgeOfExpansion</Option>
</TechAge>
</Prerequ>
</Tech>
[/code]
YorTechDefsText.xml
[code]
<StringTable>
<Label>YorCollectiveManufacturingTech_Name</Label>
<String>Collective Manufacturing</String>
</StringTable>
<StringTable>
<Label>YorCollectiveManufacturingTech_ShortDec</Label>
<String>Allows construction of improved colony buildings.</String>
</StringTable>
<StringTable>
<Label>YorCollectiveManufacturingTech_Dec</Label>
<String>Bringing order to new worlds is a challenge, as they are often plagued by existing biological detritus. This filth must first be destroyed, but it often tries to run away. It is frustrating to see it return to formerly pristine locations while construction is still undereway.</String>
</StringTable>
[/code]
with tech trees, it's really flexible on naming of the files in my experience. I'd suggest taking the easy route and make the user save the individual file components (techdefs, techdefstext, & umm.. the specialization one). I've done a lot with tech trees in gc2/gc3 & almost always work mostly from one portion at a time even though I'll usually wind up opening more that one of the three files at a time when editing stuff. You could do the same for opening the files y making people open them one at a time.
There are good reasons to have the old and the new techdefstext open at the same time. for example:
- Joe is working on a mod that makes a new branch to the existing tech trees
- if he can open newbranchtechdefstext.xml and the original, he could have a generic neebranchtext that he fluffs for each race alongside the original by loading both and making any adjustments to the original as needed before saving it.
- that's not all that different from something I'm working on right now where I'm taking one race and giving it a schism into two different themantically fluffed races to reflect the schism. I'm almost positive that I've had race1.techdefs.xml & race2.techdefs.xml pulling from ..\text\racetechdefs.xml before I did the second fluff without issues and copied/renamed it. since it went from a scope of just reworking an existing race to a scope of making two new ones during/after the first fluff.
- <TechTree>Yor_Tree</TechTree> I'm not 100% positive, but I think an orphan tech in a new file with this would append itself into the yor tree, but never tried that sort of thing