收起左侧

决定版新代码公式不会,损失单位送单位的

[复制链接]
阿吉熊发表于 2024-4-14 12:29:30
      <effect type="Data2" amount="0.50" subtype="FreeHomeCityUnitByKBQuery" unittype="xpSkullKnight" queryunittype="xpSkullKnight" querystate="Dead" unitcap="13.00" relativity="Absolute">
<target type="Player">
</target>
</effect>
决定版新代码,这里0.5是损失3个送一个,我改成0.25测试了一下,发现损失了3.97个送一个,967/243,又改成0.125试了一下,发现大约是损失8个送一个,810/99,有没有大佬知道这个公式是什么

こはね发表于 2024-4-14 17:33:22
运送单位数量等于amount*queryunittype的单位死亡统计,上限为unitcap

<tech name="test" type="Normal">
<dbid>831017</dbid>
<displaynameid>127142</displaynameid>
<researchpoints>1.0000</researchpoints>
<status>OBTAINABLE</status>
<icon>resources\images\icons\ingame\icon_age_iv.png</icon>
<rollovertextid>127142</rollovertextid>
<flag>CountsTowardEconomicScore</flag>
<flag>YPInfiniteTech</flag>
<effects>
<effect type="Data2" amount="0.01" subtype="FreeHomeCityUnitByKBQuery" unittype="Culverin" queryunittype="Musketeer" querystate="Dead" unitcap="13.00" relativity="Absolute">
<target type="Player"/>
</effect>
<effect type="Data2" amount="100.00" subtype="FreeHomeCityUnitByKBQuery" unittype="Settler" queryunittype="Musketeer" querystate="Dead" unitcap="13.00" relativity="Absolute">
<target type="Player"/>
</effect>
<effect type="Data2" amount="0.50" subtype="FreeHomeCityUnitByKBQuery" unittype="xpSkullKnight" queryunittype="Musketeer" querystate="Dead" unitcap="13.00" relativity="Absolute">
<target type="Player"/>
</effect>
<effect type="Data2" amount="1.00" subtype="FreeHomeCityUnitByKBQuery" unittype="Musketeer" queryunittype="Musketeer" querystate="Dead" unitcap="13.00" relativity="Absolute">
<target type="Player"/>
</effect>
<effect type="Data2" amount="10.00" subtype="FreeHomeCityUnitByKBQuery" unittype="Wardog" queryunittype="Musketeer" querystate="Dead" unitcap="13.00" relativity="Absolute">
<target type="Player"/>
</effect>
<effect type="AddHomeCityCard" tech="DEHCFedMXMestizos" maxcount="1" ageprereq="1" unitcount="1" infiniteinlastage="0"/>
</effects>
</tech>

01.jpg

02.jpg

03.jpg

04.jpg

05.jpg

06.jpg

以下为上限1000

<tech name="test" type="Normal">
<dbid>831017</dbid>
<displaynameid>127142</displaynameid>
<researchpoints>1.0000</researchpoints>
<status>OBTAINABLE</status>
<icon>resources\images\icons\ingame\icon_age_iv.png</icon>
<rollovertextid>127142</rollovertextid>
<flag>CountsTowardEconomicScore</flag>
<flag>YPInfiniteTech</flag>
<effects>
<effect type="Data2" amount="0.01" subtype="FreeHomeCityUnitByKBQuery" unittype="Culverin" queryunittype="Musketeer" querystate="Dead" unitcap="1000.00" relativity="Absolute">
<target type="Player"/>
</effect>
<effect type="Data2" amount="100.00" subtype="FreeHomeCityUnitByKBQuery" unittype="Settler" queryunittype="Musketeer" querystate="Dead" unitcap="1000.00" relativity="Absolute">
<target type="Player"/>
</effect>
<effect type="Data2" amount="0.50" subtype="FreeHomeCityUnitByKBQuery" unittype="xpSkullKnight" queryunittype="Musketeer" querystate="Dead" unitcap="1000.00" relativity="Absolute">
<target type="Player"/>
</effect>
<effect type="Data2" amount="1.00" subtype="FreeHomeCityUnitByKBQuery" unittype="Musketeer" queryunittype="Musketeer" querystate="Dead" unitcap="1000.00" relativity="Absolute">
<target type="Player"/>
</effect>
<effect type="Data2" amount="10.00" subtype="FreeHomeCityUnitByKBQuery" unittype="Wardog" queryunittype="Musketeer" querystate="Dead" unitcap="1000.00" relativity="Absolute">
<target type="Player"/>
</effect>
</effects>
</tech>

08.jpg

另外,建议使用AOE3ED对xml重新转xmb格式,然后再转换成xml格式,因为resource manager格式化排版太过于垃圾
こはね发表于 2024-4-14 18:06:34
测试用地图[www,aoebbs,net]Debug.rar

输出火枪手死亡数量:
aoebbs("rule _Debug49 active runImmediately { ");
aoebbs("if((trTime()-cActivationTime) >= 5.00000000){");
aoebbs("xsSetContextPlayer(1);");
aoebbs("trChatSendSpoofed(0,\"Musketeer Dead :\"+kbUnitCount(1,kbGetProtoUnitID(\"Musketeer\"),cUnitStateDead));");
aoebbs("xsEnableRule(\"_Debug50\");");
aoebbs("xsDisableSelf();");
aoebbsZ("}} /*");

aoebbs("rule _Debug50 active runImmediately { ");
aoebbs("if((trTime()-cActivationTime) >= 5.00000000){");
aoebbs("xsSetContextPlayer(1);");
aoebbs("trChatSendSpoofed(0,\"Musketeer Dead :\"+kbUnitCount(1,kbGetProtoUnitID(\"Musketeer\"),cUnitStateDead));");
aoebbs("xsEnableRule(\"_Debug49\");");
aoebbs("xsDisableSelf();");
aoebbsZ("}} /*");

  • 沉默的lsp : 大佬牛牛牛
跳转到