CCDirectLink / crosscode-map-editor

Map Editor for CrossCode
MIT License
52 stars 19 forks source link

Filtering should respect the game's dotted path notation #289

Open elluminance opened 1 year ago

elluminance commented 1 year ago

Many resources in CrossCode use a form of "dotted path". For example, when loading a map you do something like ig.game.teleport("autumn.path-01") to load the map stored at data/maps/autumn/path-01.json. Or, when choosing a character for an NPC or dialog - you would do something like main.lea.

For the new graphical selector, it would be convenient if one could search for main.lea and filter it down to the main "namespace" and search in there for lea. For example, this search would only show ones that match the substring lea.

image

While it is possible to search for the second part by just typing lea, it doesn't filter, and only highlights ones that have that in their name, which isn't necessarily the most helpful when searching through larger character folders.

Potentially, to address filtering in merely subtypes (ignoring the "main type") those it can be supported to do a "wildcard" such as *.lea or merely .lea (or anything else, I leave that detail to the implementers and/or maintainers to decide.)

Everything I've said above was specifically in the context of the NPC selector out of the necessity for an example, but would also be applicable to things like the enemy selector as well.

As 2767mr pointed out, this could also be applied to the map load window, allowing searching for maps by using their dotted path. (I imagine if #280 gets implemented this could be very helpful to filtering maps.)