Alright, time for another (shorter...) essay.
TwbT Overrides@Meph @Rydel: OK, apparently I'll also be asking Mifki to support subtypes by name. (it would also be good to log a deprecation warning for numerical indicies, both to encourage change and explain to users why things are broken...). DFHack does have access to the names - look for example at the view-item-info and item-descriptions scripts: the former looks up text in the latter by item type or subtype name.
We can't reliably merge overrides files, as they would not have the level of context that raws generally provide (ie unchanged vanilla lines). TBH I'm surprised sometimes that the merge works for raws at all... improving this has been a PyLNP goal for years, but it's a really hard problem. Unique names so we can just keep adding files is therefore my favorite solution!
Preprocessing files to keep track of item subtype ID numbers... just no. It's may be technically possible, but it's not happening. I'd improve raws merging instead if I could do this.
Where do Graphics extensions liveAs @Dirst says, it's just be whatever goes in "LNP/Mods/<some_mod>/raw/graphics" -
not a new kind of thing (which would be a combinatorial explosion at best). This is obviously a default-only thing; extensions for other graphics packs will live in subdirectories ("LNP/Mods/<some_mod>/graphics-extensions/<name-of-gfx>/", for example).
@Jecowa - creating a graphics extension for a mod makes you a mod author (or contributor, in which case you do the usual sned-changes-to-author dance); but you don't need the graphics pack to help you or even know graphics extensions exist - so they'll be backwards-compatible
No suffixes or renaming. It's just to fragile, and prone to breaking in hard-to-diagnose ways!
How does PyLNP decide which graphics extension to install?The manifest for a mod will have a new attribute "graphics-extensions", which is a dictionary mapping graphics packs to subdirectory names (see above). Technically, the extension is just another mod to merge (so object files can be changed); by policy it should just override the relevant graphics bits.
PyLNP will install the default mod (which includes graphics), then if the installed graphics pack matches a subdirectory (per the mapping) will install the relevant extension. Mod authors may therefore wish to provide nothing as the default extension (ie leave /raw/graphics and twbt files nonexistent), to avoid installation clashes.
Other comments@Meph - we feel exactly the same way about standards; I'll be sure to let you know. Honestly I'd love to bring PyLNP and the masterwork launcher closer together or even merge them, but that's a conversation for another time and place (and after some upgrades...).
Maybe mods writing to raw/graphics is banned by code elsewhere? Anyway, the core code handles this OK and I should be able to make it work without too much trouble.
PyLNP copies image files and DFHack scripts, but merges .txt (eg raws) and .init files. Otherwise we would indeed have (even more) trouble installing more than one mod at a time.