check_strings
Compare a Diablo II: Resurrected mod's string files with the game's own strings to find errors that can crash the game or lose text; warnings flag unintended changes.
Instructions
Check a mod's Diablo II: Resurrected string files against the game's own for mistakes that crash the game or lose its text. Findings are errors (the notes this rests on say it crashes, loses records or collides), warnings (probably unintended) and notes; checks marked heuristic are not from those notes. Args: mod: the mod's data/local/lng/strings folder, a mod folder holding data/local/lng (its strings and strings-legacy are both read), or .json files; a list of paths works. vanilla: the same for the game's own strings, extracted from your install; give all of the files, since the check is only as complete as they are. A next_string_id.txt beside the vanilla strings folder (or in data/local/lng above it) starts the search for a free id. limit: findings shown, 1 to 1000 (default 100); the counts are always complete. Checks: missing-keys (a mod file replaces the game's whole file of that name, so the game's keys it lacks show as keys in game); placeholders (printf-style %d, %s, %+d, %1$s, %*d and the rest differing in number, order or type from the game's string of the same key and language; a missing argument crashes if the game formats the key itself, as it does for some; %% is a literal percent sign and takes no argument); ids (a new key, or an override with a changed id, whose id shares its low 16 bits with another string, since the game matches ids by their low 16 bits; ids above 65,535; a key with different ids in different files; an override whose id differs from the game's); languages (strings missing a language field the mod's files carry, strings changed in enUS that keep the game's text in another language, languages the game has and the mod doesn't, empty or non-text values); duplicate keys the game's file doesn't have. Heuristics, reported as notes or warnings: colour codes cut short, literal backslash sequences, positional and plain placeholders mixed, an override's changed id. Keys are matched ignoring case, as the toolkit does; that isn't verified against the game. Strings the mod leaves exactly as the game has them are not judged. It ends with the next free id, counting up from next_string_id.txt (or one above the highest id below 65,536) and skipping low 16 bits in use. Limits: only keys the game has can be compared, so the placeholders of a new key (and the ones the engine fills in for it) aren't checked. The rules are Nugwa628/d2rAI-toolkit's notes on build 93847, not read from the game. Classic .tbl tables aren't checked. No findings means these checks passed, not that the strings work in game.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"mod": "<mod>",
"vanilla": "<vanilla>"
},
"name": "check_strings"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mod | Yes | ||
| limit | No | ||
| vanilla | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |