Do I have to put underscores "_" for spaces when naming anything in MV?

Discussion in 'RPG Maker MV' started by Moist__Lord, Nov 12, 2017.

  1. Moist__Lord

    Moist__Lord Veteran Veteran

    Messages:
    66
    Likes Received:
    2
    First Language:
    English
    My example:
    Let's say I'm naming a variable, right?
    I name it something like, "moist boy".
    Will there be any problems with RPG Maker if I don't put an underscore where the space should be? ("moist_boy")
     
    #1
  2. Shaz

    Shaz Veteran Veteran

    Messages:
    37,706
    Likes Received:
    11,411
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Not variables or switches, but it might be a good idea to do it with your resources. I've seen some posts here from people who say their game can't find resources after deployment, and naming standards is one of the reasons.
     
    #2
  3. vico

    vico Veteran Veteran

    Messages:
    160
    Likes Received:
    18
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    Yes, is recomended to not use spaces on your assets mostly due to RPG Maker MV project being a HTML5/Web Application

    As saw in https://unix.stackexchange.com/questions/148043/is-space-not-allowed-in-a-filename

    Plus links:
    http://webtech.training.oregonstate.edu//faq/what-are-good-file-naming-conventions
    http://forums.htmlhelp.com/index.php?showtopic=9137
    https://superuser.com/questions/358...-platform-file-names-for-linux-windows-and-os
    https://stackoverflow.com/questions...n-file-names-when-i-can-use-a-code-equivalent
     
    #3
  4. Poryg

    Poryg Dark Lord of the Castle of Javascreeps Veteran

    Messages:
    3,919
    Likes Received:
    9,893
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    Most windows systems don't have problems with that, since they substitute space for %20. However, it is better to do it anyway and mandatory to do if you want to export the game to other platforms.
    Edit: I read the question wrong. For switches and variables etc. it is not necessary, since the game takes it as a string. But as others have said, resources are necessary.

    Since I use Javascript a lot, I've gotten used to naming things in javascript format, which is first word all letters lowercase and the rest capitalised:

    firstVariable
    secondVariable
    thisIsAnAwesomeWariableBecauseItHasWInsteadOfV

    etc :D
     
    #4
  5. Moist__Lord

    Moist__Lord Veteran Veteran

    Messages:
    66
    Likes Received:
    2
    First Language:
    English
    This is a BIG problem for me because I'm mid-way through making an RPG project right now and a large amount of my maps have events using place holder or their intended sprites all without spaces in their name. I've tried renaming the resource that they use for the image and it obviously doesn't show for them, is there a way to quickly fix that without having to go through every single event and change their image by hand?
     
    #5
  6. Moist__Lord

    Moist__Lord Veteran Veteran

    Messages:
    66
    Likes Received:
    2
    First Language:
    English
    Okay so I've opened up one of the .JSON files for my game with Notepad++ and it seems that I can replace every single space and replace them with an underscore, but the problem is this affects my dialogue for my game too I believe.
    So either or it's still going to be a hassle for me to go in and change a lot of these things, so is there any easier way to deal with it?
     
    #6
  7. Moist__Lord

    Moist__Lord Veteran Veteran

    Messages:
    66
    Likes Received:
    2
    First Language:
    English
    bump
     
    #7
  8. LadyBaskerville

    LadyBaskerville Hell-poodle Veteran

    Messages:
    645
    Likes Received:
    487
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    Instead of replacing every space with an underscore, just search for your old filenames and replace them with the new ones. While that means you have to search for each file separately, it's still faster than going though all your events in the editor manually or trying to separate the spaces in the dialogue from the spaces in the filenames. Also, make sure to back up your .json files before editing them directly - there's just too much that can accidently go wrong.
     
    #8

Share This Page