收起左侧

[求助] 西班牙特拉斯塔马拉王朝卡片效果在亚洲王朝实现的问题

[复制链接]
大地发表于 2026-10-13 11:17:28
我大概做了 这张卡片的效果,测试已经可以减少堡垒时代的 时间和成本了,但是做工业时代和帝王时代的时候碰到问题。就是只对一个时代生效的问题没有实现。

<String _locid="80965">特拉斯塔马拉王朝</String>
<String _locid="80966">抵达速度极快!您在当前时代收到的船运越多,您进入新时代的费用就越低,速度也越快。(最多计算11次船运效果)</String>

发送的TechResearchPoints2已经弄好了没有问题,效果正常了。西班牙每张卡片都发一个TechResearchPoints2、TechResearchPoints2AgeIII、TechResearchPoints2AgeIV,对应各个时代。

这是卡片:
<Tech name ='HCHouseOfTrastamara' type ='Normal'>
<DBID>5724</DBID>
<DisplayNameID>80965</DisplayNameID>
<Cost resourcetype ='Ships'>1.0000</Cost>
<ResearchPoints>5.0000</ResearchPoints>
<Status>UNOBTAINABLE</Status>
<Icon>ui\techs\hc_trastamara\hc_trastamara</Icon>
<RolloverTextID>80966</RolloverTextID>
<Flag>HomeCity</Flag>
<Effects>
<Effect type ='TextOutput'>80967</Effect>
<Effect tech ='Age0Spanish' type ='Data' amount ='1.00' subtype ='FreeHomeCityUnitIfTechObtainable' unittype ='TechResearchPoints2' relativity ='Absolute'>
<Target type ='Player'></Target></Effect>
<Effect tech ='ypFreeCoinCrate400' type ='Data' amount ='1.00' subtype ='FreeHomeCityUnitIfTechObtainable' unittype ='CrateofCoinLarge400Spanish' relativity ='Absolute'>
<Target type ='Player'></Target></Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara1AgeIII</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara2AgeIII</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara3AgeIII</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara4AgeIII</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara5AgeIII</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara6AgeIII</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara7AgeIII</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara8AgeIII</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara9AgeIII</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara10AgeIII</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara11AgeIII</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara1AgeIV</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara2AgeIV</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara3AgeIV</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara4AgeIV</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara5AgeIV</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara6AgeIV</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara7AgeIV</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara8AgeIV</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara9AgeIV</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara10AgeIV</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara11AgeIV</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara1AgeV</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara2AgeV</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara3AgeV</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara4AgeV</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara5AgeV</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara6AgeV</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara7AgeV</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara8AgeV</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara9AgeV</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara10AgeV</Effect>
<Effect type ='TechStatus' status ='obtainable'>trastamara11AgeV</Effect>
</Effects>
</Tech>

