# 批量修改准星

## 前期准备

本指南要求您了解修改指南中概述的基础知识、如何备份、提取和重新打包以及修改工具。如果您不理解这些概念，请点击下面的文章链接：

{% content-ref url="/pages/-LQerJOUY9r6JEdHvM8H" %}
[修改指南](/titanfall2/chinese/how-to-start-modding/modding-introduction.md)
{% endcontent-ref %}

本指南还要求您下载一个名为TextCrawler 3的软件。软件可以在[这里](https://www.digitalvolcano.co.uk/tcdownloads.html)找到。 任何其他能够基于正则表达式进行批量修改的程序也可以做同样的事情。在“修改工具”页面中可以找到其他必需的工具：

{% content-ref url="/pages/-LQf1VwnfcshCxN-w0r9" %}
[修改工具](/titanfall2/chinese/how-to-start-modding/modding-introduction/modding-tools.md)
{% endcontent-ref %}

本指南只支持Windows10，很抱歉我们不会为其他操作系统提供扩展支持。

## 指南

### 第一步. 单独放置要修改的文件

自己新建一个文件夹来放置你想要修改的武器配置文件，我自己用的文件夹叫`CrosshairMods`。我们不推荐将泰坦武器全部状态设为相同的准星，因为其中的大多数都有替换的状态，对静态的、 stock的准星不友好。在文件夹创建及配置武器放置就绪之后进行下一步。

### 第二步. 打开TextCrawler，然后修改设置。

![](/files/-M1YWpSRCFnuRd3DyylU)

这个步骤分为五个部分，如下面所示：

1. 将包含之前创建的配置文件夹的路径放入此框中；
2. 选择"Regular Expression" 选项卡；
3. 将"Rex Ex:"改为`ui/crosshair_\w+` ，这个选项用于筛选以`ui/crosshair_`开头的所有字符串，并在以"word"（不带空格的文本部分）的末尾停止筛选；
4. 将"Replace:"框设置为要要作为修改基础的准星的完整id；
5. 单击"Find"。

### 第三步. 检验设置是否正常工作

![](/files/-M1YXTHnqZf7tWpN2ez7)

如果所有的操作都准确无误，你应该会看到一个配置文件列表，其中突出显示了准星设置。确保所有配置文件的"Matches"列值为1。如果是不同的数值，你需要手动修改配置文件；因为这表明这些配置文件拥有多个组合的准星。

### 第四步.批量更改配置文件

如果一切结果都如你所愿，点击"Replace"按钮，并在弹出窗口中确认选择。

### 第五步. 清理文件夹和配置文件

随便打开一个武器配置文件，检验修改是否完成，并删除在修改过程中创建的所有.bak文件。在全部完成之后，将所有的配置文件移回scripts/weapons文件夹并重新打包VPK文件。

## 脚注

如果你错误地使用这个软件把事情搞砸了，那是你的问题，不是我们的问题。如果本指南有任何错误，请在Discord服务器中标记`@Frontier Militia`来提醒我们查看并关注您的建议。

{% content-ref url="/pages/-LPXG6BGqEmulSzg-rm1" %}
[主页](/titanfall2/chinese/master.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://noskill.gitbook.io/titanfall2/chinese/modding/weapon-config-info/crosshair-modding/batch-crosshair-modding.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
