#Picking a good name

1 messages · Page 1 of 1 (latest)

cloud arrow
#

Creating a thread

pale tundra
#

Alright

#

I want to minimize a user's setup when he tries to use the gamemode for himself, so nothing extreme like manually setting a pretty map name or stuff like that

cloud arrow
#

There are, I think, 3 broad categories that a given map can fall into:

  1. Known prefix
  2. Unknown prefix
  3. Unknown format
#

ttt_ is a known prefix

#

33m2_ is an unknown prefix

#

c_23_central_night is an unknown format

#

If I were doing this myself, I would create a map of common known prefixes and set up logic to nicely handle those

#

Then, if a map doesn't have a known prefix, check if there are only a few characters at the beginning of the name before the first _, and if there are only a few characters, assume that's a prefix and remove it

#

However, if a map name has a lot of _ or - or numbers/symbols in it, it's probably in an unknown format that you aren't going to be able to figure out a nice, clean format for by guessing programmatically

#

In that last case, I would just leave the map name as-is under the assumption that anything you do to try to "Fix" it is going to instead make it harder to read

pale tundra
#

Right

#

This sounds much better than my previous approach of find + sub | trim if <= 3 chars

#

Thank you for the advice, i'll see what I can do with this

cloud arrow
#

No problem! I hope whatever solution you come up with works out

#

Be sure to show it off if it works out!