RMMV, git, gitattributes, and versionId change

inqs

Villager
Member
Joined
Feb 28, 2019
Messages
15
Reaction score
1
First Language
English
Primarily Uses
RMMV
I have my RMMV project checked into git.

I notice that pretty much any time I do anything, git says that a bunch of files in data/*.json have changed. I fixed some of this by adding a .gitattributes file with
Code:
# For json files in data/ don't mess with them
data/*.json text=false
but I still see data/System.json changing all the time. It looks like there is a versionId field in there that gets bumped. That's fine but it would be everything in data/System.json is on one line so it's hard to see that. Is there a way to tell git or RMMV or something to either have line breaks in data/System.json so its easier to see what has changed or to somehow highlight that change instead of showing one gigantic diff just when that one field changes?

Also, any tips on how to configure/use git with RMMV would be much appreciated.

Thanks in advance
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
you should NOT autosync your project folder to the web.

The problem is that RMMV handles its files like a database program, which means that those files are always open as long as the editor is open.
If a second program tries to access the same file at the same time, it will fail (because only one program can access a file at the same time), and most cloudsync programs interprets that as "empty file", effectively destroying it. A lot of people have lost their projects because of this.

Only call a sync after the editor has been closed. I don't know if you can program that into your sync program or not - if you can't then it's better for your file safety to only make manual backups.
 

inqs

Villager
Member
Joined
Feb 28, 2019
Messages
15
Reaction score
1
First Language
English
Primarily Uses
RMMV
you should NOT autosync your project folder to the web.
Thanks for the help, but I'm not quite sure what you are talking about. My workflow is as follows:

1. Edit in RMMV, save, close RMMV.
2. Type "git status" at a cygwin prompt to see changes.
3. Use "git commit -m" to Commit changed files into git.

I think this is a solid workflow and if anything should protect my project and not make it risky. If you have suggestions for a better git workflow, please let me know as I'm very new to RMMV.

My main issue is that when I type "git status" to see the changes, what I see is sometimes not so useful because of:
1. How git handles line endings by default.
2. How RMMV likes to put everything in the JSON file all on one line which makes changes harder to decipher.

I dealt with issue #1 using a .gitattributes file as mentioned in my original post. I'm looking for help on #2. For example, if all RMMV has done is change the versionId field in data/System.json, it would be nice if there were an easy way to realize that with "git diff".

Thanks in advance for any pointers on good git workflows for RMMV.
 

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,628
Reaction score
1,115
First Language
English
Primarily Uses
RMMV
@Andar That advice, while good advice, isn't relevant to this question - git isn't an autosync program it's a version control system.

@inqs I use git in my project and I noticed the same thing - every system generated JSON file has sensible line breaks except for System.json. That would actually be a good thing to request in the MV Improvement forum section.

I'm not 100% sure about what's possible with .gitattributes, but I don't think there's much you can do about it. I'm also not sure if you want to set the text attribute to false for those json files, otherwise it won't convert CRLF line endings to LF (unless you're on a Mac then it wouldn't matter i guess).
You'll just have to deal with it being changes on every save I think. The "versionId" field in the System.json file is just autoincremented every time you save changes to the program, this controls whether the map is reloaded/refreshed when loading a save file.
 

cmdted

Villager
Member
Joined
Mar 31, 2019
Messages
6
Reaction score
5
First Language
English
Primarily Uses
RMMV

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@cmdted Just a heads up - until that thread with your suggestion is approved by Archeia, no one except you and Mods can see it.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,045
Members
137,569
Latest member
Shtelsky
Top