Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

FIFA 19 Editor

FIFA 19 Squads 存档编辑器 · Windows · 中文 Web 界面 + 命令行工具

中文 | English


简介

本工具用于读取和修改 FIFA 19 的本地阵容存档(Squads 文件)。它提供中文 Web 界面和命令行工具两种用法,可以修改球员资料、能力值、球员特性、所属球队,以及国家队名单和球衣号码,并把结果保存为新的时间戳存档。

项目文件直接位于仓库根目录,Web 界面由本地 Flask 服务提供,浏览器只连接本机地址,不需要安装 Node.js 或数据库服务。

功能一览

页面 能做什么
球员编辑 搜索、筛选球员,修改资料、能力值、位置、归属和特性
球队编辑 查看球队评分与阵容,批量调整球衣号码
快捷转会 在两支球队之间移动球员,自动处理人数和号码
精确转会 从全体球员中筛选并转入指定球队
国家队选拔 维护国家队 23 人名单与号码
国家队国籍 配置国家队允许选拔的国籍范围

安装要求

  • Windows 10 / 11
  • Python 3.10 或更高版本
  • FIFA 19 本地阵容存档
  • 首次安装依赖时需要网络连接

安装与启动

一键启动

下载或克隆仓库后,在仓库根目录双击:

start_editor.bat

脚本会自动依次完成:查找 Python(优先 .venv,其次 C:\anaconda3\python.exe、C:\Python313\python.exe、C:\Python314\python.exe、最后 python)→ 检查 Flask 和 Waitress,缺失时自动安装 → 读取最新存档 → 启动服务并打开浏览器。

如果浏览器没有自动打开,请手动访问:

http://127.0.0.1:8765/

命令窗口需要保持打开,关闭它会停止 Web 服务。窗口会显示 Python 版本、依赖检查、当前存档、服务地址,以及球员修改、球衣号码调整、保存和重置等主要操作日志。

手动安装虚拟环境

如果电脑上有多个 Python,推荐在仓库根目录创建独立虚拟环境:

py -3 -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r requirements.txt
.\start_editor.bat

也可以直接运行 Web 服务:

.\.venv\Scripts\python.exe web_app.py

启动参数

.\.venv\Scripts\python.exe web_app.py --host 127.0.0.1 --port 8765 --no-browser
参数 默认值 说明
--host 127.0.0.1 监听地址
--port 8765 监听端口,被占用时可改
--no-browser 关闭 启动时不自动打开浏览器

快速上手

  1. 双击 start_editor.bat,等待浏览器自动打开编辑器。
  2. 顶部会显示当前加载的存档文件名;如果不是想要的那份,点“打开存档”手动指定。
  3. 在对应页面做修改。所有改动先暂存在内存里,顶部会累计“N 项待保存”。
  4. 确认无误后点右上角“保存为新存档”。
  5. 回到游戏,让 FIFA 19 重新加载存档(游戏按时间戳加载最新的 Squads 文件)。

界面使用说明

下面是球员编辑页的实际界面(选中马拉多纳):左侧搜索和筛选球员,右侧编辑资料、所属球队和两组球员特性。

球员编辑页:左侧是搜索结果列表,右侧是马拉多纳的总评、所属球队和球员特性 1 / 球员特性 2 两组勾选框

打开存档

启动时会自动查找游戏存档目录中修改时间最新的 Squads* 文件,默认目录通常是:

文档\FIFA 19\settings\

文件名一般类似 Squads20260825065104。要换一份存档,点顶部“打开存档”,输入存档的完整路径。

不要直接双击 web/index.html,它需要先运行本地 Flask 服务。

球员编辑

左侧“查找球员”支持:

  • 姓名或球员 ID:中文名、英文名、通用名或球员 ID 都能搜,例如 Messi、梅西、158023
  • 国籍:关键字筛选
  • 最低能力:只看总评不低于该值的球员
  • 位置:按主位置筛选

点击搜索结果后,右侧显示球员详情,可以修改以下分组:

