progre / lmorandomizer

Randomizer for La-Mulana (Original version).
MIT License
9 stars 3 forks source link

Strings to normalize #28

Open jeremydk opened 1 month ago

jeremydk commented 1 month ago

https://github.com/progre/lmorandomizer/blob/156a318628173949ee94600008a5794094d0c06b/src-tauri/src/script/editor/talks_editor.rs#L93

If you can pull the english strings, I'm happy to take a pass at normalizing them. The flare/bomb mixup is going to be an open issue regardless.

progre commented 1 month ago

lmocodec.exe included with the application can be used to decrypt script.dat. This is a CLI tool, so use it at the command prompt.

jeremydk commented 1 month ago

Got them. Thanks. As I look through these, what are the numbers commented out here, for reference, so I can be sure to match?

progre commented 1 month ago

It is the number of ROMs and Equipments.

BTW, I am currently working on replacing the items in the storytellers. In the process, I have found a better way to rewrite item names.

It uses a list of pairs of items to replace and strings to replace.

https://github.com/progre/lmorandomizer/blob/storyteller/src-tauri/src/script/editor/replace_talk_items.rs#L66

const ITEM_NAME_MAP: [(TalkItem, &str); 4] = [
    (TalkItem::Equipment(Equipment::Anchor), "ガラクタ"),
    (TalkItem::Equipment(Equipment::MiniDoll), "コビトの人形"),
    (
        TalkItem::Equipment(Equipment::MulanaTalisman),
        "ラムラーナのごふ",
    ),
    (TalkItem::Rom(Rom::Pr3), "ひとつ"),
];

Perhaps the Shops logic could also be replaced with this new logic. In that case, if you give me a list of item and string pairs that should be replaced, I can incorporate them.

jeremydk commented 1 month ago

Oh, I like that implementation. I'll take a look in the next day or so and see what we should normalize.