rafalh / dashfaction

A community patch for the Red Faction (2001) FPS game
https://www.factionfiles.com/ff.php?action=file&id=6252
Mozilla Public License 2.0
61 stars 11 forks source link

Game & Editor Issues with Long Texture Filenames #212

Closed GooberRF closed 6 months ago

GooberRF commented 1 year ago

I don't personally think this is an area where it's worth trying to increase the allowed filename length, but perhaps some handling could be valuable? This issue has the potential to make custom maps unusable, and cause designers to lose a lot of work.

Issue: Long texture filenames cause errors when attempting to load a map in-game that have them applied to a surface, as well as when trying to load them in the editor. I've found that textures with filenames >36 characters (extension included) simply error & freeze RED when attempting to look at them in the texture browser: image

Textures with filenames <36 characters but >32 characters do load in the editor, but display a corrupted filename: image

These textures can be applied to surfaces, however when a map is saved in this state, it will never again open in RED - an error is displayed instead, then the editor closes (top error below). The map also causes the game to error and close when attempting to load it (bottom error below). This can completely destroy an in-progress custom map, and cause the designer to have to revert to a backup (if they have one). image image

Textures with filenames <32 characters appear to work without issue. The easiest solution here I think is probably to just have RED refuse to load any textures with filename >32 characters from user_maps\textures - that'd eliminate the issue entirely. I don't know for sure whether this also applies to the filenames of other filetypes (v3m, etc.), but I suspect it probably does.

MartianMadman commented 1 year ago

This issue has destroyed an entire level I worked hard on. Please do something.