分组 包含字段
球员信息 球员 ID(只读)、名字 / 姓氏 / 通用名 / 球衣名 ID
评分 总评、潜力、状态加成、国际声望
位置 / 工作投入 主位置、三个次位置、惯用脚、花式技巧、逆足能力、进攻 / 防守投入
进攻 传中、射术、头球精度、短传、凌空射门
技巧 盘带、弧线、任意球精度、长传、控球
移动 加速、速度、敏捷、反应、平衡
力量 射门力量、弹跳、体力、强壮、远射
精神 侵略性、拦截、站位、视野、点球、沉着
防守 盯人、抢断、铲球
门将 扑救、手控球、开球、站位、反应
身体数据 身高、体重、出生日期、国籍、体型

其中出生日期在存档里存的是一个“日数”(例如 152008)。编辑页把它换算成真实日期展示:可以直接改四位年份(如 1998),或填 YYYY-MM-DD 完整生日,输入框下方会同步显示换算出的日期和年龄(年龄按 FIFA 19 最终阵容数据日期 2019-03-14 计算)。

球员详情底部还有两块:

  • 所属球队:可以改俱乐部、国家队归属,或设为自由球员。只改归属关系,不会删除球员数据。
  • 球员特性 1 / 球员特性 2:勾选框形式,标题上的 已启用/总数 表示该组当前勾选了几项。这两组对应存档里的 trait1 和 trait2 两个位掩码字段,编号 1、2 是字段编号,不是球员的特性数量。

界面下方还有说明:特长(Player Specialities)由能力值自动计算,不在这里修改,改了能力值之后特长会自动变化。

球队编辑

左侧“查找球队”支持中文名、英文名或球队 ID,例如 AC米兰、Milan、47。

选中球队后右侧显示球队评分和完整阵容,可以:

  • 查看每名球员的位置、总评和球衣号码
  • 修改球衣号码,改完点“应用号码修改”生效;点“重置号码”可以放弃这一页尚未应用的改动。号码是 1–99 的不重复整数,如果目标号码已被占用,工具会处理冲突而不是直接写重复号码

快捷转会

用于在两支球队之间移动球员:

  1. 分别选择来源球队和目标球队(输入球队 ID、中文名或英文名,会给出下拉建议),中间的 ⇄ 按钮可以交换两侧。
  2. 两支球队的阵容会分左右两栏列出,可以按号码、能力或位置排序。
  3. 在任一侧点击球员即可移到另一侧。点击后立即生效,改动直接进入待保存列表,不需要额外点“应用”。

规则说明:

  • 普通俱乐部阵容需保持 16–42 人。
  • 自由球员使用独立的球员池,不限制人数。
  • 转入俱乐部时,如果指定号码不可用,会自动分配可用号码。
  • 快捷转会里的号码仅供查看,原有国家队关系保持不变。

精确转会

当你不确定球员在哪支球队时用这个页面:

  1. 先选择目标球队。
  2. 设置筛选条件:球员姓名或 ID、国籍、能力下限。
  3. 从结果中点击球员即可转入目标球队,点击后立即生效。最多显示 300 条结果。

原俱乐部人数限制、目标球队人数限制和号码自动分配规则与快捷转会一致。

国家队选拔

  1. 在左侧“入选名单”区域选择国家队,标题会显示当前人数 N / 23 人。
  2. 右侧“候选球员”会列出该国家队可选国籍范围内的球员,可以按姓名 / ID、最低能力、位置筛选。
  3. 先移出球员,再从候选里选入,名单必须满 23 人才能应用。
  4. 号码为 1–99 且不重复;也可以点“按当前排序编号 1–23”自动编号。
  5. 点“应用选拔与号码”进入待保存列表。

注意事项:

  • 排序仅用于页面显示,不改变首发或阵型。
  • 原名单不足或超过 23 人时,该国家队会禁用选拔,避免自动重建阵容数据;这类存档需要先恢复完整名单。
  • 切换国家队前会提示尚未应用的草稿。
  • 这里只修改 RrqT 表中的国家队球员与号码,不改变球员本人的国籍或俱乐部关系。

