Suggestion Fully formatted JSON Data Files on Save

Prettify JSON Data files on-save

  • Yes

    Votes: 7 100.0%
  • No

    Votes: 0 0.0%

  • Total voters
    7

Mouradif

Villager
Member
Joined
Jan 16, 2022
Messages
20
Reaction score
14
First Language
English
Primarily Uses
RMMZ
Preliminary context
I'll deviate a tiny bit from the template to give some context. As you all know, when using Git as a VCS, for every modified file, the differences between versions are computed line-by-line. Currently when pressing the Save button (or Ctrl/Cmd + S) on the RPG Maker editor, the database elements and maps are saved into their dedicated JSON files in an almost minified form. In map files for example, all tiles data are saved in a single line. So after changing one tile in a map, the diff on Git well show the whole line that contains all tiles data as changed making diffs (1) bigger and (2) harder to understand. In case two contributors in the same RPG game made changes in the same map where one person changed the sprite of an event and one person corrected a typo in a message box from that event's instruction list, Git will detect a merge conflict because both contributors have changed the same line. This could be easily avoided with this feature.

Description of the Feature:
  • Save the JSON data files in a fully prettified version
  • Only minify the JSONs when building the final game

Mockups:
Nothing visually changes on the editor but then for example, System.json would look like this:
JSON:
{
  "advanced": {
    "gameId": 32917713,
    "screenWidth": 816,
    "screenHeight": 624,
    "uiAreaWidth": 816,
    "uiAreaHeight": 624,
    "numberFontFilename": "mplus-2p-bold-sub.woff",
    "fallbackFonts": "Verdana, sans-serif",
    "fontSize": 16,
    "mainFontFilename": "Berry Rotunda.woff",
    "windowOpacity": 192,
    "screenScale": 1
  },
  "airship": {
    "bgm": {
      "name": "Ship3",
      "pan": 0,
      "pitch": 100,
      "volume": 90
    },
    "characterIndex": 3,
    "characterName": "Vehicle",
    "startMapId": 0,
    "startX": 0,
    "...": "..."

}


Why is this feature good?
This feature is great because of the following:
  • Makes it easier to work with GIT
  • The Data files are even more human-readable

Possible issues with this feature?
Issues that might arise from this feature:
  • Slightly more storage used in the project file (Tested in a game with 98 maps: 11.1MB minified VS 12.6MB Formatted)
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
4,629
Reaction score
3,750
First Language
EN
Primarily Uses
RMMZ
Related:
 

Latest Threads

Latest Posts

Latest Profile Posts

ialfabeiufbgaeyiufgouigfeuagfiebauofvuafuvaufvuiavetgfvgfeiuyfvafuaguydg.
Happy Pride Month! I actually have a game character named Lazura Landerson who is a lesbian, and she's a Cosmic Magi who works on a starship. She's dating another Cosmic Magi named Ciara Kendren, and the two plan to marry someday. As for me, I'm straight... but you're free to choose who you want to be.
Had a dream about ending the project. I think I need a bit of a break, or to keep dev stuff lighter. And not take it super seriously. Don't think its normal to have nightmares over game stuff.
I don't wanna go to work. I want to go back to bed.
A Littlefish classic. I forgot to eat dinner and now I'm wondering how to turn the entire contents of my fridge into an abominable yet strangely satisfying breakfast.

Forum statistics

Threads
131,591
Messages
1,221,355
Members
173,298
Latest member
max80000
Top