第一张卡、第二张卡的堡垒时代对应激活效果,以此类推,只能累计11张卡,因为超过11张卡升级时间是负的:
<Tech name='trastamara1AgeIII' type='Normal'>
<DBID>5725</DBID>
<DisplayNameID>80976</DisplayNameID>
<ResearchPoints>0.0000</ResearchPoints>
<Status>UNOBTAINABLE</Status>
<Flag>Shadow</Flag>
<Prereqs>
<TechStatus status ='Active'>ColonializeSpanish</TechStatus>
<Typecount unit='TechResearchPoints2' count='1.00' state='noneState aliveState buildingState' operator='gte'/>
</Prereqs>
<Effects>
<Effect type ='Data' amount ='-10.00' subtype ='ResearchPoints' relativity ='Absolute'>
<Target type ='tech'>PoliticianBishopFortress</Target></Effect>
<Effect type ='Data' amount ='-10.00' subtype ='ResearchPoints' relativity ='Absolute'>
<Target type ='tech'>PoliticianSergeantSpanish</Target></Effect>
<Effect type ='Data' amount ='-10.00' subtype ='ResearchPoints' relativity ='Absolute'>
<Target type ='tech'>PoliticianAdmiral</Target></Effect>
<Effect type ='Data' amount ='-10.00' subtype ='ResearchPoints' relativity ='Absolute'>
<Target type ='tech'>PoliticianScout</Target></Effect>
<Effect type ='Data' amount ='-10.00' subtype ='ResearchPoints' relativity ='Absolute'>
<Target type ='tech'>PoliticianAdventurerSpanish</Target></Effect>
<Effect type ='Data' amount ='-40.00' subtype ='Cost' resource ='Food' relativity ='Absolute'>
<Target type ='Tech'>PoliticianBishopFortress</Target></Effect>
<Effect type ='Data' amount ='-40.00' subtype ='Cost' resource ='Food' relativity ='Absolute'>
<Target type ='Tech'>PoliticianSergeantSpanish</Target></Effect>
<Effect type ='Data' amount ='-40.00' subtype ='Cost' resource ='Food' relativity ='Absolute'>
<Target type ='Tech'>PoliticianAdmiral</Target></Effect>
<Effect type ='Data' amount ='-40.00' subtype ='Cost' resource ='Food' relativity ='Absolute'>
<Target type ='Tech'>PoliticianScout</Target></Effect>
<Effect type ='Data' amount ='-40.00' subtype ='Cost' resource ='Food' relativity ='Absolute'>
<Target type ='Tech'>PoliticianBishopFortress</Target></Effect>
<Effect type ='Data' amount ='-40.00' subtype ='Cost' resource ='Food' relativity ='Absolute'>
<Target type ='Tech'>PoliticianAdventurerSpanish</Target></Effect>
<Effect type ='Data' amount ='-40.00' subtype ='Cost' resource ='Gold' relativity ='Absolute'>
<Target type ='Tech'>PoliticianSergeantSpanish</Target></Effect>
<Effect type ='Data' amount ='-40.00' subtype ='Cost' resource ='Gold' relativity ='Absolute'>
<Target type ='Tech'>PoliticianAdmiral</Target></Effect>
<Effect type ='Data' amount ='-40.00' subtype ='Cost' resource ='Gold' relativity ='Absolute'>
<Target type ='Tech'>PoliticianScout</Target></Effect>
<Effect type ='Data' amount ='-40.00' subtype ='Cost' resource ='Gold' relativity ='Absolute'>
<Target type ='Tech'>PoliticianAdventurerSpanish</Target></Effect>
</Effects>
</Tech>
<Tech name='trastamara2AgeIII' type='Normal'>
<DBID>5726</DBID>
<DisplayNameID>80977</DisplayNameID>
<ResearchPoints>0.0000</ResearchPoints>
<Status>UNOBTAINABLE</Status>
<Flag>Shadow</Flag>
<Prereqs>
<TechStatus status ='Active'>ColonializeSpanish</TechStatus>
<Typecount unit='TechResearchPoints2' count='2.00' state='noneState aliveState buildingState' operator='gte'/>
</Prereqs>
<Effects>
<Effect type ='Data' amount ='-10.00' subtype ='ResearchPoints' relativity ='Absolute'>
<Target type ='tech'>PoliticianBishopFortress</Target></Effect>
<Effect type ='Data' amount ='-10.00' subtype ='ResearchPoints' relativity ='Absolute'>
<Target type ='tech'>PoliticianSergeantSpanish</Target></Effect>
<Effect type ='Data' amount ='-10.00' subtype ='ResearchPoints' relativity ='Absolute'>
<Target type ='tech'>PoliticianAdmiral</Target></Effect>
<Effect type ='Data' amount ='-10.00' subtype ='ResearchPoints' relativity ='Absolute'>
<Target type ='tech'>PoliticianScout</Target></Effect>
<Effect type ='Data' amount ='-10.00' subtype ='ResearchPoints' relativity ='Absolute'>
<Target type ='tech'>PoliticianAdventurerSpanish</Target></Effect>
<Effect type ='Data' amount ='-40.00' subtype ='Cost' resource ='Food' relativity ='Absolute'>
<Target type ='Tech'>PoliticianBishopFortress</Target></Effect>
<Effect type ='Data' amount ='-40.00' subtype ='Cost' resource ='Food' relativity ='Absolute'>
<Target type ='Tech'>PoliticianSergeantSpanish</Target></Effect>
<Effect type ='Data' amount ='-40.00' subtype ='Cost' resource ='Food' relativity ='Absolute'>
<Target type ='Tech'>PoliticianAdmiral</Target></Effect>
<Effect type ='Data' amount ='-40.00' subtype ='Cost' resource ='Food' relativity ='Absolute'>
<Target type ='Tech'>PoliticianScout</Target></Effect>
<Effect type ='Data' amount ='-40.00' subtype ='Cost' resource ='Food' relativity ='Absolute'>
<Target type ='Tech'>PoliticianBishopFortress</Target></Effect>
<Effect type ='Data' amount ='-40.00' subtype ='Cost' resource ='Food' relativity ='Absolute'>
<Target type ='Tech'>PoliticianAdventurerSpanish</Target></Effect>
<Effect type ='Data' amount ='-40.00' subtype ='Cost' resource ='Gold' relativity ='Absolute'>
<Target type ='Tech'>PoliticianSergeantSpanish</Target></Effect>
<Effect type ='Data' amount ='-40.00' subtype ='Cost' resource ='Gold' relativity ='Absolute'>
<Target type ='Tech'>PoliticianAdmiral</Target></Effect>
<Effect type ='Data' amount ='-40.00' subtype ='Cost' resource ='Gold' relativity ='Absolute'>
<Target type ='Tech'>PoliticianScout</Target></Effect>
<Effect type ='Data' amount ='-40.00' subtype ='Cost' resource ='Gold' relativity ='Absolute'>
<Target type ='Tech'>PoliticianAdventurerSpanish</Target></Effect>
</Effects>
</Tech>