国家队国籍

用于配置某个国家队可以选拔哪些国籍的球员,例如让斯洛文尼亚可以选择前南斯拉夫各国球员。

  1. 在左侧选择国家队。
  2. 右侧“可选国籍”列出所有国籍,可以按大洲筛选或搜索中英文名 / 国籍 ID,勾选允许的国籍。
  3. 点“应用国籍链接”进入待保存列表。想恢复默认,点“恢复本国国籍”。

这里修改的是存档的 CxJp 国家队-国籍关系表,不会改变球员本人的国籍。保存后,国家队选拔页会按这个范围显示候选球员。

保存、放弃修改与待保存计数

  • 顶部“N 项待保存”会累计所有尚未写入文件的改动。
  • 放弃修改:清空内存中的改动,回到刚加载存档时的状态。
  • 保存为新存档:生成一个新的 SquadsYYYYMMDDHHMMSS 文件,不覆盖输入存档;保存后会自动重新加载并验证结果。

球员特性映射

FIFA 19 的特性存放在 CZUM 表的 trait1(30 位)和 trait2(24 位)位掩码字段中,官方没有公开位定义。core/traits.py 里的映射是逐球员进游戏比对原始位与游戏内特性列表校准出来的,是该映射的唯一事实来源。

  • 界面只显示游戏里会显示的特性,共 39 项(trait1 23 项 + trait2 16 项)。
  • 另有一些位在游戏内不显示,标记为隐藏位;它们不出现在界面上,但可以用 set-trait 按位修改。
  • 已核对球员包括梅西、C罗、内马尔、马拉多纳、德布劳内、阿尔维斯、克雷斯波、伊瓜因、德赫亚、卡西、大小舒梅切尔、佩雷拉、马尔基尼奥斯、坎帕尼亚等,游戏内特性列表与编辑器显示完全一致。
  • 若发现某个球员游戏内特性与编辑器不一致,先读出该球员的 trait1 / trait2 原始值定位具体位,再决定是改名字还是标为隐藏位。

命令行工具

仓库提供两套命令行入口,都在仓库根目录执行。把示例中的存档路径替换成自己的 Squads 文件。

$python = ".\.venv\Scripts\python.exe"
$save = "C:\Users\你的用户名\OneDrive\文档\FIFA 19\settings\Squads20260825065104"

backend_cli.py(推荐)

子命令形式,所有修改命令默认只显示预览,加 --save 才会生成新存档。

命令 说明
players --search <关键词> 搜索球员
player <球员ID> 查看球员资料和特性
set-player <球员ID> 字段=值 ... 修改球员字段
set-trait <球员ID> <1|2> <bit> --enable | --disable 按位开关特性
teams --search <关键词> 搜索球队
team <球队ID> [--roster] 查看球队资料和阵容
set-team <球队ID> 字段=值 ... 修改球队字段
roster-add <球员ID> <球队ID> [--jersey N] [--position N] 将球员加入球队
roster-remove <球员ID> <球队ID> 将球员移出球队
roster-renumber <球队ID> <球员ID=号码> ... 批量调整球队号码
transfer <球员ID> <目标球队ID> [--from-team ID] [--jersey N] [--position N] 在俱乐部之间转会

示例:

# 搜索球员
& $python .\backend_cli.py $save players --search "Messi"

# 查看球员
& $python .\backend_cli.py $save player 158023

# 预览修改,不写入文件
& $python .\backend_cli.py $save set-player 158023 overallrating=99 potential=99

# 修改并生成新的时间戳存档
& $python .\backend_cli.py $save set-player 158023 overallrating=99 potential=99 --save

# 搜索球队并查看阵容
& $python .\backend_cli.py $save teams --search "Manchester"
& $python .\backend_cli.py $save team 11 --roster

# 批量调整球衣号码
& $python .\backend_cli.py $save roster-renumber 1369 158023=19 190042=10 --save

