收起左侧

单位C转化为单位A(包括建筑物。);这个语句有发现新的BUG

[复制链接]
大地发表于 2026-10-22 15:50:45

<Effect type ='TransformUnit' toprotoid ='Minuteman' fromprotoid ='TradingPostCounter'></Effect>

将这个单位转换成民兵后,没有了视野,研究教堂的单位视野+2科技后,恢复正常。

<Unit id ='1544' name ='TradingPostCounter'>
<DBID>2223</DBID>
<DisplayNameID>81014</DisplayNameID>
<EditorNameID>81015</EditorNameID>
<ObstructionRadiusX>0.00</ObstructionRadiusX>
<ObstructionRadiusZ>0.00</ObstructionRadiusZ>
<FormationCategory>Ranged</FormationCategory>
<MaxVelocity>4.5000</MaxVelocity>
<MaxRunVelocity>6.0000</MaxRunVelocity>
<MovementType>air</MovementType>
<TurnRate>18.0000</TurnRate>
<AnimFile>effects\projectiles\musket_ball.xml</AnimFile>
<Icon>ui\techs\hc_greenwich_time\hc_greenwich_time</Icon>
<ImpactType>Flesh</ImpactType>
<PhysicsInfo>dude</PhysicsInfo>
<InitialHitpoints>90.0000</InitialHitpoints>
<MaxHitpoints>90.0000</MaxHitpoints>
<LOS>0.0000</LOS>
<ProjectileProtoUnit>Arrow</ProjectileProtoUnit>
<UnitAIType>RangedCombative</UnitAIType>
<TrainPoints>1.0000</TrainPoints>
<UnitType>EmbellishmentClass</UnitType>
<UnitType>TestClass</UnitType>
<UnitType>Unattackable</UnitType>
<Flag>CollidesWithProjectiles</Flag>
<Flag>ApplyHandicapTraining</Flag>
<Flag>CorpseDecays</Flag>
<Flag>DontRotateObstruction</Flag>
<Flag>ObscuredByUnits</Flag>
<Flag>Tracked</Flag>
<Flag>Wanders</Flag>
<Flag>NotSelectable</Flag>
<Flag>DoNotShowOnMiniMap</Flag>
<Flag>NeverCountDeathAsLoss</Flag>
</Unit>
こはね发表于 2026-10-22 19:27:59

  • 大地 : 
myonion发表于 2026-10-22 21:15:54
 本帖最后由 myonion 于 2026-10-22 21:20 编辑 

transformUnit是这样的,会传递很多原单位上的信息,基本只能稳定用在大类相同战术接近的转换上,所以决定版发明了replaceUnit,直接在原位置给你发个新的
话说你这是在还原哪张卡,猜不出来
  • 大地 : 不是还原哪张卡,只是测试能不能这样弄,不想在mod文件夹里改
  • myonion 回复 大地 :  那可以spawn或者maintain后暴毙吧
  • 大地 回复 myonion : 可以,欧洲国家都用这两个方法
跳转到