こはね发表于 2026-10-13 20:51:45
不清楚你指的“只对一个时代生效的问题没有实现”是什么
大地发表于 2026-10-14 09:00:02
就是 卡片 效果只使用一次,比如升级堡垒时代有效果,到了升级工业时代和帝王时代 就 需要取消这个效果。
こはね发表于 2026-10-15 00:18:51
理论上来说很复杂,开局在civs生成带有<Flag>Invulnerable</Flag>并且看不见、视野为0的单位,然后该单位设定tactics,专门用于spawn单位;techtreey的卡片逻辑改成不再运送计数单位,而是改成战术激活,每个时代激活不同的spawn战术

こはね发表于 2026-10-15 00:24:38
已实测失败,利用active去激活3个spawn战术,受到只执行最后一句ActionAdd原则限制,以下代码无效,需要改用<Flag>Volatile</Flag>,需要弄复杂的判断式,根据时代运送单位,升级后杀死单位
<Tech name="DummyUnitSpawn" type="Normal">
<DBID>5290</DBID>
<ResearchPoints>10.0000</ResearchPoints>
<Status>OBTAINABLE</Status>
<Icon>units\asians\eggs\flaming_hot_dog_cart\unit_hot_dog_cart_icon_64</Icon>
<Flag>YPInfiniteTech</Flag>
<Effects>
<Effect type ='TechStatus' status ='active'>DummyUnitSpawn_Industrialize</Effect>
<Effect type ='TechStatus' status ='active'>DummyUnitSpawn_Imperialize</Effect>
<Effect type ='TechStatus' status ='active'>DummyUnitSpawn_Fortressize</Effect>
</Effects>
</Tech>

<Tech name="DummyUnitSpawn_Fortressize" type="Normal">
<DBID>5290</DBID>
<ResearchPoints>10.0000</ResearchPoints>
<Status>OBTAINABLE</Status>
<Icon>units\cavalry\learicorn\learicorn_icon_64x64</Icon>
<Flag>YPInfiniteTech</Flag>
<Effects>
<Effect type ='Data' action ='spawnFortressize' amount ='1.00' subtype ='ActionAdd' unittype ='XXX' relativity ='Absolute'>
<Target type ='Player'></Target></Effect>
</Effects>
</Tech>

<Tech name="DummyUnitSpawn_Industrialize" type="Normal">
<DBID>5290</DBID>
<ResearchPoints>10.0000</ResearchPoints>
<Status>OBTAINABLE</Status>
<Icon>units\animals\bear\lazer_bear_portrait</Icon>
<Flag>YPInfiniteTech</Flag>
<Effects>
<Effect type ='Data' action ='spawnIndustrialize' amount ='1.00' subtype ='ActionAdd' unittype ='XXX' relativity ='Absolute'>
<Target type ='Player'></Target></Effect>
</Effects>
</Tech>

<Tech name="DummyUnitSpawn_Imperialize" type="Normal">
<DBID>5290</DBID>
<ResearchPoints>10.0000</ResearchPoints>
<Status>OBTAINABLE</Status>
<Icon>units\george_crushington\g_crushington_icon</Icon>
<Flag>YPInfiniteTech</Flag>
<Effects>
<Effect type ='Data' action ='spawnImperialize' amount ='1.00' subtype ='ActionAdd' unittype ='XXX' relativity ='Absolute'>
<Target type ='Player'></Target></Effect>
</Effects>
</Tech>

<Tech name="EnableSpawn_Fortressize" type="Normal">
<DBID>5290</DBID>
<ResearchPoints>1.0000</ResearchPoints>
<Status>OBTAINABLE</Status>
<Icon>ui\ingame\icon_age_iii</Icon>
<Flag>YPInfiniteTech</Flag>
<Effects>
<Effect type ='Data' action ='spawnFortressize' amount ='1.0' subtype ='ActionEnable' relativity ='Absolute'>
<Target type ='ProtoUnit'>XXX</Target></Effect>
<Effect type ='Data' action ='spawnIndustrialize' amount ='0.0' subtype ='ActionEnable' relativity ='Absolute'>
<Target type ='ProtoUnit'>XXX</Target></Effect>
<Effect type ='Data' action ='spawnImperialize' amount ='0.0' subtype ='ActionEnable' relativity ='Absolute'>
<Target type ='ProtoUnit'>XXX</Target></Effect>
</Effects>
</Tech>
<Tech name="EnableSpawn_Industrialize" type="Normal">
<DBID>5290</DBID>
<ResearchPoints>1.0000</ResearchPoints>
<Status>OBTAINABLE</Status>
<Icon>ui\ingame\icon_age_iv</Icon>
<Flag>YPInfiniteTech</Flag>
<Effects>
<Effect type ='Data' action ='spawnFortressize' amount ='0.0' subtype ='ActionEnable' relativity ='Absolute'>
<Target type ='ProtoUnit'>XXX</Target></Effect>
<Effect type ='Data' action ='spawnIndustrialize' amount ='1.0' subtype ='ActionEnable' relativity ='Absolute'>
<Target type ='ProtoUnit'>XXX</Target></Effect>
<Effect type ='Data' action ='spawnImperialize' amount ='0.0' subtype ='ActionEnable' relativity ='Absolute'>
<Target type ='ProtoUnit'>XXX</Target></Effect>
</Effects>
</Tech>
<Tech name="EnableSpawn_Imperialize" type="Normal">
<DBID>5290</DBID>
<ResearchPoints>1.0000</ResearchPoints>
<Status>OBTAINABLE</Status>
<Icon>ui\ingame\icon_age_v</Icon>
<Flag>YPInfiniteTech</Flag>
<Effects>
<Effect type ='Data' action ='spawnFortressize' amount ='0.0' subtype ='ActionEnable' relativity ='Absolute'>
<Target type ='ProtoUnit'>XXX</Target></Effect>
<Effect type ='Data' action ='spawnIndustrialize' amount ='0.0' subtype ='ActionEnable' relativity ='Absolute'>
<Target type ='ProtoUnit'>XXX</Target></Effect>
<Effect type ='Data' action ='spawnImperialize' amount ='1.0' subtype ='ActionEnable' relativity ='Absolute'>
<Target type ='ProtoUnit'>XXX</Target></Effect>
</Effects>
</Tech>

