以下教程将帮助你正确地将 starcitizen.tools 站点中的飞船API信息,搬运到本站。
0. 找到需要更新的飞船
有一个很简单的步骤:在飞船页面,点击右上角更多操作中的“刷新”,仍在列表中的飞船就是没有兼容SMW数据的。
1. 识别模块数据版本
如果你打开了一个飞船页面,页面内的飞船信息不带 UUID(如下图),则该飞船的模块数据还未更新。
2. 替换新 Vehicle 模块数据
我们需要打开英文站的同一个页面来复制新的数据。通常情况下,你可以通过点击飞船页面右上角的多语言按钮来切换到英文站,建议单击右键,并选择“在新的标签页中打开页面”。
点击英文站的编辑按钮,你可以看到源代码中的第一个模块即为如下所示(以 125a 为例),模块名为 Vehicle:
{{Vehicle
| uuid = e7eeba8d-b108-48a1-a332-d9edbab2b9c1
| name = 125a
| image = 125a - Shooting - Fly though debris.png
| manufacturer = ORIG
| series = 100
| size = small
| productionstate = Flight ready
| productionstatedesc = Since [[Star Citizen Alpha 3.11.0|Alpha 3.11.0]]
| mincrew = 1
| maxcrew = 1
| pledgecost = 60
| originalpledgecost = 55
| warbondcost = 55
| originalwarbondcost = 50
| pledgeavailability = Always available
| saledate = 2018-04-13
| conceptdate = 2018-04-18
| rsistoreurl = https://robertsspaceindustries.com/pledge/ships/origin-100/125a
| brochureurl = https://robertsspaceindustries.com/media/sb217acbbj976r/source/Origin-100-Series-Brochure-FINAL.pdf
| trailerurl = https://www.youtube.com/watch?v=QGMxGdzYVY8
| presentationurl1 = https://robertsspaceindustries.com/comm-link/transmission/17814-Origin-100-Series
| qandaurl1 = https://robertsspaceindustries.com/comm-link/engineering/16520-Q-A-Origin-100-Series-Part-I
| qandaurl2 = https://robertsspaceindustries.com/comm-link/engineering/16537-Q-A-Origin-100-Series-Part-II
| galactapediaurl = https://robertsspaceindustries.com/galactapedia/article/bmNrPP2DZ9-origin-125a
| queryimage = 125a in space - Isometric.jpg
}}
打开中文站对应的编辑页面,你可以看到我们的第一个模块是不一样的(以 125a 为例),模块名为 Infobox vehicle:
{{Infobox vehicle
| name = 125a
| image = 125a - Shooting - Fly though debris.png
| size = 小型
| manufacturer = ORIG
| series = 100
| role = 新手船/轻型战斗机
| stowagespace = 650000
| productionstate = 可飞
| loanervehicle =
| maxcrew = 1
| buycost = 791000
| rentcostac =
| pledgecost = 60
| originalpledgecost = 55
| warbondcost = 55
| originalwarbondcost = 50
| cargocapacity = 2
| length = 15
| height = 4
| beam = 10
| combatspeed = 230
| maxspeed = 1150
| mass = 48143
| pledgeavailability = 常驻销售
| rsistoreurl = https://robertsspaceindustries.com/pledge/ships/origin-100/125a
| brochureurl = https://robertsspaceindustries.com/media/sb217acbbj976r/source/Origin-100-Series-Brochure-FINAL.pdf
| presentationurl = https://robertsspaceindustries.com/comm-link/transmission/17814-Origin-100-Series
| galactapediaurl = https://robertsspaceindustries.com/galactapedia/article/bmNrPP2DZ9-origin-125a
| trailerurl = https://www.youtube.com/watch?v=QGMxGdzYVY8
| qandaurl1 = https://robertsspaceindustries.com/comm-link/engineering/16520-Q-A-Origin-100-Series-Part-I
| qandaurl2 = https://robertsspaceindustries.com/comm-link/engineering/16537-Q-A-Origin-100-Series-Part-II
| mincrew = 1
| claimtime = 4:13
| expeditetime = 0:00
| expeditecost = 635
| 自动替换标识符
| combatspeed = 230
| maxspeed = 1 150
| mass = 48 143
| cargocapacity =2
| maxpitch =51
| maxyaw =51
| maxroll =210
| hydrogencapacity =65 000
| qtfuelcapacity =700
| totalhp =4 450
| physicaldmg =-52%
| energydmg =
| distortiondmg =
| emsignature =
| irsignature =
| cssignature =
| 自动化更新时间 =2023/3/19 17:23:57
}}
如果你看不到这个代码,你可能在可视化编辑模式。点击右上角的模式切换,切换到代码模式就能看到了:
请删除整个 Infobox Vehicle 模块,包括大括号{{}},并将英文站的模块数据,包括大括号{{}},直接复制到原位。
3. 复制飞船挂点、设备和系统(hardpoints)模块信息
继续向下查看英文站的挂点部分,你可以在 Specifications 段落看到新的模块信息:
{{Vehicle hardpoints}}
是的,就是这么简单。你需要将本站飞船规格章节下的所有内容删除,这些内容可能看起来是下面这样,并写上新的模块信息:
<tabber>
飞船设备&系统=
{{Vehicle avionics
| radarcount = 1
| computercount = 1
| radar1quantity = 1
| radar1size = 1
| radar1manufacturer = GRNP
| radar1name = [[Ecouter]]
| computer1quantity = 1
| computer1size = 1
| computer1manufacturer =
| computer1name = S 计算机
}}
{{Vehicle systems
| powerplantcount = 1
| coolercount = 1
| shieldgeneratorcount = 1
| powerplant1quantity = 1
| powerplant1size = 1
| powerplant1manufacturer = AEGS
| powerplant1name = [[Regulus]]
| cooler1quantity = 2
| cooler1size = 1
| cooler1manufacturer = AEGS
| cooler1name = [[Bracer]]
| shieldgenerator1quantity = 1
| shieldgenerator1size = 1
| shieldgenerator1manufacturer = GODI
| shieldgenerator1name = [[AllStop]]
}}
|-|
航线设备&推进系统=
{{Vehicle propulsion
| fuelintakecount = 1
| fueltankcount = 1
| quantumdrivecount = 1
| jumpdrivecount = 1
| quantumfueltankcount = 1
| fuelintake1quantity = 2
| fuelintake1size = 1
| fuelintake1manufacturer =
| fuelintake1name = S 燃料进气口
| fueltank1quantity = 2
| fueltank1size = 1
| fueltank1manufacturer =
| fueltank1name = S 燃料箱
| quantumdrive1quantity = 1
| quantumdrive1size = 1
| quantumdrive1manufacturer = TARS
| quantumdrive1name = [[Expedition]]
| jumpdrive1quantity = 1
| jumpdrive1size = 1
| jumpdrive1manufacturer =
| jumpdrive1name = S 跳跃模块
| quantumfueltank1quantity = 1
| quantumfueltank1size = 1
| quantumfueltank1manufacturer =
| quantumfueltank1name = S 量子燃料箱
}}
{{Vehicle thrusters
| mainthrustercount = 1
| maneuveringthrustercount = 4
| mainthruster1quantity = 2
| mainthruster1size = 1
| mainthruster1manufacturer =
| mainthruster1name = 主推进器
| maneuveringthruster1quantity = 2
| maneuveringthruster1size = 1
| maneuveringthruster1manufacturer =
| maneuveringthruster1name = 制动推进器
| maneuveringthruster2quantity = 10
| maneuveringthruster2size = 1
| maneuveringthruster2manufacturer =
| maneuveringthruster2name = 固定机动推进器
| maneuveringthruster3quantity = 1
| maneuveringthruster3size = 1
| maneuveringthruster3manufacturer =
| maneuveringthruster3name = 固定机动推进器
| maneuveringthruster4quantity = 1
| maneuveringthruster4size = 1
| maneuveringthruster4manufacturer =
| maneuveringthruster4name = 固定机动推进器
}}
|-|
武器=
{{Vehicle weaponry
| weaponcount = 1
| turretcount = 0
| missilerackcount = 2
| utilityitemcount = 0
| weapon1mountquantity = 2
| weapon1mountsize = 3
| weapon1mountmanufacturer = FFSY
| weapon1mountname = [[VariPuck S3 Gimbal Mount]]
| weapon1quantity = 2
| weapon1size = 2
| weapon1manufacturer = BEHR
| weapon1name = [[M4A Cannon]]
| missilerack1quantity = 1
| missilerack1size = 2
| missilerack1manufacturer =
| missilerack1name = 四联导弹架
| missilerack1missilecount = 1
| missilerack1missile1quantity = 4
| missilerack1missile1size = 2
| missilerack1missile1manufacturer = THCN
| missilerack1missile1name = [[StrikeForce II]]
| missilerack2quantity = 1
| missilerack2size = 2
| missilerack2manufacturer =
| missilerack2name = 双联导弹架
| missilerack2missilecount = 1
| missilerack2missile1quantity = 2
| missilerack2missile1size = 2
| missilerack2missile1manufacturer = THCN
| missilerack2missile1name = [[StrikeForce II]]
}}
</tabber>
修改后:
==规格==
{{Vehicle hardpoints}}
4. 修改系列变体模块(请暂时跳过这一步,我们正在排查相关故障)
在英文站中,Series variants 是系列变体模块所在的段落。
=== Series variants ===
{{Vehicle variants}}
中文站原模块:
===系列变体===
{| class="wikitable"
!图片
!名称
!描述
|-
|[[File:100i in space - Isometric.jpg|center|frameless|100x67px]]
|'''[[100i]]'''
|专为独自旅行的风格和舒适而设计。
|-
|[[File:135c in space - Isometric.jpg|center|frameless|100x67px]]
|'''[[135c]]'''
|以轻型运输为功能,它有一个加大的货舱。
|}
我们只需要将中文站的 wikitable 替换为 Vehicle variants 模块即可。如果替换后发现这个页面没有其他飞船,请检查该系列飞船是否为单独的飞船。 修改后:
===系列变体===
{{Vehicle variants}}
5. 替换 购买&租借 数据
在英文站中,购买和租赁段落已合并为 Acquisition:
== Acquisition ==
{{Vehicle availability}}
我们在此将这两段合并为购买&租借:
==购买地点和定价==
{{Note|'''Updated''': {{Start date and age|2021|05|11|p=yes}} - [[Star Citizen Alpha 3.13.0|Alpha 3.13.0]]}}
=== 购买 ===
{| class="wikitable"
|-
![[New Deal]], 罗威尔
![[Astro Armada]], 18区
|-
|791,000
|<span style="color:#808080">Unavailable</span>
|}
=== 租借 ===
<span style="color:#808080">不可用</span>
''所给出的价格是按天计算的。所有租赁期的价格可以在[[Ship renting|舰船租赁]]找到。'
修改后:
=== 购买&租借 ===
{{Vehicle availability}}
至此,你已经完成了所有我们需要替换的内容。
6. 刷新页面,开个香槟,继续下一艘飞船!
点击页面右上角的保存更改,并在摘要处写下”SMW兼容“,然后点击刷新,或是在地址栏输入 ?action=purge 来确保我们的新页面数据在缓存端更新。
如果规格段落显示“SMW data not found on 300i”,不用惊慌,只要你的飞船卡片显示正确,服务器会自动获取相关数据,并将其添加到当前页面。等了很长时间(5分钟以上)也不出来?请再一次尝试刷新,或联系我们的站点管理员。