--save 可以用 --output-dir 指定输出目录。完整参数:

& $python .\backend_cli.py --help
& $python .\backend_cli.py $save set-trait --help

main.py(旧版入口)

单文件形式,主要覆盖概览、搜索、导出和传奇球员导入:

python main.py <存档文件>                                   # 显示概览
python main.py <存档文件> --search <关键词>                 # 按姓名/ID 搜索球员
python main.py <存档文件> --player <ID>                     # 显示球员属性
python main.py <存档文件> --set <ID> <字段=值>... [--save]   # 修改球员并保存
python main.py <存档文件> --set-team <球员ID> <球队ID> [号码]  # 修改球员所属球队
python main.py <存档文件> --apply-legend <ID> <姓名>        # 用传奇面部/属性覆盖球员
python main.py <存档文件> --remap-ids <旧ID:新ID>...         # 批量重映射球员 ID
python main.py <存档文件> --export <xlsx>                   # 导出所有表
python main.py <存档文件> --export-players <xlsx>           # 仅导出球员表

⚠️ main.py 的 --save-in-place(以及后面不跟路径的裸 --save)会直接覆盖原存档。 想保留原文件,请一律用 --save-as <路径> 或 --save <路径> 写到新文件。

例如:

& $python .\main.py $save --search "Messi"
& $python .\main.py $save --player 20801
& $python .\main.py $save --apply-legend 248718 Zidane --save-as .\merged.sav

apply_legend.py 是 --apply-legend 的独立脚本版本。

存档安全说明

  • Web 编辑器和 backend_cli.py 的保存器都会生成新的 SquadsYYYYMMDDHHMMSS 文件,不会覆盖输入存档;main.py 默认也是另存,但它的 --save-in-place(或后面不跟路径的裸 --save)会覆盖原文件,不要用。FIFA 19 会优先加载时间戳最新的文件,因此建议保存后确认新文件已经生成,并保留旧文件作为备份。
  • 球员能力编辑采用原始布局保留方式:只覆盖实际修改的字段,尽量保留未修改表、记录填充、空槽、表尾和目录布局。
  • AGmV 等高风险默认阵容数据保持只读。
  • 涉及俱乐部阵容、转会或自定义球员时,建议先复制一份原始存档,并在 FIFA 19 中确认能够正常加载生涯和欧冠相关模式。
  • 不要手动编辑 fifa_ng_db-meta.xml,它是存档字段定义的来源。
  • 游戏自身会轮换自动存档:你在游戏里进出相关界面时,FIFA 会写入新的 Squads 文件并替换它上一次的自动存档。用编辑器改动前,先确认当前最新存档就是你要改的那份。

常见问题

打开页面是空白 / 无法访问 确认 start_editor.bat 的命令窗口还开着,并且访问的是 http://127.0.0.1:8765/。不要直接双击 web/index.html。

端口 8765 被占用 换一个端口启动:.\.venv\Scripts\python.exe web_app.py --port 8766

提示找不到存档 默认目录是 文档\FIFA 19\settings\。如果存档在别处(例如 OneDrive 重定向后的路径),点“打开存档”手动填完整路径。

保存后在游戏里没看到变化 确认游戏加载的是时间戳最新的那个 Squads 文件;如果游戏自己又存过一次档,它写出的新文件会排在编辑器保存的文件之后。

游戏内特性和编辑器显示不一致 见上面的“球员特性映射”。先定位是哪一个位对不上,再决定改名字还是标为隐藏位。

改了国家队或俱乐部名单后游戏异常 先恢复备份存档,再在游戏里确认生涯和欧冠模式是否正常。国家队选拔只在原名单为 23 人时可用,就是为了避免自动重建阵容数据。

项目结构

.
├─ web/              Web 页面、样式和 JavaScript
├─ web_app.py        Flask Web 服务与 JSON API
├─ core/             FIFA 19 存档解析、字段和无损写入
├─ services/         球员、球队、阵容、国家队和保存服务
├─ backend_cli.py    命令行入口(子命令形式)
├─ main.py           命令行入口(旧版,含导出与传奇导入)
├─ apply_legend.py   传奇球员数据导入脚本
├─ data/             轻量数据库和球员头像
├─ reference/        参考数据
├─ tests/            自动化测试
└─ docs/             存档格式、开发说明和界面截图

测试

.\.venv\Scripts\python.exe -m unittest

或运行:

.\run_tests.bat

相关文档

许可证

本项目采用 PolyForm Noncommercial License 1.0.0。允许个人用于学习、研究、测试、娱乐和业余项目,也允许其他非商业用途;商业使用需要获得单独授权。

该许可证属于 source-available(源码可见)许可,不是 OSI 定义的严格意义上的开源许可证。项目中的 FIFA 19 数据、头像、XML schema、参考存档以及第三方/上游代码或资源,可能受其各自的版权和许可证约束,不自动包含在本项目许可证中。

免责声明

本工具仅用于 FIFA 19 本地存档的个人备份和编辑。使用前请自行备份存档;因存档损坏、版本不匹配或游戏读取失败造成的数据损失,由使用者自行承担。


English

FIFA 19 Squads save editor · Windows · Chinese web UI + command line tools

中文 | English

Overview

This tool reads and edits FIFA 19 local squad saves (Squads files). It ships a Chinese-language web UI and two command line entry points. You can edit player profiles, attributes, traits, club and national team links, national team squads and shirt numbers, then write the result to a new timestamped save file.

Everything lives at the repository root. The web UI is served by a local Flask process; the browser only talks to your own machine. No Node.js or database server is required.

Features

Page What it does
Players Search and filter players; edit profile, attributes, positions, team links and traits
Teams Inspect team ratings and rosters; bulk-edit shirt numbers
Quick transfer Move players between two teams, with roster size and number handling
Precise transfer Filter the whole player database and move a player into a target team
National selection Maintain a national team's 23-man squad and numbers
National nations Configure which nationalities a national team may select from

Requirements

  • Windows 10 / 11
  • Python 3.10 or newer
  • A local FIFA 19 squad save
  • Network access for the first dependency install

Install and run

One-click start

Double-click start_editor.bat in the repository root. The script finds a Python interpreter (preferring .venv, then C:\anaconda3\python.exe, C:\Python313\python.exe, C:\Python314\python.exe, and finally python), checks Flask and Waitress and installs them if missing, loads the newest save, starts the server and opens your browser.

If the browser does not open automatically, go to:

http://127.0.0.1:8765/

Keep the console window open — closing it stops the server. The window logs the Python version, dependency check, current save, service address, and the main edit/save/reset operations.

Manual virtual environment

py -3 -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r requirements.txt
.\start_editor.bat

Or start the web service directly:

.\.venv\Scripts\python.exe web_app.py

Start-up options

.\.venv\Scripts\python.exe web_app.py --host 127.0.0.1 --port 8765 --no-browser
Option Default Description
--host 127.0.0.1 Listen address
--port 8765 Listen port; change it if the default is taken
--no-browser off Do not open the browser on start

Quick start

  1. Double-click start_editor.bat and wait for the browser to open.
  2. The header shows the loaded save file. If it is not the one you want, click 打开存档 (Open save) and pick the file.
  3. Make your edits. Changes are held in memory; the header accumulates a “N 项待保存” (pending) counter.
  4. Click 保存为新存档 (Save as new save) when you are done.
  5. Let FIFA 19 reload the save — the game loads the newest Squads file by timestamp.

Using the interface

The screenshot below shows the players page with Maradona selected: search and filters on the left, profile, team links and the two trait groups on the right.

Players page: search results on the left; Maradona's rating, team links and the two trait checkbox groups on the right

Opening a save

On start-up the editor automatically picks the most recently modified Squads* file in the FIFA save folder, normally:

Documents\FIFA 19\settings\

Filenames look like Squads20260825065104. To switch saves, click 打开存档 and enter the full path.

Do not open web/index.html directly — the page needs the local Flask service running.

Players

The left sidebar 查找球员 (Find players) supports:

  • Name or player ID — Chinese name, English name, common name or ID, e.g. Messi, 梅西, 158023
  • Nationality — keyword filter
  • Minimum overall — only players at or above a given rating
  • Position — filter by primary position

Selecting a result shows the player on the right, grouped into editable sections:

Section Fields
Player info Player ID (read-only), first / last / common / jersey name IDs
Ratings Overall, potential, form modifier, international reputation
Positions / work rates Primary position, three secondary positions, preferred foot, skill moves, weak foot, attacking and defensive work rate
Attack Crossing, finishing, heading accuracy, short passing, volleys
Skill Dribbling, curve, free kick accuracy, long passing, ball control
Movement Acceleration, sprint speed, agility, reactions, balance
Power Shot power, jumping, stamina, strength, long shots
Mentality Aggression, interceptions, positioning, vision, penalties, composure
Defending Marking, standing tackle, sliding tackle
Goalkeeping Diving, handling, kicking, positioning, reflexes
Physical Height, weight, birth date, nationality, body type

Below the attributes there are two more blocks:

  • Team links — change the club, the national team, or make the player a free agent. Only the link changes; the player record is never deleted.
  • Traits 1 / Traits 2 — checkbox lists. The enabled/total figure in the heading is how many boxes are ticked in that group. The two groups map to the save's trait1 and trait2 bitmask fields; the 1 and 2 are field numbers, not the number of traits a player has.

Note the text under the list: player specialities are computed from attributes and are not edited here — they change automatically when you edit the attributes.

Teams

The left sidebar 查找球队 (Find teams) accepts Chinese names, English names or team IDs, e.g. AC米兰, Milan, 47.

Selecting a team shows its ratings and full roster. You can:

  • Inspect each player's position, overall and shirt number
  • Edit shirt numbers, then click 应用号码修改 (Apply number changes) to apply them; 重置号码 (Reset numbers) discards unapplied edits on this page. Numbers are unique integers from 1 to 99; if a target number is taken the tool resolves the conflict instead of writing a duplicate

Quick transfer

Move players between two teams:

  1. Pick a source team and a target team (type a team ID, Chinese or English name for suggestions). The ⇄ button swaps the two sides.
  2. Both rosters appear side by side and can be sorted by number, rating or position.
  3. Click a player on either side to move them across. The transfer applies immediately and goes straight into the pending list — there is no separate apply button.

Rules:

  • Normal clubs must keep 16–42 players.
  • Free agents use a separate player pool with no size limit.
  • When moving into a club, an unavailable shirt number is assigned automatically.
  • Shirt numbers shown in quick transfer are informational only, and existing national team links are preserved.

Precise transfer

Use this when you know the player but not the team:

  1. Pick the target team.
  2. Set filters: player name or ID, nationality, minimum overall.
  3. Click a player in the results to move them into the target team — the transfer applies immediately. At most 300 results are shown.

Source club limits, target club limits and automatic number assignment work exactly as in quick transfer.

National selection

  1. Choose a national team in the left panel; the heading shows N / 23.
  2. The right panel lists candidates from the nationalities that team may select from, filterable by name / ID, minimum overall and position.
  3. Remove players first, then add from the candidates. The squad must be exactly 23 before you can apply.
  4. Numbers are unique integers from 1 to 99; you can also click 按当前排序编号 1–23 to number the squad automatically.
  5. Click apply to add the changes to the pending list.

Notes:

  • Sorting only changes the display; it does not change the starting eleven or formation.
  • If the existing squad is not exactly 23 players, selection is disabled for that team to avoid rebuilding roster data automatically — restore a full squad first.
  • Switching teams warns you about unapplied drafts.
  • Only the national team players and numbers in the RrqT table are modified; the player's own nationality and club links are untouched.

National nations