<Unit id ='534' name ='XXX'>
<DBID>704</DBID>
<ObstructionRadiusX>0.4900</ObstructionRadiusX>
<ObstructionRadiusZ>0.4900</ObstructionRadiusZ>
<FormationCategory>Body</FormationCategory>
<MaxVelocity>5.0000</MaxVelocity>
<MaxRunVelocity>7.0000</MaxRunVelocity>
<MovementType>land</MovementType>
<TurnRate>18.0000</TurnRate>
<AnimFile>units\spc\delgado\spc_delgado.xml</AnimFile>
<ImpactType>Flesh</ImpactType>
<Icon>units\spc\delgado\delgado_icon_64x64</Icon>
<PortraitIcon>units\spc\delgado\delgado_igc_icon</PortraitIcon>
<RolloverTextID>32439</RolloverTextID>
<ShortRolloverTextID>32438</ShortRolloverTextID>
<InitialHitpoints>1200.0000</InitialHitpoints>
<MaxHitpoints>1200.0000</MaxHitpoints>
<LOS>24.0000</LOS>
<AutoAttackRange>16.0000</AutoAttackRange>
<UnitAIType>Hero</UnitAIType>
<Bounty>40.0000</Bounty>
<AllowedAge>0</AllowedAge>
<Armor type ='Hand' value ='0.1000'></Armor>
<UnitType>LogicalTypeHealed</UnitType>
<UnitType>LogicalTypeNeededForVictory</UnitType>
<UnitType>LogicalTypeHandUnitsAutoAttack</UnitType>
<UnitType>LogicalTypeLandMilitary</UnitType>
<UnitType>LogicalTypeScout</UnitType>
<UnitType>LogicalTypeValidSPCUnitsDeadCondition</UnitType>
<UnitType>LogicalTypeGarrisonInShips</UnitType>
<UnitType>LogicalTypeRangedUnitsAutoAttack</UnitType>
<UnitType>LogicalTypeVillagersAttack</UnitType>
<UnitType>LogicalTypeHandUnitsAttack</UnitType>
<UnitType>LogicalTypeRangedUnitsAttack</UnitType>
<UnitType>LogicalTypeMinimapFilterMilitary</UnitType>
<UnitType>AbstractInfantry</UnitType>
<UnitType>Hero</UnitType>
<UnitType>Unit</UnitType>
<UnitType>Military</UnitType>
<UnitType>UnitClass</UnitType>
<UnitType>AbstractHandInfantry</UnitType>
<UnitType>ConvertsHerds</UnitType>
<UnitType>HasBountyValue</UnitType>
<Flag>CollidesWithProjectiles</Flag>
<Flag>ApplyHandicapTraining</Flag>
<Flag>CorpseDecays</Flag>
<Flag>ShowGarrisonButton</Flag>
<Flag>DontRotateObstruction</Flag>
<Flag>ObscuredByUnits</Flag>
<Flag>NotDeleteable</Flag>
<Flag>Tracked</Flag>
<Tech row ='0' page ='1' column ='1'>DummyUnitSpawn</Tech>
<Tech row ='0' page ='2' column ='1'>EnableSpawn_Fortressize</Tech>
<Tech row ='0' page ='2' column ='2'>EnableSpawn_Industrialize</Tech>
<Tech row ='0' page ='2' column ='3'>EnableSpawn_Imperialize</Tech>
<Tech row ='0' page ='3' column ='1'>DummyUnitSpawn_Fortressize</Tech>
<Tech row ='0' page ='3' column ='2'>DummyUnitSpawn_Industrialize</Tech>
<Tech row ='0' page ='3' column ='3'>DummyUnitSpawn_Imperialize</Tech>
<Command page ='10' column ='0'>Garrison</Command>
<Command page ='11' column ='0'>Abilities</Command>
<Command page ='10' column ='1'>Stop</Command>
<Tactics>xxx.tactics</Tactics>
<ProtoAction>
<Name>BuildingAttack</Name>
<Damage>200.000000</Damage>
<DamageType>Siege</DamageType>
<ROF>3.000000</ROF>
</ProtoAction>
<ProtoAction>
<Name>HandAttack</Name>
<Damage>500.000000</Damage>
<DamageType>Hand</DamageType>
<ROF>1.500000</ROF>
</ProtoAction>
</Unit>

<?xml version="1.0" encoding="utf-8"?>

<tactics>
<action>
<name>spawnFortressize</name>
<type>Spawn</type>
<rate type="Learicorn">1.0</rate>
<active>1</active>
<singleuse>1</singleuse>
<persistent>0</persistent>
</action>
<action>
<name>spawnIndustrialize</name>
<type>Spawn</type>
<rate type="Lazerbear">1.0</rate>
<active>1</active>
<singleuse>1</singleuse>
<persistent>0</persistent>
</action>
<action>
<name>spawnImperialize</name>
<type>Spawn</type>
<rate type="GeorgeCrushington">1.0</rate>
<active>1</active>
<singleuse>1</singleuse>
<persistent>0</persistent>
</action>
<action>
<name stringid="69148">Discover</name>
<type>Discover</type>
<anim>Pickup</anim>
<maxrange>0.2</maxrange>
<rate type="AbstractNugget">1.0</rate>
</action>
<action>
<name stringid="69147">Build</name>
<type>Build</type>
<anim>Build</anim>
<maxrange>0.2</maxrange>
<rate type="Building">1.0</rate>
</action>
<action>
<name stringid="38134">HandAttack</name>
<type>Attack</type>
<attackaction>1</attackaction>
<handlogic>1</handlogic>
<anim>HandAttack</anim>
<idleanim>CombatIdle</idleanim>
<maxrange>1.75</maxrange>
<impacteffect>effects\impacts\melee</impacteffect>
<rate type="Unit">1.0 </rate>
</action>
<action>
<name stringid="38118">BuildingAttack</name>
<type>Attack</type>
<rangedlogic>1</rangedlogic>
<maxrange>6</maxrange>
<rate type="LogicalTypeShipsAndBuildings">1.0</rate>
<attackaction>1</attackaction>
<speedboost>1</speedboost>
<anim>Raze_Attack</anim>
<idleanim>Raze_Idle</idleanim>
<impacteffect>effects\impacts\torch</impacteffect>
<projectile>TorchProjectile</projectile>
</action>
<action>
<name stringid="38124">Throwbobmod</name>
<type>Attack</type>
<attackaction>1</attackaction>
<rangedlogic>1</rangedlogic>
<anim>Raze_Attack</anim>
<idleanim>Raze_Idle</idleanim>
<maxheight>0</maxheight>
<accuracy>1.0</accuracy>
<accuracyreductionfactor>0.001</accuracyreductionfactor>
<aimbonus>5</aimbonus>
<trackrating>12</trackrating>
<rate type="unit">1.0 </rate>
<impacteffect>effects\impacts\torch</impacteffect>
<projectile>TorchProjectile</projectile>
<rof>1.000000</rof>
<instantballistics>1</instantballistics>
</action>
<tactic>
Melee
<action priority="100">BuildingAttack</action>
<action priority="75">HandAttack</action>
<action>Throwbobmod</action>
<action>Build</action>
<action>Discover</action>

<action>spawnImperialize</action>
<action>spawnIndustrialize</action>
<action>spawnFortressize</action>
<speedmodifier>1.0</speedmodifier>
<attacktype>LogicalTypeHandUnitsAttack</attacktype>
<autoattacktype>LogicalTypeHandUnitsAutoAttack</autoattacktype>
<attackresponsetype>LogicalTypeHandUnitsAttack</attackresponsetype>
<runaway>1</runaway>
<autoretarget>1</autoretarget>
<idleanim>Idle</idleanim>
<boredanim>Bored</boredanim>
<deathanim>Death</deathanim>
<walkanim>Walk</walkanim>
<joganim>Jog</joganim>
<runanim>Run</runanim>
</tactic>
<tactic>
Defend
<action priority="100">BuildingAttack</action>
<action priority="25">HandAttack</action>
<action>Throwbobmod</action>
<action>Build</action>
<action>Discover</action>
<action>spawnImperialize</action>
<action>spawnIndustrialize</action>
<action>spawnFortressize</action>
<attacktype>LogicalTypeHandUnitsAttack</attacktype>
<autoattacktype>LogicalTypeHandUnitsAutoAttack</autoattacktype>
<attackresponsetype>LogicalTypeHandUnitsAttack</attackresponsetype>
<runaway>0</runaway>
<autoretarget>1</autoretarget>
<idleanim>Idle</idleanim>
<boredanim>Bored</boredanim>
<deathanim>Death</deathanim>
<walkanim>Walk</walkanim>
<joganim>Jog</joganim>
<runanim>Run</runanim>
</tactic>
<tactic>
Cover
<speedmodifier>0.5</speedmodifier>
<action priority="100">BuildingAttack</action>
<action priority="25">HandAttack</action>
<action>Throwbobmod</action>
<action>Build</action>
<action>Discover</action>
<action>spawnImperialize</action>
<action>spawnIndustrialize</action>
<action>spawnFortressize</action>
<attacktype>LogicalTypeHandUnitsAttack</attacktype>
<autoattacktype>LogicalTypeHandUnitsAutoAttack</autoattacktype>
<attackresponsetype>LogicalTypeHandUnitsAttack</attackresponsetype>
<runaway>0</runaway>
<autoretarget>1</autoretarget>
<idleanim>Idle</idleanim>
<boredanim>Bored</boredanim>
<deathanim>Death</deathanim>
<walkanim>Walk</walkanim>
<joganim>Jog</joganim>
<runanim>Run</runanim>
</tactic>
</tactics>

こはね发表于 2026-10-15 00:37:06
<Flag>Volatile</Flag>的方法先不整,我觉得你可以测试在升级时代完成前使用
<Effect type ='Data' amount ='0.0' subtype ='Hitpoints' relativity ='Assign'>
<Target type ='ProtoUnit'>Unittype</Target></Effect>
把计数单位的生命值归0,升级时代后再复原

<Effect type ='Data' amount ='100.0' subtype ='Hitpoints' relativity ='Assign'>
<Target type ='ProtoUnit'>Unittype</Target></Effect>

示例:
<Effect type ='Data' amount ='0.0' subtype ='Hitpoints' relativity ='Assign'>
<Target type ='ProtoUnit'>Unittype</Target></Effect>
<Effect type ='SetAge'>Age3</Effect>
<Effect type ='Data' amount ='100.0' subtype ='Hitpoints' relativity ='Assign'>
<Target type ='ProtoUnit'>Unittype</Target></Effect>

又或者转换单位: <Effect type ='TransformUnit' toprotoid ='A' fromprotoid ='C'></Effect>
<Effect type ='SetAge'>Age3</Effect>

原理:使上一个时代用于判断的单位消失。

上面这两个你可以自己尝试,不保证有用,把结果回馈给我就行

大地发表于 2026-10-15 09:29:54
计数单位的生命值归0有什么意义,状态变成死亡?升级时代后再复原状态变成 存活???
myonion发表于 2026-10-15 12:31:40
 本帖最后由 myonion 于 2026-10-15 12:43 编辑 

那有个和羽大不同的思路就是,你各个FreeHomeCityUnitIfTechObtainable的条件不应该是Age0Spanish,
你应该用西班牙对应的时代科技(ColonializeSpanish那些)各自对应运送TechResearchPoints2、TechResearchPoints2AgeIII、TechResearchPoints2AgeIV这三个计数单位,
这样可以防止提前积累后续时代的计数单位
然后在时代科技的效果里加上,将下个时代的穷举王朝减费设置不可获取的效果
比如FortressizeSpanish加上<Effect type ='TechStatus' status ='unobtainable'>trastamara1~11AgeIV</Effect>和<Effect type ='TechStatus' status ='unobtainable'>trastamara1~11AgeV</Effect>
那这样我们预想一下情景
在时代2发送的任何卡都只会运送TechResearchPoints2,如果在时代2不发王朝,那无事发生,上时代的不可获取效果也实际无事发生,你在时代3再发送王朝卡还是能正常使减费变为可获取;
如果发了王朝卡,本时代的穷举减费就会根据TechResearchPoints2数量自行研究,上时代3后对应时代4的减费科技被设置为不可获取,那即使在时代3你发的卡会运送TechResearchPoints2AgeIII,那也不会导致任何减费科技被自动研究。
这样应该没有遗漏吧
  • こはね : 似乎可以,FreeHomeCityUnitIfTechObtainable是我的知识盲区
大地发表于 2026-10-15 14:35:48
现在碰到莫名其妙的BUG,卡了我几天了,不管怎么添加新的科技都不生效。无论换什么方式给西班牙或者美国添加新的科技都没有任何效果,奇了怪了。我之前改了的都还能生效,任何新增加的科技无一例外都没有生效。
  • こはね : 请检查是否存在重复命名的科技调用名,如果你认为没有重复命名的科技,可以考虑在Age0French前面建立一个科技来判断。
  • 大地 回复 こはね : 重复命名的科技调用名 在圣典第几章来着,忘记了一下找不到
  • 大地 : 用Notepad 把所有的<Tech name =' 复制出来了,放到表格里查找重复,发现0个重复项。确定没有完全重复的科技名。
  • myonion 回复 大地 : 那你还是把文件传上来吧,信息不足没法判断
大地发表于 2026-10-15 14:36:57
本来想了几种方法来测试,结果都失败了,没有一个科技可以用,连在TC添加一个普通的科技按钮也消失了…………
  • myonion : 用网页浏览器打开你的techtree xml文件看看是不是有语法错误
  • 大地 回复 myonion : 那个没有,丢给转换器就能检查,而且有语法错误也进不去游戏。
  • 大地 : 现在卡莫名BUG了,不知道是什么原因,改动太多了也不好查
こはね发表于 2026-10-16 21:41:50
Screenshot 2026-10-16 214045.png
  • 大地 : 最近有事,没有看到哈。马上上传
大地发表于 2026-10-19 17:10:37
 本帖最后由 大地 于 2026-10-19 17:34 编辑 

randommapstringsy.xmlprotoy.rar

homecityspanish.xmltechtreey.rar

こはね发表于 2026-10-19 21:49:39
实测添加科技有效

Screenshot 2026-10-19 214805.png
  • 大地 : 已经解决了。你这个是虚拟机吗?界面很简洁
跳转到