Producing Unit Condition, multiple techs

What about on the Tech Tree, do they show in just Archery? Have you tried researching Archery first, just to check it's behaving correctly the other way round? If this works it's pretty useful, adds a lot of possibilities for creating new units by combining techs. I had a couple of similar scenarios in my planned tree. I think the tech tree / civpedia could be fixed in the UI LUA scripts where it's probably just not looking at the Unit_TechTypes. Also a possible issue is how would the AI handle this, although that might not matter since the tech flavors seem to mostly guide what they research.

Yeah, when I researched Archery, I could not build chariot archers until I researched the wheel (and got horses). But the changes don't show in the Civlopedia or in the Tech Tree, though still -- I needed both techs for chariot archers. :)
 
Spoiler :

<Unit_TechTypes>
<Row>
<UnitType>UNIT_CHARIOT_ARCHER</UnitType>
<TechType>TECH_THE_WHEEL</TechType>
</Row>
<Row>
<UnitType>UNIT_CHARIOT_ARCHER</UnitType>
<TechType>TECH_ARCHERY</TechType>
</Row>
</Unit_TechTypes>


What would this look like if applied through the use of the <Update> tags? So far it's been eluding me.
 
Spoiler :

<Unit_TechTypes>
<Row>
<UnitType>UNIT_CHARIOT_ARCHER</UnitType>
<TechType>TECH_THE_WHEEL</TechType>
</Row>
<Row>
<UnitType>UNIT_CHARIOT_ARCHER</UnitType>
<TechType>TECH_ARCHERY</TechType>
</Row>
</Unit_TechTypes>


What would this look like if applied through the use of the <Update> tags? So far it's been eluding me.

Pretty sure you wouldn't use <Update>, seeing as how no instances of these fields occur in the original code that you can update. You'd just want to add them like so:

Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 10/9/2010 12:25:37 PM -->
<GameData>
    <Unit_TechTypes>
        <Row>
            <UnitType>UNIT_CHARIOT_ARCHER</UnitType>
            <TechType>TECH_THE_WHEEL</TechType>
        </Row>
        <Row>
            <UnitType>UNIT_CHARIOT_ARCHER</UnitType>
            <TechType>TECH_ARCHERY</TechType>
        </Row>
    </Unit_TechTypes>  
</GameData>

And then proceed with the OnModActivated and so on.
 
Hooray, it works! Many thanks.

Now to see if the civilopedia can be reconciled with this.
 
<GameData>
<Units>
<Update>
<Where Type="UNIT_CHARIOT_ARCHER" />
<Add PrereqTech="TECH_THE_WHEEL" />
</Update>
</Units>
</GameData>
Add function? Would that really work in updates to rows that don't have a particular attribute specified (but made possible in the schema)? :eek:

That could solve some problems for me.
 
Add function? Would that really work in updates to rows that don't have a particular attribute specified (but made possible in the schema)? :eek:

That could solve some problems for me.
No. If they're in the Schema, they can be Set, if they're not then nothing can done. If they're in the schema it means they're set to the default value (usually null)
 
Back
Top Bottom