收起左侧

各位朋友,本人想求助一下

[复制链接]
乐曦发表于 2023-9-21 15:44:16
就是说,本人想做一个mod(根据之前做的大清炮兵mod改的),让欧美国家可以加强他们的长炮,已经学会了写卡片的效果,但是呢,如何把卡片添加进主城的卡组却始终搞不明白,一出来卡还是在北京。跪求哪位朋友不吝赐教,感激不尽。

附上之前写的代码:
<homecitymods>
<cards>
<card>
<name>WhitworthCannon</name>
<maxcount>1</maxcount>
<level>10</level>
<age>3</age>
<!-- <displayunitcount>2</displayunitcount> -->
</card>
</cards>
<building>
<name>ArtilleryFoundry</name>
<obtainabletechs>
<tech x="7.8" y="7">WhitworthCannon</tech>
</obtainabletechs>
<activetechs>
<tech x="7.8" y="7">WhitworthCannon</tech>
</activetechs>
</building>
</homecitymods>
还有这些:
<techtreemods>
<tech name="WhitworthCannon" type="Normal">
<dbid>4657</dbid>
<displaynameid>999987</displaynameid>
<cost resourcetype="Ships">1.0000</cost>
<researchpoints>40.0000</researchpoints>
<cost resourcetype="Gold">1000</cost>
<status>UNOBTAINABLE</status>
<icon>resources\art\units\asians\chinese\hand_mortar\hand_mortar_icon_64.png</icon>
<rollovertextid>999986</rollovertextid>
<flag>HomeCity</flag>
<effects>
<Effect type ="Data" amount ="6.1" subtype ="DamageBonus" unittype ="Building" allactions ="1" relativity ="absolute">
<Target type ="ProtoUnit">ypCulverin</Target></Effect>
<Effect type ="Data" amount ="1" subtype ="DamageBonus" unittype ="AbstractArtillery" allactions ="1" relativity ="absolute">
<Target type ="ProtoUnit">ypCulverin</Target></Effect>
<Effect type ="Data" amount ="3" subtype ="DamageBonus" unittype ="AbstractInfantry" allactions ="1" relativity ="absolute">
<Target type ="ProtoUnit">ypCulverin</Target></Effect>
<Effect type ="Data" amount ="1.5" subtype ="DamageBonus" unittype ="AbstractCavalry" allactions ="1" relativity ="absolute">
<Target type ="ProtoUnit">ypCulverin</Target></Effect>
<Effect type ="Data" amount ="1.5" subtype ="DamageBonus" unittype ="AbstractLightInfantry" allactions ="1" relativity ="absolute">
<Target type ="ProtoUnit">ypCulverin</Target></Effect>
<Effect type ="Data" amount ="2" subtype ="DamageBonus" unittype ="Guardian" allactions ="1" relativity ="absolute">
<Target type ="ProtoUnit">ypCulverin</Target></Effect>
<Effect type ="Data" amount ="1" subtype ="DamageBonus" unittype ="AbstractVillager" allactions ="1" relativity ="absolute">
<Target type ="ProtoUnit">ypCulverin</Target></Effect>
<Effect type ="Data" amount ="2" subtype ="DamageArea" action ="CannonAttack" relativity ="absolute">
<Target type ="ProtoUnit">ypCulverin</Target></Effect>
<Effect type ="Data" amount ="200" subtype ="Cost" resource ="Gold" relativity ="absolute">
<Target type ="ProtoUnit">ypCulverin</Target></Effect>
<Effect type ="Data" amount ="200" subtype ="Cost" resource ="Wood" relativity ="absolute">
<Target type ="ProtoUnit">ypCulverin</Target></Effect>
<Effect type ="Data" amount ="3" subtype ="populationcount" relativity ="absolute">
<Target type ="ProtoUnit">ypCulverin</Target></Effect>
</effects>
</tech>
</techtreemods>
こはね发表于 2023-9-23 22:37:29

不太明白你说的“把卡片添加进主城的卡组”是什么?是默认卡组还是让卡片在主城显示,因为我直接拿了你的语句,在游戏中是没有任何显示的(因为你提到了北京,我默认当你是修改中国卡片,homecitychinese.mods.xml这个文件)

如果是让卡片在主城显示
你需要修正homecitychinese.mods.xml语句中的ArtilleryFoundry,将其改成Fortress
<building> <name>Fortress</name>
<!--<name>ArtilleryFoundry</name>-->
<obtainabletechs>
<tech x="7.8" y="7">WhitworthCannon</tech>
</obtainabletechs>
<activetechs>
<tech x="7.8" y="7">WhitworthCannon</tech>
</activetechs>
</building>屏幕截图.jpg

<name></name>不能乱填,要与原来的homecity文件名称一直
113.png

112.png
跳转到