Configure which nationalities a national team may draw players from — for example, letting Slovenia select players from the former Yugoslav countries.

  1. Choose a national team on the left.
  2. The right panel lists all nationalities; filter by continent or search by Chinese / English name or nationality ID, then tick the allowed ones.
  3. Click 应用国籍链接 (Apply nation links) to add the changes to the pending list. 恢复本国国籍 (Restore home nation) resets to the default.

This edits the save's CxJp national-team-to-nation table and does not change any player's own nationality. After saving, the national selection page shows candidates according to this range.

Pending changes, reset and saving

  • The header's “N 项待保存” counter accumulates every change not yet written to disk.
  • 放弃修改 (Discard changes) clears the in-memory edits and returns to the state the save was loaded in.
  • 保存为新存档 (Save as new save) writes a new SquadsYYYYMMDDHHMMSS file and never overwrites the input save. The file is reloaded and verified after saving.

Player trait mapping

FIFA 19 stores traits in the CZUM table as two bitmask fields, trait1 (30 bits) and trait2 (24 bits). There is no official public bit definition. The mapping in core/traits.py was calibrated by comparing each bit against what the game actually displays, player by player, and is the single source of truth.

  • The UI only shows traits that the game displays — 39 in total (23 from trait1, 16 from trait2).
  • Some bits are set but never shown in game. They are marked as hidden, do not appear in the UI, and can still be toggled with set-trait.
  • Verified players include Messi, Cristiano Ronaldo, Neymar, Maradona, De Bruyne, Dani Alves, Crespo, Higuaín, De Gea, Casillas, both Schmeichels, M. Pereira, Marquinhos and Campaña — the in-game trait list matches the editor exactly for all of them.
  • If a player's in-game traits disagree with the editor, read that player's raw trait1 / trait2 values to locate the bit, then decide whether to rename it or mark it hidden.

Command line

Two entry points are provided, both run from the repository root. Replace the save path with your own Squads file.

$python = ".\.venv\Scripts\python.exe"
$save = "C:\Users\your-name\OneDrive\Documents\FIFA 19\settings\Squads20260825065104"

backend_cli.py (recommended)

Subcommand based. Every modifying command only prints a preview by default; add --save to write a new save file.

Command Description
players --search <keyword> Search players
player <player-id> Show a player's profile and traits
set-player <player-id> field=value ... Edit player fields
set-trait <player-id> <1|2> <bit> --enable | --disable Toggle a trait bit
teams --search <keyword> Search teams
team <team-id> [--roster] Show a team and its roster
set-team <team-id> field=value ... Edit team fields
roster-add <player-id> <team-id> [--jersey N] [--position N] Add a player to a team
roster-remove <player-id> <team-id> Remove a player from a team
roster-renumber <team-id> <player-id=number> ... Bulk-edit shirt numbers
transfer <player-id> <to-team-id> [--from-team ID] [--jersey N] [--position N] Transfer between clubs

Examples:

# Search for a player
& $python .\backend_cli.py $save players --search "Messi"

# Show a player
& $python .\backend_cli.py $save player 158023

# Preview an edit without writing
& $python .\backend_cli.py $save set-player 158023 overallrating=99 potential=99

# Edit and write a new timestamped save
& $python .\backend_cli.py $save set-player 158023 overallrating=99 potential=99 --save

# Search teams and show a roster
& $python .\backend_cli.py $save teams --search "Manchester"
& $python .\backend_cli.py $save team 11 --roster

# Bulk-edit shirt numbers
& $python .\backend_cli.py $save roster-renumber 1369 158023=19 190042=10 --save

--save accepts --output-dir to choose the output folder. Full help:

& $python .\backend_cli.py --help
& $python .\backend_cli.py $save set-trait --help

main.py (legacy entry point)

Single-file CLI covering overview, search, export and legend import:

python main.py <save-file>                                  # overview
python main.py <save-file> --search <keyword>               # search players by name/ID
python main.py <save-file> --player <ID>                    # show player attributes
python main.py <save-file> --set <ID> <field=value>... [--save]  # edit a player and save
python main.py <save-file> --set-team <player-id> <team-id> [number]  # change a player's team
python main.py <save-file> --apply-legend <ID> <name>       # overwrite a player with legend face/attributes
python main.py <save-file> --remap-ids <old-id:new-id>...   # remap player IDs
python main.py <save-file> --export <xlsx>                  # export all tables
python main.py <save-file> --export-players <xlsx>          # export the player table only

⚠️ main.py --save-in-place (or a bare --save with no path) overwrites the original save file. To keep the original, always use --save-as <path> or --save <path> to write a new file.

For example:

& $python .\main.py $save --search "Messi"
& $python .\main.py $save --player 20801
& $python .\main.py $save --apply-legend 248718 Zidane --save-as .\merged.sav

apply_legend.py is the standalone script version of --apply-legend.

Save safety

  • The web editor and backend_cli.py always create a new SquadsYYYYMMDDHHMMSS file and never overwrite the input save; main.py also writes to a new file by default, but its --save-in-place (or a bare --save with no path) overwrites the original — avoid it. FIFA 19 loads the newest file by timestamp, so confirm the new file exists and keep the old one as a backup.
  • Player attribute edits use a layout-preserving writer: only the fields you actually changed are overwritten, and unmodified tables, record padding, empty slots, table tails and directory layout are preserved.
  • High-risk default lineup data such as AGmV is kept read-only.
  • Before editing club rosters, transfers or custom players, copy the original save first and confirm in FIFA 19 that career and Champions League modes still load.
  • Do not hand-edit fifa_ng_db-meta.xml; it is the source of the save's field definitions.
  • The game rotates its own autosaves: entering and leaving certain screens makes FIFA write a new Squads file and replace its previous autosave. Before editing, make sure the newest save really is the one you want to change.

FAQ

The page is blank / unreachable Make sure the start_editor.bat console window is still open and that you are visiting http://127.0.0.1:8765/. Do not open web/index.html directly.

Port 8765 is already in use Start on another port: .\.venv\Scripts\python.exe web_app.py --port 8766

“Save not found” The default folder is Documents\FIFA 19\settings\. If the save lives elsewhere (for example under a redirected OneDrive path), click 打开存档 and enter the full path.

Nothing changed in game after saving Check that the game is loading the newest Squads file by timestamp. If the game saved again afterwards, its file sorts after the one the editor wrote.

In-game traits do not match the editor See the “Player trait mapping” section above. Locate which bit disagrees first, then decide whether to rename it or mark it hidden.

The game misbehaves after editing national team or club squads Restore your backup save first, then verify career and Champions League modes in game. National selection only works when the existing squad is exactly 23 players, precisely to avoid rebuilding roster data automatically.

Project layout

.
├─ web/              Web page, styles and JavaScript
├─ web_app.py        Flask web service and JSON API
├─ core/             FIFA 19 save parsing, fields and lossless writing
├─ services/         Player, team, roster, national team and save services
├─ backend_cli.py    Command line entry point (subcommands)
├─ main.py           Command line entry point (legacy, includes export and legend import)
├─ apply_legend.py   Legend player import script
├─ data/             Lightweight database and player heads
├─ reference/        Reference data
├─ tests/            Automated tests
└─ docs/             Save format, development notes and screenshots

Tests

.\.venv\Scripts\python.exe -m unittest

Or run:

.\run_tests.bat

Further reading

License

This project is licensed under the PolyForm Noncommercial License 1.0.0. Personal use for learning, research, testing, entertainment and hobby projects is allowed, as are other noncommercial uses; commercial use requires a separate license.

This is a source-available license, not an OSI-approved open source license. FIFA 19 data, player heads, the XML schema, reference saves, and any third-party or upstream code and assets may be subject to their own copyrights and licenses and are not automatically covered by this project's license.

Disclaimer

This tool is intended for personal backup and editing of local FIFA 19 saves. Back up your save before use. Data loss caused by a corrupted save, version mismatch or the game failing to load it is your own responsibility.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages